Disclosure of Invention
Based on this, it is necessary to provide a remote debugging method, device, electronic equipment and storage medium for an embedded web page of an application program, aiming at the problems that the debugging process based on the existing remote debugging of the embedded web page of the application program is too professional and too complex.
In a first aspect, an embodiment of the present application provides a remote debugging method for an embedded web page of an application program, where the method is applied to a debugging server, and the method includes:
receiving a request for establishing debugging connection with a second client sent by a first client;
responding to the request, and establishing debug connection between the first client and the second client through the transferred debug server;
Receiving a request to be debugged of the first client and sending the request to be debugged to the second client under the condition that the first client and the second client successfully establish debug connection;
and receiving script content generated by the second client according to the to-be-debugged request, and sending the script content to the first client for automatic debugging.
In one possible implementation manner, before the receiving the request sent by the first client to establish the debug connection with the second client, the method further includes:
receiving an instruction for creating a debug channel sent by the second client;
And creating a debug channel according to the instruction, and sending a channel identifier corresponding to the debug channel to the second client.
In one possible implementation, the establishing a debug connection between the first client and the debug server in response to the request includes:
Acquiring the channel identification corresponding to the debug channel;
And matching the corresponding channel in a database according to the channel identification, if the corresponding channel is matched in the database, generating a user token corresponding to the channel, and returning the user token to the first client.
In one possible implementation manner, the obtaining the channel identifier corresponding to the debug channel includes:
the first client sends the channel identification to the second client;
the second client sends the channel identification to the debug server.
In one possible implementation, the method further includes:
And receiving an overlay code generated by the second client according to the to-be-debugged request, and sending the overlay code to the first client so as to overlay the original code of the to-be-debugged page through the overlay code.
In a second aspect, an embodiment of the present application provides a remote debugging method for an embedded web page of an application program, where the method is applied to a first client, and the method includes:
Responding to touch operation of a user, opening a page to be debugged of an application program, and inputting a channel identifier corresponding to a channel to be entered on the page to be debugged;
Sending a request for establishing debugging connection with the second client to the debugging server;
Responding to the request, and establishing debug connection with the debug server;
And under the condition that the first client and the debugging server successfully establish debugging connection, sending the request to be debugged to the debugging server so as to forward the request to be debugged to the second client.
In one embodiment, the sending the debug request to the debug server includes:
And acquiring a content screenshot of the page to be debugged according to a first preset mode at intervals of preset time, and sending the content screenshot to the debugging server so as to forward the content screenshot to the second client.
In one embodiment, the sending the debug request to the debug server includes:
rewriting a control console log method according to a second preset mode;
And sending the console log data received based on the rewritten console log method to the debugging server to forward the console log data to the second client.
In one embodiment, the sending the debug request to the debug server includes:
A network request log method is rewritten according to a third preset mode;
And sending the network request log data received based on the rewritten network request log method to the debugging server to forward the network request log data to the second client.
In one embodiment, the method further comprises:
Receiving a touch instruction of the debugging server, wherein the touch instruction carries click position data corresponding to the click operation of the second client, and the click position data comprises an abscissa of a click position and an ordinate of the click position;
and executing corresponding clicking operation according to the clicking position data in the touch instruction.
In a third aspect, an embodiment of the present application provides a remote debugging method for an embedded web page of an application program, where the method is applied to a second client, and the method includes:
Transmitting an instruction for creating a debug channel to a debug server to create the debug channel in response to the instruction;
receiving a channel identifier corresponding to a debug channel created by the debug server;
Transmitting the channel identifier to a first client in at least one preset mode to respond to touch operation of a user to open a page to be debugged of a corresponding application program, and inputting the channel identifier on the page to be debugged;
responding to a request which is sent to the debugging server by a first client and used for establishing debugging connection with the first client, and establishing debugging connection with the debugging server;
Receiving a request to be debugged of the first client under the condition that the second client and the debugging server successfully establish debugging connection;
Generating corresponding script content according to the to-be-debugged request, and sending the script content to the first client for automatic debugging.
In one embodiment, the method further comprises:
Generating corresponding overlay codes according to the to-be-debugged request, and sending the overlay codes to the first client so as to overlay the original codes of the to-be-debugged page through the overlay codes.
In one embodiment, the method further comprises:
And responding to the clicking operation of the second client to click the target area of the page to be debugged, generating clicking position data corresponding to the clicking operation, and sending the clicking position data to the debugging server to forward the clicking position data to the first client, wherein the clicking position data comprises an abscissa of the clicking position and an ordinate of the clicking position.
In a fourth aspect, an embodiment of the present application provides a remote debugging device for an embedded web page of an application program, where the device is applied to a debugging server, and the device includes:
the first receiving module is used for receiving a request for establishing debugging connection with the second client, which is sent by the first client;
the first debugging connection establishment module is used for responding to the request received by the first receiving module, and the first client and the second client establish debugging connection through the transferred debugging server;
The second receiving module is used for receiving a request to be debugged of the first client under the condition that the debugging connection establishment module successfully establishes debugging connection between the first client and the second client;
The first sending module is used for sending the to-be-debugged request received by the second receiving module to the second client;
The third receiving module is used for receiving script content generated by the second client according to the to-be-debugged request sent by the first sending module;
And the second sending module is used for sending the script content received by the third receiving module to the first client for automatic debugging.
In a fifth aspect, an embodiment of the present application provides a remote debugging device for an application embedded web page, where the device is applied to a first client, and the device includes:
The opening and inputting module is used for responding to the touch operation of a user, opening a page to be debugged of an application program, and inputting a channel identifier corresponding to a channel to be entered on the page to be debugged;
the third sending module is used for sending a request for establishing debugging connection with the second client to the debugging server;
The second debug connection establishment module is used for responding to the request sent by the sending module and establishing debug connection with the debug server;
and the fourth sending module is used for sending the request to be debugged to the debugging server so as to forward the request to be debugged to the second client under the condition that the second debugging connection establishment module successfully establishes the debugging connection between the first client and the debugging server.
In a sixth aspect, an embodiment of the present application provides a remote debugging device for an embedded web page of an application, where the device is applied to a second client, and the device includes:
a fifth transmitting module for transmitting an instruction for creating a debug channel to a debug server to create the debug channel in response to the instruction;
A fourth receiving module, configured to receive a channel identifier corresponding to a debug channel created by the debug server;
A sixth sending module, configured to send the channel identifier to a first client in at least one preset manner, so as to open a page to be debugged of a corresponding application program in response to a touch operation of a user, and input the channel identifier on the page to be debugged;
the third debug connection establishment module is used for responding to a request which is sent to the debug server by the first client and is used for establishing debug connection with the debug server, and establishing debug connection with the debug server;
A fifth receiving module, configured to receive a request to be debugged of the first client when the third debug connection establishment module successfully establishes debug connection with the second client and the debug server;
The generation module is used for generating corresponding script content according to the to-be-debugged request received by the fifth receiving module;
and the seventh sending module is used for sending the script content generated by the generating module to the first client side so as to automatically debug.
In a seventh aspect, an embodiment of the present application provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor running the computer program to implement the method steps as described above.
In an eighth aspect, embodiments of the present application provide a computer readable storage medium having stored thereon a computer program for execution by a processor to perform the method steps described above.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
In the embodiment of the application, a request for establishing debugging connection with a second client sent by a first client is received; responding to the request, and establishing debug connection between the first client and the second client through a transit debug server; under the condition that the first client and the second client successfully establish debugging connection, receiving a request to be debugged of the first client, and sending the request to be debugged to the second client; and receiving script content generated by the second client according to the to-be-debugged request, and sending the script content to the first client for automatic debugging. According to the remote debugging method provided by the embodiment of the disclosure, under the condition that the first client and the second client successfully establish debugging connection, script content generated by the second client according to a to-be-debugged request can be received and sent to the first client for automatic debugging, so that a user of the first client does not need to have professional knowledge of various parameters of an embedded webpage of a debugging application program, the user experience is effectively improved, and it is to be understood that the general description and the following detailed description are only exemplary and explanatory and are not restrictive to the application.
Detailed Description
The following description and the drawings sufficiently illustrate specific embodiments of the invention to enable those skilled in the art to practice them.
It should be understood that the described embodiments are merely some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Alternative embodiments of the present disclosure are described in detail below with reference to the drawings.
As shown in fig. 1, an embodiment of the present disclosure provides a remote debugging method for an embedded web page of an application program, where the method is applied to a debugging server, and specifically includes the following method steps:
S102: and receiving a request for establishing debugging connection with the second client, which is sent by the first client.
In the embodiment of the application, the first client corresponds to a problem that the embedded webpage of the application program used by the user is wrong, for example, the content displayed by the webpage is incomplete, and the like. And will not be described in detail herein. The second client is a developer, and can see where the problem occurs according to the page content and the page data of the user forwarded by the debugging server, so that the parameters can be adjusted in a targeted manner, and the purpose of remote debugging is achieved.
Fig. 2 is a schematic flow chart of a remote debugging method for an embedded web page of an application program in a specific application scenario according to an embodiment of the present disclosure.
As shown in fig. 2, the remote debugging method in a specific application scenario includes the following steps:
starting;
the developer (second client) sends a command for creating a debug channel;
the debugging server returns a channel ID (identification) after creating the channel;
The developer (second client) sends the channel ID to the user (first client) through channels such as WeChat/telephone;
A user (a first client) opens a debugging page at an APP end and inputs a channel ID;
The debugging connection between the first client and the second client is established successfully;
starting debugging;
and (5) finishing debugging.
Fig. 3 is a schematic flow chart of a multi-end execution body of a remote debugging method for an embedded web page of an application program in a specific application scenario according to an embodiment of the present disclosure.
As shown in the flow chart of the multi-terminal execution body in fig. 3, similar to the steps in fig. 2, after the debug connection is established successfully between the first client user and the second client developer, the second client developer performs debug according to the H5 frame, the Html structure, the CSS style and the interface request record sent by the first client, and executes script and click operations.
The remaining steps based on fig. 3 are not repeated, and refer to the description of the same or similar parts of fig. 2.
Fig. 4 is a schematic flow chart of a multi-end execution body of a remote debugging method for an embedded web page of an application program in another specific application scenario according to an embodiment of the present disclosure.
Fig. 4 is similar to fig. 3, and the description of fig. 4 is referred to the description of fig. 3, and is not repeated here.
In one possible implementation manner, before receiving the request sent by the first client to establish the debug connection with the second client, the method further includes the following steps:
Receiving an instruction sent by a second client side and used for creating a debug channel;
And creating the debug channel according to the instruction, and sending a channel identifier corresponding to the debug channel to the second client.
In the embodiment of the present application, the channel identifier may be identified by unique numbers such as numbers 1, 2, and 3, for example, the unique channel identifier corresponding to the channel 1 is 1, which is not described herein in detail.
S104: and responding to the request, and establishing a debugging connection between the first client and the second client through the transit debugging server.
Fig. 5 is a schematic diagram of a new debug channel in a specific application scenario according to an embodiment of the present disclosure. As shown in fig. 5, the interface of the newly created debug channel includes the following information:
channel ID, currently newly created channel ID;
the prompt document "wait for client to join..etc. is used to prompt the developer, and at this time, the user should wait for the channel access operation.
In one possible implementation, establishing a debug connection between a first client and a debug server in response to a request includes the steps of:
Acquiring a channel identifier corresponding to a debug channel;
And matching the corresponding channels in the database according to the channel identifiers, generating user tokens corresponding to the channels if the corresponding channels are matched in the database, and returning the user tokens to the first client.
By the above way, a debug connection can be established between the first client and the debug server.
In one possible implementation manner, obtaining the channel identifier corresponding to the debug channel includes the following steps:
The first client sends the channel identification to the second client;
the second client sends the channel identification to the debug server.
S106: and under the condition that the first client and the second client successfully establish the debugging connection, receiving a request to be debugged of the first client, and sending the request to be debugged to the second client.
In the embodiment of the application, the to-be-debugged request includes the picture content and the picture data of the to-be-debugged page, and the to-be-debugged page is sent to the second client through the forwarding function of the debug server, so that a developer of the second client can also see the same to-be-debugged page as the first client on the computer equipment of the second client.
Fig. 6 is a schematic diagram of a debug interface of a second client developer in a specific application scenario according to an embodiment of the present disclosure.
As shown in fig. 6, the debug interface is divided into left and right areas;
The left area is a screen preview and control area;
The right area is divided into an upper area, a middle area and a lower area, wherein the top area is a console log area, the middle area is a network request log area, and the bottom area is an execution script editing area;
The screen preview area displays content: a real-time screenshot picture of the h5 page in the user client webview;
console log area content: all debug log content of the h5 page in the user's client webview (e.g., data printed by h5 call log method);
Web request log area content: all web request logs that occur in the h5 page within the user client webview;
Executing script editing area: is a code editor where a developer can write a script. The send button in the lower right corner may send the script to the h5 page in user client webview and perform script editing.
S108: and receiving script content generated by the second client according to the to-be-debugged request, and sending the script content to the first client for automatic debugging.
Fig. 7 is a schematic diagram of forwarding flow of a debug server in a specific application scenario provided by an embodiment of the present disclosure;
As shown in fig. 7, when a message from a first client is received, the channel ID (identification) of the first client is compared with the channel_id of each channel object in the channel array in turn, if the channel_id of a certain channel object is the same as the channel ID of the received message, devConnection in the object is the user link object and the developer object of the current channel, and the devconnection () method is called to forward the message to the developer. When a message from the developer browser is received, the same method finds, calls userconnection.send () to forward the message to the first client.
The following description is made for the message forwarding function of the debug server: when both the user application end and the developer web end are connected with the WebSocket service, the WebSocket service may receive messages from both sides. For processing the message, onmessage event handling functions are defined at the debug server, which can be executed upon receipt of the message. The specific method is as follows: the on method of the connection object is called, and a onmessage callback function is defined at the second parameter of the method, onmessage is executed when a message (from the user client) is received.
In one possible implementation manner, the remote debugging method provided by the embodiment of the disclosure further includes the following steps:
Receiving a coverage code generated by a second client according to a to-be-debugged request, and sending the coverage code to the first client so as to cover the original code of the to-be-debugged page through the coverage code; thus, the purpose of rapid remote debugging can be realized.
The embodiment of the disclosure provides a remote debugging method for an embedded webpage of an application program, which is applied to a first client, and comprises the following steps:
Step a1: responding to touch operation of a user, opening a page to be debugged of an application program, and inputting a channel identifier corresponding to a channel to be entered on the page to be debugged;
step a2: sending a request for establishing debugging connection with the second client to the debugging server;
step a3: responding to the request, and establishing a debugging connection with a debugging server;
step a4: and under the condition that the first client and the debugging server successfully establish the debugging connection, sending a request to be debugged to the debugging server so as to forward the request to be debugged to the second client.
The remote debugging method is that the user stands on the first client, and for the same or similar description, refer to the description of the debugging server, and the description is not repeated here.
In one possible implementation, sending the request to be debugged to the debug server includes the steps of:
and acquiring a content screenshot of the page to be debugged according to a first preset mode at intervals of preset time, and sending the content screenshot to a debugging server to forward the content screenshot to a second client.
In the embodiment of the present application, the first preset manner may be: the first client calls WebView, getdragwidth cache () mode once every 0.5 seconds to obtain a content screenshot displayed by WebView, and other preset modes may also be available, which will not be described herein.
In the embodiment of the present application, the interval preset time is not particularly limited, and for example, the interval preset time may be set to 0.5 seconds.
In one possible implementation, sending the request to be debugged to the debug server includes the steps of:
rewriting a control console log method according to a second preset mode;
and sending the console log data received based on the rewritten console log method to a debugging server to forward the console log data to the second client.
In the embodiment of the present application, the second preset manner may be: the first client may rewrite onConsoleMessage () manner in Webview, and may have other preset manners, which are not described herein.
In one possible implementation, sending the request to be debugged to the debug server includes the steps of:
A network request log method is rewritten according to a third preset mode;
And sending the network request log data received based on the rewritten network request log method to a debugging server to forward the network request log data to a second client.
In the embodiment of the present application, the third preset manner may be: the first client rewrites shouldInterceptRequest, which is called when the H5 in WebView requests (including loading html, pictures, etc.) and may have other preset modes, which are not described herein.
In one possible implementation manner, the remote debugging method provided by the embodiment of the disclosure further includes the following steps:
receiving a touch instruction of the debugging server, wherein the touch instruction carries click position data corresponding to click operation of the second client, and the click position data comprises an abscissa of the click position and an ordinate of the click position;
Executing corresponding clicking operation according to the clicking position data in the touch instruction; therefore, the clicking operation can be synchronously executed between the second client and the first client, which is equivalent to the clicking operation of the developer of the second client on the interface to be debugged of the application program of the user of the first client, so that the real-time effect of the script content for debugging the defects of the interface to be debugged is tested.
The embodiment of the disclosure provides a remote debugging method for an embedded webpage of an application program, which is applied to a second client, and comprises the following steps:
step b1: transmitting an instruction for creating a debug channel to a debug server to create the debug channel in response to the instruction;
The following description is made regarding the creation process of the debug channel by the debug server in response to the instruction: after receiving the instruction, the debug server adds a record in the channel table, including the channel ID and the second client developer Token (generated randomly), and returns the channel ID and the developer Token to the browser of the second client developer. Meanwhile, the server starts a WebSocket service, which is equivalent to establishing a debug channel.
And establishing connection between the browser of the second client developer and the WebSocket service of the debugging server, wherein the browser of the second client developer carries a channel ID and a Token of the second client developer, the ID indicates which channel is to be added, the Token corresponds to a secret key and indicates which second client developer is in particular, and thus the second client developer adds the channel. The ID is a number such as 12345. The Token format is a 128-length random string, e.g., ej1k23j12.
Step b2: receiving a channel identifier corresponding to a debug channel created by a debug server;
step b3: transmitting the channel identification to the first client in at least one preset mode to respond to touch operation of a user to open a page to be debugged of a corresponding application program, and inputting the channel identification on the page to be debugged; the preset mode may be WeChat, telephone, etc., which is not limited herein;
Step b4: responding to a request which is sent to a debugging server by a first client and used for establishing debugging connection with the first client, and establishing debugging connection with the debugging server;
step b5: receiving a request to be debugged of the first client under the condition that the second client and the debugging server successfully establish debugging connection;
Step b6: generating corresponding script content according to the to-be-debugged request, and sending the script content to the first client for automatic debugging.
The remote debugging method is that the second client developer stands on, and for the same or similar description, refer to the description of the debugging server, and the description is not repeated here.
In one possible implementation manner, the remote debugging method provided by the embodiment of the disclosure further includes the steps of:
generating a corresponding coverage code according to the to-be-debugged request, and sending the coverage code to the first client so as to cover the original code of the to-be-debugged page through the coverage code; therefore, the original code can be covered by the cover code, and the real-time debugging condition of the page to be debugged corresponding to the cover code can be seen in real time.
In one possible implementation manner, the remote debugging method provided by the embodiment of the disclosure further includes the following steps:
Responding to a clicking operation of a second client to click a target area of a page to be debugged, generating clicking position data corresponding to the clicking operation, and sending the clicking position data to a debugging server to forward the clicking position data to the first client, wherein the clicking position data comprises an abscissa of the clicking position and an ordinate of the clicking position; therefore, the clicking operation can be synchronously executed between the second client and the first client, which is equivalent to the clicking operation of the developer of the second client on the interface to be debugged of the application program of the user of the first client, so that the real-time effect of the script content for debugging the defects of the interface to be debugged is tested.
In the embodiment of the disclosure, a request for establishing debug connection with a second client sent by a first client is received; responding to the request, and establishing debug connection between the first client and the second client through a transit debug server; under the condition that the first client and the second client successfully establish debugging connection, receiving a request to be debugged of the first client, and sending the request to be debugged to the second client; and receiving script content generated by the second client according to the to-be-debugged request, and sending the script content to the first client for automatic debugging. According to the remote debugging method provided by the embodiment of the disclosure, under the condition that the first client and the second client successfully establish debugging connection, script content generated by the second client according to a to-be-debugged request can be received, and the script content is sent to the first client for automatic debugging, so that a user of the first client does not need to have professional knowledge of various parameters of an embedded webpage of a debugging application program, and the user experience is effectively improved.
The following is an embodiment of a remote debugging device for implementing an application embedded web page of the present disclosure, which may be used to execute the remote debugging method embodiment of the application embedded web page of the embodiment of the present disclosure. For details not disclosed in the embodiments of the remote debugging device for the embedded web page of the application program in the embodiments of the present disclosure, please refer to the embodiments of the remote debugging method for the embedded web page of the application program in the embodiments of the present disclosure.
Referring to fig. 8, a schematic structural diagram of a remote debugging device for an application embedded web page according to an exemplary embodiment of the invention is shown. The remote debugging means of the application embedded web page may be implemented as all or part of the terminal by software, hardware or a combination of both. The remote debugging device for the embedded web page of the application program comprises a first receiving module 802, a first debugging connection establishment module 804, a second receiving module 806, a first sending module 808, a third receiving module 810 and a second sending module 812.
Specifically, a first receiving module 802 is configured to receive a request sent by a first client to establish a debug connection with a second client;
a first debug connection establishment module 804, configured to establish a debug connection between the first client and the second client through the transferred debug server in response to the request received by the first receiving module 802;
a second receiving module 806, configured to receive a request to be debugged of the first client when the debug connection establishment module successfully establishes a debug connection between the first client and the second client;
a first sending module 808, configured to send the to-be-debugged request received by the second receiving module 806 to the second client;
A third receiving module 810, configured to receive script content generated by the second client according to the to-be-debugged request sent by the first sending module 808;
The second sending module 812 is configured to send the script content received by the third receiving module 810 to the first client for automatic debugging.
Optionally, the apparatus further includes:
A sixth receiving module (not shown in fig. 8) configured to receive, before the first receiving module 802 receives a request sent by the first client to establish a debug connection with the second client, an instruction sent by the second client to create a debug channel;
A channel creation module (not shown in fig. 8) for creating a debug channel according to the instruction received by the sixth receiving module;
An eighth transmitting module (not shown in fig. 8) is configured to transmit the channel identifier corresponding to the debug channel created by the channel creation module to the second client.
Optionally, the first debug connection establishment module 804 is specifically configured to:
Acquiring a channel identifier corresponding to a debug channel;
And matching the corresponding channels in the database according to the channel identifiers, generating user tokens corresponding to the channels if the corresponding channels are matched in the database, and returning the user tokens to the first client.
Optionally, the first debug connection establishment module 804 is specifically configured to:
The first client sends the channel identification to the second client;
the second client sends the channel identification to the debug server.
Optionally, the apparatus further includes:
a seventh receiving module (not shown in fig. 8) for receiving the overlay code generated by the second client according to the request to be debugged;
a ninth sending module (not shown in fig. 8) is configured to send the overlay code received by the seventh receiving module to the first client to overlay the original code of the page to be debugged with the overlay code.
It should be noted that, when the remote debugging device provided in the above embodiment performs the remote debugging method, only the division of the above functional units is used for illustration, and in practical application, the above functional allocation may be performed by different functional units according to needs, that is, the internal structure of the device is divided into different functional units, so as to complete all or part of the functions described above. In addition, the remote debugging device and the remote debugging method provided in the above embodiments belong to the same concept, and the implementation process is detailed in the remote debugging method embodiment, which is not repeated here.
In the embodiment of the disclosure, a first receiving module is used for receiving a request sent by a first client to establish debug connection with a second client; the first debugging connection establishment module is used for responding to the request received by the first receiving module, and the first client and the second client establish debugging connection through the transferred debugging server; the second receiving module is used for receiving a request to be debugged of the first client under the condition that the debugging connection establishment module successfully establishes debugging connection between the first client and the second client; the first sending module is used for sending the to-be-debugged request received by the second receiving module to the second client; the third receiving module is used for receiving script content generated by the second client according to the to-be-debugged request sent by the first sending module; and the second sending module is used for sending the script content received by the third receiving module to the first client for automatic debugging. According to the remote debugging device provided by the embodiment of the disclosure, under the condition that the first client and the second client successfully establish debugging connection, script content generated by the second client according to a to-be-debugged request can be received, and the script content is sent to the first client for automatic debugging, so that a user of the first client does not need to have professional knowledge of various parameters of an embedded webpage of a debugging application program, and the user experience is effectively improved.
As shown in fig. 9, the present embodiment provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor running the computer program to implement the method steps as described above.
The disclosed embodiments provide a storage medium storing computer readable instructions having a computer program stored thereon, the program being executed by a processor to perform the method steps described above.
Referring now to fig. 9, a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 9 is merely an example, and should not impose any limitations on the functionality and scope of use of embodiments of the present disclosure.
As shown in fig. 9, the electronic device may include a processing means (e.g., a central processor, a graphics processor, etc.) 901, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 902 or a program loaded from a storage means 908 into a Random Access Memory (RAM) 903. In the RAM903, various programs and data required for the operation of the electronic device are also stored. The processing apparatus 901, the ROM902, and the RAM903 are connected to each other through a bus 909. An input/output (I/O) interface 905 is also connected to the bus 904.
In general, the following devices may be connected to the I/O interface 905: input devices 906 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 907 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 908 including, for example, magnetic tape, hard disk, etc.; and a communication device 909. Communication means 909 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While fig. 9 shows an electronic device having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 909, or installed from the storage device 908, or installed from the ROM 902. When executed by the processing device 901, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.