Mouse data processing methods and devices, electronic devices and storage media
By judging and adjusting the abnormal values in the mouse event data on the cloud server side, the problem of screen rotation caused by abnormal coordinates in cloud applications is solved and the smoothness of the application is improved.
Patent Information
- Application Number
- CN202410889090.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-07-04
AI Technical Summary
In a cloud application environment, there are often coordinate outliers in mouse data collected by Web terminals, which causes the cloud application screen rotation angle to change significantly, affecting the user experience.
The cloud server receives the mouse event data sent by the terminal and determines whether there are abnormal values in the abscissa and ordinate coordinates. If so, it generates target mouse event data by adjusting the adjacent mouse event coordinates to reduce the transmission of abnormal values.
By adjusting the outliers, the large changes in the rotation angle of the cloud application screen are reduced, and the fluency of the cloud application is improved.
Smart Images

Figure CN118426663B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud applications, and in particular to a mouse data processing method and device, an electronic device and a storage medium. Background Art
[0002] With the rapid development of cloud applications such as cloud games and cloud computers, users have higher and higher demands for the accuracy and smoothness of mouse operations. In the traditional cloud application environment, the Web terminal collects the mouse data input by the mouse through the browser and transmits it to the cloud server system, so that the cloud application running in the cloud server can obtain the corresponding data from the system to respond. However, the mouse data collected by the Web terminal often has abnormal values with very large coordinates, which causes the rotation angle of the cloud application screen to change significantly, affecting the user experience.
[0003] Therefore, how to provide a mouse data processing solution to improve the smoothness of cloud application screens has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] In view of the technical problems existing in the prior art, the embodiments of the present application provide a mouse data processing method and device, an electronic device and a storage medium.
[0005] In a first aspect, an embodiment of the present application provides a mouse data processing method, which is applied to a cloud server, comprising:
[0006] Receiving current mouse event data sent by the terminal, and determining whether at least one of the horizontal coordinate and the vertical coordinate of the current mouse event is not 0, wherein the current mouse event data includes the coordinates of the current mouse event;
[0007] If at least one of the horizontal coordinate and the vertical coordinate of the current mouse event is not 0, then determine the mouse event adjacent to the current mouse event, and determine whether there is an abnormal value in the coordinates of the current mouse event according to the size relationship between the coordinates of the current mouse event and the adjacent mouse event;
[0008] If there are abnormal values in the coordinates of the current mouse event, the abnormal value coordinates in the current mouse event are adjusted according to the coordinates of the adjacent mouse events to obtain the target mouse event data, and the target mouse event data is transmitted to the system of the cloud server.
[0009] In a second aspect, an embodiment of the present application further provides a mouse data processing device, which is applied to a cloud server, comprising:
[0010] A first judgment unit is used to receive current mouse event data sent by the terminal, and judge whether at least one of the horizontal coordinate and the vertical coordinate of the current mouse event is not 0, wherein the current mouse event data includes the coordinates of the current mouse event;
[0011] A second judgment unit is used to determine the mouse events adjacent to the current mouse event if at least one of the horizontal coordinate and the vertical coordinate of the current mouse event is not 0, and to judge whether there is an abnormal value in the coordinates of the current mouse event according to the size relationship between the coordinates of the current mouse event and the adjacent mouse event;
[0012] The adjustment unit is used to adjust the coordinates of the abnormal value in the current mouse event according to the coordinates of the adjacent mouse events if there are abnormal values in the coordinates of the current mouse event to obtain target mouse event data, and transmit the target mouse event data to the cloud server system.
[0013] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the mouse data processing method described in the first aspect are executed.
[0014] In a fourth aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the mouse data processing method described in the first aspect.
[0015] In summary, the mouse data processing method and device, electronic device and storage medium provided by the embodiments of the present application, when the horizontal and vertical coordinates of the current mouse event data are not all zero, and there are abnormal values in the coordinates of the current mouse event, adjust the abnormal value coordinates in the current mouse event according to the coordinates of adjacent mouse events to obtain the target mouse event data. In this way, it is no longer the abnormal value coordinates that are transmitted to the system, thereby reducing the occurrence of drastic changes in the rotation viewing angle of the cloud application screen and improving the smoothness of the cloud application screen. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A flowchart of an embodiment of a mouse data processing method provided in an embodiment of the present application;
[0017] Figure 2 A schematic diagram of the structure of an embodiment of a mouse data processing device provided in an embodiment of the present application;
[0018] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0019] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0020] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0021] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0022] Reference Figure 1 FIG. 1 is a flow chart of a mouse data processing method provided in an embodiment of the present application, which is applied to a cloud server and includes:
[0023] S10, receiving current mouse event data sent by the terminal, and determining whether at least one of the horizontal coordinate and the vertical coordinate of the current mouse event is not 0, wherein the current mouse event data includes the coordinates of the current mouse event;
[0024] In this embodiment, it should be noted that the mouse events involved include mouse events generated during the movement of the mouse. The mouse event data includes the horizontal coordinate and the vertical coordinate of the mouse event, and the horizontal coordinate and the vertical coordinate are both relative coordinates, that is, relative coordinates relative to the coordinates of the previous mouse event. When the terminal (which can be a Web terminal) collects mouse event data, it can specifically obtain a mouse event array through the interface of the browser, and the mouse event array serves as a carrier of the mouse event data. After that, the terminal can send the mouse event array to the cloud server. After the cloud server receives the mouse event array, it will execute the processing logic of step S10 for the mouse event data of each mouse event contained therein. Specifically, the mouse event data to be processed currently can be used as the current mouse event data, and it is determined whether the horizontal coordinate and the vertical coordinate of the current mouse event are not both 0. If they are not both 0, the processing logic of step S11 is executed, otherwise, the current mouse event data is not processed (that is, the data corresponding to the current mouse event data is no longer transmitted to the system).
[0025] S11, if at least one of the horizontal coordinate and the vertical coordinate of the current mouse event is not 0, determine the mouse event adjacent to the current mouse event, and determine whether there is an abnormal value in the coordinates of the current mouse event according to the size relationship between the coordinates of the current mouse event and the adjacent mouse event;
[0026] In this embodiment, it should be noted that whether there are abnormal values in the coordinates of the current mouse event is determined based on the size relationship between the coordinates of the current mouse event and the adjacent mouse event. If there are abnormal values in the coordinates of the current mouse event, step S12 needs to be executed to adjust the abnormal value coordinates in the current mouse event.
[0027] S12. If there are abnormal values in the coordinates of the current mouse event, the abnormal value coordinates in the current mouse event are adjusted according to the coordinates of the adjacent mouse events to obtain target mouse event data, and the target mouse event data is transmitted to the system of the cloud server.
[0028] In this embodiment, it should be noted that the target mouse event data can be obtained by adjusting the abnormal value coordinates in the current mouse event data, and what is subsequently transmitted to the system is the target mouse event data, not the current mouse event data containing the abnormal value coordinates. At the same time, the current mouse event data will also be updated to the target mouse event data. When the next mouse event data is processed, the next mouse event data becomes the current mouse event data, and when the corresponding conditions are met (described later, and will not be repeated here), the target mouse event data obtained this time becomes the mouse event data of the previous mouse event.
[0029] The mouse data processing method provided in the embodiment of the present application, when the horizontal and vertical coordinates of the current mouse event data are not all 0 and there are abnormal values in the coordinates of the current mouse event, adjusts the abnormal value coordinates in the current mouse event according to the coordinates of adjacent mouse events to obtain the target mouse event data. In this way, it is no longer the abnormal value coordinates that are transmitted to the system, thereby reducing the occurrence of drastic changes in the rotation viewing angle of the cloud application screen and improving the smoothness of the cloud application screen.
[0030] Based on the foregoing method embodiment, determining a mouse event adjacent to the current mouse event may include:
[0031] When there is a previous mouse event for the current mouse event, if it is determined that the processing time interval corresponding to the current mouse event and the previous mouse event is less than or equal to a first threshold, the previous mouse event is taken as the previous mouse event adjacent to the current mouse event;
[0032] When there is a subsequent mouse event for the current mouse event, if it is determined that the processing time interval corresponding to the current mouse event and the subsequent mouse event is less than or equal to the second threshold, the subsequent mouse event is taken as the subsequent mouse event adjacent to the current mouse event.
[0033] In this embodiment, it should be noted that the cloud server can receive mouse event data in the form of a mouse event array. Assume that a mouse event array A is received at a certain moment, and the mouse event array A contains the mouse event data of mouse event 1, the mouse event data of mouse event 2, and the mouse event data of mouse event 3. Then, a mouse event array B is received, and the mouse event array B contains the mouse event data of mouse event 4 and the mouse event data of mouse event 5. Then, mouse event 2 is the previous mouse event of mouse event 3, mouse event 3 is the previous mouse event of mouse event 4, and mouse event 4 is the previous mouse event of mouse event 5. For the current mouse event, it is necessary to determine whether there is an adjacent previous mouse event based on the processing time interval corresponding to the previous mouse event, and at the same time, it is necessary to determine whether there is an adjacent next mouse event based on the processing time interval corresponding to the next mouse event. Specifically, if the processing time interval corresponding to the current mouse event and the previous mouse event is less than or equal to the first threshold, then the previous mouse event is the previous mouse event adjacent to the current mouse event; similarly, if the processing time interval corresponding to the current mouse event and the next mouse event is less than or equal to the first threshold, then the next mouse event is the next mouse event adjacent to the current mouse event. Through this method, the mouse events adjacent to the current mouse event can be determined. The mouse events involved in the aforementioned mouse event array A and mouse event array B are still used for explanation. Assume that the first mouse event array received by the cloud server is mouse event array A, and the second mouse event array is mouse event array B. Then there is no previous mouse event for mouse event 1, only a next mouse event (i.e., mouse event 2). If the processing time interval corresponding to mouse event 1 and mouse event 2 is less than or equal to the first threshold, then mouse event 2 is the next mouse event adjacent to mouse event 1.
[0034] The previous mouse event of mouse event 3 is mouse event 2. If the processing time interval corresponding to mouse event 3 and mouse event 2 is less than or equal to the first threshold, then mouse event 2 is the previous mouse event adjacent to mouse event 3. For mouse event 3, since the mouse event data of mouse event 3 does not have the next mouse event data in the mouse event array (i.e., mouse event array A) to which it belongs (i.e., there is no mouse event data after the mouse event data of mouse event 3 in mouse event array A), if the cloud server receives a mouse event array within a period of time after the current time, the mouse event corresponding to the first mouse event data of the mouse event array is the next mouse event of mouse event 3. Assuming that the mouse event array is mouse event array B, the next mouse event of mouse event 3 is mouse event 4. If the processing time interval corresponding to mouse event 3 and mouse event 4 is less than or equal to the first threshold, then mouse event 4 is the next mouse event adjacent to mouse event 3.
[0035] The previous mouse event of mouse event 4 is mouse event 3. If the processing time interval corresponding to mouse event 4 and mouse event 3 is less than or equal to the first threshold, mouse event 3 is the previous mouse event adjacent to mouse event 4. The next mouse event of mouse event 4 is mouse event 5. If the processing time interval corresponding to mouse event 4 and mouse event 5 is less than or equal to the first threshold, mouse event 5 is the next mouse event adjacent to mouse event 4.
[0036] The processing time interval is the interval between processing times, and the processing time may be the acquisition time of the mouse event data. The first threshold and the second threshold may be set as required, for example, to 50 ms.
[0037] On the basis of the aforementioned method embodiment, when there are abnormal values in the coordinates of the current mouse event, adjusting the abnormal value coordinates in the current mouse event according to the size relationship between the coordinates of the current mouse event and the adjacent mouse event to obtain the target mouse event data may include:
[0038] If the absolute value of the horizontal coordinate of the current mouse event is greater than or equal to the larger value of the product of the absolute value of the horizontal coordinate of the adjacent mouse event and the third threshold, the direction of the horizontal coordinate of the current mouse event is kept unchanged, and the size of the horizontal coordinate of the current mouse event is adjusted to the larger value to obtain target mouse event data including the horizontal coordinate of the current mouse event; and / or
[0039] If the absolute value of the vertical coordinate of the current mouse event is greater than or equal to the larger value of the product of the absolute value of the vertical coordinate of the adjacent mouse event and the third threshold, the direction of the vertical coordinate of the current mouse event is kept unchanged, and the size of the vertical coordinate of the current mouse event is adjusted to the larger value to obtain the target mouse event data containing the vertical coordinate of the current mouse event.
[0040] In this embodiment, the abnormal value coordinate in the current mouse event is used as the horizontal coordinate for example. Assuming that the third threshold is 5, the current mouse event is mouse event 2, the horizontal coordinate of mouse event 2 is 100, the mouse events adjacent to mouse event 2 are mouse event 1 and mouse event 3, the horizontal coordinate of mouse event 1 is -1, and the horizontal coordinate of mouse event 3 is 10. Because the absolute value of the horizontal coordinate of mouse event 2 (i.e., 100) is greater than the product of the absolute value of the horizontal coordinate of mouse event 1 and 5 (i.e., 5) and the product of the absolute value of the horizontal coordinate of mouse event 3 and 5 (i.e., 50), the horizontal coordinate of mouse event 2 is an abnormal value coordinate. At this time, the size of the horizontal coordinate of mouse event 2 needs to be adjusted to the larger value 50, while the direction of the horizontal coordinate of mouse event 2 and the vertical coordinate of mouse event 2 remain unchanged. The mouse event data of mouse event 2 after the size of the horizontal coordinate is adjusted is the target mouse event data. After determining the target mouse event data, it needs to be sent to the system at a specific time. In addition, it should be noted that, when the mouse event 3 is subsequently processed, the mouse event data of the mouse event 2 is the mouse event data after the size of the horizontal coordinate is adjusted.
[0041] Based on the foregoing method embodiment, the method may further include:
[0042] If the absolute value of the horizontal coordinate of the current mouse event is smaller than the larger value of the product of the absolute value of the horizontal coordinate of the adjacent mouse event and the third threshold, then the target mouse event data including the horizontal coordinate of the current mouse event is obtained; and / or
[0043] If the absolute value of the ordinate of the current mouse event is smaller than the larger value of the product of the absolute value of the ordinate of the adjacent mouse event and the third threshold, target mouse event data including the ordinate of the current mouse event is obtained.
[0044] In this embodiment, it should be noted that if the horizontal coordinate / vertical coordinate of the current mouse event is not an abnormal value coordinate (i.e., the absolute value of the horizontal coordinate is less than the larger value of the product of the absolute value of the horizontal coordinate of the adjacent mouse event and the third threshold value / the absolute value of the vertical coordinate is less than the larger value of the product of the absolute value of the vertical coordinate of the adjacent mouse event and the third threshold value), it will not be adjusted. That is, the target mouse event data is consistent with the mouse event data of the current mouse event: if the coordinates of the current mouse event are adjusted, the mouse event data of the current mouse event after the coordinate adjustment is the target mouse event data; and if the coordinates of the current mouse event are not adjusted, the mouse event data of the current mouse event is the target mouse event data.
[0045] Based on the foregoing method embodiment, the method may further include:
[0046] The maximum return rate of the mouse is determined, and a threshold corresponding to a return rate range to which the maximum return rate belongs is determined as a third threshold.
[0047] In this embodiment, it should be noted that the third threshold value can be determined based on the maximum return rate of the mouse, and the maximum return rate of the mouse can be determined based on the mouse event data processed by the cloud server within 1 second or the target mouse event data sent to the system within 1 second. The higher the maximum return rate, the smaller the corresponding third threshold value. For example, for a mouse with a high return rate, the corresponding third threshold value can be set to 5; for a mouse with a low return rate, the corresponding third threshold value can be set to 10.
[0048] On the basis of the aforementioned method embodiment, when there are abnormal values in the coordinates of the current mouse event, adjusting the abnormal value coordinates in the current mouse event according to the size relationship between the coordinates of the current mouse event and the adjacent mouse event to obtain the target mouse event data may include:
[0049] If the absolute value of the horizontal coordinate of the current mouse event is greater than or equal to the result of the summation of the larger value of the absolute values of the horizontal coordinates of the adjacent mouse events and the fourth threshold, the direction of the horizontal coordinate of the current mouse event is kept unchanged, and the size of the horizontal coordinate of the current mouse event is adjusted to the result of the summation to obtain target mouse event data including the horizontal coordinate of the current mouse event; and / or
[0050] If the absolute value of the vertical coordinate of the current mouse event is greater than or equal to the result of the sum operation of the larger value of the absolute value of the vertical coordinate of the adjacent mouse event and the fourth threshold, the direction of the vertical coordinate of the current mouse event is kept unchanged, and the size of the vertical coordinate of the current mouse event is adjusted to the result of the sum operation to obtain the target mouse event data containing the vertical coordinate of the current mouse event.
[0051] In this embodiment, the principle of adjusting the coordinates of the abnormal value in the current mouse event is consistent with the principle of adjusting the coordinates of the abnormal value in the current mouse event in the previous embodiment, except that the comparison basis of the absolute value of the horizontal coordinate / vertical coordinate of the current mouse event is no longer the larger value of the product of the absolute value of the horizontal coordinate of the adjacent mouse event and the third threshold value / the larger value of the product of the absolute value of the vertical coordinate of the adjacent mouse event and the third threshold value, but the result of the summation operation of the larger value of the absolute value of the horizontal coordinate of the adjacent mouse event and the fourth threshold value / the result of the summation operation of the larger value of the absolute value of the vertical coordinate of the adjacent mouse event and the fourth threshold value, and the specific implementation is not repeated here. The fourth threshold value can also be determined in the same way as the third threshold value, which is not repeated here.
[0052] Based on the foregoing method embodiment, the method may further include:
[0053] If the absolute value of the horizontal coordinate of the current mouse event is less than the sum of the larger value of the absolute values of the horizontal coordinates of the adjacent mouse events and the fourth threshold, the target mouse event data including the horizontal coordinate of the current mouse event is obtained; and / or
[0054] If the absolute value of the ordinate of the current mouse event is smaller than the sum of the larger absolute value of the ordinate of the adjacent mouse event and the fourth threshold, target mouse event data including the ordinate of the current mouse event is obtained.
[0055] Based on the aforementioned method embodiment, the system for transmitting the target mouse event data to the cloud server may include:
[0056] Add the target mouse event data to the linked list, and obtain a piece of data from the linked list each time according to the preset time interval and send it to the system kernel.
[0057] In this embodiment, it should be noted that the preset time interval can be set as needed, such as 0.5ms. Sending target mouse event data to the system kernel at the preset time interval can further reduce the occurrence of cloud application screen freezes and improve the fluency and stability of the cloud application screen.
[0058] Based on the aforementioned method embodiment, the current mouse event data may be collected through the pointerrawupdate interface.
[0059] In this embodiment, it should be noted that, in existing Web terminals, a normal local mouse generally sends mouse event data to the system once every 1 millisecond, and due to the limitation of related functions, the collection frequency of mouse event data is generally once every 16 milliseconds, which results in the relative coordinate data of the mouse event data collected by the terminal through the browser being relatively large, which in turn causes the rotation angle of the cloud application screen to change greatly, reducing the smoothness of the cloud application screen. Based on this, for existing Web terminals, mouse event data is collected through the pointerrawupdate interface. This method can collect mouse event data in real time. Compared with the existing technology, the collection frequency of mouse event data is higher. After sending the data to the system, the rotation angle of the rendered cloud application screen is smoother and more fluent.
[0060] Reference Figure 2 FIG. 1 is a schematic diagram of a structure of a mouse data processing device provided in an embodiment of the present application, which is applied to a cloud server, and the device includes:
[0061] A first judgment unit 20 is used to receive current mouse event data sent by the terminal, and judge whether at least one of the horizontal coordinate and the vertical coordinate of the current mouse event is not 0, wherein the current mouse event data includes the coordinates of the current mouse event;
[0062] The second judgment unit 21 is used to determine the mouse events adjacent to the current mouse event if at least one of the horizontal coordinate and the vertical coordinate of the current mouse event is not 0, and judge whether there is an abnormal value in the coordinates of the current mouse event according to the size relationship between the coordinates of the current mouse event and the adjacent mouse event;
[0063] The adjustment unit 22 is used to adjust the coordinates of the abnormal value in the current mouse event according to the coordinates of the adjacent mouse events if there are abnormal values in the coordinates of the current mouse event to obtain target mouse event data, and transmit the target mouse event data to the cloud server system.
[0064] The mouse data processing device provided in the embodiment of the present application adjusts the abnormal value coordinates in the current mouse event according to the coordinates of adjacent mouse events to obtain target mouse event data when the horizontal and vertical coordinates of the current mouse event data are not all zero and there are abnormal values in the coordinates of the current mouse event. In this way, it is no longer the abnormal value coordinates that are transmitted to the system, thereby reducing the occurrence of drastic changes in the rotation viewing angle of the cloud application screen and improving the smoothness of the cloud application screen.
[0065] The mouse data processing device provided in the embodiment of the present application has an implementation process that is consistent with the mouse data processing method provided in the embodiment of the present application, and the effect that can be achieved is also the same as the mouse data processing method provided in the embodiment of the present application, which will not be repeated here.
[0066] like Figure 3 As shown, an electronic device provided by an embodiment of the present application includes: a processor 30, a memory 31 and a bus 32, wherein the memory 31 stores machine-readable instructions executable by the processor 30, and when the electronic device is running, the processor 30 communicates with the memory 31 through the bus 32, and the processor 30 executes the machine-readable instructions to perform the steps of the above-mentioned mouse data processing method.
[0067] Specifically, the memory 31 and the processor 30 can be general-purpose memories and processors, which are not specifically limited here. When the processor 30 runs the computer program stored in the memory 31, the mouse data processing method can be executed.
[0068] Corresponding to the above-mentioned mouse data processing method, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned mouse data processing method are executed.
[0069] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A mouse data processing method, applied to a cloud server, characterized in that: include: Receiving current mouse event data sent by the terminal, and determining whether at least one of the horizontal coordinate and the vertical coordinate of the current mouse event is not 0, wherein the current mouse event data includes the coordinates of the current mouse event; If at least one of the horizontal coordinate and the vertical coordinate of the current mouse event is not 0, then determine the mouse event adjacent to the current mouse event, and determine whether there is an abnormal value in the coordinates of the current mouse event according to the size relationship between the coordinates of the current mouse event and the adjacent mouse event; If there are abnormal values in the coordinates of the current mouse event, the abnormal value coordinates in the current mouse event are adjusted according to the coordinates of the adjacent mouse events to obtain the target mouse event data, and the target mouse event data is transmitted to the system of the cloud server.
2. The method according to claim 1, characterized in that The determining of a mouse event adjacent to the current mouse event comprises: When there is a previous mouse event for the current mouse event, if it is determined that the processing time interval corresponding to the current mouse event and the previous mouse event is less than or equal to a first threshold, the previous mouse event is taken as the previous mouse event adjacent to the current mouse event; When there is a subsequent mouse event for the current mouse event, if it is determined that the processing time interval corresponding to the current mouse event and the subsequent mouse event is less than or equal to the second threshold, the subsequent mouse event is taken as the subsequent mouse event adjacent to the current mouse event.
3. The method according to claim 1 or 2, characterized in that When there is an abnormal value in the coordinates of the current mouse event, adjusting the abnormal value coordinates in the current mouse event according to the size relationship between the coordinates of the current mouse event and the adjacent mouse event to obtain the target mouse event data, including: If the absolute value of the horizontal coordinate of the current mouse event is greater than or equal to the larger value of the product of the absolute value of the horizontal coordinate of the adjacent mouse event and the third threshold, the direction of the horizontal coordinate of the current mouse event is kept unchanged, and the size of the horizontal coordinate of the current mouse event is adjusted to the larger value to obtain target mouse event data including the horizontal coordinate of the current mouse event; and / or If the absolute value of the vertical coordinate of the current mouse event is greater than or equal to the larger value of the product of the absolute value of the vertical coordinate of the adjacent mouse event and the third threshold, the direction of the vertical coordinate of the current mouse event is kept unchanged, and the size of the vertical coordinate of the current mouse event is adjusted to the larger value to obtain the target mouse event data containing the vertical coordinate of the current mouse event.
4. The method according to claim 3, characterized in that Also includes: The maximum return rate of the mouse is determined, and a threshold corresponding to a return rate range to which the maximum return rate belongs is determined as a third threshold.
5. The method according to claim 1 or 2, characterized in that: When there is an abnormal value in the coordinates of the current mouse event, adjusting the abnormal value coordinates in the current mouse event according to the size relationship between the coordinates of the current mouse event and the adjacent mouse event to obtain the target mouse event data, including: If the absolute value of the horizontal coordinate of the current mouse event is greater than or equal to the result of the summation of the larger value of the absolute values of the horizontal coordinates of the adjacent mouse events and the fourth threshold, the direction of the horizontal coordinate of the current mouse event is kept unchanged, and the size of the horizontal coordinate of the current mouse event is adjusted to the result of the summation to obtain target mouse event data including the horizontal coordinate of the current mouse event; and / or If the absolute value of the vertical coordinate of the current mouse event is greater than or equal to the result of the sum operation of the larger value of the absolute value of the vertical coordinate of the adjacent mouse event and the fourth threshold, the direction of the vertical coordinate of the current mouse event is kept unchanged, and the size of the vertical coordinate of the current mouse event is adjusted to the result of the sum operation to obtain the target mouse event data containing the vertical coordinate of the current mouse event.
6. The method according to claim 1, characterized in that The system for transmitting target mouse event data to a cloud server includes: Add the target mouse event data to the linked list, and obtain a piece of data from the linked list each time according to the preset time interval and send it to the system kernel.
7. The method according to claim 1, characterized in that The current mouse event data is collected through the interface pointerrawupdate.
8. A mouse data processing device, applied to a cloud server, characterized in that: include: A first judgment unit is used to receive current mouse event data sent by the terminal, and judge whether at least one of the horizontal coordinate and the vertical coordinate of the current mouse event is not 0, wherein the current mouse event data includes the coordinates of the current mouse event; A second judgment unit is used to determine the mouse events adjacent to the current mouse event if at least one of the horizontal coordinate and the vertical coordinate of the current mouse event is not 0, and to judge whether there is an abnormal value in the coordinates of the current mouse event according to the size relationship between the coordinates of the current mouse event and the adjacent mouse event; The adjustment unit is used to adjust the coordinates of the abnormal value in the current mouse event according to the coordinates of the adjacent mouse events if there are abnormal values in the coordinates of the current mouse event to obtain target mouse event data, and transmit the target mouse event data to the cloud server system.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the mouse data processing method according to any one of claims 1 to 7 are executed.
10. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the mouse data processing method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Error correction method and device for physical routing data and nonvolatile storage medium
CN118041856A
