CN112274916B - Key mouse input method, device, equipment and medium - Google Patents
Key mouse input method, device, equipment and medium Download PDFInfo
- Publication number
- CN112274916B CN112274916B CN202011311313.0A CN202011311313A CN112274916B CN 112274916 B CN112274916 B CN 112274916B CN 202011311313 A CN202011311313 A CN 202011311313A CN 112274916 B CN112274916 B CN 112274916B
- Authority
- CN
- China
- Prior art keywords
- target
- operation information
- mouse operation
- mouse
- key mouse
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/40—Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment
- A63F13/42—Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment by mapping the input signals into game commands, e.g. mapping the displacement of a stylus on a touch screen to the steering angle of a virtual vehicle
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/30—Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0489—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using dedicated keyboard keys or combinations thereof
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The application discloses a keyboard and mouse input method, a device, equipment and a medium, wherein the method comprises the following steps: when the connection is established with the target user, the control client captures the mouse operation information of the target user for executing the mouse operation, and sends the mouse operation information to the server; when the server receives the information, the driver is utilized to acquire the operation information of the key mouse; when the driver acquires the information, determining a target process of executing the key mouse operation information by a target user according to the key mouse operation information, and calling a target API to simulate the key mouse input operation of the target process. Obviously, the target process of the user executing the mouse operation is simulated by calling the target API, so that the process is used as a unit to simulate the mouse operation of the user, a plurality of users can use the same cloud host without influencing and disturbing the mouse operation of other users, and each user can obtain an independent game experience.
Description
Technical Field
The present invention relates to the field of game services, and in particular, to a method, apparatus, device, and medium for inputting a mouse.
Background
The cloud game is a game mode based on cloud computing, and all game processes can run on a cloud host in a running mode of the cloud game. The cloud host is responsible for rendering a realistic game picture by utilizing a CPU (Central Processing Unit, a central processing unit) and a GPU (Graphics Processing Unit, a graphic processor), and then compressing the picture displayed by the cloud host and transmitting the picture to a user through a network. Under the condition, a user can smoothly experience various games which need high-performance hardware support only by having one device with basic video decompression capability.
Because the user selects the service provider of the cloud game according to the hardware specification of the cloud host, the cloud game service provider usually purchases a high-performance computer as the cloud host to enhance the competitiveness of the cloud game service itself. In practical applications, some games that users want to play do not need to configure a computer with too high performance, and in this case, in order to fully exert all the performance of the cloud host, a plurality of games may be run on one cloud host to provide hardware sharing resources for a plurality of users. However, in the current cloud game application scenario, a set of virtual mouse operations is usually created on the cloud host through a virtual mouse driver. In this setting manner, the mouse operations between the user a and the user B will affect and interfere with each other, and thus the user cannot play the game on a shared cloud host. Currently, there is no more effective solution to this technical problem.
Therefore, how to enable multiple users to use the same cloud host without affecting and interfering with the mouse operations of other users, and enable each user to obtain independent game experience is a technical problem to be solved by those skilled in the art.
Disclosure of Invention
Accordingly, the present invention is directed to a method, apparatus, device and medium for inputting a mouse, so that a plurality of users can obtain a single game experience without affecting and interfering with the mouse operation of other users when using the same cloud host. The specific scheme is as follows:
a keyboard and mouse input method is applied to a cloud host and comprises the following steps:
When connection is established with a target user, the control client captures the mouse operation information of the target user for executing mouse operation, and sends the mouse operation information to the server;
when the server receives the key mouse operation information, acquiring the key mouse operation information by using a driver of the cloud host;
When the driver acquires the key mouse operation information, determining a target process of executing the key mouse operation information by the target user according to the key mouse operation information, and calling a target API to simulate key mouse input operation on the target process; the target API is an application program interface which is acquired from the cloud host kernel in advance and related to the operation of a key mouse.
Preferably, the determining the target process of the target user to execute the key mouse operation information according to the key mouse operation information includes:
determining a process ID and/or a window handle of the target user for executing the key mouse operation information by utilizing the key mouse operation information;
and if the process ID and/or the window handle are valid, determining the target process of executing the mouse operation information by the target user according to the process ID and/or the window handle.
Preferably, the process of calling the target API to simulate the input operation of the keyboard and mouse to the target process includes:
invoking Allocate Hid data a target memory applying for Raw Input, and filling the key mouse operation information into the target memory to obtain a filled Raw Input;
Activating the filling Raw Input by Post Input Message to transmit the key mouse operation information to the driver by using the filling Raw Input;
judging whether the key mouse operation information is successfully transmitted or not;
If yes, the target process is judged to finish the simulation of the input operation of the keyboard and mouse.
Preferably, after the process of determining whether the transmission of the key mouse operation information is successful, the method further includes:
if not, using FREE HID DATA to release the memory in the filling Raw Input.
Preferably, the method further comprises:
creating JobObject for the target user using a Windows window manager and binding the target process to the JobObject.
Preferably, the method further comprises:
Controlling the Windows window manager to enumerate a first window and a second window which are opened by the target user at the current time and the target time through the JobObject; the target time is the preset time before the current time;
determining a target window newly opened by the target user according to the first window and the second window, and judging whether the target window is displayed on a display of the client;
if not, calling Set Window Placement to move the target window to a main control display of the cloud host.
Preferably, after the step of obtaining the mouse operation information of the target user for performing the mouse operation, the method further includes:
Judging whether a window for the target user to execute the mouse operation belongs to JobObject;
If yes, the key mouse operation information is sent to the driver, so that the driver determines the target process of the key mouse operation information to be executed by the target user according to the key mouse operation information, and calls the target API to simulate the key mouse input operation on the target process;
and if not, discarding the key mouse operation information.
Correspondingly, the invention also discloses a key mouse input device which is applied to the cloud host and comprises:
The user connection module is used for controlling the client to capture the mouse operation information of the target user for executing the mouse operation when the connection is established with the target user, and sending the mouse operation information to the server;
The information acquisition module is used for acquiring the key mouse operation information by utilizing a driver of the cloud host when the server receives the key mouse operation information;
The operation simulation module is used for determining a target process of executing the key mouse operation information by the target user according to the key mouse operation information when the driver acquires the key mouse operation information, and calling a target API to simulate key mouse input operation on the target process; the target API is an application program interface which is acquired from the cloud host kernel in advance and related to the operation of a key mouse.
Correspondingly, the invention also discloses a key mouse input device, which comprises:
A memory for storing a computer program;
a processor for implementing the steps of a keyboard and mouse input method as disclosed above when executing the computer program.
Correspondingly, the invention also discloses a computer readable storage medium, wherein the computer readable storage medium is stored with a computer program, and the computer program realizes the steps of the keyboard and mouse input method disclosed in the previous step when being executed by a processor.
In the mouse input method provided by the invention, the target API related to mouse operation is firstly obtained from the kernel of the cloud host in advance, when the cloud host establishes connection with a target user, the client is controlled to capture mouse operation information of the target user for executing mouse operation, the mouse operation information is sent to the server, and when the server receives the mouse operation information captured by the client, the cloud host can obtain the mouse operation information through a driver of the cloud host; when the driver acquires the key mouse operation information, the cloud host determines a target process of executing the key mouse operation information by a target user according to the key mouse operation information, and calls a target API to simulate the key mouse input operation of the target process. Obviously, in the method, because the cloud host performs the simulation of the mouse input operation on the target process of executing the mouse operation by calling the target API, the simulation is equivalent to the simulation of the mouse operation of the user by taking the process as a unit, a plurality of users can not influence and interfere the mouse operation of other users when using the same cloud host by the setting mode, and each user can obtain the exclusive game experience. Correspondingly, the key mouse input device, the device and the medium provided by the invention have the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for inputting a mouse according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating an implementation of isolated mouse input according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a target user creating user session and window operation rights management according to an embodiment of the present invention;
FIG. 4 is a block diagram of a mouse input device according to an embodiment of the present invention;
Fig. 5 is a block diagram of a keyboard and mouse input device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, fig. 1 is a flowchart of a method for inputting a mouse according to an embodiment of the present invention, where the method includes:
Step S11: when the connection is established with the target user, the control client captures the mouse operation information of the target user for executing the mouse operation, and sends the mouse operation information to the server;
step S12: when the server receives the mouse operation information, the driver of the cloud host is utilized to acquire the mouse operation information;
Step S13: when the driver acquires the key mouse operation information, determining a target process of executing the key mouse operation information by a target user according to the key mouse operation information, and calling a target API to simulate the key mouse input operation of the target process;
The target API is an application program interface related to the operation of a key mouse, which is acquired from a cloud host kernel in advance.
In this embodiment, a method for inputting a mouse is provided, by which a plurality of users can use the same cloud host without affecting and interfering with the mouse operations of other users, and each user can obtain a single-sharing game experience. In the key mouse input method, a cloud host is used as an execution main body.
Specifically, in the key mouse input method, the cloud host firstly acquires a target API (Application Programming Interface, application program interface) related to the key mouse operation from the cloud host kernel in advance. Among other things, the target APIs include :Allocate Hid data、Post Input Message、Free Hid Data、Validata Hwnd、xxxSend Transformable Message Timeout and Post transformable Message Extended, and so on.
When a target user wants to play a game on a cloud host, the target user is connected with the cloud host in a communication way, and when the cloud host establishes a connection with the target user, the cloud host firstly controls a client to capture mouse operation information of the target user for executing mouse operation and sends the obtained mouse operation information to a server; and then, sending the mouse operation information of the target user for executing the mouse operation to a driver of the cloud host through the server, determining a target process of the target user when executing the mouse operation information according to the mouse operation information when the driver receives the mouse operation information sent by the server, and calling a target API to simulate the input operation of the mouse by the target process when determining the target process of the target user when executing the mouse operation information by the cloud host.
It can be understood that, because the cloud host performs the simulation of the mouse input operation on the target process of executing the mouse operation by calling the target API, the process is used as a unit to simulate the mouse operation of the user, so that the multiple users can use the same cloud host without affecting and interfering the mouse operation of other users, and each user can obtain a unique game experience.
It can be seen that, in the mouse input method provided in this embodiment, firstly, a target API related to mouse operation is obtained in advance from a cloud host kernel, when the cloud host establishes a connection with a target user, a control client captures mouse operation information of the target user for executing mouse operation, and sends the mouse operation information to a server, and when the server receives the mouse operation information captured by the client, the cloud host obtains the mouse operation information through its own driver; when the driver acquires the key mouse operation information, the cloud host determines a target process of executing the key mouse operation information by a target user according to the key mouse operation information, and calls a target API to simulate the key mouse input operation of the target process. Obviously, in the method, because the cloud host performs the simulation of the mouse input operation on the target process of executing the mouse operation by calling the target API, the simulation is equivalent to the simulation of the mouse operation of the user by taking the process as a unit, a plurality of users can not influence and interfere the mouse operation of other users when using the same cloud host by the setting mode, and each user can obtain the exclusive game experience.
Based on the above embodiment, this embodiment further describes and optimizes the technical solution, as a preferred implementation manner, the steps are as follows: the process of determining the target progress of the target user for executing the key mouse operation information according to the key mouse operation information comprises the following steps:
Determining a process ID and/or a window handle of the target user for executing the key mouse operation information by using the key mouse operation information;
If the process ID and/or the window handle are valid, determining a target process of executing the key mouse operation information by the target user according to the process ID and/or the window handle.
In this embodiment, a specific implementation manner of determining a target process of performing a mouse operation information by a target user is provided, that is, in a process of determining the target process, a process ID and/or a window handle of performing a mouse operation by the target user is determined by using the mouse operation information first.
It will be appreciated that because the process ID is an address allocated when a process is created, the operating system operates on the corresponding process by the process ID, and the window handle is a data structure to which the process is assigned when the process is created, in which various operation information of the process are described, such as: window size, moving window, closing window, etc., so when the process ID and/or window handle of the target user in executing the mouse operation are obtained, the target process of the target user in executing the mouse operation information can be determined according to the process ID and/or window handle.
In addition, in this embodiment, in order to avoid the situation that the process ID and/or the window handle are invalid and the subsequent process cannot continue to be executed, after the process ID and/or the window handle are obtained, whether the process ID and/or the window handle are valid is further determined, that is, only on the premise that the process ID and/or the window handle are valid, the cloud host can determine the target process of the target user execution key mouse operation information according to the process ID and/or the window handle.
Obviously, by the technical scheme provided by the embodiment, the accuracy in determining the target process can be ensured.
Based on the above embodiment, this embodiment further describes and optimizes the technical solution, as a preferred implementation manner, the steps are as follows: the process of calling the target API to simulate the input operation of the key mouse to the target process comprises the following steps:
invoking Allocate Hid data a target memory applying for Raw Input, and filling the mouse operation information into the target memory to obtain filling Raw Input;
activating the filling Raw Input by Post Input Message to transmit the key mouse operation information to the driver by using the filling Raw Input;
judging whether the key mouse operation information is successfully transmitted or not;
If yes, the target process is judged to finish the simulation of the input operation of the keyboard and mouse.
In this embodiment, when performing the mouse operation simulation on the target process, firstly, the target memory of the Raw Input application Allocate Hid data is called, and the target memory is filled with the mouse operation information to obtain the filling Raw Input, where the purpose of filling the target memory is that the parameters in the target memory are Post Input Message parameters, so that the target memory needs to be filled with the mouse operation information.
Then, the filling Raw Input is activated by utilizing Post Input Message, so that the mouse operation information is transmitted to the driver by utilizing the filling Raw Input, and if the mouse operation information can be successfully transmitted to the driver in the cloud host, the memory in the filling Raw Input is transmitted to the driving layer by the application layer, namely, the cloud host completes the mouse operation simulation of the target process.
As a preferred embodiment, after the process of determining whether the transmission of the mouse operation information is successful, the method further comprises:
If not, then the memory in the Raw Input is freed and filled with FREE HID DATA.
In practical application, if the key mouse operation information is not successfully transmitted to the driver, it is indicated that the cloud host does not complete the key mouse operation simulation of the target process, and at this time, in order to avoid that the memory in the Raw Input occupies the resource overhead of the cloud host, at this time, the memory in the filling Raw Input can be released by utilizing FREE HID DATA, so that the execution efficiency of the cloud host can be improved.
Referring to fig. 2, fig. 2 is a schematic diagram illustrating a call for implementing isolated mouse input according to an embodiment of the present invention. When the client captures the mouse operation information of a target user when executing the mouse operation, the client transmits the mouse operation information to the server through a network, the server invokes an interface of a window management program again, constructs an internal structure body comprising a process ID, a window handle and RawInput, invokes a driving interface, and acquires parameters required by a target API through the process ID and the window handle, in the process, the cloud host judges whether the target user executes the keyboard operation or the mouse operation at all according to the mouse operation information, if the target user executes the keyboard operation, a structure body of a keyboard RawInput is constructed, and if the target user executes the mouse operation, a structure body of a mouse RawInput is constructed; and then calling Allocate Hid data a target memory required by the structure, filling the target memory by using the constructed structure to obtain filling RawInput, then calling Post Input Message to activate the filling RawInput, transmitting the mouse operation information to a driver by using the filling RawInput to judge whether the target API call is successful, if the call is successful, completing one-time isolated mouse Input by taking a process as a unit, and if the call is unsuccessful, calling FREE HID DATA to release the memory in the filling Raw Input.
Obviously, by the technical scheme provided by the embodiment, the reliability of the target process in the mouse operation simulation can be further ensured.
Based on the above embodiment, this embodiment further describes and optimizes a technical solution, and as a preferred implementation manner, the above keyboard and mouse input method further includes:
Create JobObject for the target user using the Windows window manager and bind the target process to JobObject.
It will be appreciated that since JobObject is a way to manage processes provided by the Windows window manager, and JobObject allows a set of processes to be managed as a unit, in this embodiment, after the target process is determined, jobObject is created for the target user by using the Windows window manager, and the target process is bound to JobObject.
It is conceivable that when the target process is bound to JobObject, each sub-process created by the target process is automatically added to JobObject, in which case the Windows window manager enumerates all Windows opened by the target user through JobObject and manages and invokes the opened Windows.
Obviously, by the technical scheme provided by the embodiment, the management efficiency in the process of creating the process management for the target user can be further improved.
As a preferred embodiment, further comprising:
controlling a Windows window manager to enumerate a first window and a second window which are opened by a target user at the current time and the target time through JobObject;
The target time is the preset time before the current time;
Determining a target window newly opened by a target user according to the first window and the second window, and judging whether the target window is displayed on a display of the client;
if not, call Set Window Placement moves the target window to the master display of the cloud host.
In this embodiment, in order to determine a newly created window and an already destroyed window of the target process, the Windows window manager further manages the processes recorded in JobObject according to a preset period, that is, controls the Windows window manager to enumerate a first window and a second window opened by the target user at the current time and the target time through JobObject, and then compares the first window with the second window, so that the newly created window and the already destroyed window of the target process can be identified.
And for the newly opened target window of the target user, whether the target window is displayed on the display of the client can be judged by calculating the coordinates of the target window, and if the target window is not displayed on the display of the client, the target window cannot be checked by the target user. In this case, to enable the target user to view the target window, set Window Placement may be invoked to move the target window to the master display of the cloud host to enable the target user to view the target window.
Referring to fig. 3, fig. 3 is a schematic diagram illustrating a user session created by a target user and window operation authority management according to an embodiment of the present invention. After the Windows window manager is started, the target user selects a game by using the client, and then connects with the cloud host server to acquire a game display. Thereafter, the cloud host creates JobObject a current session, initiates a game session, and binds the game session to JobObject. When the game process is bound to JobObject, jobObject enumerates the window opened by the target user, compares the enumerated result with the enumeration result at the previous moment to determine whether a new window is newly created, caches the new window and related process information if the new window is present, and only then the target user has legal operation authority for the new window and related process, and waits for JobObject for the next enumeration if the new window is not present. Wherein when a game process is bound to JobObject, all sub-processes related to the game process are automatically bound to JobOject, thus facilitating the management of the game process by the target user.
Obviously, through the technical scheme provided by the embodiment, the experience of the target user in the game process can be further improved.
As a preferred embodiment, the steps are as follows: after the process of obtaining the mouse operation information of the target user for executing the mouse operation, the method further comprises the following steps:
Judging whether a window for a target user to execute the mouse operation belongs to JobObject or not;
if yes, the key mouse operation information is sent to the driver, so that the driver determines a target process of executing the key mouse operation information by a target user according to the key mouse operation information, and calls a target API to simulate key mouse input operation of the target process;
if not, discarding the mouse operation information.
In practical application, if the window for the target user to execute the mouse operation belongs to JobObject, it is indicated that the target user has legal operation authority to the window, and at this time, the mouse operation information can be sent to the driver, so that the driver can determine the target process for the target user to execute the mouse operation information according to the mouse operation information, and call the target API to simulate the mouse input operation on the target process.
If the window of the target user for executing the mouse operation does not belong to JobObject, the target user is indicated to have no legal operation authority on the window, and at the moment, the cloud host can control the driver to discard the mouse operation information. Thus, the target user can not violently kill the processes of the operation authorities of other users through Windows management tools like task managers, and the operation behaviors of the target user are completely isolated and safe for the other users.
In addition, in the operation mode, the target user can only operate the process with the operation authority, but cannot operate the process without the operation authority, so that the target user can hardly threaten the safe operation of the cloud host through Trojan horse or virus, and cannot forcedly finish the system blue screen caused by malicious operations such as the key process of the system, and the safety of the cloud host is further ensured.
Obviously, through the technical scheme provided by the embodiment, the safety and reliability of the cloud host in the running process can be further ensured.
Referring to fig. 4, fig. 4 is a block diagram of a mouse input device according to an embodiment of the present invention, where the mouse input device includes:
the user connection module 21 is configured to control the client to capture mouse operation information of the target user for performing mouse operation when establishing a connection with the target user, and send the mouse operation information to the server;
The information acquisition module 22 is configured to acquire the mouse operation information by using a driver of the cloud host when the server receives the mouse operation information;
The operation simulation module 23 is configured to determine, when the driver obtains the key mouse operation information, a target process of executing the key mouse operation information by the target user according to the key mouse operation information, and invoke the target API to simulate the input operation of the key mouse for the target process; the target API is an application program interface related to the operation of a key mouse, which is acquired from a cloud host kernel in advance.
The mouse input device provided by the embodiment of the invention has the beneficial effects of the mouse input method disclosed by the embodiment of the invention.
Referring to fig. 5, fig. 5 is a block diagram of a keyboard and mouse input device according to an embodiment of the present invention, where the keyboard and mouse input device includes:
A memory 31 for storing a computer program;
a processor 32 for implementing the steps of a keyboard and mouse input method as disclosed above when executing a computer program.
The key mouse input device provided by the embodiment of the invention has the beneficial effects of the key mouse input method disclosed by the embodiment of the invention.
Correspondingly, the embodiment of the invention also discloses a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and the computer program realizes the steps of the mouse input method disclosed in the previous description when being executed by a processor.
The computer readable storage medium provided by the embodiment of the invention has the beneficial effects of the disclosed key mouse input method.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above detailed description of the method, the device, the equipment and the medium for inputting the mouse provided by the invention applies specific examples to illustrate the principle and the implementation of the invention, and the above examples are only used for helping to understand the method and the core idea of the invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.
Claims (9)
1. The key mouse input method is characterized by being applied to a cloud host, wherein a plurality of games are run on the cloud host to provide hardware sharing resources for a plurality of users, and the cloud host creates a set of virtual key mouse operation through a virtual key mouse driver; the method comprises the following steps:
When connection is established with a target user, the control client captures the mouse operation information of the target user for executing mouse operation, and sends the mouse operation information to the server;
when the server receives the key mouse operation information, acquiring the key mouse operation information by using a driver of the cloud host;
When the driver acquires the key mouse operation information, determining a target process of executing the key mouse operation information by the target user according to the key mouse operation information, and calling a target API to simulate key mouse input operation on the target process; the target API is an application program interface which is acquired from the cloud host kernel in advance and related to the operation of a key mouse;
The process of determining the target user to execute the target process of the mouse operation information according to the mouse operation information includes:
determining a process ID and/or a window handle of the target user for executing the key mouse operation information by utilizing the key mouse operation information;
and if the process ID and/or the window handle are valid, determining the target process of executing the mouse operation information by the target user according to the process ID and/or the window handle.
2. The method according to claim 1, wherein the process of calling the target API to simulate a mouse input operation to the target process comprises:
invoking Allocate Hid data a target memory applying for Raw Input, and filling the key mouse operation information into the target memory to obtain a filled Raw Input;
Activating the filling Raw Input by Post Input Message to transmit the key mouse operation information to the driver by using the filling Raw Input;
judging whether the key mouse operation information is successfully transmitted or not;
If yes, the target process is judged to finish the simulation of the input operation of the keyboard and mouse.
3. The method according to claim 2, wherein after the step of determining whether the transmission of the key mouse operation information is successful, further comprising:
if not, using FREE HID DATA to release the memory in the filling Raw Input.
4. A method of inputting to a mouse according to any of claims 1 to 3, further comprising:
creating JobObject for the target user using a Windows window manager and binding the target process to the JobObject.
5. The method of claim 4, further comprising:
Controlling the Windows window manager to enumerate a first window and a second window which are opened by the target user at the current time and the target time through the JobObject; the target time is the preset time before the current time;
determining a target window newly opened by the target user according to the first window and the second window, and judging whether the target window is displayed on a display of the client;
if not, calling Set Window Placement to move the target window to a main control display of the cloud host.
6. The method according to claim 4, wherein after the step of obtaining the mouse operation information of the target user for performing the mouse operation, further comprising:
Judging whether a window for the target user to execute the mouse operation belongs to JobObject;
If yes, the key mouse operation information is sent to the driver, so that the driver determines the target process of the key mouse operation information to be executed by the target user according to the key mouse operation information, and calls the target API to simulate the key mouse input operation on the target process;
and if not, discarding the key mouse operation information.
7. The key mouse input device is characterized by being applied to a cloud host, wherein a plurality of games are run on the cloud host to provide hardware sharing resources for a plurality of users, and the cloud host creates a set of virtual key mouse operation through a virtual key mouse driver; the device comprises:
The user connection module is used for controlling the client to capture the mouse operation information of the target user for executing the mouse operation when the connection is established with the target user, and sending the mouse operation information to the server;
The information acquisition module is used for acquiring the key mouse operation information by utilizing a driver of the cloud host when the server receives the key mouse operation information;
The operation simulation module is used for determining a target process of executing the key mouse operation information by the target user according to the key mouse operation information when the driver acquires the key mouse operation information, and calling a target API to simulate key mouse input operation on the target process; the target API is an application program interface which is acquired from the cloud host kernel in advance and related to the operation of a key mouse;
The process of determining the target user to execute the target process of the mouse operation information according to the mouse operation information includes:
determining a process ID and/or a window handle of the target user for executing the key mouse operation information by utilizing the key mouse operation information;
and if the process ID and/or the window handle are valid, determining the target process of executing the mouse operation information by the target user according to the process ID and/or the window handle.
8. A keyboard and mouse input device, comprising:
A memory for storing a computer program;
A processor for implementing the steps of a method of keyboard and mouse input as claimed in any one of claims 1 to 6 when executing said computer program.
9. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of a method for inputting a keyboard and a mouse according to any of claims 1 to 6.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011311313.0A CN112274916B (en) | 2020-11-20 | 2020-11-20 | Key mouse input method, device, equipment and medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011311313.0A CN112274916B (en) | 2020-11-20 | 2020-11-20 | Key mouse input method, device, equipment and medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN112274916A CN112274916A (en) | 2021-01-29 |
| CN112274916B true CN112274916B (en) | 2024-05-31 |
Family
ID=74399696
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202011311313.0A Active CN112274916B (en) | 2020-11-20 | 2020-11-20 | Key mouse input method, device, equipment and medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN112274916B (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113992730B (en) * | 2021-10-27 | 2024-09-06 | 哈尔滨工业大学 | A user behavior simulation method based on knowledge construction, simulation system, customization system, computer and storage medium |
| CN114089849A (en) * | 2021-11-08 | 2022-02-25 | 北京明朝万达科技股份有限公司 | Mouse control method, device, device and storage medium |
| CN116366625B (en) * | 2023-02-28 | 2025-11-18 | 深圳市秦安科技有限公司 | A remote automatic control system, method, and electronic device based on IPKVM |
| CN119493512A (en) * | 2023-08-15 | 2025-02-21 | 同方威视技术股份有限公司 | Security inspection machine operation method, system, device, equipment, medium and program product |
Citations (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005166051A (en) * | 2003-12-03 | 2005-06-23 | Inca Internet Co Ltd | How to prevent unauthorized access to processes |
| JP2009230587A (en) * | 2008-03-24 | 2009-10-08 | Science Park Corp | Data management method of electronic computer, and program therefor |
| KR20120014675A (en) * | 2010-08-10 | 2012-02-20 | 주식회사 잉카인터넷 | Automatic input blocking device and method in computer system |
| CN103699533A (en) * | 2012-09-27 | 2014-04-02 | 中国电信股份有限公司 | Method and system for acquiring WEB updating information |
| CN103970279A (en) * | 2013-01-30 | 2014-08-06 | 云联(北京)信息技术有限公司 | Control method and system for cloud game |
| CN105027054A (en) * | 2013-11-30 | 2015-11-04 | 华为技术有限公司 | Gesture operation conversion method and device |
| CN105739888A (en) * | 2016-01-26 | 2016-07-06 | 百度在线网络技术(北京)有限公司 | Method and device for configuring dynamic display effect of virtual keyboard |
| CN106155760A (en) * | 2015-03-31 | 2016-11-23 | 北京奇虎科技有限公司 | The method and device of key Mus script playback |
| CN106598295A (en) * | 2016-12-12 | 2017-04-26 | 广东威创视讯科技股份有限公司 | Method and system for improving operation delay feeling of KVM mouse |
| CN106657071A (en) * | 2016-12-26 | 2017-05-10 | 东莞市丰润计算机有限公司 | A keyboard and mouse device for electronic games applied to cloud games and its use method |
| CN111240501A (en) * | 2020-01-17 | 2020-06-05 | 康晓峰 | Method for realizing mouse and cursor control based on computer keyboard |
| CN111870948A (en) * | 2020-07-10 | 2020-11-03 | 杭州雾联科技有限公司 | Window management method and system under cloud game single-host multi-user environment |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8719714B2 (en) * | 2009-07-08 | 2014-05-06 | Steelseries Aps | Apparatus and method for managing operations of accessories |
| US8956234B2 (en) * | 2009-07-27 | 2015-02-17 | Steelseries Aps | Device for managing operations of accessories |
| US20110028194A1 (en) * | 2009-07-31 | 2011-02-03 | Razer (Asia-Pacific) Pte Ltd | System and method for unified-context mapping of physical input device controls to application program actions |
| US8788950B2 (en) * | 2012-02-15 | 2014-07-22 | Seiko Epson Corporation | Method for providing multiple mouse inputs in a remote desktop session |
| US9292108B2 (en) * | 2012-06-28 | 2016-03-22 | Dell Products Lp | Systems and methods for remote mouse pointer management |
| CN109544663B (en) * | 2018-11-09 | 2023-01-06 | 腾讯科技(深圳)有限公司 | Virtual scene recognition and interaction key position matching method and device of application program |
-
2020
- 2020-11-20 CN CN202011311313.0A patent/CN112274916B/en active Active
Patent Citations (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005166051A (en) * | 2003-12-03 | 2005-06-23 | Inca Internet Co Ltd | How to prevent unauthorized access to processes |
| JP2009230587A (en) * | 2008-03-24 | 2009-10-08 | Science Park Corp | Data management method of electronic computer, and program therefor |
| KR20120014675A (en) * | 2010-08-10 | 2012-02-20 | 주식회사 잉카인터넷 | Automatic input blocking device and method in computer system |
| CN103699533A (en) * | 2012-09-27 | 2014-04-02 | 中国电信股份有限公司 | Method and system for acquiring WEB updating information |
| CN103970279A (en) * | 2013-01-30 | 2014-08-06 | 云联(北京)信息技术有限公司 | Control method and system for cloud game |
| CN105027054A (en) * | 2013-11-30 | 2015-11-04 | 华为技术有限公司 | Gesture operation conversion method and device |
| CN106155760A (en) * | 2015-03-31 | 2016-11-23 | 北京奇虎科技有限公司 | The method and device of key Mus script playback |
| CN105739888A (en) * | 2016-01-26 | 2016-07-06 | 百度在线网络技术(北京)有限公司 | Method and device for configuring dynamic display effect of virtual keyboard |
| CN106598295A (en) * | 2016-12-12 | 2017-04-26 | 广东威创视讯科技股份有限公司 | Method and system for improving operation delay feeling of KVM mouse |
| CN106657071A (en) * | 2016-12-26 | 2017-05-10 | 东莞市丰润计算机有限公司 | A keyboard and mouse device for electronic games applied to cloud games and its use method |
| CN111240501A (en) * | 2020-01-17 | 2020-06-05 | 康晓峰 | Method for realizing mouse and cursor control based on computer keyboard |
| CN111870948A (en) * | 2020-07-10 | 2020-11-03 | 杭州雾联科技有限公司 | Window management method and system under cloud game single-host multi-user environment |
Non-Patent Citations (3)
| Title |
|---|
| 一种基于内核事件的Windows系统游戏反外挂方法;傅建明;杨铮;罗陈可;黄坚伟;;电子与信息学报;20200915(09);全文 * |
| 基于数据过滤的多输入支持原理;陈珂;;计算机光盘软件与应用(10);全文 * |
| 键盘输入安全研究;李鹏伟;傅建明;沙乐天;丁爽;;计算机科学;20131015(第10期);全文 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN112274916A (en) | 2021-01-29 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112274916B (en) | Key mouse input method, device, equipment and medium | |
| CN112104623B (en) | Cloud application login method and device, cloud equipment, client and system | |
| CN112767133B (en) | Service decision method and device, storage medium and computer equipment | |
| US9081601B2 (en) | Virtual mobile infrastructure and its base platform | |
| CN112767135B (en) | Configuration method and device of rule engine, storage medium and computer equipment | |
| US20150081764A1 (en) | Remote Virtualization of Mobile Apps | |
| US20060089992A1 (en) | Remote computing systems and methods for supporting multiple sessions | |
| CN111433743A (en) | A kind of APP remote control method and related equipment | |
| CN107613020A (en) | A device management method and device | |
| CN114691286B (en) | Server system, virtual machine creation method and device | |
| WO2010087829A1 (en) | Selectively communicating data of a peripheral device to plural sending computers | |
| CN109308241A (en) | Method, device, terminal device and storage medium for monitoring application startup process | |
| CN106656622A (en) | Method and device for configuring interface call tasks | |
| CN113617020B (en) | Game control method, device, storage medium, server and terminal | |
| CN111870962A (en) | A cloud game data processing method and system | |
| US9465677B2 (en) | Partitioned application environment | |
| WO2021239073A1 (en) | Method for constructing internet of things operating system, system, cloud platform and internet of things device | |
| US12028491B2 (en) | Scanning preview method for a remote application when using scanner redirection for remote desktop services | |
| CN113934557B (en) | Methods, related equipment and systems for communication between mini-programs and web pages | |
| CN111414238B (en) | Remote control method and system | |
| CN113952736A (en) | Cloud game login method, device, electronic device, and computer-readable storage medium | |
| CN113577759A (en) | Game data processing method, electronic device and storage medium | |
| US20250080663A1 (en) | Method to isolate image capturing devices between remote desktop sessions for scanner redirection | |
| CN113703878B (en) | Component starting method and device, storage medium and electronic equipment | |
| CN110795156A (en) | Mobile memory loading method, thin client, storage medium and device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |