A method for testing mouse offset in cloud games
Through automated mouse position information acquisition and calculation methods, the problems of low accuracy and low efficiency of manual testing in the existing technology are solved, and high-precision and high-efficiency cloud gaming mouse offset testing is realized, supporting precise repair.
Patent Information
- Application Number
- CN202111243296.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-25
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2041-10-25
AI Technical Summary
In the prior art, the cloud gaming mouse is tested by manual visual observation. The error is large, the accuracy of comparison cannot be guaranteed, and the efficiency is low, which affects the testing efficiency.
Establish communication connections through the server, client, and test ends, set test information, including the server screen running time value and the number of times the client clicks the screen every minute, automatically click on the client screen, obtain and calculate mouse position information, and calculate The mouse coordinates are single offset and average offset, the number of differences is statistically different, and the test results are output.
Automatic testing of mouse coordinate offset is realized, testing accuracy and efficiency is improved, mouse coordinate deviation can be accurately positioned, and the repair efficiency of later server screens is improved.
Smart Images

Figure CN113946477B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud gaming, and in particular to a method for testing mouse offset in cloud gaming. Background Art
[0002] In the prior art, when testing whether a cloud gaming mouse is offset, the game screen is mostly observed with the naked eye and compared with the expected structure. Observation with the naked eye results in large errors, and the accuracy of the comparison cannot be guaranteed. In addition, the comparison efficiency is low, which affects the test efficiency.
[0003] Therefore, the prior art has defects and needs to be improved. Summary of the invention
[0004] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a method for testing the mouse offset of cloud games to solve the problem in the prior art of manually testing whether the mouse position is offset, resulting in low test accuracy and low test efficiency.
[0005] The technical solution of the present invention is as follows: A method for testing the mouse offset of a cloud game comprises the following steps:
[0006] S1: Establish a communication connection between the server, the client, and the test end, and set test information on the test end.
[0007] The test information includes: the server screen running time value, and the number of times the client clicks the screen per minute.
[0008] S2: The server starts the canvas tool, and the client synchronously displays the server screen. When the server screen starts to run, the client mouse automatically clicks the client screen according to the test information set by the test end. The test end synchronously captures the server screen and the client screen, and saves the server screen and the client screen according to the timestamp as the file name.
[0009] S3: After the time for the canvas tool on the server to display the screen reaches the server screen running time value, the server mouse position information and the client mouse position information in the server screen and the client screen saved in step S2 are respectively obtained through the coordinate acquisition tool. The test end calculates the single offset of the mouse coordinates and the average offset of the mouse coordinates according to the server mouse position information and the client mouse position information.
[0010]
[0011] The average mouse coordinate offset = the sum of all individual mouse coordinate offsets / the total number of individual mouse coordinate offsets.
[0012] Among them: X1 and Y1 are the coordinates of the mouse in the captured server screen, respectively, and X2 and Y2 are the coordinates of the mouse in the captured client screen, respectively, and the server screen and the client screen have the same timestamp.
[0013] S4: The test end counts the number of non-zero single offsets of the mouse coordinates, which is recorded as the number of differences.
[0014] Preferably, the coordinate acquisition tool is GetCursorPos.
[0015] Furthermore, the step S2 is: the server starts the canvas tool and displays it in full screen, and the client synchronously displays the server screen. When the server screen starts to run, the client mouse automatically clicks the client screen according to the test information set by the test end. Each time the client clicks the client screen, the test end synchronously captures the server screen and the client screen, and saves the server screen and the client screen according to the timestamp as the file name.
[0016] Furthermore, in step S4, the test end also calculates the maximum value of the single offset of the mouse coordinates and the minimum value of the single offset of the mouse coordinates according to the calculated values of all the single offsets of the mouse coordinates.
[0017] Further, the step S4 is: the test end counts the number of single mouse coordinate offsets that are not zero, records it as the number of differences, and outputs the server screen running time value, the total number of client screen clicks, all single mouse coordinate offsets, the average mouse coordinate offset, the maximum single mouse coordinate offset, the minimum single mouse coordinate offset, and the number of differences as results.
[0018] By adopting the above scheme, the present invention provides a method for testing the mouse offset of a cloud game, which has the following beneficial effects:
[0019] 1. It can realize the automatic test process of mouse coordinate offset, which effectively improves the test efficiency and has high test accuracy compared with the manual test method in the existing technology;
[0020] 2. According to the test results, the position where the mouse coordinate deviation exists is accurately located, which is conducive to the accurate repair of the server screen in the later stage and improves work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is a flowchart of the present invention. DETAILED DESCRIPTION
[0022] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0023] Please refer to Figure 1 The present invention provides a method for testing a mouse offset of a cloud game, comprising the following steps:
[0024] S1: Establish a communication connection between the server, the client, and the test end, and set test information on the test end; the test information includes: the server screen running time value, the number of times the client clicks the screen per minute; specifically, in this embodiment, the server screen running time value is set to 60 minutes, and the number of times the client clicks the screen per minute is 60 times; the specific setting can be based on actual test requirements to meet different test requirements.
[0025] S2: The server starts the canvas tool, and the client synchronously displays the server screen. When the server screen starts to run, the client mouse automatically clicks the client screen according to the test information set by the test end. The test end synchronously captures the server screen and the client screen, and saves the server screen and the client screen according to the timestamp as the file name; after the server establishes a communication connection with the client, after the client opens the canvas tool, the displayed screen is synchronously transmitted to the client, so that the screens displayed by the server and the client are consistent.
[0026] S3: After the time for the canvas tool on the server to display the screen reaches the server screen running time value, the server mouse position information and the client mouse position information in the server screen and the client screen saved in step S2 are respectively obtained through the coordinate acquisition tool GetCursorPos, and the test end calculates the single offset of the mouse coordinates and the average offset of the mouse coordinates in turn according to the server mouse position information and the client mouse position information; it should be noted that, for any server screen and client screen captured at the same timestamp, the server mouse position information and the client mouse position information must be obtained and the single offset of the mouse coordinates must be calculated.
[0027]
[0028] The average mouse coordinate offset = the sum of all individual mouse coordinate offsets / the total number of individual mouse coordinate offsets.
[0029] Among them: X1 and Y1 are the coordinates of the mouse in the captured server screen, respectively, and X2 and Y2 are the coordinates of the mouse in the captured client screen, respectively, and the server screen and the client screen have the same timestamp.
[0030] S4: The test end counts the number of non-zero single offsets of the mouse coordinates, which is recorded as the number of differences.
[0031] The present invention provides a method for testing the mouse offset of a cloud game. The method comprises the following steps: setting test information on a test end, installing a server screen running time value in the test information on a server end, and playing a screen of a corresponding time in a canvas tool. The client end can synchronize the screen displayed on the server end, and after the server screen starts to run, according to the preset number of times the client clicks the screen per minute, click the client screen a corresponding number of times within one minute. Each time the client completes a click, the test end synchronously captures the server screen and the client screen at this time, and continuously repeats the process of clicking, capturing the server screen and the client screen. After reaching the server screen running time value, the server mouse position information in the server screen and the client mouse position information in the client screen are obtained through GetCursorPos, and a single offset of the mouse coordinates under each timestamp is calculated. After all the single offsets of the mouse coordinates are calculated, the mouse The average offset of the mouse coordinates is calculated. If the value of a single offset of the mouse coordinates is zero, it means that there is no offset in the mouse coordinates of the server screen and the client screen at the timestamp. If the value of a single offset of the mouse coordinates is not zero, it means that there is an offset in the mouse coordinates of the server screen and the client screen at the timestamp. The number of non-zero single offsets of the mouse coordinates is counted. By the difference number, the overall situation of the offset of the mouse coordinates in the server screen and the client screen is judged. If the number is large, it means that the offset is serious. Therefore, it is necessary to further optimize the transmission method of the coordinates between the server and the client, or repair the server screen to reduce the coordinate offset. A cloud game mouse offset testing method in the present invention can realize an automatic testing process of the mouse coordinate offset, effectively improve the testing efficiency, and compared with the manual testing method in the prior art, it can effectively improve the testing accuracy and ensure the accuracy of the transmission of the server and client screens.
[0032] Specifically, in this embodiment, step S2 is: the server starts the canvas tool and displays it in full screen, and the client synchronously displays the server screen. When the server screen starts to run, the client mouse automatically clicks the client screen according to the test information set by the test end. Every time the client clicks the client screen, the test end synchronously captures the server screen and the client screen, and saves the server screen and the client screen according to the timestamp as the file name.
[0033] Specifically, in the present embodiment, in the step S4, the test end further calculates the maximum value of the single offset of the mouse coordinates and the minimum value of the single offset of the mouse coordinates according to the calculated values of the single offset of the mouse coordinates. The maximum value of the single offset is the value with the largest value among all the single offsets of the mouse coordinates, and the minimum value of the single offset of the mouse coordinates is the value with the smallest value among all the single offsets of the mouse coordinates.
[0034] Specifically, in this embodiment, step S4 is: the test end counts the number of non-zero single offsets of the mouse coordinates, records it as the number of differences, and outputs the server screen running time value, the total number of times the client clicks the screen, all the single offsets of the mouse coordinates, the average offset of the mouse coordinates, the maximum single offset of the mouse coordinates, the minimum single offset of the mouse coordinates, and the number of differences as the result. It should be noted that the total number of times the client clicks the screen is equal to the server screen running time value (in minutes) multiplied by the number of times the client clicks the screen per minute.
[0035] In summary, the present invention provides a method for testing the mouse offset of a cloud game, which has the following beneficial effects:
[0036] 1. It can realize the automatic test process of mouse coordinate offset, which effectively improves the test efficiency and has high test accuracy compared with the manual test method in the existing technology;
[0037] 2. According to the test results, the position where the mouse coordinate deviation exists is accurately located, which is conducive to the accurate repair of the server screen in the later stage and improves work efficiency.
[0038] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for testing the mouse offset of a cloud game, characterized in that: The following steps are involved: S1: Establish a communication connection between the server, the client, and the test end, and set test information on the test end; The test information includes: the running time of the server screen and the number of times the client clicks the screen per minute; S2: The server starts the canvas tool, and the client synchronously displays the server screen. When the server screen starts running, the client mouse automatically clicks the client screen according to the test information set by the test end. The test end synchronously captures the server screen and the client screen, and saves the server screen and the client screen according to the timestamp as the file name; S3: After the time for the canvas tool on the server to display the screen reaches the server screen running time value, the server mouse position information and the client mouse position information in the server screen and the client screen saved in step S2 are respectively obtained through the coordinate acquisition tool, and the test end calculates the single offset of the mouse coordinates and the average offset of the mouse coordinates according to the server mouse position information and the client mouse position information; The average offset of the mouse coordinates = the sum of all the individual offsets of the mouse coordinates / the total number of the individual offsets of the mouse coordinates; Wherein: X1 and Y1 are the coordinates of the mouse in the captured server screen, respectively; X2 and Y2 are the coordinates of the mouse in the captured client screen, respectively; and the server screen and the client screen have the same timestamp; S4: The test end counts the number of non-zero single offsets of the mouse coordinates, which is recorded as the number of differences.
2. A cloud gaming mouse offset testing method according to claim 1, characterized in that: The coordinate acquisition tool is GetCursorPos.
3. A cloud gaming mouse offset testing method according to claim 1, characterized in that: The step S2 is as follows: the server starts the canvas tool and displays it in full screen, and the client synchronously displays the server screen. When the server screen starts to run, the client mouse automatically clicks the client screen according to the test information set by the test end. Each time the client clicks the client screen, the test end synchronously captures the server screen and the client screen, and saves the server screen and the client screen according to the timestamp as the file name.
4. A cloud gaming mouse offset testing method according to claim 1, characterized in that: In the step S4, the test end also calculates the maximum value and the minimum value of the single offset of the mouse coordinates according to all the calculated values of the single offset of the mouse coordinates.
5. A cloud gaming mouse offset testing method according to claim 4, characterized in that: The step S4 is as follows: the test end counts the number of non-zero single offsets of the mouse coordinates, records it as the number of differences, and outputs the server screen running time value, the total number of times the client clicks the screen, the single offset of the mouse coordinates, the average offset of the mouse coordinates, the maximum single offset of the mouse coordinates, the minimum single offset of the mouse coordinates, and the number of differences as results.
