CN115202495B - Mouse hardware simulation movement method, device, equipment and storage medium - Google Patents

Mouse hardware simulation movement method, device, equipment and storage medium Download PDF

Info

Publication number
CN115202495B
CN115202495B CN202211092206.2A CN202211092206A CN115202495B CN 115202495 B CN115202495 B CN 115202495B CN 202211092206 A CN202211092206 A CN 202211092206A CN 115202495 B CN115202495 B CN 115202495B
Authority
CN
China
Prior art keywords
coordinate
migration
simulation
preset
coordinate data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211092206.2A
Other languages
Chinese (zh)
Other versions
CN115202495A (en
Inventor
王芳勤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Xfanic Technology Co Ltd
Original Assignee
Shenzhen Xfanic Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Xfanic Technology Co Ltd filed Critical Shenzhen Xfanic Technology Co Ltd
Priority to CN202211092206.2A priority Critical patent/CN115202495B/en
Publication of CN115202495A publication Critical patent/CN115202495A/en
Application granted granted Critical
Publication of CN115202495B publication Critical patent/CN115202495B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0354Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of 2D relative movements between the device, or an operating part thereof, and a plane or surface, e.g. 2D mice, trackballs, pens or pucks
    • G06F3/03543Mice or pucks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Physics (AREA)
  • Computational Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Probability & Statistics with Applications (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Human Computer Interaction (AREA)
  • Algebra (AREA)
  • Operations Research (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Position Input By Displaying (AREA)

Abstract

The invention relates to the field of mouse control, and discloses a method, a device, equipment and a storage medium for simulating movement of mouse hardware. The method comprises the following steps: receiving a dynamic simulation instruction, and reading screen coordinate data of the mouse; judging whether the current display environment has preset dormancy detection setting or not; if the dormancy detection setting exists, analyzing the simulation track setting in the dynamic simulation instruction, wherein the simulation track setting comprises the following steps: setting a vector track and a curve track; when the simulation track is set as the vector track, converting and modifying the screen coordinate data according to a preset vector modification algorithm to obtain the moved screen coordinate data; and when the simulation track is set to be the curve track, performing curve iterative operation processing on the screen coordinate data according to a preset curve simulation algorithm to obtain the moved screen coordinate data.

Description

Mouse hardware simulation movement method, device, equipment and storage medium
Technical Field
The invention relates to the field of mouse control, in particular to a method, a device, equipment and a storage medium for simulating movement of mouse hardware.
Background
When the account is logged in through the network, the computer is not operated because some things need to be processed temporarily or some specific display information needs to be checked. Although the computer is not operated at present, the account is still used, the server provider mistakenly considers that the idle account is automatically logged out, and thus half of the operation is directly suspended, the account password needs to be input again, the whole working process is affected, and the working efficiency is reduced.
Therefore, in the case that the probability that the current network account is judged by mistake and automatically logged out is high, a technology for changing the current misjudgment on the operation is needed.
Disclosure of Invention
The invention mainly aims to solve the technical problem that the automatic login probability is high when the current network account is judged by mistake.
The invention provides a simulation moving method of mouse hardware in a first aspect, which comprises the following steps:
receiving a dynamic simulation instruction, and reading screen coordinate data of the mouse;
judging whether the current display environment has preset dormancy detection setting or not;
if the dormancy detection setting exists, analyzing the simulation track setting in the dynamic simulation instruction, wherein the simulation track setting comprises the following steps: setting a vector track and a curve track;
when the simulation track is set as a vector track, converting and modifying the screen coordinate data according to a preset vector modification algorithm to obtain moved screen coordinate data;
and when the simulation track is set to be the curve track, performing curve iterative operation processing on the screen coordinate data according to a preset curve simulation algorithm to obtain the moved screen coordinate data.
Optionally, in a first implementation manner of the first aspect of the present invention, the performing conversion modification processing on the screen coordinate data according to a preset vector modification algorithm to obtain the moved screen coordinate data includes:
analyzing the abscissa X and the ordinate Y of the screen coordinate data;
based on the preset vector change direction, carrying out vector migration processing on the abscissa X and the ordinate Y to obtain the abscissa X after migration n Ordinate Y n Wherein n is the migration frequency, and n is a positive integer;
will be the abscissa X n The ordinate Y n And assigning to the screen coordinate data to obtain the moved screen coordinate data.
Optionally, in a second implementation manner of the first aspect of the present invention, the abscissa X and the ordinate Y are subjected to vector migration processing based on a preset vector change direction, so as to obtain an abscissa X after the migration n Ordinate Y n The method comprises the following steps:
extracting all change coordinates of the abscissa X and the ordinate Y in a preset vector change direction to obtain a change coordinate set;
based on the coordinate transformation function F (X) n ,Y n ) = (rand ()% n, rand ()% n), the abscissa X after migration is obtained n Ordinate Y n Wherein, F (X) n ,Y n ) For migrated coordinate data, rand ()% n is the random sampling function of the changing coordinate set.
Optionally, in a third implementation manner of the first aspect of the present invention, the performing curve iterative operation processing on the screen coordinate data according to a preset curve simulation algorithm to obtain the moved screen coordinate data includes:
carrying out migration processing on the screen coordinate data according to a preset migration step length to obtain a first migration coordinate and a second migration coordinate;
screening the first migration coordinate and the second migration coordinate according to a preset simulation curve function to obtain a screening migration coordinate;
determining the screen coordinate data after movement by using the screening migration coordinates, and performing migration processing on the screen coordinate data again according to a preset migration step length to obtain a first migration coordinate and a second migration coordinate.
Optionally, in a fourth implementation manner of the first aspect of the present invention, the performing, according to a preset simulation curve function, a screening process on the first migration coordinate and the second migration coordinate to obtain a screened migration coordinate includes:
calculating a midpoint coordinate of the first migration coordinate and the second migration coordinate to obtain an operation coordinate;
substituting the operation coordinate into a preset simulation curve function to obtain a screening value;
and screening the first migration coordinate and the second migration coordinate according to the screening value to obtain a screening migration coordinate.
Optionally, in a fifth implementation manner of the first aspect of the present invention, an abscissa/ordinate of the first migration coordinate is greater than an abscissa/ordinate of the second migration coordinate, and the performing, according to the screening value, the screening processing on the first migration coordinate and the second migration coordinate to obtain the screening migration coordinate includes:
judging whether the screening value is a positive number or not;
if the first migration coordinate is a positive number, determining the first migration coordinate as a screening migration coordinate;
and if the second migration coordinate is not a positive number, determining the second migration coordinate as a screening migration coordinate.
Optionally, in a sixth implementation manner of the first aspect of the present invention, after the obtaining of the moved screen coordinate data, the method further includes:
and outputting the moved screen coordinate data to equipment corresponding to the current display environment based on the USB equipment single chip microcomputer CH 552.
The second aspect of the present invention provides a mouse hardware simulated moving device, which includes:
the receiving module is used for receiving the dynamic simulation instruction and reading the screen coordinate data of the mouse;
the judging module is used for judging whether preset dormancy detection setting exists in the current display environment;
and the analysis module is used for analyzing the simulation track setting in the dynamic simulation instruction if the dormancy detection setting exists, wherein the simulation track setting comprises the following steps: setting a vector track and a curve track;
the vector simulation module is used for carrying out conversion modification processing on the screen coordinate data according to a preset vector modification algorithm when the simulation track is set as a vector track setting, so as to obtain the moved screen coordinate data;
and the curve simulation module is used for performing curve iterative operation processing on the screen coordinate data according to a preset curve simulation algorithm when the simulation track is set to be the curve track setting, so as to obtain the moved screen coordinate data.
The third aspect of the present invention provides a simulated mobile device of mouse hardware, comprising: a memory having instructions stored therein and at least one processor, the memory and the at least one processor interconnected by a line; the at least one processor calls the instructions in the memory to enable the simulated movement equipment of the mouse hardware to execute the simulated movement method of the mouse hardware.
A fourth aspect of the present invention provides a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to execute the above-described simulated movement method of mouse hardware.
In the embodiment of the invention, when the user has an accident or looks up a document temporarily, the dynamic simulation is activated to perform the mobile simulation on the mouse coordinate, so that the situation that the mouse coordinate is judged to be idle by a supplier to recycle resources is avoided, the probability that the mouse coordinate is judged to be idle by mistake in the work is reduced, the work efficiency of the user is improved, and the situation of mistaken logout is reduced.
Drawings
FIG. 1 is a diagram of an embodiment of a method for simulating movement of mouse hardware according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a curve simulation of a method for simulating movement of mouse hardware according to an embodiment of the present invention;
FIG. 3 is a diagram of an embodiment of a simulated mobile device of mouse hardware in an embodiment of the invention;
FIG. 4 is a diagram of another embodiment of a simulated mobile device for mouse hardware according to an embodiment of the present invention;
FIG. 5 is a diagram of an embodiment of a simulated mobile device of mouse hardware in an embodiment of the invention.
Detailed Description
The embodiment of the invention provides a method, a device, equipment and a storage medium for simulating movement of mouse hardware.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," or "having," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of understanding, a specific flow of the embodiment of the present invention is described below, and referring to fig. 1, an embodiment of the method for simulating movement of mouse hardware in the embodiment of the present invention includes:
101. receiving a dynamic simulation instruction, and reading screen coordinate data of the mouse;
102. judging whether the current display environment has preset dormancy detection setting or not;
103. if the dormancy detection setting exists, analyzing the simulation track setting in the dynamic simulation instruction, wherein the simulation track setting comprises the following steps: setting a vector track and a curve track;
in steps 101-103, the dynamic simulation command activates the dynamic command to directly read the screen coordinates in the mouse. In order to reduce resource consumption, dynamic simulation is performed only when a sleep detection setting exists in a display environment, but the simulated parameters are small and do not affect normal operation. No analog move is required if the current environment has no sleep detection settings. When the dormancy setting of the display environment is determined, a dormancy setting record table or a user setting table in a network database may be used to determine whether the dormancy detection setting exists in the current display environment.
And when determining that the sleep detection setting exists in the current display environment, directly reading the simulation track setting in the dynamic simulation instruction, wherein the simulation track is provided with vector track setting and curve track setting. The vector trajectory setting consumes less computing resources, but has a worse effect of avoiding misjudgment. The curve track setting consumes more computing resources, but the effect of avoiding misjudgment is better. The user is required to choose the relevant setting at his or her discretion, and the relevant simulation algorithm will be executed at a fixed setting.
104. When the simulation track is set as a vector track, converting and modifying the screen coordinate data according to a preset vector modification algorithm to obtain moved screen coordinate data;
in this embodiment, the vector motion mode is divided into three motion trajectories of left-right, up-down, and diagonal motion; and before moving, randomly taking out one element from the n elements respectively as the maximum distance of the moving range.
(1) Moving left and right, keeping the Y coordinate value unchanged, taking 1 element from n different elements by the X coordinate value, and taking the taken element as the coordinate of X; the value formula is as follows: xn = range ()% n, and a coordinate conversion function F (Xn, 0) = (range ()% n, 0) is obtained, and the obtained function is substituted into the coordinate conversion function setting coordinates, and range ()% n is a function of randomly generating an integer of 0~n-1, which is a conventional function.
(2) Moving up and down, keeping the X coordinate value unchanged, taking 1 element from n different elements by the Y coordinate value, and taking the taken element as the coordinate of Y; the value formula is as follows: yn = rand ()% n, and a coordinate conversion function F (0, yn) = (0, rand ()% n) is obtained, and the obtained function is substituted into the coordinate conversion function setting coordinates.
(3) Performing oblique line motion, taking 1 element from n different elements, and taking the taken element as coordinates of X and Y; the value formula is as follows: yn = rand ()% n, xn = rand ()% n, a coordinate conversion function F (Xn, yn) = (rand ()% n, rand ()% n) is obtained, and the obtained function is substituted into the coordinate conversion function setting coordinates.
Further, at 104, the following steps may be performed:
1041. analyzing the abscissa X and the ordinate Y of the screen coordinate data;
1042. based on the preset vector change direction, carrying out vector migration processing on the abscissa X and the ordinate Y to obtain the abscissa X after migration n Ordinate Y n Wherein n is the migration frequency, and n is a positive integer;
1043. will be the abscissa X n The ordinate Y n And assigning to the screen coordinate data to obtain the moved screen coordinate data.
In steps 1041-1043, in a certain direction passing through the screen coordinate data, the movement with a fixed step length of 1 is performed, each time of the movement is performed, and the data after each time of the movement is assigned to the screen coordinate data again, so that the moved screen coordinate data can be obtained.
Further, in the 1042 step, the following steps may also be performed:
10421 extracting all the change coordinates of the abscissa X and the ordinate Y in the preset vector change direction to obtain a change coordinate set;
10422. based on the coordinate transformation function F (X) n ,Y n ) = (range ()% n), the abscissa X after migration was obtained n Ordinate Y n Wherein, F (X) n ,Y n ) For migrated coordinate data, rand ()% n is the random sampling function of the changing coordinate set.
In steps 10421-10422, all migration coordinates in the direction of vector change are collected as a change coordinate set, and then based on a coordinate transformation function F (X) n ,Y n ) = (range ()% n), the abscissa X after migration was obtained n Ordinate Y n Wherein, F (X) n ,Y n ) For migrated coordinate data, rand ()% n is a random sampling function for the varying coordinate set.
105. And when the simulation track is set to be the curve track, performing curve iterative operation processing on the screen coordinate data according to a preset curve simulation algorithm to obtain the moved screen coordinate data.
In this embodiment, referring to the schematic diagram of curve simulation in fig. 2, assuming that the current mouse coordinate p (Xp, yp) needs to draw a circle with a radius r, there is a constructor F (x, y) = x 2 +y 2 -r 2 When the coordinates are in the circle, F (x, y)<0; outside the circle there is F (x, y)>0. The next point to be moved is M, which is the midpoint of P1 and P2, then F (M) = (Xp +1, yp-0.5); Δ D = F (M) = (Xp +1, yp-0.5); if Δ D<0 indicates that point F (M) is inside the circle, the closest point to the circle is P1, then the calculation method for the next point is Δ D1= F (Xp +1, yp-0.5) = Δ D +2Xp +3; if Δ D>0 indicates that point F (M) is outside the circle and the closest point to the circle is P2, then the formula for calculating the next point is:
Figure 904171DEST_PATH_IMAGE001
further, 105 may perform the following steps:
1051. migrating the screen coordinate data according to a preset migration step length to obtain a first migration coordinate and a second migration coordinate;
1052. screening the first migration coordinate and the second migration coordinate according to a preset simulation curve function to obtain a screening migration coordinate;
1053. determining the screen coordinate data after movement by using the screening migration coordinates, and performing migration processing on the screen coordinate data again according to a preset migration step length to obtain a first migration coordinate and a second migration coordinate.
In the 1051-1053 steps, the migration step size is 1, and every time the abscissa changes by 1, the abscissas increase or decrease by 1, while the ordinates do not change one and decrease or increase by 1. And obtaining a first migration coordinate P1 and a second migration coordinate P2, judging the inside and the outside of the first migration coordinate P1 and the second migration coordinate P2 and the simulation curve function, and determining the distance coordinate of the simulation curve as a screening migration coordinate. In 1053, after the assignment of the migration coordinates to the screen coordinate data is completed, the process returns to 1051 again for the loop processing.
Further, 1052 may perform the following steps:
10521. calculating a midpoint coordinate of the first migration coordinate and the second migration coordinate to obtain an operation coordinate;
10522. substituting the operation coordinate into a preset simulation curve function to obtain a screening value;
10523. and screening the first migration coordinate and the second migration coordinate according to the screening value to obtain a screening migration coordinate.
In the steps 10521-10523, referring to the graph simulation diagram in fig. 2, assuming that the current mouse coordinate p (Xp, yp) needs to draw a circle with radius r, there is a constructor F (x, y) = x 2 +y 2 -r 2 When the coordinates are in the circle, F (x, y)<0; outside the circle there is F (x, y)>0. The next point to be moved is M, which is the midpoint of P1 and P2, then F (M) = (Xp +1, yp-0.5); Δ D = F (M) = (Xp +1, yp-0.5); if Δ D<0 indicates that point F (M) is inside the circle, the closest point to the circle is P1, then the calculation method for the next point is Δ D1= F (Xp +1, yp-0.5) = Δ D +2Xp +3; if Δ D>0 indicates that point F (M) is outside the circle and the closest point to the circle is P2, then the formula for calculating the next point is:
Figure 821312DEST_PATH_IMAGE001
further, the abscissa/ordinate of the first migration coordinate is larger than the abscissa/ordinate of the second migration coordinate, 10533 may perform the following steps:
105331, judging whether the screening value is a positive number;
105332, if the first migration coordinate is a positive number, determining the first migration coordinate as a screening migration coordinate;
105333, if not positive, determining the second migration coordinate as the screening migration coordinate.
In the steps 105331-10533, the screening value is positive indicating that the first migration coordinate is closer to the curve, and the first migration coordinate is determined as the screening migration coordinate. And if the screening value is not positive, the second migration coordinate is closer to the curve, and the second migration coordinate is determined as the screening migration coordinate.
Further, after 104, 105, the following steps may also be performed:
106. and outputting the moved screen coordinate data to equipment corresponding to the current display environment based on the USB equipment single chip microcomputer CH 552.
In the embodiment, the mouse simulation is performed by using software, and sometimes the mouse cannot be simulated after the server platform is upgraded, so that the problem of the server platform can be avoided by using a hardware simulation mouse.
In the embodiment of the invention, when the user has an accident or looks up a document temporarily, the dynamic simulation is activated to perform the mobile simulation on the mouse coordinate, so that the situation that the mouse coordinate is judged to be idle by a supplier to recycle resources is avoided, the probability that the mouse coordinate is judged to be idle by mistake in the work is reduced, the work efficiency of the user is improved, and the situation of mistaken logout is reduced.
The above description of the method for simulating movement of mouse hardware in the embodiment of the present invention is provided, and referring to fig. 3, the following description of the simulated movement apparatus of mouse hardware in the embodiment of the present invention is provided, where an embodiment of the simulated movement apparatus of mouse hardware in the embodiment of the present invention includes:
the receiving module 301 is configured to receive a dynamic simulation instruction and read screen coordinate data of a mouse;
a judging module 302, configured to judge whether a preset dormancy detection setting exists in a current display environment;
an analyzing module 303, configured to analyze a simulation trajectory setting in the dynamic simulation instruction if there is a sleep detection setting, where the simulation trajectory setting includes: setting a vector track and a curve track;
the vector simulation module 304 is configured to, when the simulation trajectory is set as a vector trajectory setting, perform conversion modification processing on the screen coordinate data according to a preset vector modification algorithm to obtain moved screen coordinate data;
a curve simulation module 305, configured to, when the simulation trajectory is set as a curve trajectory setting, perform curve iterative operation processing on the screen coordinate data according to a preset curve simulation algorithm, to obtain moved screen coordinate data.
In the embodiment of the invention, when the user has an accident or looks up a document temporarily, the dynamic simulation is activated to perform the mobile simulation on the mouse coordinate, so that the situation that the mouse coordinate is judged to be idle by a supplier to recycle resources is avoided, the probability that the mouse coordinate is judged to be idle by mistake in the work is reduced, the work efficiency of the user is improved, and the situation of mistaken logout is reduced.
Referring to fig. 4, another embodiment of the simulated moving device of mouse hardware according to the embodiment of the present invention includes:
the receiving module 301 is configured to receive a dynamic simulation instruction and read screen coordinate data of a mouse;
a judging module 302, configured to judge whether a preset dormancy detection setting exists in a current display environment;
an analyzing module 303, configured to analyze a simulation trajectory setting in the dynamic simulation instruction if there is a sleep detection setting, where the simulation trajectory setting includes: setting a vector track and a curve track;
the vector simulation module 304 is configured to, when the simulation trajectory is set as a vector trajectory setting, perform conversion modification processing on the screen coordinate data according to a preset vector modification algorithm to obtain moved screen coordinate data;
a curve simulation module 305, configured to, when the simulation trajectory is set as a curve trajectory setting, perform curve iterative operation processing on the screen coordinate data according to a preset curve simulation algorithm, to obtain moved screen coordinate data.
The vector simulation module 304 is specifically configured to:
analyzing the abscissa X and the ordinate Y of the screen coordinate data;
based on the preset vector change direction, carrying out vector migration processing on the abscissa X and the ordinate Y to obtain the abscissa X after migration n Ordinate Y n Wherein n is the migration frequency, and n is a positive integer;
will the abscissa X n The ordinate Y n And assigning values to the screen coordinate data to obtain the moved screen coordinate data.
The vector simulation module 304 may be further specifically configured to:
extracting all change coordinates of the abscissa X and the ordinate Y in a preset vector change direction to obtain a change coordinate set;
based on the coordinate transformation function F (X) n ,Y n ) = (range ()% n), the abscissa X after migration was obtained n Ordinate Y n Wherein, F (X) n ,Y n ) For migrated coordinate data, rand ()% n is the random sampling function of the changing coordinate set.
Wherein the curve simulation module 305 is specifically configured to:
carrying out migration processing on the screen coordinate data according to a preset migration step length to obtain a first migration coordinate and a second migration coordinate;
screening the first migration coordinate and the second migration coordinate according to a preset simulation curve function to obtain a screening migration coordinate;
determining the screen coordinate data after movement of the screening migration coordinates, and performing migration processing on the screen coordinate data again according to a preset migration step length to obtain a first migration coordinate and a second migration coordinate.
The curve simulation module 305 may further specifically be configured to:
calculating a midpoint coordinate of the first migration coordinate and the second migration coordinate to obtain an operation coordinate;
substituting the operation coordinate into a preset simulation curve function to obtain a screening value;
and screening the first migration coordinate and the second migration coordinate according to the screening value to obtain a screening migration coordinate.
Wherein the abscissa/ordinate of the first migration coordinate is greater than the abscissa/ordinate of the second migration coordinate, and the curve simulation module 305 may be further specifically configured to:
judging whether the screening value is a positive number or not;
if the first migration coordinate is a positive number, determining the first migration coordinate as a screening migration coordinate;
and if the second migration coordinate is not a positive number, determining the second migration coordinate as a screening migration coordinate.
The mouse hardware simulation mobile device may further include a hardware output module 306, where the hardware output module 306 is specifically configured to:
and outputting the moved screen coordinate data to equipment corresponding to the current display environment based on the USB equipment single chip microcomputer CH 552.
In the embodiment of the invention, when the user has an accident or looks up a document temporarily, the dynamic simulation is activated to perform the mobile simulation on the mouse coordinate, so that the situation that the mouse coordinate is judged to be idle by a supplier to recycle resources is avoided, the probability that the mouse coordinate is judged to be idle by mistake in the work is reduced, the work efficiency of the user is improved, and the situation of mistaken logout is reduced.
Fig. 3 and fig. 4 above describe the simulated mobile device of the mouse hardware in the embodiment of the present invention in detail from the perspective of the modular functional entity, and the following describes the simulated mobile device of the mouse hardware in the embodiment of the present invention in detail from the perspective of the hardware processing.
Fig. 5 is a schematic structural diagram of a mouse hardware simulation mobile device according to an embodiment of the present invention, where the mouse hardware simulation mobile device 500 may have a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 510 (e.g., one or more processors) and a memory 520, and one or more storage media 530 (e.g., one or more mass storage devices) for storing applications 533 or data 532. Memory 520 and storage media 530 may be, among other things, transient storage or persistent storage. The program stored on the storage medium 530 may include one or more modules (not shown), each of which may include a series of instruction operations in the simulated mobile device 500 for the mouse hardware. Further, the processor 510 may be configured to communicate with the storage medium 530 to execute a series of instruction operations in the storage medium 530 on the simulated mobile device 500 of the mouse hardware.
The mouse hardware-based simulated mobile device 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input-output interfaces 560, and/or one or more operating systems 531, such as Windows Server, mac OS X, unix, linux, freeBSD, and the like. Those skilled in the art will appreciate that the mouse hardware simulated mobile device configuration shown in FIG. 5 does not constitute a limitation of mouse hardware based simulated mobile devices and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
The present invention also provides a computer readable storage medium, which may be a non-volatile computer readable storage medium, and which may also be a volatile computer readable storage medium, having stored therein instructions, which, when run on a computer, cause the computer to perform the steps of the simulated movement method of mouse hardware.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses, and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (8)

1. A method for simulating movement of mouse hardware is characterized by comprising the following steps:
receiving a dynamic simulation instruction, and reading screen coordinate data of the mouse;
judging whether the current display environment has preset dormancy detection setting or not;
if the dormancy detection setting exists, analyzing the simulation track setting in the dynamic simulation instruction, wherein the simulation track setting comprises the following steps: setting a vector track and a curve track;
when the simulation track is set as a vector track, converting and modifying the screen coordinate data according to a preset vector modification algorithm to obtain moved screen coordinate data;
when the simulation track is set to be a curve track, performing curve iterative operation processing on the screen coordinate data according to a preset curve simulation algorithm to obtain moved screen coordinate data;
the processing of curve iteration operation on the screen coordinate data according to a preset curve simulation algorithm to obtain the moved screen coordinate data comprises the following steps:
migrating the screen coordinate data according to a preset migration step length to obtain a first migration coordinate and a second migration coordinate;
screening the first migration coordinate and the second migration coordinate according to a preset simulation curve function to obtain a screening migration coordinate;
determining the screen coordinate data after movement by using the screening migration coordinate, and migrating the screen coordinate data again according to a preset migration step length to obtain a first migration coordinate and a second migration coordinate;
the screening processing of the first migration coordinate and the second migration coordinate according to a preset simulation curve function to obtain a screened migration coordinate includes:
calculating a midpoint coordinate of the first migration coordinate and the second migration coordinate to obtain an operation coordinate;
substituting the operation coordinate into a preset simulation curve function to obtain a screening value;
and screening the first migration coordinate and the second migration coordinate according to the screening value to obtain a screening migration coordinate.
2. The method of claim 1, wherein the converting and modifying the screen coordinate data according to a preset vector modification algorithm to obtain the moved screen coordinate data comprises:
analyzing the abscissa X and the ordinate Y of the screen coordinate data;
carrying out vector migration processing on the abscissa X and the ordinate Y based on a preset vector change direction to obtain an abscissa Xn and an ordinate Yn after migration, wherein n is the migration frequency and n is a positive integer;
and assigning the abscissa Xn and the ordinate Yn to screen coordinate data to obtain the moved screen coordinate data.
3. The method of claim 2, wherein the performing vector migration processing on the abscissa X and the ordinate Y based on a preset vector change direction to obtain an abscissa Xn and an ordinate Yn after the migration comprises:
extracting all change coordinates of the abscissa X and the ordinate Y in a preset vector change direction to obtain a change coordinate set;
and obtaining the abscissa Xn and the ordinate Yn after the migration based on a coordinate transformation function F (Xn, yn) = (rand ()% n, rand ()% n), wherein F (Xn, yn) is coordinate data after the migration, and rand ()% n is a random sampling function of the change coordinate set.
4. The method for simulating movement of mouse hardware according to claim 1, wherein an abscissa/ordinate of the first migration coordinate is larger than an abscissa/ordinate of the second migration coordinate, and the obtaining the filtered migration coordinate by performing the filtering process on the first migration coordinate and the second migration coordinate according to the filtering value includes:
judging whether the screening value is a positive number or not;
if the first migration coordinate is a positive number, determining the first migration coordinate as a screening migration coordinate;
and if the second migration coordinate is not a positive number, determining the second migration coordinate as a screening migration coordinate.
5. The method for simulating movement of mouse hardware according to claim 1, further comprising, after obtaining the moved screen coordinate data:
and outputting the moved screen coordinate data to equipment corresponding to the current display environment based on the USB equipment singlechip CH 552.
6. An analog mobile device of mouse hardware, the analog mobile device of mouse hardware comprising:
the receiving module is used for receiving the dynamic simulation instruction and reading the screen coordinate data of the mouse;
the judging module is used for judging whether preset dormancy detection setting exists in the current display environment;
the analysis module is used for analyzing the simulation track setting in the dynamic simulation instruction if the dormancy detection setting exists, wherein the simulation track setting comprises the following steps: setting a vector track and a curve track;
the vector simulation module is used for carrying out conversion modification processing on the screen coordinate data according to a preset vector modification algorithm when the simulation track is set as a vector track setting, so as to obtain the moved screen coordinate data;
the curve simulation module is used for carrying out curve iterative operation processing on the screen coordinate data according to a preset curve simulation algorithm when the simulation track is set to be the curve track setting, so as to obtain the moved screen coordinate data;
wherein the curve simulation module is specifically configured to:
carrying out migration processing on the screen coordinate data according to a preset migration step length to obtain a first migration coordinate and a second migration coordinate;
screening the first migration coordinate and the second migration coordinate according to a preset simulation curve function to obtain a screening migration coordinate;
determining the screen coordinate data after movement by using the screening migration coordinate, and migrating the screen coordinate data again according to a preset migration step length to obtain a first migration coordinate and a second migration coordinate;
wherein, the curve simulation module may be further specifically configured to:
calculating a midpoint coordinate of the first migration coordinate and the second migration coordinate to obtain an operation coordinate;
substituting the operation coordinate into a preset simulation curve function to obtain a screening value;
and screening the first migration coordinate and the second migration coordinate according to the screening value to obtain a screening migration coordinate.
7. An emulated mobile device of mouse hardware, comprising: a memory having instructions stored therein and at least one processor, the memory and the at least one processor interconnected by a line;
the at least one processor invokes the instructions in the memory to cause the simulated movement of the mouse hardware device to perform the simulated movement method of the mouse hardware as recited in any of claims 1-5.
8. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a method of simulating movement of mouse hardware according to any one of claims 1 to 5.
CN202211092206.2A 2022-09-08 2022-09-08 Mouse hardware simulation movement method, device, equipment and storage medium Active CN115202495B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211092206.2A CN115202495B (en) 2022-09-08 2022-09-08 Mouse hardware simulation movement method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211092206.2A CN115202495B (en) 2022-09-08 2022-09-08 Mouse hardware simulation movement method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115202495A CN115202495A (en) 2022-10-18
CN115202495B true CN115202495B (en) 2022-12-16

Family

ID=83572946

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211092206.2A Active CN115202495B (en) 2022-09-08 2022-09-08 Mouse hardware simulation movement method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115202495B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112400162A (en) * 2018-07-19 2021-02-23 日立汽车系统株式会社 Simulation device and method thereof, and ECU device
CN112799801A (en) * 2021-01-08 2021-05-14 杭州雾联科技有限公司 Method, device, equipment and medium for drawing simulation mouse pointer
CN113010074A (en) * 2021-04-22 2021-06-22 海信电子科技(深圳)有限公司 Webpage Video control bar display method and display equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100248803A1 (en) * 2009-03-31 2010-09-30 Codemasters Software Company Ltd. Forming and executing a computer game
EP2616975A1 (en) * 2010-09-15 2013-07-24 DockOn AG Automated antenna builder and antenna repository
CN105957120B (en) * 2016-06-22 2021-09-21 财付通支付科技有限公司 Motion trail simulation method and device
CN107402713B (en) * 2017-07-28 2019-08-27 Oppo广东移动通信有限公司 Accelerate method, apparatus, storage medium and the mobile terminal of the processing of blank screen gesture
CN107908300B (en) * 2017-11-17 2019-08-13 哈尔滨工业大学(威海) A kind of synthesis of user's mouse behavior and analogy method and system
CN110135487A (en) * 2019-05-09 2019-08-16 国网山东省电力公司滨州供电公司 A kind of computer user mouse Behavior modeling method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112400162A (en) * 2018-07-19 2021-02-23 日立汽车系统株式会社 Simulation device and method thereof, and ECU device
CN112799801A (en) * 2021-01-08 2021-05-14 杭州雾联科技有限公司 Method, device, equipment and medium for drawing simulation mouse pointer
CN113010074A (en) * 2021-04-22 2021-06-22 海信电子科技(深圳)有限公司 Webpage Video control bar display method and display equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
自动移动鼠标避免锁屏;无.法;《csdn》;20200222;博客1-3页 *

Also Published As

Publication number Publication date
CN115202495A (en) 2022-10-18

Similar Documents

Publication Publication Date Title
AU2017206394B2 (en) Method, system and device for testing and readable storage medium
EP3786795A1 (en) Memory allocation method and apparatus for neural network
US20080263073A1 (en) Detecting apparatus, system, program, and detecting method
US8990792B2 (en) Method for constructing dynamic call graph of application
Qian et al. Roscript: a visual script driven truly non-intrusive robotic testing system for touch screen applications
CN108133223B (en) Device and method for determining convolutional neural network CNN model
US11436188B2 (en) Resource optimization and update method, server, and device
CN113467944B (en) Resource deployment device and method for complex software system
CN115202495B (en) Mouse hardware simulation movement method, device, equipment and storage medium
EP3940588A1 (en) Fingerprint image processing methods and apparatuses
Lee et al. Towards scalable performance analysis and visualization through data reduction
CN104008046A (en) Method and device for testing programs
CN112181479A (en) Method and device for determining difference between code file versions and electronic equipment
CN110908870A (en) Resource monitoring method and device for mainframe, storage medium and equipment
US20220392107A1 (en) Image processing apparatus, image processing method, image capturing apparatus, and non-transitory computer-readable storage medium
CN114171107A (en) Detection method, device, equipment and storage medium for VPD information of solid state disk
CN113722203A (en) Program testing method and device, electronic device and computer readable storage medium
CN113934813A (en) Method, system and equipment for dividing sample data and readable storage medium
CN111340349A (en) Product reliability evaluation method and device, computer equipment and storage medium
CN113282304B (en) System for identifying virtual machine based on app installation list
CN117632378B (en) Performance test management method and system for virtualized CPU
US20180336473A1 (en) Detection of data offloading through instrumentation analysis
Nagy et al. ENHANCED REGRESSION TESTING EXECUTION PROCESS USING TEST SUITE REDUCTION TECHNIQUES AND PARALLEL EXECUTION
US20240036845A1 (en) Runtime environment optimizer for jvm-style languages
CN109710319B (en) Method and system for identifying in-place hard disk of computer

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant