Data processing method and apparatus, electronic device and computer-readable storage medium
By using preset compensation strategies in the smart terminal to compensate the Bluetooth mouse point data, the problem of insufficient Bluetooth mouse point rate under the high refresh rate screen is solved, and the smoothness of mouse movement and user experience are improved.
Patent Information
- Application Number
- PCT/CN2024/093146
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-08-10
- Filing Date
- 2024-05-14
- Publication Date
- 2025-02-13
AI Technical Summary
The increase in the screen refresh rate of smartphones causes the point rate of ordinary Bluetooth mice to be unable to match, resulting in insufficient mouse movement.
By obtaining the point data of the mouse movement event, compensation is performed based on the preset compensation strategy determined by the screen refresh frequency and mouse return rate, and inserting compensation data to match the screen refresh rate to ensure that there is a point data report every time the screen refresh is refreshed.
It improves the smoothness of the Bluetooth mouse movement on the high refresh rate screen, avoids the problem of lag in mouse movement, and improves the user experience.
Smart Images

Figure CN2024093146_13022025_PF_FP_ABST
Abstract
Description
Data processing method and device, electronic device and computer-readable storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to Chinese patent application No. 202311008304.8 filed on August 10, 2023, the contents of which are incorporated herein by reference in their entirety. Technical Field
[0003] The present application relates to the field of computer technology, and in particular to a data processing method, a data processing device, an electronic device, and a computer-readable storage medium. Background Art
[0004] Ordinary Bluetooth mice on the market are generally compatible with Android phones from all manufacturers. When moving, ordinary Bluetooth mice will trigger a move event and report the point to the upper layer. The reporting time interval of the move event is about 16ms, which is just smaller than the time interval of the vertical synchronization (vsync) signal with a refresh rate of 60HZ of most mobile phone screens (about 16.67ms), which means that it can meet the Bluetooth mouse movement needs of most mobile phones.
[0005] However, the development speed of smartphone screens is getting faster and faster. Now many flagship screens on the market have reached a refresh rate of 120HZ. The time interval of the vsync signal of a 120HZ refresh rate screen is 8ms, which means that an ordinary Bluetooth mouse will only report one point for every 2 vsync signals. The screen refresh rate and the reporting frequency do not match, so the reporting rate of an ordinary Bluetooth mouse (16ms interval) can no longer meet the requirements of smooth mouse movement on flagship phones.
[0006] Public content
[0007] In the first aspect, the present application provides a data processing method, including: obtaining reporting point data reported by a mouse movement event; compensating the reporting point data based on a preset compensation strategy to obtain compensation data, wherein the preset compensation strategy is determined based on the screen refresh frequency and the mouse return rate; when the screen is refreshed, determining the data to be reported corresponding to this screen refresh based on the reporting point data and the compensation data, and reporting the data to be reported.
[0008] In the second aspect, the present application provides a data processing device, including: an acquisition module, configured to acquire the reporting point data reported by the mouse movement event; a compensation module, configured to compensate the reporting point data based on a preset compensation strategy to obtain compensation data, and the preset compensation strategy is determined based on the screen refresh frequency and the mouse return rate; a reporting module, configured to determine the data to be reported corresponding to this screen refresh based on the reporting point data and the compensation data when the screen is refreshed, and report the data to be reported.
[0009] In a third aspect, the present application provides an electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicatively connected via the communication bus; the memory is configured to store a computer program; and the processor is configured to execute the computer program stored in the memory to implement the data processing method described in the first aspect.
[0010] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and the computer program is executed by a processor so that the processor implements the data processing method described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate some embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0012] In order to more clearly illustrate the implementation methods of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the description of the implementation methods of the present application or the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0013] FIG1 is a structural diagram of a software module in a smart terminal provided in an embodiment of the present application.
[0014] FIG2 is a flow chart of a data processing method provided in an embodiment of the present application.
[0015] FIG3 is a structural diagram of a data processing device provided in an embodiment of the present application.
[0016] FIG4 is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0017] To make the purpose, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. The described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments described in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0018] Due to the increasingly rapid development of smartphone screens, many flagship screens on the market now have a refresh rate of 120HZ, and the time interval of the vsync signal of a 120HZ refresh rate screen is already 8ms, which is equivalent to an ordinary Bluetooth mouse reporting a point every two vsync signals. The screen refresh rate and the reporting frequency do not match, so the reporting rate of an ordinary Bluetooth mouse (16ms interval) can no longer meet the requirements of smooth mouse movement on flagship phones. The present application provides a data processing method, a data processing device, an electronic device, and a computer-readable storage medium. The technical solution proposed in the present application is: a specific number of interpolation points is obtained according to a preset compensation strategy determined by the screen refresh frequency and the mouse return rate, and then a specific interpolation is performed according to a linear mean algorithm, and then reported to the application layer APP (such as a game). By implementing this technical solution, the movement performance of the game perspective according to the movement of the Bluetooth mouse can be significantly improved, which is smoother and will not be stuck.
[0019] This application provides a data processing method that can be applied to the middle layer for input event processing in a smart terminal. A smart terminal refers to a Bluetooth-enabled device that can be controlled by a Bluetooth mouse. The smart terminal can establish a Bluetooth connection with the Bluetooth mouse, and the Bluetooth mouse can input collected point reporting data and other information to the smart terminal. For example, the smart terminal can be a mobile phone, tablet computer, etc. As shown in Figure 1, the software in the smart terminal includes: a Bluetooth mouse driver, an middle layer, an APP layer, and a display module. The Bluetooth mouse driver receives information such as point reporting data from the Bluetooth mouse and sends it to the middle layer. The middle layer processes the data using the data processing method provided in this application and reports it to the APP layer. The APP layer further processes the reported data so that the display module drives the smart terminal screen to display the movement and operation of the mouse.
[0020] In some embodiments, the Android system of the smart terminal sends a vsync signal every time Z (Z is in ms, Z=1000 / X, X is the screen refresh rate, and X is in Hz) to trigger the drawing and display of the user interface (UI). The vsync mechanism has been introduced in Android version 4.1 to synchronize the drawing and display. The UI of the APP layer can work according to the vsync rhythm generated by the hardware. By sending a vsync signal to the APP layer, the upper-layer APP performs the drawing action after receiving the vsync signal, so that the UI content of the APP layer can be drawn according to the refresh rate of the screen.
[0021] As shown in FIG2 , the data processing method provided in this application may include the following steps S101 to S103 .
[0022] Step S101: Acquire the point data reported by the mouse movement event.
[0023] In the data processing method provided in this application, the mouse movement event is triggered when the Bluetooth mouse is in a page and moves, and the point reporting data includes: the coordinate position of the pointer corresponding to the Bluetooth mouse in the page and the timestamp corresponding to the detection of the coordinate position.
[0024] Step S102: Compensating the reported point data based on a preset compensation strategy to obtain compensated data.
[0025] In the data processing method provided in the present application, the preset compensation strategy is determined based on the screen refresh frequency and the mouse return rate; in order to match the screen refresh rate and the reporting frequency, that is, a point reporting can be performed each time the screen is refreshed, the number of compensation points can be determined based on the screen refresh frequency and the mouse return rate, that is, the preset compensation strategy is about the number of compensation points for compensating the reporting data, that is, it is a compensation strategy about the number of compensation points.
[0026] In some embodiments, the data processing method further includes: determining a screen refresh interval based on the screen refresh frequency; determining a mouse report interval based on the mouse report rate; determining a number of compensation points based on a ratio of the mouse report interval to the screen refresh interval; and generating the preset compensation strategy based on the number of compensation points.
[0027] For example, the screen refresh frequency is X times per second, with milliseconds as the time unit, 1 second equals 1000 milliseconds, then the screen refresh interval is 1000 / X milliseconds, assuming that the reporting interval of the mouse move event, that is, the mouse report interval is Y milliseconds, and the mouse report interval is calculated based on the mouse report rate of 1 / Y. In order to make the mouse report interval smaller than the screen refresh interval, linear interpolation of N compensation points is required. The value of N can be calculated according to the following formula: N = Y / (1000 / X)-1, where N is the number of compensation points.
[0028] Assuming that the current screen refresh rate is X = 120HZ and the mouse reporting interval is Y = 16ms, then according to the calculation formula for the number of compensation points, it can be calculated that: N = 16 / (1000 / 120)-1≈1, which is equivalent to inserting 1 compensation point of compensation data between two adjacent reporting point data.
[0029] In practical applications, the calculated N may also be greater than 1, which is equivalent to inserting compensation data of at least two compensation points between two adjacent reporting point data.
[0030] In this step, the compensation data can be determined based on the number of compensation points and the reporting point data in the preset compensation strategy, and the reporting point data can be compensated using the compensation data, that is, the compensation data is inserted into the reporting point data according to the number of compensation points. After inserting the compensation data, the mouse report interval can be made smaller than the screen refresh interval, thereby ensuring that a point can be reported each time the screen is refreshed.
[0031] Step S103: When the screen is refreshed, the data to be reported corresponding to the current screen refresh is determined based on the reporting point data and the compensation data, and the data to be reported is reported.
[0032] In order to ensure that a reporting point can be performed each time the screen is refreshed, the data to be reported corresponding to this screen refresh can be determined based on the reporting point data and compensation data when the screen is refreshed, and then the data to be reported can be reported to the application layer. In this way, it can be ensured that a data to be reported is reported to the application layer each time the screen is refreshed, so that the screen refresh rate matches the reporting point frequency.
[0033] The data processing method provided in the present application compensates the reporting point data reported by the mouse movement event according to a preset compensation strategy determined based on the screen refresh frequency and the mouse return rate, and then determines the data to be reported based on the reporting point data and the compensation data. This can ensure that each time the screen is refreshed, a reporting point is triggered, that is, one data to be reported is reported, which is equivalent to adding compensation data according to the screen refresh frequency, and then increasing the reporting point frequency, so that the screen refresh rate matches the reporting point frequency, and the mouse reporting point rate meets the requirements of smooth mouse movement, and the mouse movement is smoother and more convenient for users to use.
[0034] In some implementations, step S101 (obtaining point data reported by a mouse movement event) includes steps S201 to S203.
[0035] Step S201: When a first mouse movement event is monitored, first reporting point information corresponding to a first mouse position reported by the first mouse movement event is intercepted and cached.
[0036] In the data processing method provided in the present application, the first reporting point information includes: a first position coordinate and a first timestamp corresponding to the first mouse position.
[0037] When the first point reporting information reported by the first mouse movement event is received, the first point reporting information is not reported to the application layer, but is intercepted and stored in a cache.
[0038] Step S202: When a second mouse movement event is monitored, second reporting point information corresponding to a second mouse position reported by the second mouse movement event is intercepted.
[0039] In the data processing method provided in the present application, the first mouse movement event and the second mouse movement event are obtained by monitoring two adjacent times during the mouse movement process, and the first mouse movement event is earlier than the second mouse movement event; the second reporting point information includes: the second position coordinates and the second timestamp corresponding to the second mouse position, and the second timestamp is later than the first timestamp.
[0040] When the second reporting point information reported by the second mouse movement event is received, the second reporting point information is not reported to the application layer, but is intercepted. The second reporting point information can be saved in the cache later, or after obtaining the second reporting point information and the cached first reporting point information, the two can be directly used as reporting point data.
[0041] Step S203: Acquire the first reporting point information and the second reporting point information as the reporting point data.
[0042] For example, assuming that the current screen refresh rate is X=120HZ, an ordinary Bluetooth mouse moves in one direction, the mouse reporting interval is Y=16ms, and the reporting order is the first mouse position A (first timestamp 0ms, first position coordinate (0, 0)), the second mouse position B (second timestamp 16ms, second position coordinate (0, 30)), after the middle layer receives the first reporting information reported by the Bluetooth mouse at the first mouse position A, it first intercepts the first reporting information and prevents the first reporting information from being reported to the application layer, and saves the first reporting information in the cache. After receiving the second reporting information reported at the second mouse position B, it first intercepts the second reporting information, obtains the second reporting information, and obtains the cached first reporting information, so that the two can be used as the reporting data in the aforementioned implementation method (i.e., step S101).
[0043] By intercepting the first reporting point information and the second reporting point information, it is possible to avoid direct reporting without a screen refresh trigger, which results in the screen refresh and the reporting point being unable to match synchronously, making it easier to compensate for the reporting point data in the future. The reporting point is triggered only once each time the screen is refreshed, that is, a data to be reported is reported, and the screen refresh is matched with the reporting point, so that the mouse reporting rate meets the requirements of smooth mouse movement, the mouse movement is smoother, and it is easier for users to use.
[0044] In some embodiments, the reporting point data includes: first reporting point information corresponding to the first mouse position and second reporting point information corresponding to the second mouse position, and step S102 (compensating the reporting point data based on a preset compensation strategy to obtain compensation data) includes: steps S301 and S302.
[0045] Step S301: determining interpolation parameters based on the first reporting point information and the second reporting point information.
[0046] In the data processing method provided in the present application, the interpolation parameters are used to indicate the time range and coordinate range in which the compensation points can be inserted. The interpolation parameters may include: the time interval for moving from the first mouse position to the second mouse position and the movement path from the first mouse position to the second mouse position.
[0047] In some embodiments, step S301 (determining interpolation parameters based on the first point reporting information and the second point reporting information) includes: determining the time interval for moving from the first mouse position to the second mouse position based on the first timestamp in the first point reporting information and the second timestamp in the second point reporting information; determining the moving path from the first mouse position to the second mouse position based on the first position coordinates in the first point reporting information and the second position coordinates in the second point reporting information; and using the time interval and the moving path as the interpolation parameters.
[0048] As an example, based on the above-mentioned embodiment, it can be calculated that the time interval between the first mouse position point A (first timestamp 0ms, first position coordinate (0, 0)) and the second mouse position point B (second timestamp 16ms, second position coordinate (0, 30)) is 16ms and the moving path is from (0, 0) to (0, 30).
[0049] Step S302: Compensating the reported point data based on the interpolation parameters and the preset compensation strategy to obtain compensated data.
[0050] After determining the time range (the above time interval) and coordinate range (the above moving path) in which the compensation points can be inserted, the compensation data used to compensate the reported point data can be determined according to the number of compensation points in the preset compensation strategy.
[0051] In some embodiments, step S302 (compensating the reported point data based on the interpolation parameters and the preset compensation strategy to obtain compensation data) includes: determining the number of compensation points according to the preset compensation strategy; performing linear interpolation between the first mouse position and the second mouse position according to the interpolation parameters and the number of compensation points to determine the third timestamp and third coordinate of the inserted compensation point; and determining the third timestamp and the third coordinate as the compensation data.
[0052] In the data processing method provided in the present application, compensation points can be evenly inserted within the time range and coordinate range in which compensation points can be inserted according to the number of compensation points. For example, when the number of compensation points is 1, compensation point A1 (third timestamp 8ms, third position coordinates (0, 15)) can be inserted at the middle position between the first mouse position point A (first timestamp 0ms, first position coordinates (0, 0)) and the second mouse position point B (second timestamp 16ms, second position coordinates (0, 30)); when the number of compensation points is 3, compensation points A2 (third timestamp 4ms, third position coordinates (0, 7.5)), A3 (third timestamp 8ms, third position coordinates (0, 15)) and A4 (third timestamp 12ms, third position coordinates (0, 22.5)) can be evenly inserted between the first mouse position point A (first timestamp 0ms, first position coordinates (0, 0)) and the second mouse position point B (second timestamp 16ms, second position coordinates (0, 30)).
[0053] The data processing method provided in the present application first determines the interpolation parameters for indicating the time range and coordinate range in which compensation points can be inserted, and then determines the compensation data that can compensate the reporting point data according to the number of compensation points in the preset compensation strategy determined according to the screen refresh frequency and the mouse return rate. By compensating the reporting point data, the reporting point data can be expanded, the compensation data is added, and the reporting point frequency is increased, so that the screen refresh rate matches the reporting point frequency, ensuring that each time the screen is refreshed, a reporting point is triggered, that is, a data to be reported is reported, so that the screen refresh rate matches the reporting point frequency, and the mouse reporting point rate meets the requirements of smooth mouse movement, the mouse movement is smoother, and it is convenient for users to use.
[0054] In some embodiments, the reporting point data includes: first reporting point information corresponding to the first mouse position and second reporting point information corresponding to the second mouse position, step S103 (when the screen is refreshed, determining the data to be reported corresponding to this screen refresh based on the reporting point data and the compensation data, and reporting the data to be reported) includes: steps S401 and S402.
[0055] Step S401: sort the first reporting point information, the compensation data and the second reporting point information according to the time sequence of the corresponding timestamps.
[0056] Based on the aforementioned implementation, it can be seen that the first mouse position is detected earlier than the second mouse position, the timestamp corresponding to the first point information is earlier than the timestamp of the second mouse position, and the compensation point is inserted between the first and second mouse positions. Therefore, the order of the three is: first point information, compensation data, and second point information.
[0057] Step S402, when the screen is refreshed, according to the sorting, determine a to-be-reported data corresponding to the current screen refresh from the first reporting point information, the compensation data and the second reporting point information, and report the to-be-reported data.
[0058] In this step, one of the first reporting point information, compensation data and second reporting point information can be used as the data to be reported and uploaded during the subsequent screen refreshes. Since the subsequent screen refreshes are in sequence, the screen refreshes can be matched one by one with the data to be reported in the sorted sequence. The corresponding data to be reported in the sorting sequence is selected for reporting each time the screen is refreshed until all the data in the sorting sequence are reported.
[0059] That is to say, when the screen is refreshed for the first time after receiving the reporting point data, the first reporting point information that is ranked first in the sort (that is, with the earliest timestamp) can be used as the data to be reported, and the first reporting point information can be reported; when the screen is refreshed for the second time after receiving the reporting point data, the compensation data that is ranked second in the sort (that is, with the second timestamp) can be used as the data to be reported. If there are multiple compensation points, the compensation data of the first compensation point can be reported in this screen refresh; when the screen is refreshed for the third time after receiving the reporting point data, the compensation data of the second compensation point can be reported in this screen refresh, and so on, until the compensation data of all compensation points are fully reported at the mth screen refresh, and the second reporting point information is reported at the m+1th screen refresh. At this point, all data in the sort are reported.
[0060] For example, when there is only one compensation point, the first reporting point information of the first mouse position point A can be reported when the screen is refreshed for the first time, the compensation data of compensation point A1 can be reported when the screen is refreshed for the second time, and the second reporting point information of the second mouse position point B can be reported when the screen is refreshed for the third time.
[0061] When there are multiple compensation points, the first reporting point information of the first mouse position point A can be reported when the screen is refreshed for the first time, the compensation data of compensation point A1 can be reported when the screen is refreshed for the second time, the compensation data of compensation point A2 can be reported when the screen is refreshed for the third time, and the compensation data of compensation point A3 can be reported when the screen is refreshed for the third time, and so on, until the compensation data of compensation point An is reported when the screen is refreshed for the mth time, and the second reporting point information of the second mouse position point B is reported when the screen is refreshed for the m+1th time.
[0062] In this way, the application layer can receive the first reporting point information of the first mouse position A within the current screen refresh vsync signal (8ms), and can receive the compensation data of the compensation point A1 in the next vsync signal (8ms)... and so on. Furthermore, it can ensure that the game APP at the application layer can receive a reporting point of the mouse movement within each screen refresh vsync signal (8ms), ensuring that there will be no defects during the screen refresh vsync signal (defects will cause visual freezes). In this way, the accuracy of the Bluetooth mouse movement in the game can be guaranteed, and the user's experience of smooth gaming can be enhanced.
[0063] The present application also provides a data processing device, as shown in Figure 3, including: an acquisition module 11, configured to obtain the reporting point data reported by the mouse movement event; a compensation module 12, configured to compensate the reporting point data based on a preset compensation strategy to obtain compensation data, and the preset compensation strategy is determined based on the screen refresh frequency and the mouse return rate; a reporting module 13, configured to determine the data to be reported corresponding to this screen refresh based on the reporting point data and the compensation data when the screen is refreshed, and report the data to be reported.
[0064] The present application also provides an electronic device, including a processor 1110, a communication interface 1120, a memory 1130 and a communication bus 1140, wherein the processor 1110, the communication interface 1120 and the memory 1130 are communicatively connected via the communication bus 1140; the memory 1130 is configured to store a computer program; and the processor 1110 is configured to execute the computer program stored in the memory 1130 to implement the aforementioned data processing method.
[0065] In the electronic device provided by the present application, the processor 1110 realizes compensation for the reporting point data reported by the mouse movement event according to a preset compensation strategy determined based on the screen refresh frequency and the mouse return rate by executing the computer program stored in the memory 1130, and then determines the data to be reported based on the reporting point data and the compensation data. It can ensure that each time the screen is refreshed, a reporting point is triggered, that is, one data to be reported is reported, which is equivalent to adding compensation data according to the screen refresh frequency, and then increasing the reporting point frequency, so that the screen refresh rate matches the reporting point frequency, so that the mouse reporting point rate meets the requirements of smooth mouse movement, the mouse movement is smoother, and it is convenient for users to use.
[0066] The communication bus 1140 mentioned in the electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 1140 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, FIG4 shows only one thick line, but this does not mean that there is only one bus or only one type of bus.
[0067] The communication interface 1120 is used for communication between the electronic device and other devices.
[0068] The memory 1130 may include a random access memory (RAM) or a non-volatile memory, such as at least one disk storage. The memory 1130 may also be at least one storage device located away from the processor 1110 .
[0069] The above-mentioned processor 1110 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0070] The present application also provides a computer-readable storage medium, on which a computer program is stored. The computer program is executed by a processor, so that the processor implements the aforementioned data processing method.
[0071] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0072] The foregoing is merely a list of specific embodiments of the present application, intended to enable those skilled in the art to understand and implement the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the broadest scope consistent with the principles and novel features of the present application.
Claims
1. A data processing method, comprising: Get the point data reported by the mouse movement event; The point reporting data is compensated based on a preset compensation strategy to obtain compensation data, wherein the preset compensation strategy is determined based on a screen refresh frequency and a mouse return rate; When the screen is refreshed, the data to be reported corresponding to the current screen refresh is determined based on the reporting point data and the compensation data, and the data to be reported is reported.
2. The data processing method according to claim 1, wherein: The step of obtaining the reported point data reported by the mouse movement event includes: When a first mouse movement event is monitored, first reporting point information corresponding to a first mouse position reported by the first mouse movement event is intercepted and cached; When a second mouse movement event is monitored, second reporting point information corresponding to a second mouse position reported by the second mouse movement event is intercepted, wherein the first mouse movement event and the second mouse movement event are obtained by two consecutive monitorings during the mouse movement process; The first reporting point information and the second reporting point information are obtained as the reporting point data.
3. The data processing method according to claim 1, wherein: The reporting point data includes: first reporting point information corresponding to the first mouse position and second reporting point information corresponding to the second mouse position, and the point reporting data is compensated based on a preset compensation strategy to obtain compensation data including: Determine an interpolation parameter based on the first reporting point information and the second reporting point information; The reported point data is compensated based on the interpolation parameters and the preset compensation strategy to obtain compensated data.
4. The data processing method according to claim 3, wherein: The determining of the interpolation parameter based on the first reporting point information and the second reporting point information comprises: Based on the first timestamp in the first reporting information and the second reporting information determining a time interval from the first mouse position to the second mouse position using a second timestamp; Determine a moving path from the first mouse position to the second mouse position based on the first position coordinates in the first reporting point information and the second position coordinates in the second reporting point information; The time interval and the moving path are used as the interpolation parameters.
5. The data processing method according to claim 3, wherein: The compensating the reporting data based on the interpolation parameter and the preset compensation strategy to obtain the compensated data includes: Determining the number of compensation points according to the preset compensation strategy; Performing linear interpolation between the first mouse position and the second mouse position according to the interpolation parameter and the number of compensation points to determine a third timestamp and a third coordinate of the inserted compensation point; The third timestamp and the third coordinates are determined as the compensation data.
6. The data processing method according to claim 1, further comprising: determining a screen refresh interval based on the screen refresh frequency; Determining a mouse reporting interval based on the mouse reporting rate; Determining the number of compensation points based on the ratio of the mouse reporting interval to the screen refresh interval; The preset compensation strategy is generated based on the number of compensation points.
7. The data processing method according to claim 1, wherein: The point reporting data includes: first point reporting information corresponding to the first mouse position and second point reporting information corresponding to the second mouse position. When the screen is refreshed, the to-be-reported data corresponding to the current screen refresh is determined based on the point reporting data and the compensation data. Reporting the to-be-reported data includes: sorting the first reporting point information, the compensation data and the second reporting point information according to the time sequence of the corresponding timestamps; Each time the screen is refreshed, the first reporting point information, the Determine a to-be-reported data corresponding to the current screen refresh from the compensation data and the second reporting point information, and report the to-be-reported data.
8. A data processing device, comprising: An acquisition module, configured to acquire point data reported by a mouse movement event; A compensation module, configured to compensate the reported point data based on a preset compensation strategy to obtain compensation data, wherein the preset compensation strategy is determined based on a screen refresh frequency and a mouse return rate; The reporting module is configured to determine the data to be reported corresponding to the current screen refresh based on the reporting point data and the compensation data when the screen is refreshed, and report the data to be reported.
9. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein: The processor, communication interface, and memory communicate with each other via a communication bus; a memory configured to store a computer program; A processor is configured to execute a computer program stored in a memory to implement the data processing method described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor so that the processor implements the data processing method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Data processing method and device
CN107436700A
Touch screen point reporting method and device, electronic equipment and storage medium
CN110928449A
Track display method and device, equipment, medium and computer program product
CN116521010A
Data processing method and device, electronic equipment and storage medium
CN117215684A
Refresh of auxiliary display
US20110185369A1
Cited By
Data processing method and system of wireless mouse
CN120704500A