Method and server for memorizing operation of mobile terminalTechnical Field
The invention relates to the field of computers, in particular to a method and a server for memorizing mobile terminal operation.
Background
With the popularization of networks and the explosive increase of the number of mobile users in recent years, mobile terminals are becoming Personal information processing devices important as PCs (Personal computers), and there is an increasing demand for mobile terminals, and it is desired to operate mobile terminals stably.
In the prior art, before the mobile terminal is put on the market, a manufacturer can test the stability of the mobile terminal. During testing, a user generally operates the mobile terminal to obtain operation information, and then tests the mobile terminal according to the operation information.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems: when the user operates the mobile terminal for multiple times to obtain multiple times of operation information, the repetitive labor of the user is strong, and one operation is repeated for multiple times, so that other unpredictable bugs are easy to appear on the mobile terminal.
Disclosure of Invention
In order to reduce the repetitive labor of a user and avoid other bugs of a mobile terminal, the embodiment of the invention provides a method and a server for memorizing the operation of the mobile terminal. The technical scheme is as follows:
in one aspect, a method for memorizing the operation of a mobile terminal is provided, the method comprising:
monitoring the mobile terminal;
when the operation of the mobile terminal by the user is monitored, acquiring coordinate information generated when the mobile terminal is operated by the user, and storing the coordinate information;
and calling the mobile terminal to operate according to the coordinate information.
The obtaining of the coordinate information generated by the user operating the mobile terminal specifically includes:
and acquiring coordinate information reported by the mobile terminal, wherein the coordinate information is generated when a user operates the mobile terminal.
The calling the mobile terminal to operate according to the coordinate information specifically includes:
sending an instruction to the mobile terminal, wherein the instruction carries the coordinate information;
and running the coordinate information on the mobile terminal, and calling the mobile terminal to operate.
Wherein the operation of the mobile terminal by the user specifically includes: click operation, long press operation, or slide operation.
The coordinate information generated when the user operates the mobile terminal specifically includes:
when the user operation is click operation, generating coordinate information, wherein the coordinate information comprises a horizontal coordinate value, a vertical coordinate value and a time coordinate value, and the time coordinate value is 0; or,
when the user operation is a long-press operation, generating first pair of coordinate information, wherein the horizontal and vertical coordinate values of the first pair of coordinate information are the same, and the time coordinate values are different; or,
when the user operates the sliding operation, a second pair of coordinate information is generated, and the horizontal coordinate value and the vertical coordinate value of the second pair of coordinate information are different, and the time coordinate value is different.
On the other hand, an embodiment of the present invention further provides a server, where the server includes:
the monitoring module is used for monitoring the mobile terminal;
the acquisition module is used for acquiring coordinate information generated when the mobile terminal is operated by a user and storing the coordinate information when the monitoring module monitors that the mobile terminal is operated by the user;
and the operation module is used for calling the mobile terminal to operate according to the coordinate information stored by the acquisition module.
The acquisition module specifically comprises an acquisition unit and a storage unit;
the acquiring unit is used for acquiring coordinate information reported by the mobile terminal, wherein the coordinate information is generated when a user operates the mobile terminal;
the storage unit is used for storing the coordinate information acquired by the acquisition unit.
The operation module specifically comprises a sending unit and an operation unit;
the sending unit is used for sending an instruction to the mobile terminal, and the instruction carries the coordinate information;
and the operation unit is used for operating the coordinate information sent by the sending unit on the mobile terminal and calling the mobile terminal to operate.
Wherein the operation of the mobile terminal by the user specifically includes: click operation, long press operation, or slide operation.
The coordinate information generated when the user operates the mobile terminal specifically includes:
when the user operation is click operation, generating coordinate information, wherein the coordinate information comprises a horizontal coordinate value, a vertical coordinate value and a time coordinate value, and the time coordinate value is 0; or,
when the user operation is a long-press operation, generating first pair of coordinate information, wherein the horizontal and vertical coordinate values of the first pair of coordinate information are the same, and the time coordinate values are different; or,
when the user operates the sliding operation, a second pair of coordinate information is generated, and the horizontal coordinate value and the vertical coordinate value of the second pair of coordinate information are different, and the time coordinate value is different.
The technical scheme provided by the embodiment of the invention has the following beneficial effects: when a user operates the mobile terminal, the operation of the user is monitored through the server to obtain the operation information of the user, the operation information is stored, and then the mobile terminal can be operated for many times according to the operation information to test the mobile terminal, and the user does not need to operate the mobile terminal for many times to test the mobile terminal.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a method for memorizing mobile terminal operations according to embodiment 1 of the present invention;
fig. 2 is a flowchart of a method for memorizing mobile terminal operations according to embodiment 2 of the present invention;
fig. 3 is a schematic structural diagram of a server provided in embodiment 3 of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Example 1
An embodiment of the present invention provides a method for memorizing an operation of a mobile terminal, and referring to fig. 1, the method includes:
step 101: monitoring the mobile terminal;
step 102: when monitoring that a user operates the mobile terminal, acquiring coordinate information generated when the user operates the mobile terminal, and storing the coordinate information;
step 103: and calling the mobile terminal to operate according to the coordinate information.
According to the method provided by the embodiment of the invention, when the user operates the mobile terminal, the operation of the user is monitored by the server to obtain the operation information of the user, and the operation information is stored, so that the mobile terminal can be operated for many times according to the operation information to test the mobile terminal, and the user does not need to operate the mobile terminal for many times to test the mobile terminal.
Example 2
Referring to fig. 2, an embodiment of the present invention provides a method for memorizing an operation of a mobile terminal, where the method includes:
201: the server is in communication connection with the mobile terminal;
specifically, the server may perform communication connection with the mobile terminal through the USB interface, or may perform communication connection with the mobile terminal through a wireless communication manner. The mobile terminal may be a mobile phone, a notebook, a PDA (Personal Digital Assistant), a POS (Point Of Sale) machine, a vehicle-mounted computer, and the like, and the server may be a PC, and the like.
202: the server monitors the mobile terminal, and executes step 203 when monitoring that the user operates the mobile terminal;
the embodiment of the invention sets a monitoring function in the server to monitor the user operation of the mobile terminal. For a mobile terminal, when a user operates the mobile terminal, operation information is generated, and the operation of the user on the mobile terminal includes three types: the embodiment of the invention can record user operation in a coordinate mode aiming at click operation, long-time press operation and sliding operation.
203: acquiring coordinate information generated when a user operates the mobile terminal;
specifically, when a user operates the mobile terminal, a click event is triggered to generate coordinate information on the mobile terminal, and the coordinate information is reported to the server, where the form of the coordinate information may be multiple, such as (x, y, t) form or (x, y) form, and includes a parameter t form, and the like.
As an implementation manner, the coordinate information is in the form of (x, y, t), and when the operation of the user on the mobile terminal is a click operation, the mobile terminal generates a piece of coordinate information (x, y, t)1,y20); when the operation of the user on the mobile terminal is a long press operation, one coordinate information is generated on the mobile terminal when the user presses down and pops up, namely, a pair of coordinate information is generated during the long press operation, the horizontal coordinate value and the vertical coordinate value of the pair of coordinate information are the same, the time coordinate value is different, and at the moment, the coordinate information respectively generated by the mobile terminal is (x)1,y1,t1) And (x)1,y1,t2) (ii) a When the operation of the user on the mobile terminal is a sliding operation, coordinate information is generated on the mobile terminal when the user presses down and pops up, namely, a coordinate information is generated during the sliding operationFor coordinate information, the horizontal and vertical coordinate values of the coordinate information are different, and the time coordinate value is different, at this time, the coordinate information generated by the mobile terminal is (x)1,y1,t1) And (x)2,y2,t2)。
As another implementation manner, the coordinate information is in the form of (x, y, t), and when the operation of the user on the mobile terminal is a click operation, the mobile terminal generates a piece of coordinate information (x, y, t)1,y1) (ii) a When the operation of the user on the mobile terminal is a long press operation, the mobile terminal generates coordinate information when the user presses and pops up, namely, a pair of coordinate information is generated when the user presses and pops up, the horizontal and vertical coordinate values of the pair of coordinate information are the same, the time coordinate values are different, and at the moment, the coordinate information respectively generated by the mobile terminal is (x)1,y1) And t = t1And (x)1,y1) And t = t2(ii) a When the operation of the user on the mobile terminal is a sliding operation, the mobile terminal generates a pair of coordinate information when the user presses and pops up, namely the sliding operation generates a pair of coordinate information, the horizontal and vertical coordinate values of the pair of coordinate information are different, the time coordinate values are different, and at the moment, the coordinate information respectively generated by the mobile terminal is (x)1,y1) And t = t1And (x)2,y2) And t = t2。
In practical application, when the server monitors that the user operates the mobile terminal for multiple times, coordinate information corresponding to the multiple operations is acquired, and at the server, for each operation of the user, a set of coordinate information corresponds to each operation of the user, for example, when the user operates as a click operation, a corresponding set of coordinate information is one set of coordinate information: (x)1,y10) or (x)1,y1) (ii) a When the user operation is a long press operation, a group of coordinate information corresponding to the server is two coordinate information: (x)1,y1,t1) And (x)1,y1,t2) Or (x)1,y1) And t = t1And (x)1,y1) And ist=t2(ii) a When the user operation is a sliding operation, a group of coordinate information corresponding to the server is two coordinate information: (x)1,y1,t1) And (x)2,y2,t2) Or (x)1,y1) And t = t1And (x)2,y2) And t = t2。
204: the server stores the acquired coordinate information;
specifically, the server collects coordinate information reported by the mobile terminal and stores the coordinate information so as to facilitate the subsequent playback of the user operation according to the coordinate information.
When the server stores the coordinate information, a blank table may be preset, and the coordinate information is stored in the table, so that a group of coordinate information relationships is established in the table, for example, a group of coordinate information in the table is (x)1,y1,t1) And (x)1,y1,t2) And then, the user operation corresponding to the group of coordinate information can be known as long-press operation.
The embodiment of the invention does not limit the position of the server for storing the coordinate information, can preset a default position information, and stores the coordinate information to the default position information every time the coordinate information is acquired; or after the coordinate information is acquired for the first time, setting a piece of position information for the coordinate information to store, storing the coordinate information to the set position information, and when different coordinate information is received subsequently, storing the coordinate information to the set position information.
205: and the server reads the stored coordinate information and sends the coordinate information to the mobile terminal, so that the mobile terminal performs automatic operation according to the coordinate information.
Specifically, a playback function is arranged on the server, coordinate information stored on the server is read through the playback function, and the mobile terminal is called to perform automatic operation according to the coordinate information. In practical application, the server can send a calling instruction to the mobile terminal, the calling instruction carries coordinate information, after the mobile terminal receives the instruction, automatic operation is carried out on the mobile terminal according to the coordinate information carried in the instruction, then automatic testing can be carried out on the mobile terminal, the mobile terminal is tested according to the memorized coordinate information, and stability of testing the mobile terminal is achieved.
The automatic test is to perform a memory function and a playback function according to the specific operation steps of the user, so that the automatic test of the mobile terminal is realized; the stability test is to use a specific scene operated by a user to realize the stability test of the mobile terminal. The method and the device are suitable for the test scene of the mobile terminal, in particular for the test of the mobile terminal of an Android operating system, such as the test scene of a mobile phone of the Android operating system.
According to the method provided by the embodiment of the invention, when the user operates the mobile terminal, the operation of the user is monitored by the server to obtain the operation information of the user, and the operation information is stored, so that the mobile terminal can be operated for many times according to the operation information to test the mobile terminal, and the user does not need to operate the mobile terminal for many times to test the mobile terminal.
Example 3
Referring to fig. 3, an embodiment of the present invention provides a server, where the server includes: a monitoring module 301, an obtaining module 302 and an operating module 303;
a monitoring module 301, configured to monitor a mobile terminal;
the obtaining module 302 is configured to obtain coordinate information generated when the monitoring module monitors that the user operates the mobile terminal, and store the coordinate information;
and an operation module 303, configured to call the mobile terminal to perform an operation according to the coordinate information stored by the obtaining module.
The obtaining module 302 specifically includes an obtaining unit and a storing unit;
the mobile terminal comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring coordinate information reported by the mobile terminal, and the coordinate information is generated when a user operates the mobile terminal;
and the storage unit is used for storing the coordinate information acquired by the acquisition unit.
The operation module 303 specifically includes a sending unit and an operation unit;
the sending unit is used for sending an instruction to the mobile terminal, and the instruction carries coordinate information;
and the operation unit is used for operating the coordinate information sent by the sending unit on the mobile terminal and calling the mobile terminal to operate.
Further, the operation of the mobile terminal by the user specifically includes: click operation, long press operation, or slide operation.
Further, the coordinate information generated when the user operates the mobile terminal specifically includes:
when the user operation is click operation, generating coordinate information, wherein the coordinate information comprises a horizontal coordinate value, a vertical coordinate value and a time coordinate value, and the time coordinate value is 0; or,
when the user operation is a long-press operation, generating first pair of coordinate information, wherein the horizontal coordinate value and the vertical coordinate value of the first pair of coordinate information are the same, and the time coordinate value is different; or,
when the user operates the sliding operation, a second pair of coordinate information is generated, the horizontal coordinate value and the vertical coordinate value of the second pair of coordinate information are different, and the time coordinate value is different.
According to the server provided by the embodiment of the invention, when the user operates the mobile terminal, the operation of the user is monitored to obtain the operation information of the user, and the operation information is stored, so that the mobile terminal can be operated for many times according to the operation information to test the mobile terminal, and the user does not need to operate the mobile terminal for many times to test the mobile terminal.
It should be noted that: in the above embodiment, when the server memorizes the operation of the mobile terminal, only the division of the functional modules is taken as an example, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the server is divided into different functional modules to complete all or part of the functions described above. In addition, the server and the method for memorizing the operation of the mobile terminal provided by the above embodiments belong to the same concept, and the specific implementation process thereof is detailed in the method embodiments and will not be described herein again.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.