Control method of mouse and application thereofTechnical Field
The invention relates to the field of mice, in particular to a control method and application of a mouse.
Background
The optical mouse is a commonly used electronic device, wherein the optical mouse mainly comprises four parts of core components, namely a light emitting component, a lens component, a photoelectric sensor and a control chip. When the mouse moves, the photoelectric sensor records continuous patterns, then the front and back comparison analysis processing of each picture is carried out to judge the moving direction and displacement of the mouse, so as to obtain the moving numerical values of the mouse in the x and y directions, and the numerical values are transmitted to the host after being processed. Wherein, DPI (dot per inch) is an important characteristic parameter of the mouse, DPI of the mouse is the positioning precision of the mouse, and the unit is DPI or cpi, which means the maximum information number that can be accurately positioned every inch of movement of the mouse. DPI is the number of points per inch, i.e., the number of points a pointer moves on the screen per inch of mouse movement.
The mouse in the prior art does not provide a DPI adjusting function, so that when a user actually uses the mouse, the DPI of the mouse needed by different scenes is not consistent, for example, when the user plays a game, the mouse needs to have a very high DPI, and when the user performs a drawing operation, the DPI needs to be lower. The DPI adjustment is to achieve the effect of adjusting the sensitivity of the mouse by adjusting the sampling frequency of the sensor so as to adapt the mouse to different working requirements. In the conventional technology, a user can only adjust the DPI of the mouse through a device manager on a host, so that the burden of the user is increased, the DPI is still fixed after adjustment, the flexibility is poor, the user can only adjust the DPI according to self feeling or subjective prediction, and the adjustment effect cannot achieve the expected purpose.
Aiming at the technical problem, the prior art provides an automatic mouse DPI adjusting method and a speed self-adaptive mouse capable of identifying different task types. The task environment used by the user is judged, the DPI value is automatically selected, namely the adaptive mouse speed is automatically selected to adapt to the requirements of the user on different tasks, the operation precision of a specific task can be improved, and the operation time is reduced. Meanwhile, the physical distance for the user to move the mouse is reduced, fatigue is relieved, and the prior art is suitable for various computers which can be connected with the mouse to be used as input equipment.
However, the prior art has obvious defects, for example, the task type is a certain task type, that is, the task type of a user moving and clicking a mouse is multiple certain and predictable, but in practical situations, the task type is often uncertain and difficult to predict, so that the automatic adjustment method is applicable to few scenes, and is mostly mouse DPI automatic adjustment in some specific professional fields.
In addition, in the prior art, for each task type, the gradient is adjusted by taking a specific value as the DPI, a user is required to test the operation efficiency under different gradients respectively according to the specification, and the workload is large and time-consuming for the user. In the prior art, the optimal mouse DPI value is solved through algorithms such as traversal or iteration, the calculated amount is large under the conditions of more parameters, larger data volume and the like, so that the calculation resources of a host are greatly occupied, the normal work of the host is influenced, and the host is halted or a long time is needed to obtain the solving result if serious conditions exist.
Further, in the prior art, the task type ID is determined by the ferz's law log2(D/W +1), and then the optimal DPI is tested for each task type ID to maximize the mouse operation efficiency. In practice, however, the optimal DPI required for the same task type ID is different in different application scenarios through operational efficiency, thus further making this prior art applicable only to specific scenarios.
In addition, in some prior art, the host needs to collect a large amount of data and complete the solution of the optimal mouse DPI value, and then generates an instruction to adjust the DPI value of the mouse. In a period of time before the adjustment is completed, the actual DPI value of the mouse is the DPI value before the adjustment, except that the adjustment process occupies computing resources, if the DPI value before the adjustment is not matched with the requirement, the mouse is still not matched with the actual requirement in the time during the adjustment process, and the use of a user is influenced.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a mouse control method and application thereof, which are applicable to various application scenes, have small calculated amount and high adjustment speed, and the specific technical scheme is as follows:
a control method of a mouse comprises the following steps:
s1: establishing a selection table P of the initial DPI value of the mouse;
s2: identifying the program type of a real-time program D0 which responds to the mouse in real time on the host;
s3: selecting a DPI value matched with the program type from the selection table P and setting the DPI value as an initial DPI value of the mouse;
s4: adjusting the DPI value of the mouse for the first time:
s41: the method comprises the steps that a mouse starts to move to be clicked to serve as a click task, real-time coordinates of the mouse are collected according to a preset sampling frequency f, a host receives time and real-time coordinates of each sampling, and the time and the real-time coordinates are stored in a storage medium through a point location information table P, wherein the point location information table P is used for storing the time and the real-time coordinates of each sampling, and the point location information table P is used for storing the time and the real-time coordinates of each sampling, wherein the point location information table P is { AO [ T0, X0, Y0], Ai [ Ti, Xi, Yi ], … …, An [ Tn, Xn, Yn ] }, wherein AO is the initial mouse position of the click task, Ai represents the point location information of the ith sampling, Ti represents the time, Xi represents the horizontal coordinate of the mouse;
s42: continuously collecting a point location information table P initial of a subsequent multi-click task according to the method of the step S41;
s43: storing the plurality of point location information tables P obtained in step S41 and step S42;
s44: respectively reconstructing a track of each click task according to each point location information table;
s45: grouping and screening the reconstructed trajectories according to the similarity to obtain a sample group;
s46: in the sample group, sequencing each corresponding track according to the start time of each click task, calculating the average speed of a mouse in each track, and then performing linear fitting on the average speed of each track;
s47: correcting the DPI value of the mouse according to the slope of the straight line obtained by fitting;
s5: and according to the method of the step S4, the DPI value of the mouse is adjusted for more than one time, and the adjustment of the DPI value of the mouse is completed.
In a specific embodiment, the step of respectively reconstructing a track of each click task according to each point location information table includes:
s441: establishing a coordinate system;
s442: reconstructing each point in a point location information table P ═ AO [ T0, X0, Y0], Ai [ Ti, Xi, Yi ], … …, An [ Tn, Xn, Yn ] } in a coordinate system;
s443: connecting the points in sequence according to a time sequence and through a smooth curve to realize the reconstruction of a one-time click task;
s444: repeating the step S441 to the step S443 to reconstruct the next click task, and circulating the steps until the reconstruction of all the click tasks is completed;
the step of grouping the reconstructed trajectories according to the similarity comprises the following steps:
s451: calculating an included angle between a previous point position and a subsequent point position when the point position is taken as a center in the same track, setting the included angle as a deviation angle of the point position, and further calculating the deviation angle of each point position between a starting point and an end point in the same track;
s452: and calculating deviation angles of point positions in each track according to the method in the step S451, and if all deviation angles in a certain track are smaller than a preset threshold value, listing the track into a sample group until the screening of all tracks is completed.
In a specific embodiment, in step S47, the step of correcting the DPI value of the mouse according to the slope of the fitted straight line includes:
if the slope of the straight line obtained by fitting is less than 0, reducing the DPI value of the mouse by a preset decrement;
if the slope of the straight line obtained by fitting is greater than or equal to 0 and smaller than a preset slope threshold value of the straight line, maintaining the current DPI value of the mouse;
and if the slope of the straight line obtained by fitting is larger than the threshold value of the slope of the preset straight line, increasing the DPI value of the mouse by a preset increment.
In a specific embodiment, the predetermined slope threshold is 0.1.
In a specific embodiment, the step of establishing a selection table P of initial DPI values of the mouse includes:
setting the initial DPI value of the mouse as Iinitial, and selecting the initial DPI value according to a formula I initial-I0 + K N, wherein I0 is a starting value, K is a constant, and N is a gradient variable.
In a specific embodiment, I0 is 200, K is 50, N ∈ (1, 2, 3 … … 40).
In a specific embodiment, the step of identifying the program type of the real-time program D0 which responds to the mouse on the host computer in real time comprises the following steps:
s21: detecting a real-time program D0 responding to the mouse on the host computer in real time;
s22: comparing the program type library stored in the host computer to identify the program type of the real-time program D0;
s23: if the program type of the real-time program D0 is not identified from the program type library, feeding back information to the user, and prompting the user to select the program type of the real-time program D0;
s24: and if the information for setting the new program type selected by the user is received, setting the real-time program D0 as the new program type and adding the new program type to the program type library.
In a specific embodiment, the step of selecting the DPI value adapted to the program type from the selection table P and setting as the initial DPI value of the mouse comprises:
if the program type of the real-time program D0 comprises a document editing program or a drawing program, selecting and setting an initial I with the DPI value of the mouse smaller than a preset threshold value from a selection table P;
if the program type of the real-time program D0 does not include a document editing program or a drawing program, selecting an initial I with the DPI value of the mouse being larger than a preset threshold value from the selection table P;
the preset threshold is preferably 450.
A computer system combined by a mouse and a host is used for realizing the control method of any one scheme, and comprises the host and the mouse, wherein the mouse is provided with a detection module, a first communication module and an execution module, and the host is provided with a storage medium, a second communication module and a processing module;
the detection module is used for acquiring real-time coordinates of the mouse according to a preset sampling frequency f, the first communication module is used for sending acquisition information of the detection module to the host through the second communication module, the host is used for generating a control instruction for controlling the DPI of the mouse according to the control method of any scheme, and the execution module is used for adjusting the DPI of the mouse according to the control instruction of the host.
A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the control method according to any one of the preceding claims.
The invention has at least the following beneficial effects:
according to the mouse control method, firstly, a selection table P of the initial DPI value of the mouse is established, the program type of a real-time program D0 which responds to the mouse in real time on a host is identified, and then the DPI value which is matched with the program type is selected from the selection table P and set as the initial DPI value of the mouse. Therefore, the mouse DPI value can be initially selected according to the program type, on one hand, the selection efficiency is high, the calculation amount can be obviously reduced, and on the other hand, the initially selected mouse DPI value which is matched with different types of program types can be obtained.
In the invention, the DPI value of the mouse is adjusted for the first time after the initial selection, and the DPI value of the mouse is adjusted for more than one time after the initial selection. On one hand, compared with the initial selection, the mouse DPI value can be further more adapted to the corresponding program type by adjusting the mouse DPI value more than twice. On the other hand, compared with the prior art that the DPI value is selected by adopting the algorithms such as the optimal iteration and the like, the technical scheme of the invention can obviously reduce the calculation amount, thereby reducing the workload of the host computer, avoiding the host computer from crashing or occupying a large amount of calculation resources, and avoiding the slow adjustment caused by the infinite iteration in the prior art because the time length of each adjustment period is short and controllable.
Further, in the specific adjusting method of the invention, real-time coordinates of the mouse are collected, the host respectively reconstructs a track of each click task according to the point location information table, and groups and screens the reconstructed tracks according to the similarity to obtain a sample group. Therefore, a track which is useful for adjusting the DPI of the mouse can be obtained through screening, noise is eliminated, accuracy of an adjusting result can be improved, and calculated amount can be reduced. Further, deviation angles of point positions in each track are calculated, and if all deviation angles in a certain track are smaller than a preset threshold value, the track is listed into a sample group until all tracks are screened. Therefore, the linear track and the approximate linear track which mainly act on the adjustment of the DPI value of the mouse and the user operation relation can be screened out, and noises such as curve tracks and the like are eliminated, so that the DPI adjustment is more suitable for the real use environment and the actual requirements of users.
Further, in the specific adjusting method of the present invention, in the sample group, each corresponding track is sorted according to the start time of each click task, the average speed of the mouse in each track is calculated, then the average speed of each track is linearly fitted, and the DPI value of the mouse is corrected according to the linear slope obtained by the fitting. Therefore, the DPI value of the mouse can be adjusted according to the speed change rule when the user operates the mouse, and compared with the prior art, the adjustment result is more fit with the actual situation.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1 is a flowchart showing an overall control method of a mouse in the embodiment;
FIG. 2 is a flowchart illustrating the first adjustment of the DPI value of the mouse according to the embodiment;
FIG. 3 is a flowchart illustrating reconstructing a track of each click task according to each point location information table in the embodiment;
FIG. 4 is a flowchart illustrating grouping and screening of reconstructed trajectories according to similarity to obtain a sample group in the embodiment;
FIG. 5 is a flowchart illustrating the procedure of identifying the type of the real-time procedure D0 responding to the mouse on the host computer in real time according to the embodiment.
Detailed Description
The present invention will be further described with reference to the following embodiments. The drawings are only for purposes of illustration and are not to be construed as limiting the patent.
Examples
As shown in fig. 1, the present embodiment provides a method for controlling a mouse, including:
s1: a selection table P of initial DPI values for the mouse is established.
The step of establishing a selection table P of initial DPI values of the mouse comprises the following steps: setting an initial DPI value of the mouse as Iinitial, wherein the selection method comprises the step of selecting according to a formula I initial-I0 + K N, wherein I0 is a starting point value of the DPI of the mouse, K is a constant, and N is a gradient variable. Illustratively, I0 is 200, K is 50, N ∈ (1, 2, 3 … … 40).
S2: the program type of the real-time program D0 on the host that responds to the mouse in real time is identified.
As shown in fig. 5, the step of identifying the program type of the real-time program D0 responding to the mouse on the host in real time includes: s21: detecting a real-time program D0 responding to the mouse on the host computer in real time; s22: comparing the program type library stored in the host computer to identify the program type of the real-time program D0; s23: if the program type of the real-time program D0 is not identified from the program type library, feeding back information to the user, and prompting the user to select the program type of the real-time program D0; s24: and if the information for setting the new program type selected by the user is received, setting the real-time program D0 as the new program type and adding the new program type to the program type library.
The program types in this embodiment preferably include a document editing program, a drawing program, a game program, a web page navigation program, a news browsing program, a music playing program, a video playing program, a management information system, and the like, and the program types may be preset in the program type library. In the prior art, technicians generally divide the program types into B/S architectures or C/S architectures according to the architecture types, and in the embodiment, the specific contents of the program are creatively proposed to distinguish the program types, so as to perform initial selection and subsequent adjustment of the mouse DPI value, which is more suitable for the actual operation scene of the user, and make the selection and adjustment of the subsequent mouse DPI value more suitable for the requirements of the actual application scene.
An exemplary method of detecting a real-time program D0 on a host that responds to a mouse in real-time includes: whether the detection program type is a B/S framework program or a C/S framework program, for the C/S framework program (i.e. an exe program), one detection method is to identify and detect the real-time program D0 by the program name by collecting the program name, such as a nail, Excel, the world of beasts, and the like. For the B/S architecture program, one detection method is to detect the real-time program D0 by capturing the network access information of the host and combining the network access information of the host. In addition, for the program type of B/S architecture program or C/S architecture program, the content of the program interface can be identified by the screen monitor program to detect the real-time program D0. In this embodiment, the method for detecting the real-time program D0 responding to the mouse on the host in real time may be used alone, or different detection methods may be used in combination.
The name, number and characteristic information of the program type are stored in the program type library stored in the host, and after the real-time program D0 which responds to the mouse in real time on the host is detected, the program type of the real-time program D0 is identified by comparing the detected program type with the program type library stored in the host. For unsuccessfully identified real-time program D0, information may be fed back to the user, such as a pop-up dialog box, prompting the user to select the program type of real-time program D0, and determining the program type based on the user's selection. If no program type matching with the real-time program D0 exists in the program type library, a new program type can be set by the user, the information of setting the new program type selected by the user is received, and the real-time program D0 is set as the new program type and added to the program type library. In this embodiment, by identifying the program type of the real-time program D0 responding to the mouse in real time on the host, a basis can be provided for setting the initial DPI value of the mouse to be matched according to different program types.
S3: the DPI value adapted to the program type is selected from the selection table P and set as the initial DPI value of the mouse.
In an exemplary embodiment, the step of selecting the DPI value adapted to the program type from the selection table P and setting as the initial DPI value of the mouse includes: if the program type of the real-time program D0 includes a document editing program or a drawing program, the initial I setting the DPI value of the mouse to be less than the preset threshold value is selected from the selection table P. If the program type of the real-time program D0 does not include the document editing program or the drawing program, the initial I setting the DPI value of the mouse to be greater than the preset threshold value is selected from the selection table P. Therefore, multiple program types can be preliminarily divided into two categories, and for a document editing program and a drawing program, a relatively small initial DPI value of the mouse is set, so that a user can accurately operate when editing or drawing a document, and the operation precision is improved. For other types of programs, a relatively large initial DPI value of the mouse is set so that the user can perform mouse movements at a relatively fast speed. The preset threshold is preferably 450. It should be noted that the preset threshold of 450 is only one preferred, and those skilled in the art can set the preset threshold higher than 450, for example, 500, 550, 600, 650, 700, etc., or set the preset threshold smaller than 450, for example, 400, 350, etc., according to the specific application scenario and the user characteristics when implementing the control method of the embodiment.
Therefore, in the embodiment, the selection table P of the initial DPI values of the mouse is firstly established, the program type of the real-time program D0 which responds to the mouse in real time on the host is identified, and then the DPI value which is matched with the program type is selected from the selection table P and set as the initial DPI value of the mouse. The mouse DPI value can be initially selected according to the type of the program, on one hand, the selection efficiency is high, the calculation amount required by the subsequent adjustment of the mouse DPI value can be obviously reduced through initial selection, on the other hand, the mouse DPI value can be initially selected and matched with the program types of different types, the requirement of a user is preliminarily met before the mouse DPI value is adjusted, and in the subsequent adjustment process of the mouse DPI value, the mouse can be close to work under the condition meeting the requirement of the user.
As shown in fig. 2, S4: adjusting the DPI value of the mouse for the first time:
s41: the method comprises the steps that a mouse starts to move to be clicked to serve as a click task, the real-time coordinates of the mouse are collected according to a preset sampling frequency f within a preset sampling period T, a host receives the sampling time and the real-time coordinates each time, and the real-time coordinates are stored in a storage medium through a point location information table P. Where, P is ═ AO [ T0, X0, Y0], Ai [ Ti, Xi, Yi ], … …, An [ Tn, Xn, Yn ] }, where AO is the initial mouse position of the click task, Ai represents the sampling time information at the ith time, Ti represents the time, Xi represents the abscissa of the mouse relative to the origin of coordinates, Yi represents the ordinate of the mouse relative to the origin of coordinates, 0< i < n, and n represents the number of sampling times. For example, AO [ T0, X0, Y0] represents An initial time T0, An abscissa X0 of the mouse relative to the origin of coordinates, An ordinate Y0 of the mouse relative to the origin of coordinates, and Ai [ Ti, Xi, Yi ] represents An i-th sampling time Ti, An abscissa Xi of the mouse relative to the origin of coordinates, An ordinate Yi of the mouse relative to the origin of coordinates, An [ Tn, Xn, Yn ] represents a sampling time Tn of a last sampling within a sampling period T, An abscissa Xn of the mouse relative to the origin of coordinates, and An ordinate Yn of the mouse relative to the origin of coordinates. Illustratively, the sampling frequency f may be 20HZ, i.e. 20 times per second.
S42: and continuing to collect the point location information table P of the subsequent multi-click task according to the method of the step S41. For example, the point information table P of the next 200 click tasks is collected according to the method of step S41.
S43: the plurality of point information tables P obtained in step S41 and step S42 are stored.
S44: and respectively reconstructing the track of each click task according to each point location information table. As shown in fig. 3, the step of respectively reconstructing a track of each click task according to each point location information table includes:
s441: and establishing a coordinate system.
S442: each point in the point location information table P is reconstructed in the coordinate system, where "AO" { AO [ T0, X0, Y0], Ai [ Ti, Xi, Yi ], … …, An [ Tn, Xn, Yn ] }.
S443: and connecting the points in sequence according to a time sequence and through a smooth curve to realize the reconstruction of the one-time click task.
S444: and repeating the step S441 to the step S443 to reconstruct the next click task, and circulating the steps until the reconstruction of all the click tasks is completed.
By the method, the track of each click task is respectively reconstructed according to each point location information table, so that the DPI value of the mouse can be adjusted by processing and analyzing the rule of the mouse track image.
S45: and grouping and screening the reconstructed tracks according to the similarity to obtain a sample group. As shown in fig. 4, the step of grouping the reconstructed trajectories according to the similarity includes:
s451: in the same track, for any point location, calculating an included angle between a previous point location and a next point location with the point location as a center, setting the included angle as a deviation angle of the point location, and further calculating the deviation angle of each point location between a starting point and an end point in the same track.
S452: and calculating deviation angles of point positions in each track according to the method in the step S451, and if all deviation angles in a certain track are smaller than a preset threshold value, listing the track into a sample group until the screening of all tracks is completed.
Preferably, the preset threshold value of the deviation angle ranges from 5 degrees to 15 degrees, and further preferably ranges from 10 degrees. Therefore, the straight line and the track similar to the straight line are listed in the sample group, and other tracks are eliminated. Practical tests show that when a user operates a mouse, the operation tracks mainly aiming at movement are straight tracks and approximate straight tracks, the DPI value of the mouse has a large influence on the straight tracks and the approximate straight tracks, and the DPI value of the mouse has a small significance on the operation of the user on other tracks, such as curve tracks with large deviation angles. The linear track and the approximate linear track which are mainly used for adjusting the DPI value of the mouse and the user operation relation are screened out, and noises such as curve tracks are eliminated, so that the DPI adjustment is more suitable for real use environments and actual requirements of users, the accuracy of adjustment results is improved, and the occupation of computing resources is reduced.
S46: in the sample group, sequencing each corresponding track according to the start time of each click task, calculating the average speed of a mouse in each track, and then performing linear fitting on the average speed of each track;
s47: correcting the DPI value of the mouse according to the slope of the straight line obtained by fitting;
specifically, in step S47, the step of correcting the DPI value of the mouse according to the slope of the fitted straight line includes:
if the slope of the straight line obtained by fitting is less than 0, reducing the DPI value of the mouse by a preset decrement;
if the slope of the straight line obtained by fitting is greater than or equal to 0 and smaller than a preset slope threshold value of the straight line, maintaining the current DPI value of the mouse;
and if the slope of the straight line obtained by fitting is larger than the threshold value of the slope of the preset straight line, increasing the DPI value of the mouse by a preset increment.
Illustratively, the preset straight-line slope threshold is 0.1. It should be noted that, for different users and different scenes, the preset slope threshold of the straight line may be changed.
Therefore, the DPI value of the mouse can be adjusted according to the speed change rule when the user operates the mouse, and compared with the prior art, the adjustment result is more fit with the actual situation. Specifically, when a user normally operates a mouse, along with the improvement of proficiency of the real-time program D0, for the movement of the mouse with a linear track and an approximate linear track, if the speed of the mouse is kept unchanged or slightly increased, the normal rule can be determined, it is indicated that the initial DPI value of the mouse selected according to the program type meets the user requirement and the operation habit, the slope of the straight line obtained by fitting is greater than or equal to 0 and smaller than a preset slope threshold value, and the mouse can maintain the current DPI value, that is, the DPI value of the mouse does not need to be adjusted. If the slope of the straight line obtained by fitting is less than 0, it indicates that although the proficiency level of the real-time program D0 is improved, the speed of moving the mouse by the user is reduced, and it can be determined that the user emphasizes the requirement on the operation precision in the real-time program D0, and the DPI value of the mouse can be reduced by a preset decrement, so that the DPI value of the mouse is more adaptive to the requirement of the user. If the slope of the straight line obtained by fitting is greater than the preset slope threshold value, it indicates that the proficiency level of the real-time program D0 is improved, but the mouse moving speed of the user is gradually increased, and it can be determined that the user emphasizes the requirement on the mouse moving speed in the real-time program D0, the DPI value of the mouse is increased by a preset increment, so that the DPI value of the mouse is more adaptive to the requirement of the user.
S5: and according to the method of the step S4, the DPI value of the mouse is adjusted for more than one time, and the adjustment of the DPI value of the mouse is completed. By carrying out more than one subsequent adjustment on the DPI value of the mouse, the adjustment result of the DPI value of the mouse can be corrected for the second time, and the adjustment accuracy is improved.
In this embodiment, the adjustment of the DPI value of the mouse is completed by performing the first adjustment and the more than one subsequent adjustment on the DPI value of the mouse after the initial selection. On one hand, compared with the initial selection, the mouse DPI value can be further more adapted to the corresponding program type by adjusting the mouse DPI value more than twice. On the other hand, compared with the prior art that the DPI value is selected by adopting the algorithms such as the optimal iteration and the like, the technical scheme of the invention can obviously reduce the calculation amount, thereby reducing the workload of the host and avoiding the host from crashing or occupying a large amount of calculation resources.
A computer system combining a mouse and a host is used for realizing the control method of any scheme, and comprises the host and the mouse, wherein the mouse is provided with a detection module, a first communication module and an execution module, and the host is provided with a storage medium, a second communication module and a processing module.
The detection module is used for acquiring real-time coordinates of the mouse according to a preset sampling frequency f, the first communication module is used for sending acquisition information of the detection module to the host through the second communication module, the host is used for generating a control instruction for controlling the DPI of the mouse according to the control method of any scheme, and the execution module is used for adjusting the DPI of the mouse according to the control instruction of the host.
A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the control method according to any one of the preceding claims.
As one skilled in the art will appreciate, the drawings are merely schematic representations of one preferred implementation scenario and the blocks or flows in the drawings are not necessarily required to practice the present invention.
Those skilled in the art will appreciate that the modules in the devices in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above-mentioned invention numbers are merely for description and do not represent the merits of the implementation scenarios.
The above disclosure is only a few specific implementation scenarios of the present invention, however, the present invention is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present invention.