Mouse swipe end-to-end delay measurement method and device

By defining the mouse swipe stop time and the marker object stop time in the mouse swipe scenario, and combining this with a time window display from the same clock source, the problem of accurately measuring end-to-end mouse swipe delay is solved, cross-clock domain errors are eliminated, and high-precision delay measurement is achieved.

CN123114873APending Publication Date: 2026-11-17BEIJING HAIYUDONGXIANG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611596919.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-15
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing technologies cannot accurately measure end-to-end latency of mouse movements and suffer from cross-clock domain alignment errors, leading to inaccurate measurements.

Method used

Define the sliding stop time as the input-side reference time, and the flag object stop time as the screen-side stop response time. Display the current time drawing screen by overlaying a time window on the screen of the program under test, and ensure that the sliding stop time and the current time come from the same clock source. Read the time value directly from the video frame for comparison to eliminate cross-clock domain alignment error.

Benefits of technology

It enables accurate measurement of end-to-end mouse swipe latency, filling the gap in existing methods that can only measure click latency and eliminating cross-clock domain alignment errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123114873A_ABST
    Figure CN123114873A_ABST
Patent Text Reader

Abstract

This application provides a method and apparatus for measuring end-to-end mouse sliding delay. The method includes: acquiring the sliding stop time; determining a search start frame from the video to be processed based on the sliding stop time; starting from the search start frame, calculating the displacement distance of a marker object between adjacent frames frame by frame; if the displacement distances corresponding to N consecutive frames are all less than or equal to a preset distance and the current time corresponding to the current time drawing screen of the Nth frame in the N consecutive frames is greater than or equal to the sliding stop time, it is determined that the marker object has entered a stationary state; the first frame in the N consecutive frames is determined as the marker object stop start frame; and the current time corresponding to the current time drawing screen of the marker object stop start frame is determined as the marker object stop time; the mouse sliding end-to-end delay is calculated based on the sliding stop time and the marker object stop time, which can achieve accurate measurement of mouse sliding end-to-end delay.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computers, and in particular to a method and apparatus for measuring end-to-end delay of mouse movement. Background Technology

[0002] In scenarios such as gaming and cloud computing, there is a very intuitive tactile metric for users operating with a mouse called responsiveness: whether the screen immediately stops responding after the user stops moving the mouse, or whether it lags for several frames before stopping. This metric directly determines the user's operating feel: if the screen lags for several frames before stopping, the user will feel that the operation is sticky, sluggish, and unresponsive.

[0003] The behavior of screen retardation varies depending on the scenario. In scenarios where a cursor is displayed, it manifests as whether the cursor stops immediately; in scenarios where the cursor is not displayed (such as hiding the system cursor in a game or responding to mouse input by rotating the view), it manifests as whether the area of ​​content on the screen that changes with mouse movement stops changing immediately. The time difference between the cessation of mouse input and the retardation of screen retardation is called the end-to-end latency of mouse movement.

[0004] Current methods for measuring latency measure the time from pressing a mouse button to the appearance of a response on the screen. However, these methods have two main problems: First, they measure the click latency from button press to screen response, which is a completely different definition of end-to-end latency for mouse movement, making it impossible to quantify end-to-end mouse movement latency. Second, mouse event timestamps and video frame timestamps come from different clock domains, and direct alignment introduces systematic errors ranging from half a frame to several frames, making it impossible to accurately measure end-to-end mouse movement latency.

[0005] Therefore, how to accurately measure the end-to-end delay of mouse movement has become a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0006] To address the technical problems existing in the prior art, this application provides a method and apparatus for measuring end-to-end delay of mouse movement.

[0007] In a first aspect, embodiments of this application provide a method for measuring end-to-end latency of mouse movement, including: The sliding stop time is obtained, and the search start frame is determined from the video to be processed based on the sliding stop time. The video is a video recorded from the screen of the program under test. A time window is superimposed on the screen of the program under test. The time window continuously displays the current time drawing screen. The current time drawing screen is the screen generated based on the current time. The sliding stop time represents the time when the mouse stops sliding. The sliding stop time and the current time come from the same clock source. Starting from the search start frame, calculate the displacement distance of the marker object between adjacent frames frame by frame. If the displacement distances corresponding to N consecutive frames are all less than or equal to the preset distance and the current time corresponding to the current time drawing screen of the Nth frame in the N consecutive frames is greater than or equal to the sliding stop time, it is determined that the marker object has entered a stationary state. The first frame in the N consecutive frames is determined as the marker object stop start frame, and the current time corresponding to the current time drawing screen of the marker object stop start frame is determined as the marker object stop time, where N is a positive integer. The end-to-end delay of mouse movement is calculated based on the stop time of the movement and the stop time of the marked object.

[0008] Secondly, embodiments of this application also provide a mouse sliding end-to-end delay measurement device, comprising: The determination unit is used to obtain the sliding stop time and determine the search start frame from the video to be processed based on the sliding stop time. The video is a video recorded from the screen of the program under test. A time window is superimposed on the screen of the program under test. The time window continuously displays the current time drawing screen. The current time drawing screen is the screen generated based on the current time. The sliding stop time represents the time when the mouse stops sliding. The sliding stop time and the current time come from the same clock source. The first calculation unit is used to calculate the displacement distance of the marker object between two adjacent frames one by one, starting from the search start frame. If the displacement distance corresponding to N consecutive frames is less than or equal to a preset distance and the current time corresponding to the current time drawing screen of the Nth frame in the N consecutive frames is greater than or equal to the sliding stop time, it is determined that the marker object has entered a stationary state. The first frame in the N consecutive frames is determined as the marker object stop start frame, and the current time corresponding to the current time drawing screen of the marker object stop start frame is determined as the marker object stop time, where N is a positive integer. The second calculation unit is used to calculate the end-to-end delay of mouse movement based on the sliding stop time and the stop time of the marker object.

[0009] The mouse sliding end-to-end delay measurement method and apparatus provided in this application address the first problem by defining the sliding stop time as the input-side reference time and the marker object stop time as the screen-side stop response time. The difference between the two is the single mouse sliding end-to-end delay, thus establishing a set of end-to-end delay measurement methods specifically for mouse sliding scenarios, filling the gap in existing methods that can only measure click delay. Addressing the second problem, a time window is overlaid above the screen of the program under test, continuously displaying the current time drawing generated based on the current time. It is explicitly required that the sliding stop time and the current time come from the same clock source. In this way, the current time corresponding to the current time drawing in the video frame and the mouse event timestamp are naturally in the same time coordinate system. The analysis program can directly read the time value from the video frame and compare it directly with the sliding stop time without any additional calibration, fundamentally eliminating cross-clock domain alignment errors and achieving accurate measurement of mouse sliding end-to-end delay. Attached Figure Description

[0010] Figure 1 This is a flowchart illustrating an embodiment of a mouse sliding end-to-end delay measurement method provided in this application. Figure 2 This is a schematic diagram of an embodiment of a mouse sliding end-to-end delay measurement device provided in this application. Detailed Implementation

[0011] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.

[0012] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0013] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.

[0014] Reference Figure 1 The diagram shown is a flowchart illustrating a mouse sliding end-to-end delay measurement method provided in an embodiment of this application. The method includes: S10. Obtain the sliding stop time and determine the search start frame from the video to be processed based on the sliding stop time. The video is a video recorded from the screen of the program under test. A time window is superimposed on the screen of the program under test. The time window continuously displays the current time drawing screen. The current time drawing screen is the screen generated based on the current time. The sliding stop time represents the time when the mouse stops sliding. The sliding stop time and the current time come from the same clock source. S11. Starting from the search start frame, calculate the displacement distance of the marker object between two adjacent frames frame by frame. If the displacement distances corresponding to N consecutive frames are all less than or equal to the preset distance and the current time corresponding to the current time drawing screen of the Nth frame in the N consecutive frames is greater than or equal to the sliding stop time, it is determined that the marker object has entered a stationary state. The first frame in the N consecutive frames is determined as the marker object stop start frame, and the current time corresponding to the current time drawing screen of the marker object stop start frame is determined as the marker object stop time, where N is a positive integer. S12. Calculate the end-to-end delay of mouse movement based on the sliding stop time and the stop time of the marked object.

[0015] The mouse sliding end-to-end delay measurement method provided in this application addresses the first problem by defining the sliding stop time as the input-side reference time and the marker object stop time as the screen-side stop response time. The difference between the two is the single mouse sliding end-to-end delay, thus establishing a dedicated end-to-end delay measurement method for mouse sliding scenarios, filling the gap in existing methods that can only measure click delay. Addressing the second problem, a time window is overlaid above the screen of the program under test, continuously displaying a current-time drawing generated based on the current time. It is explicitly required that the sliding stop time and the current time come from the same clock source. This ensures that the current time corresponding to the current-time drawing in the video frame and the mouse event timestamp are naturally in the same time coordinate system. The analysis program can directly read the time value from the video frame and compare it directly with the sliding stop time without any additional calibration, fundamentally eliminating cross-clock domain alignment errors and achieving accurate measurement of mouse sliding end-to-end delay.

[0016] The following is a detailed description of the scheme proposed in this application.

[0017] The aforementioned steps S10 to S12 are executed by the testing software. When the testing software starts, it calls RegisterRawInputDevices to register the mouse device with Windows. During registration, it needs to set UsagePage=0x01, Usage=0x02, and add the RIDEV_INPUTSINK flag. UsagePage=0x01 represents the general desktop control category (including all desktop input devices such as mouse, keyboard, and gamepad), and Usage=0x02 further specifies the mouse subtype within this category. The two values ​​together uniquely identify the mouse device. The RIDEV_INPUTSINK flag is used to indicate that the testing software window still receives raw mouse input when it is not in the foreground. With this flag, the testing software can still receive mouse movement when the program under test (such as a game) is running, and will not miss data because the program under test takes over the focus.

[0018] After successful registration, during the test software's operation, testers need to repeatedly move the mouse within the test area. The test area is a transparent, click-through area superimposed on the center of the screen by the test software. Transparency ensures the content under test (game screen, browser page, etc.) is not obscured, and click-through ensures the user's mouse actions are transmitted correctly to the tested program; the presence of the test software does not affect the normal operation of the tested program. Whenever the mouse moves, Windows sends a WM_INPUT message to the test software window, carrying the raw data packet. The test software intercepts this message by subclassing the window procedure (i.e., taking over Windows' default message handling function and inserting its own processing logic). When the WM_INPUT message arrives, the GetRawInputData function is called to parse the data packet into a RAWMOUSE structure (this is the Windows-defined raw mouse data format, containing detailed information about the current mouse movement). The lLastX and lLastY fields are read from the RAWMOUSE structure (these two fields indicate the mouse's displacement increment in the X and Y directions relative to the previous movement, respectively, in the mouse sensor's counting units). If the values ​​of these two fields are not both zero, it indicates that the mouse has started moving and the state has switched to sliding. The `time.perf_counter_ns()` function is immediately called (its internal implementation on Windows calls the Windows `QueryPerformanceCounter` function, a high-precision timing function provided by Windows that reads the current count value of the underlying hardware clock with an accuracy of approximately 100ns, making it the highest precision timing method available on Windows). The current time is recorded as the start time of the sliding. As the mouse slides, `WM_INPUT` messages are continuously intercepted, and `lLastX` and `lLastY` are parsed to update the latest duration of the sliding. If, after a period of time (e.g., 25ms) since the last received `WM_INPUT` message, no further `WM_INPUT` messages with non-zero `lLastX` and `lLastY` values ​​are received, the sliding is determined to have stopped, and the latest duration of the sliding is recorded as the mouse sliding stop time.

[0019] Each time a user completes a quick swipe and immediately stops, the state machine generates a pair of records: the swipe start time and the swipe stop time. The swipe stop time serves as the baseline time for subsequent latency calculations. Under the same set of configurations (such as fixed mouse polling rate, mouse connection method, network conditions, the program under test, and screen display frame rate), multiple tests can be conducted to obtain multiple pairs of records. By changing a single configuration, multiple sets of records can be created for cross-configuration comparison.

[0020] During the test software's operation, it reads the current time at fixed intervals (e.g., 2ms) and renders it as a current time display. This current time display is then placed on top of the test software's time window on the screen. Thus, each frame recorded by the screen recording software / camera contains the corresponding current time display. Subsequent analysis allows direct identification of the current time display from the screen and retrieval of the current time from it. Specifically, the current time can be encoded as black and white squares displayed in the time window. The `time.perf_counter_ns()` function can be used to obtain the current QPC millisecond value as the current time. Since the current QPC millisecond value is a 32-bit integer, the arrangement of black and white squares (i.e., a binary clock) can represent the individual bits of this 32-bit integer: a 1 indicates a bright white square, and a 0 indicates a dark black square. The arrangement of the black and white squares can be customized as needed, such as a horizontal line (e.g., 32 squares arranged from left to right, corresponding to positions 31 to 0), a rectangle, an L-shape, etc. The position of the binary clock does not overlap with the test area. When the test area is located in the center of the screen, the position of the binary clock can be specified as the top left corner of the screen, with a dark canvas as the background. The dark canvas is drawn first as the bottom layer; the squares are drawn later, covering the canvas. Each square can have a side length of 18 pixels, and the spacing between adjacent squares can be 4 pixels.

[0021] To ensure that the current time in each frame is as close as possible to the actual time displayed in that frame, the testing software needs to call the `timeBeginPeriod(1)` function to increase the precision of the Windows system timer from the default of approximately 15ms to 1ms. This allows for a fixed period of continuous clock redrawing, ensuring that the clock value on the screen is the latest each time the monitor refreshes. For example, when the clock is redrawn at a period of approximately 2ms, the clock value displayed on the screen each time will be at most 2ms outdated. It should be noted that the visible change granularity of the clock on the screen is limited by the monitor refresh rate (a 60Hz monitor outputs a new frame approximately every 16.7ms, and a 120Hz monitor outputs a new frame approximately every 8.3ms). A 2ms redraw does not mean that the screen can change at a 2ms granularity, but rather that the clock value displayed on the screen is as latest as possible each time the monitor refreshes.

[0022] To avoid the impact of Windows' scaling function on block drawing, the test software needs to call the SetProcessDpiAwareness(2) function to declare that it is fully aware of DPI (screen pixel density), so that the drawing coordinates of the blocks directly correspond to physical pixels and are not affected by system scaling.

[0023] After the testing software starts, the screen under test can be recorded via external recording (using a camera to film the physical screen) and internal recording (screen recording software directly capturing the screen). During recording, the user needs to perform multiple rapid mouse movements followed by immediate stops, with the cursor moving within the test area. The recording process must ensure a frame rate of at least 60fps and that the time window area on the screen is visible and not obscured by other windows. Upon completion, a video clip is generated, where each frame contains two types of information: the position of the marker object on the screen, and the current time corresponding to the current time of the drawn frame. This video clip serves as the raw material for all subsequent analyses.

[0024] For the recorded video, extract the location of the marker object and the current time corresponding to the current time of the drawing in each frame of the video. Specifically, the following operations can be performed on each frame to extract the location of the marker object and the current time: (1) Convert the image to grayscale (only retain the brightness information, remove the color, and simplify the subsequent calculation); (2) Search in the grayscale image for the region most similar to the marker object image template (the similarity between the most similar region and the marker object image template must be greater than the preset threshold), take the location of the most similar region as the location of the marker object, and for each square in the grayscale image, calculate its average brightness value, and compare the average brightness value with the preset threshold (e.g., set to 127): if the average brightness value is greater than the threshold, determine that the square is displayed as bright white (bit value = 1); if the average brightness value is not greater than the threshold, determine that the square is displayed as dark black (bit value = 0), and combine the bit values ​​of each square to form the current time.

[0025] The `cv2.matchTemplate` function from the OpenCV library can be used to search for the region in a grayscale image that is most similar to the template of the marker image. Since the marker's movement distance between adjacent frames is finite, a local priority strategy can be used: using the marker's position in the previous frame as the center, the search is performed only within a local region (e.g., ±260px) around the center; if the highest matching score in the local search is low (e.g., below 0.55, indicating the marker has moved out of the local region or there is interference within the local region), the search is reversed to a larger range until the entire test area is searched again. Because the local region is much smaller than the entire image, the local priority strategy can significantly improve search speed.

[0026] The average brightness of a square can be the average brightness of the central pixel area of ​​that square, such as the average brightness of the 3×3 pixel area in the center of the square. When the current time is the current timestamp, and the current timestamp is represented by 32 black and white squares, the bit values ​​of the 32 squares are concatenated in order to form a 32-bit integer, which is the clock decoding value of this frame, that is, the QPC millisecond time when this frame was last redrawn.

[0027] After extracting the positions of the marker objects in each frame of the video and the current time corresponding to the current time of the drawn screen, it is necessary to determine the stopping time of the marker objects. The determination process includes: starting from the search starting point (e.g., the first frame in the video where the clock decoding value is ≥ the sliding stop time - 100ms), calculating the displacement distance of the marker objects between adjacent frames frame by frame. If the displacement of N consecutive frames (e.g., 3) is ≤ a preset distance (e.g., 2px) and the clock decoding value of the Nth frame in the N consecutive frames is ≥ the sliding stop time, the marker object is considered to have entered a stationary state. Then, the first frame in the N consecutive frames is the starting frame for the marker object to stop, and the clock decoding value of the starting frame for the marker object to stop is the stopping time of the marker object. If the starting frame for the marker object to stop is not found after a certain period of time, the sliding stop time of the current mouse movement is discarded, and the stopping time of the next mouse movement is used to determine the stopping time of the marker object corresponding to the next mouse movement. For example, assuming the preset distance is 2px and N is 3, frame P0 is the starting point of a search for a certain mouse movement. The frames after frame P0 in chronological order are P1, P2, P3, P4, P5, P6, P7... Assuming the displacement distance of the marker object between P1 and P0 is greater than 2px, the displacement distance between P2 and P1 is greater than 2px, the displacement distance between P3 and P2 is greater than 2px, the displacement distance between P4 and P3 is greater than 2px, the displacement distance between P5 and P4 is less than or equal to 2px, the displacement distance between P6 and P5 is less than or equal to 2px, the displacement distance between P7 and P6 is less than or equal to 2px, and the clock decoding value of P7 is greater than or equal to the movement stop time, then P5 is the starting frame for stopping the marker object of this mouse movement.

[0028] Let T_frame be the time when the marker object stops for a given mouse movement, and t_stop be the time when the mouse movement stops. Then: The lower bound of the delay, lo = T_frame - t_stop, The upper limit of the delay, hi, is equal to (the first larger clock decoding value after the flag object stops the start frame) - t_stop.

[0029] It's important to note that T_frame represents the moment when the marker object stopped redrawing the last start frame, not the moment when the marker object stopped redrawing the start frame actually output to the display. The moment the image is actually displayed can only be sometime after the last redraw and before the next redraw. In other words, the actual display time is greater than T_frame, and the upper limit is the next larger clock decoding value. Therefore, the latency lo calculated using T_frame is only the lower bound of the actual latency; the upper bound is calculated using the next larger clock decoding value hi. The actual latency must fall within the interval [lo, hi], and the width of this interval is approximately equal to one display refresh cycle (approximately 16.7ms at a frame rate of 60Hz and approximately 8.3ms at a frame rate of 120Hz). Specifically, the latency estimate is (lo + hi) / 2.

[0030] After each time a marker object stops at its starting frame, the stopping time of the next mouse movement needs to be used to determine the starting frame of the marker object for the next mouse movement. In this way, for the recorded video, multiple sets of [lo, hi] intervals and latency estimates can be obtained. Data with excessively short movement durations (e.g., less than 50ms) need to be filtered out from these sets of data. The resulting [lo, hi] intervals and latency estimates are the valid samples. Then, all latency estimates in the valid samples can be statistically analyzed to describe the overall latency performance. These statistics can include median, p95 (95th percentile), mean, min, and max.

[0031] The marker object can include the cursor or the content area in the screen of the program being tested that changes position as the mouse moves.

[0032] Reference Figure 2 The diagram shown is a structural schematic of a mouse sliding end-to-end delay measurement device provided in an embodiment of this application. The device includes: The determining unit 20 is used to obtain the sliding stop time and determine the search start frame from the video to be processed based on the sliding stop time. The video is a video recorded from the screen of the program under test. A time window is superimposed on the screen of the program under test. The time window continuously displays the current time drawing screen. The current time drawing screen is the screen generated based on the current time. The sliding stop time represents the time when the mouse stops sliding. The sliding stop time and the current time come from the same clock source. The first calculation unit 21 is used to calculate the displacement distance of the marker object between two adjacent frames one by one, starting from the search start frame. If the displacement distances corresponding to N consecutive frames are all less than or equal to a preset distance and the current time corresponding to the current time drawing screen of the Nth frame in the N consecutive frames is greater than or equal to the sliding stop time, it is determined that the marker object has entered a stationary state. The first frame in the N consecutive frames is determined as the marker object stop start frame, and the current time corresponding to the current time drawing screen of the marker object stop start frame is determined as the marker object stop time, where N is a positive integer. The second calculation unit 22 is used to calculate the end-to-end delay of mouse sliding based on the sliding stop time and the stop time of the marker object.

[0033] The mouse sliding end-to-end delay measurement device provided in this application addresses the first problem by defining the sliding stop time as the input-side reference time and the marker object stop time as the screen-side stop response time. The difference between the two is the single mouse sliding end-to-end delay, thus establishing a dedicated end-to-end delay measurement method for mouse sliding scenarios, filling the gap in existing methods that can only measure click delay. Addressing the second problem, a time window is overlaid above the screen of the program under test, continuously displaying a current-time drawing generated based on the current time. It is explicitly required that the sliding stop time and the current time come from the same clock source. This ensures that the current time corresponding to the current-time drawing in the video frame and the mouse event timestamp are naturally in the same time coordinate system. The analysis program can directly read the time value from the video frame and compare it directly with the sliding stop time without any additional calibration, fundamentally eliminating cross-clock domain alignment errors and achieving accurate measurement of mouse sliding end-to-end delay.

[0034] The mouse sliding end-to-end delay measurement device provided in this application embodiment is implemented in the same way as the mouse sliding end-to-end delay measurement method provided in this application embodiment, and the effect it achieves is also the same as the mouse sliding end-to-end delay measurement method provided in this application embodiment, so it will not be described again here.

[0035] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for measuring end-to-end delay of mouse movement, characterized in that, include: The sliding stop time is obtained, and the search start frame is determined from the video to be processed based on the sliding stop time. The video is a video recorded from the screen of the program under test. A time window is superimposed on the screen of the program under test. The time window continuously displays the current time drawing screen. The current time drawing screen is the screen generated based on the current time. The sliding stop time represents the time when the mouse stops sliding. The sliding stop time and the current time come from the same clock source. Starting from the search start frame, calculate the displacement distance of the marker object between adjacent frames frame by frame. If the displacement distances corresponding to N consecutive frames are all less than or equal to the preset distance and the current time corresponding to the current time drawing screen of the Nth frame in the N consecutive frames is greater than or equal to the sliding stop time, it is determined that the marker object has entered a stationary state. The first frame in the N consecutive frames is determined as the marker object stop start frame, and the current time corresponding to the current time drawing screen of the marker object stop start frame is determined as the marker object stop time, where N is a positive integer. The end-to-end delay of mouse movement is calculated based on the stop time of the movement and the stop time of the marked object.

2. The method as described in claim 1, characterized in that, The sliding stop time is the time obtained by calling the time.perf_counter_ns() function after the last interception of the WM_INPUT message before the mouse stops sliding. The values ​​of the lLastX and lLastY fields in the RAWMOUSE structure of the WM_INPUT message are not all 0.

3. The method as described in claim 1, characterized in that, The current time of the screen corresponding to the current time of the search start frame is greater than or equal to the difference between the sliding stop time and the preset time threshold.

4. The method as described in claim 1, characterized in that, The current time display screen contains 32 squares, each corresponding to a binary digit of the current time. If the value of the binary digit is 1, the corresponding square is displayed in bright white; if the value of the binary digit is 0, the corresponding square is displayed in dark black.

5. The method as described in claim 1, characterized in that, The marked object includes the cursor or the content area in the screen of the program being tested that changes position as the mouse moves.

6. The method as described in claim 1, characterized in that, The calculation of the end-to-end mouse swipe delay based on the swipe stop time and the marker object stop time includes: The end-to-end delay of each mouse movement is statistically analyzed, and the statistical value of the end-to-end delay of each mouse movement is used as the final end-to-end delay of the mouse movement. The end-to-end delay of each mouse movement is the average of the lower bound lo and the upper bound hi of the delay of that mouse movement, where lo = T_frame - t_stop, hi = P_frame - t_stop, T_frame is the stop time of the marker object, t_stop is the movement stop time, P_frame is the current time of the drawing screen corresponding to the current time of the target stop frame, and the target stop frame is the frame whose current time of the first drawing screen after the start frame of the marker object stop is greater than the current time of the drawing screen corresponding to the current time of the start frame of the marker object stop.

7. A mouse sliding end-to-end delay measurement device, characterized in that, include: The determination unit is used to obtain the sliding stop time and determine the search start frame from the video to be processed based on the sliding stop time. The video is a video recorded from the screen of the program under test. A time window is superimposed on the screen of the program under test. The time window continuously displays the current time drawing screen. The current time drawing screen is the screen generated based on the current time. The sliding stop time represents the time when the mouse stops sliding. The sliding stop time and the current time come from the same clock source. The first calculation unit is used to calculate the displacement distance of the marker object between two adjacent frames one by one, starting from the search start frame. If the displacement distance corresponding to N consecutive frames is less than or equal to a preset distance and the current time corresponding to the current time drawing screen of the Nth frame in the N consecutive frames is greater than or equal to the sliding stop time, it is determined that the marker object has entered a stationary state. The first frame in the N consecutive frames is determined as the marker object stop start frame, and the current time corresponding to the current time drawing screen of the marker object stop start frame is determined as the marker object stop time, where N is a positive integer. The second calculation unit is used to calculate the end-to-end delay of mouse movement based on the sliding stop time and the stop time of the marker object.