WO2014101213A1 - 鼠标同步的方法、装置和*** - Google Patents

鼠标同步的方法、装置和*** Download PDF

Info

Publication number
WO2014101213A1
WO2014101213A1 PCT/CN2012/088099 CN2012088099W WO2014101213A1 WO 2014101213 A1 WO2014101213 A1 WO 2014101213A1 CN 2012088099 W CN2012088099 W CN 2012088099W WO 2014101213 A1 WO2014101213 A1 WO 2014101213A1
Authority
WO
WIPO (PCT)
Prior art keywords
mouse
information
client
server
recorded
Prior art date
Application number
PCT/CN2012/088099
Other languages
English (en)
French (fr)
Inventor
杜川
胡斐然
孟艳平
Original Assignee
华为技术有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2012/088099 priority Critical patent/WO2014101213A1/zh
Priority to CN201280027915.0A priority patent/CN104067202B/zh
Priority to CN201611201878.7A priority patent/CN106843537B/zh
Publication of WO2014101213A1 publication Critical patent/WO2014101213A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0354Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of 2D relative movements between the device, or an operating part thereof, and a plane or surface, e.g. 2D mice, trackballs, pens or pucks
    • G06F3/03543Mice or pucks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/038Control and interface arrangements therefor, e.g. drivers or device-embedded control circuitry
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/08Protocols specially adapted for terminal emulation, e.g. Telnet

Definitions

  • Embodiments of the present invention relate to computer technology, and more particularly to a method, apparatus, and system for mouse synchronization. Background technique
  • the cloud computing network includes "cloud server” and user terminal with powerful computing power.
  • the core concept of cloud computing is to continuously improve the processing power of the "cloud server", thereby reducing the processing load of the user terminal, and finally making the user terminal into one. Simple input and output devices, and can enjoy the powerful computing power of "cloud” on demand.
  • the user terminal accesses the cloud server through the remote desktop.
  • the desktop cloud is one of the remote desktops. It provides unified desktop services for cloud computing technologies.
  • the desktop cloud hosts and manages all desktop virtual machines in the data center. At the same time, users can get a complete PC experience. Users can get a user experience with a traditional PC through a thin client (TC) or similar device (called a cloud terminal) on a local area network or remote access.
  • TC thin client
  • cloud terminal on a local area network or remote access.
  • the operation information of the client's mouse needs to be transmitted to the server, so that the mouse operation of the client is executed and validated on the server side.
  • the user moves the mouse of the client, and the client controls the application interface through the mouse of the local system.
  • API Application Programming Interface
  • obtain the client mouse button status and the current client mouse position information and then pass the client mouse operation information obtained by the protocol communication to the server side, and the server end receives the client mouse operation information.
  • the server-side mouse is set to the relevant location and state through the relevant API according to the client mouse operation information.
  • the above technical solution actually has the problem that the mouse position displayed by the client and the actual mouse position of the server cannot be accurately synchronized.
  • the server side also runs some special programs for controlling the mouse position, for example, running instant messaging in the virtual desktop.
  • Software which allows others to share their desktops and allows others to remotely control the mouse.
  • Such software constantly sets the location of the virtual desktop mouse to remote control of others. For example, when a virtual desktop runs a first-person perspective shooting game, usually this type of The game will force the mouse to the center of the screen. At this point, because the client displays its own mouse position, the user will not see the real position of the server-side mouse cursor, resulting in out of sync.
  • the embodiment of the invention provides a method, device and system for mouse synchronization to synchronize the client mouse with the server mouse.
  • the embodiment of the present invention provides a method for synchronizing a mouse, where the synchronization of the mouse includes synchronization between a client mouse and a server-side mouse, including: acquiring first information of a client mouse, where the client mouse The first information is the real-time information of the client mouse after the user operates the client mouse; the client cursor is controlled according to the first information of the client mouse; the first information of the client mouse is reported to the server, so that The server performs a mouse redirection operation according to the first information of the client mouse, and receives the second information of the server-side mouse returned by the server, where the second information of the server-side mouse is the server
  • the terminal performs real-time information of the server-side mouse after the mouse redirection operation according to the first information of the client mouse; and controls the client cursor to move again according to the second information of the server-side mouse.
  • the method before the reporting, by the server, the first information of the client mouse, the method further includes: acquiring a last time of the client mouse recorded by the client mouse information recording module Recorded information after the move; compares the last move of the client mouse The recorded information after the movement and the first information of the client mouse, when the first information of the client mouse changes with respect to the record information after the last movement of the client mouse, the server end is executed The step of reporting the first information of the client mouse.
  • the method further includes: updating, according to the first information of the client mouse, the record information after the last movement of the client mouse recorded by the client mouse information recording module.
  • the controlling, by the second information of the server-side mouse, before the client cursor is moved again includes: acquiring the record information of the last mouse movement of the client mouse recorded by the client mouse information record module, wherein the record information after the last move of the client mouse is the first information of the client mouse; Comparing the first information of the client mouse with the second information of the server mouse, when the second information of the server mouse changes with respect to the first information of the client mouse, performing according to the server The second information of the mouse controls the step of moving the client cursor again.
  • a method for synchronizing a mouse is also provided, where the synchronization of the mouse includes a synchronization between a client mouse and a server-side mouse, including: receiving first information of a client mouse reported by the client, where the client The first information of the mouse is real-time information of the client mouse after the user operates the client mouse; the mouse redirection operation is performed according to the first information of the client mouse; and the second information of the server-side mouse is obtained, where the server end The second information of the mouse is real-time information of the server-side mouse after the mouse redirection operation is performed according to the first information of the client mouse, and the second information of the server-side mouse is sent to the client. So that the client controls the client cursor to move again according to the second information of the server-side mouse.
  • the method further includes: monitoring whether a server-side mouse re-movement event occurs, and if detecting the server-side mouse re-moving event, performing the step of acquiring the second information of the server-side mouse.
  • the monitoring whether a server-side mouse re-movement event occurs includes: when a third-party program calls the server-side mouse control interface And causing the server-side mouse control interface to control the server-side mouse to move again, monitoring that the server-side mouse movement event occurs.
  • the method before the performing the mouse redirection operation according to the first information of the client mouse, the method further includes: acquiring The server-side mouse information recording module records the record information of the server-side mouse after the last move; compares the record information of the server-side mouse after the last move with the first information of the client mouse, when the first When the information of the information after the last movement of the server mouse is changed, the step of performing a mouse redirection operation according to the first information of the client mouse is performed.
  • the method further includes: The first information of the client mouse updates the record information after the last movement of the server mouse recorded by the server-side mouse information recording module.
  • the method before the sending, by the client, the second information of the server-side mouse, the method further includes: Obtaining, after the last movement of the server-side mouse recorded by the server-side mouse information recording module, the record information after the last movement of the server-side mouse is the first information of the client mouse; The first information of the client mouse and the second information of the server-side mouse, when the second information of the server-side mouse changes relative to the first information of the client mouse, performing sending to the client The step of describing the second information of the server mouse.
  • a client device for implementing synchronization between a client mouse and a server-side mouse, including: a first obtaining unit, configured to acquire first information of a client mouse, where the client The first information of the mouse is real-time information of the client mouse after the user operates the client mouse; the client mouse control unit is configured to control the movement of the client cursor according to the first information of the client mouse; The first information of the client mouse is reported to the server, so that the server performs a mouse redirection operation according to the first information of the client mouse; the first acquiring unit is further configured to receive the The second information of the server-side mouse returned by the server, wherein the second information of the server-side mouse is a real-time operation of the server-side mouse after the server redirection operation according to the first information of the client mouse The client mouse control unit is further configured to control according to the second information of the server mouse Said client cursor again.
  • a server is configured to implement synchronization between a client mouse and a server-side mouse, including: a second communication unit, configured to receive first information of a client mouse reported by the client, where the client The first information of the mouse is real-time information of the client mouse after the user operates the client mouse; the server-side mouse control unit is configured to perform a mouse redirection operation according to the first information of the client mouse; Obtaining second information of the server-side mouse, wherein the second information of the server-side mouse is real-time information of the server-side mouse after the server performs a mouse redirection operation according to the first information of the client mouse; The second communication unit is further configured to send the second information of the server-side mouse to the client, so that the client controls the client cursor to move again according to the second information of the server-side mouse.
  • a communication system in a fifth aspect, includes a client device and a server, and is configured to synchronize a client mouse and a server mouse.
  • the client device is configured to acquire first information of a client mouse.
  • the first information of the client mouse is real-time information of the client mouse after the user operates the client mouse, and the client cursor is controlled according to the first information of the client mouse, and the client is reported to the server.
  • the first information of the mouse is configured to receive the first information of the client mouse reported by the client, perform a mouse redirection operation according to the first information of the client mouse, and obtain second information of the server mouse, where the server The second information of the mouse is the real-time information of the server-side mouse after the server side performs the mouse redirection operation according to the first information of the client mouse, and sends the second of the server-side mouse to the client.
  • the client device is further configured to receive the second information of the server-side mouse returned by the server, and control the client cursor to move again according to the second information of the server-side mouse.
  • a client device for implementing synchronization between a client mouse and a server-side mouse, the device comprising a processor, a memory, a bus, and a communication interface; the memory is configured to store a computer execution instruction, The processor is coupled to the memory via the bus, and when the client device is running, the processor executes the computer-executed instructions stored by the memory to cause the client device to perform the first aspect as above The method of mouse synchronization described.
  • a server for implementing synchronization between a client mouse and a server-side mouse;
  • the server includes a processor, a memory, a bus, and a communication interface;
  • the memory is configured to store a computer execution instruction, and the processing And the memory is connected to the memory, and when the client device is running, the processor executes the computer execution instruction stored by the memory, so that the server executes the mouse as described in the second aspect above The method of synchronization.
  • a computer readable medium comprising computer execution instructions for causing a computer of the computer to perform the method of mouse synchronization as described in the first aspect, when the computer executes the instructions.
  • a computer readable medium comprising computer execution instructions for causing a computer to execute a method of mouse synchronization as described in the second aspect, when the processor of the computer executes the computer.
  • the server can also capture the latest mouse information of the server, and the latest mouse of the server.
  • the information is returned to the client, so that the client can adjust the cursor display of the client again according to the latest mouse information of the server after the mouse movement according to the local user operation, thereby ensuring accurate synchronization between the client and the server mouse, so that the user obtains accurate
  • the mouse information ensures the normal execution of certain special programs in the desktop cloud scenario, bringing a good customer experience.
  • FIG. 1 is a schematic structural diagram of a mouse synchronous communication system according to an embodiment of the present invention.
  • FIG. 2 is a flowchart of a mouse synchronization method according to Embodiment 1 of the present invention.
  • FIG. 3 is a flowchart of a mouse synchronization method according to a second embodiment of the present invention.
  • FIG. 4 is a flowchart of a mouse synchronization method according to a third embodiment of the present invention.
  • FIG. 5 is a schematic diagram showing the composition of a client device according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram showing the composition of a server according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram showing the composition of a communication system according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram showing the composition of a client device according to still another embodiment of the present invention.
  • FIG. 9 is a schematic diagram showing the composition of a server according to still another embodiment of the present invention. detailed description
  • the architecture depicts an example of a system architecture for implementing a method of mouse synchronization in an embodiment of the present invention.
  • the architecture depicts an application scenario of a desktop cloud.
  • the desktop cloud is usually composed of a client and a server.
  • the client's computer/terminal device accesses the server.
  • a remote computing device that transfers the desktop of the remote computer to the terminal device of the client.
  • the client in Figure 1 includes a normal computer (101), a tablet
  • the computer (102), the smart phone (103) may also include a thin terminal TC (not shown), and the client computer or terminal device accesses the remote server through the network (201) using the remote desktop protocol (202).
  • the server includes a server 301, 302, 303....30n, and the virtual desktop of the user is implemented by the server 301 in the form of a virtual machine (301a, 301b-301n), the server 302, 303 ....30 ⁇ is similar to server 301.
  • the user accesses the virtual machine assigned to the user on the server through the client, and the virtual machine transmits the content accessed by the user to the user's client for display.
  • the server side may also include a desktop cloud management system (not shown), and the management system may be loaded on any server on the server side.
  • the mouse synchronization process in the embodiment of the present invention can be implemented in the context of the desktop cloud shown in FIG. 1.
  • the scenario shown in FIG. 1 is only one scenario in which the remote desktop scenario is a desktop cloud.
  • This embodiment is only an example.
  • the various components shown in FIG. 1 are only given to the components related to the embodiments of the present invention, and are not specifically limited to the application of the present invention.
  • the first embodiment of the method for the mouse synchronization of the embodiment of the present invention may be implemented as shown in FIG. 2, including:
  • Step S201 The client device acquires the first information of the client mouse, where the first information of the client mouse is real-time information of the client mouse after the user operates the client mouse;
  • Step S202 the client device according to the client The first information of the mouse controls the movement of the client cursor;
  • Step S203 The client device reports the first information of the client mouse to the server.
  • Step S204 The server receives the first information of the client mouse reported by the client, and performs the mouse according to the first information of the client mouse. Redirect operation
  • Step S205 Acquire second information of the mouse of the server, wherein the second information of the server mouse is a server end after the server performs a mouse redirection operation according to the first information of the client mouse. Real-time information of the mouse;
  • Step S206 Send the second information of the server-side mouse to the client;
  • Step S207 The client receives the second information of the server-side mouse returned by the server, Controlling the client cursor to move again according to the second information of the server-side mouse.
  • the server can also capture the latest mouse information of the server, and return the latest mouse information of the server to the client, so that the client is according to the local end.
  • the cursor display of the client can be adjusted again according to the latest mouse information on the server side, thereby ensuring accurate synchronization between the client and the server mouse, so that the user obtains accurate mouse information and ensures that certain special programs are on the desktop.
  • the normal execution under the cloud scenario brings a good customer experience.
  • the above embodiment can implement the method for synchronizing the mouse of the embodiment of the present invention by modifying the existing function module of the client device and the server, and can also implement the mouse of the embodiment of the present invention by adding a function module to the client device and the server.
  • the method of synchronization will describe several specific embodiments by taking the mouse control application interface API and the mouse and keyboard service module in the client device and server as examples.
  • the mouse information in the embodiment of the present invention may specifically include one or both of the position information of the mouse and the button state information of the mouse. In the following specific embodiments, both of them are included as an example.
  • the second embodiment of the method for the mouse synchronization of the embodiment of the present invention may be as shown in FIG. 3, including: Step S301: The user moves the mouse, and the client mouse control API acquires the first location information and the first button state information of the current client mouse. ;
  • the first location information of the current client mouse acquired by the client mouse control API is represented by the client screen X and y coordinate information.
  • Step S302 The client mouse control API controls the client cursor movement according to the acquired client mouse first position information and the first button state information to display to the user;
  • Step S303 The client mouse and keyboard service module acquires the first location information and the first button state information of the client mouse through an event message mechanism, and uses the client and server communication protocol to set the first location information of the client mouse. And sending the first button state information to the server; step S304: the server-side mouse-and-pin service module receives the first location information of the client mouse And the first button state information, calling the server-side mouse control API;
  • Step S305 The server-side mouse control API performs a mouse redirection operation according to the first position information of the client mouse and the first button state information, that is, controlling the server-side mouse to move to the server-side mouse first position and the server-side mouse first Button status;
  • the server-side mouse control API needs to hide the cursor position of the server-side mouse, so as to prevent the client from detecting the delay of the mouse movement;
  • Step S306 The third-party application invokes the server-side mouse control API, and causes the server-side mouse control API to control the position of the server-side mouse or the state of the button to be changed;
  • Step S307 The server-side mouse-and-pin service module acquires the server-side mouse second location information and the second button state information by using an event message mechanism, where the second location information and the second button state information are The first information of the mouse is used to perform real-time information of the server-side mouse after the mouse redirection operation; and the server-side mouse second position information and the second button state information are sent to the client through a communication protocol between the client and the server;
  • Step S308 The client mouse and keyboard service module receives the second location information and the second button state information of the server mouse, and invokes a client mouse control API;
  • Step S309 The client mouse control API controls the client cursor to move to the second position and implement the second button state to display to the user according to the server-side mouse second position information and the second button state information.
  • the server can also capture the latest mouse position and button state of the server, and return the latest mouse position and button state of the server to the client.
  • the end enables the client to adjust the cursor display of the client according to the latest mouse position and button state on the server side, thereby ensuring accurate synchronization between the client and the server mouse, thereby enabling the user to obtain accurate mouse position and button state information, thereby ensuring certain
  • the normal execution of special programs in the desktop cloud scenario brings a good customer experience.
  • the third embodiment of the method for the mouse synchronization of the embodiment of the present invention may be as shown in FIG.
  • Step S401 setting a mouse information recording module, such as a client mouse information recording module and server mouse information, on both the client and the server
  • the recording module, the mouse information recording module at each end is used to record the record information of the local mouse after the last movement (the record information after the last movement of the position, the record information after the last movement of the button state), when the client and the server end
  • the mouse information recording module at each end records the initial information of the local mouse (initial position information, initial button state information);
  • the initial mouse information recorded by the client mouse information recording module is the same as the local mouse initial information recorded by the server-side mouse information recording module.
  • Step S402 The user moves the mouse, and the client mouse control API acquires the first information (first position information, first button state information) of the current client mouse;
  • the first location information of the current client mouse acquired by the client mouse control API is represented by the client screen X and y coordinate information.
  • Step S403 The client mouse and keyboard service module acquires information of the client mouse (first position information, first button state information) through an event message mechanism, and the client mouse and keyboard service module compares current client mouse information (first The location information, the first button state information) and the initial information of the local mouse recorded by the client mouse information recording module (initial position information, initial button state information), if a change occurs, step S404 is performed, if no change occurs, the client The end mouse control API returns to step S402;
  • Step S404 The client mouse and keyboard service module controls the client cursor movement according to the obtained first information of the current client mouse (first position information, first button state information), and displays it to the user;
  • the record information of the local mouse recorded by the client mouse information recording module may be updated to the current value (first position information, first button state information);
  • Step S405 Client mouse and keyboard
  • the service module sends the first information (first location information, first button state information) of the client mouse to the service through a communication protocol between the client and the server. Server side;
  • Step S406 The server-side mouse-and-pin service module receives the first information of the client mouse (first location information, first button state information);
  • Step S407 The server-side mouse-and-pin service module compares the first information (first position information, first button state information) of the current client mouse with the initial information (initial position information of the local mouse recorded by the server-side mouse information recording module, Initial button state information), if a change occurs, step S408 is performed, if no change occurs, then return to step S406;
  • Step S408 The server-side mouse and keyboard service module invokes the server-side mouse control API to perform a mouse redirection operation, that is, the server-side mouse control API controls the server end according to the first position information of the client mouse and the first button state information. Move the mouse to the first position of the server-side mouse and the first button state of the server-side mouse;
  • the record information of the local mouse recorded by the server-side mouse information recording module may be updated to the current value (first position information, first button state information); meanwhile, in this step, If the server-side mouse is moved, the server-side mouse control API needs to hide the cursor position of the server-side mouse, so as to prevent the client from detecting the delay of the mouse movement; Step S409: The server-side mouse and keyboard service module monitors whether a server-side mouse movement event occurs, if the detection Obtaining the second information of the server-side mouse by the server-side mouse moving event again, the second information of the server-side mouse is after the server side performs the mouse redirection operation according to the first information of the client mouse Real-time information of the server-side mouse; if the third-party application calls the server-side mouse control API, and causes the server-side mouse control API to control the position of the server-side mouse or the button state to be changed, the server-side mouse-and-pin service module Get the updated service Real-time information of the server-side mouse,
  • Step S410 The server-side mouse-and-pin service module compares the second information of the updated server-side mouse (the second location information, the second button state information) with the last mouse movement of the local mouse recorded by the server-side mouse information recording module. Record information (first position information and first button status letter) If the change occurs, step S411 is performed, if no change occurs, the process returns to step S409; Step S411: the server-side mouse-and-pin service sends the second location information of the server-side mouse through a communication protocol between the client and the server. The second button status information is sent to the client;
  • Step S412 The client mouse and keyboard service module receives the second location information and the second button state information of the server mouse, and the client mouse and keyboard service module compares the second information of the server mouse (second location information, second Key state information) and the information of the last mouse movement of the local mouse recorded by the client mouse information recording module (first position information, first button state information), if a change occurs, step S413 is performed;
  • Step S413 The client mouse and keyboard service module invokes the client mouse control API, so that the client mouse control API controls the client cursor to move to the second position according to the server second mouse second position information and the second button state information.
  • the second button state is displayed to the user.
  • the changed value (or difference) of the change can be obtained, for example.
  • the peer end needs to recover the current mouse information according to the mouse information recorded by the local mouse information recording module and the changed value (or difference value). Real position or button status information, and operate accordingly.
  • the server can also capture the latest mouse position and button state of the server, and return the latest mouse position and button state of the server to the client.
  • the end enables the client to adjust the cursor display of the client according to the latest mouse position and button state on the server side, thereby ensuring accurate synchronization between the client and the server mouse, thereby enabling the user to obtain accurate mouse position and button state information, thereby ensuring certain
  • the mouse information recording module is set. Therefore, in this embodiment, only the current mouse position information or the button state information is notified to the opposite end when the current mouse position information or the button state changes. It can reduce the number of mouse redirection operations, reduce the interaction between client and server messages, reduce bandwidth usage, and reduce the load on related devices.
  • FIG. 5 is a schematic structural diagram of a client device according to an embodiment of the present invention.
  • the client device in the embodiment of the present invention may be implemented by a hardware terminal or a software component in a thin terminal or a user mobile terminal, for example, a mouse and keyboard in a thin terminal.
  • Service module implementation for example, a hardware terminal or a software component in a thin terminal or a user mobile terminal, for example, a mouse and keyboard in a thin terminal.
  • the client device 500 is configured to synchronize the client mouse with the server mouse, and includes:
  • the first obtaining unit 501 is configured to acquire first information of the client mouse, where the first information of the client mouse is real-time information of the client mouse after the user operates the client mouse; the client mouse control unit 502 uses Controlling client cursor movement according to the first information of the client mouse;
  • the first communication unit 503 is configured to report the first information of the client mouse to the server, so that the server performs a mouse redirection operation according to the first information of the client mouse.
  • the first obtaining unit 501 is further configured to receive second information of the server-side mouse returned by the server, where the second information of the server-side mouse is the server end according to the client mouse Real-time information of the server-side mouse after a mouse redirection operation;
  • the client mouse control unit 502 is further configured to control the client cursor to move again according to the second information of the server mouse.
  • the client device may further include a client mouse information recording module 504, configured to save the record information of the client mouse after the last move;
  • the first obtaining unit 501 is further configured to acquire the record information of the client mouse after the last movement recorded by the client mouse information recording module, and compare the last time of the client mouse. Transmitting the recorded information and the first information of the client mouse, triggering the first communication when the first information of the client mouse changes relative to the record information of the last mouse movement of the client mouse.
  • the unit 503 performs the first information that reports the client mouse to the server.
  • the client mouse information recording module 504 is further configured to update the record information of the client mouse after the last movement recorded by the client mouse information recording module 504 according to the first information of the client mouse.
  • the first obtaining unit 501 is further configured to acquire the record information of the last mouse movement of the client mouse recorded by the client mouse information recording module, where the record information of the client mouse after the last move is The first information of the client mouse, comparing the first information of the client mouse with the second information of the server mouse, when the second information of the server mouse is relative to the first information of the client mouse
  • the client mouse control unit 502 is triggered to control the client cursor to move again according to the second information of the server mouse.
  • FIG. 6 is a schematic structural diagram of a server according to an embodiment of the present invention.
  • the server in the embodiment of the present invention may be a remote processing server that is remotely logged in by a client, or a server that provides a virtual machine in a desktop cloud scenario/virtualization scenario, or A server that provides virtual machine management; the function of the server to implement mouse synchronization can be implemented by hardware implementation or software components, for example, by a mouse and keyboard service module installed in the server.
  • the server 600 is configured to implement synchronization between the client mouse and the server-side mouse, and includes: a second communication unit 601, configured to receive first information of the client mouse reported by the client, where the client mouse A message is real-time information of the client mouse after the user operates the client mouse;
  • a server-side mouse control unit 602 configured to perform a mouse redirection operation according to the first information of the client mouse
  • a second obtaining unit 603 configured to acquire second information of the server-side mouse, where the second information of the server-side mouse is after the server performs a mouse redirection operation according to the first information of the client mouse Real-time information of the server-side mouse;
  • the second communication unit 601 is further configured to send, to the client, the second information of the server-side mouse, so that the client controls the client-side cursor according to the second information of the server-side mouse. mobile.
  • the server may further include a server-side mouse information recording module 604, configured to save the record information after the last movement of the server-side mouse;
  • the second obtaining unit 603 is further configured to acquire the record information of the server-side mouse saved after the last movement of the server-side mouse information recording module, and compare the last movement of the server-side mouse. Recording information and the first information of the client mouse, when the record information of the first information relative to the last movement of the server mouse is changed, triggering the server mouse control unit 602 to perform according to the The first information of the client mouse performs a mouse redirection operation.
  • the server-side mouse information recording module 604 is further configured to update the record information of the server-side mouse after the last move according to the first information of the client mouse.
  • the second obtaining unit 603 is further configured to acquire, after the second information of the server-side mouse, the record information after the last movement of the server-side mouse recorded by the server-side mouse information recording module, where the server end The recorded information after the last movement of the mouse is the first information of the client mouse, comparing the first information of the client mouse with the second information of the server mouse, when the second of the server mouse When the information changes with respect to the first information of the client mouse, the second communication unit 601 is triggered to send the second information of the server mouse to the client.
  • the server further includes a monitoring unit 605, configured to monitor whether a server-side mouse re-movement event occurs, and if the server-side mouse re-movement event is detected, triggering the second obtaining unit 603 to acquire the second information of the server-side mouse.
  • a monitoring unit 605 configured to monitor whether a server-side mouse re-movement event occurs, and if the server-side mouse re-movement event is detected, triggering the second obtaining unit 603 to acquire the second information of the server-side mouse.
  • FIG. 7 is a schematic structural diagram of a communication system according to an embodiment of the present invention.
  • the communication system 700 is used in a scenario where a client remotely logs in to a remote processing server, or a user uses a desktop cloud scenario/virtualization scenario, where the system includes a client.
  • the end device 701 and the server 702 are configured to implement synchronization between the client mouse and the server mouse.
  • the client device 701 is configured to acquire first information of a client mouse, where the first information of the client mouse is real-time information of a client mouse after the user operates the client mouse, according to the client mouse a message controlling client cursor movement, and reporting the first information of the client mouse to the server;
  • the server 702 is configured to receive the first information of the client mouse reported by the client, perform a mouse redirection operation according to the first information of the client mouse, and obtain second information of the server mouse, where The second information of the server-side mouse is real-time information of the server-side mouse after the server side performs a mouse redirection operation according to the first information of the client mouse, and sends the server-side mouse to the client.
  • Two information ;
  • the client device 701 is further configured to receive the second information of the server end mouse returned by the server, and control the client cursor to move again according to the second information of the server mouse.
  • the client device 701 may include various functional sub-modules as shown in FIG. 5.
  • the server 702 may include various functional sub-modules as shown in FIG. 6.
  • the system and device described above are described.
  • the specific working process of the unit refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
  • FIG. 8 is a schematic structural diagram of a client device according to an embodiment of the present invention.
  • the client device of the embodiment of the invention is used for synchronizing a client mouse and a server mouse;
  • the client device can include:
  • the processor 801, the memory 802, and the communication interface 804 are connected by the system bus 803 and communicate with each other.
  • Processor 801 may be a single core or multi-core central processing unit (Cent ra l Proces s ing Unit, CPU), or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention.
  • CPU central processing unit
  • ASIC Application Specific Integrated Circuit
  • the memory 802 may be a high speed RAM memory or a non-volatile memory such as at least one disk memory.
  • Memory 802 is used to store program 805.
  • program code 805 can include program code, and the program code includes computer execution instructions.
  • the processor 801 runs the program 805 to execute the following instructions:
  • the first information of the client mouse is real-time information of the client mouse after the user operates the client mouse;
  • the client device in the embodiment of the present invention further performs the mouse synchronization method shown in FIG. 3 or 4 according to the instruction, and details are not described herein.
  • FIG. 9 is a schematic structural diagram of a server according to an embodiment of the present invention.
  • the server of the embodiment of the invention is used for synchronizing a client mouse and a server mouse;
  • the server can include:
  • the processor 901, the memory 902, and the communication interface 904 are connected by the system bus 803 and communicate with each other.
  • Processor 901 may be a single-core or multi-core central processing unit (Central Processing
  • the memory 902 may be a high speed RAM memory or a non-volatile memory such as at least one disk memory.
  • Memory 902 is used to store program 905.
  • program code 905 can include program code, and the program code includes computer execution instructions.
  • the processor 901 runs the program 905 to execute the following instructions:
  • the second information of the server-side mouse is real-time information of the server-side mouse after the mouse redirection operation is performed by the server according to the first information of the client mouse;
  • the server in the embodiment of the present invention further performs the mouse synchronization method shown in FIG. 3 or 4 according to the instruction, and details are not described herein.
  • aspects of the invention, or possible implementations of various aspects may be embodied as a system, method, or computer program product.
  • aspects of the invention, or possible implementations of various aspects may be in the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, etc.), or a combination of software and hardware aspects, They are collectively referred to herein as "circuits," “modules,” or “systems.”
  • aspects of the invention, or possible implementations of various aspects may take the form of a computer program product, which is a computer readable program code stored in a computer readable medium.
  • the computer readable medium can be a computer readable signal medium or a computer readable storage medium.
  • Computer readable storage media includes, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or A semiconductor system, device or device, or any suitable combination of the foregoing, such as random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), fiber optics, portable only Read memory (CD-ROM).
  • the processor in the computer reads the computer readable program code stored in the computer readable medium, such that the processor can perform the functional actions specified in each step or combination of steps in the flowchart; A device that functions as specified in each block, or combination of blocks.
  • the computer readable program code can be executed entirely on the user's computer, partly on the user's computer, as a separate software package, partly on the user's computer and partly on the remote computer, or entirely on the remote computer or server.
  • the functions noted in the various steps in the flowcharts or in the blocks in the block diagrams may not occur in the order noted.
  • two steps, or two blocks, shown in succession may in fact be executed substantially simultaneously, or the blocks may sometimes be executed in the reverse order.

Landscapes

  • Engineering & Computer Science (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)
  • Information Transfer Between Computers (AREA)

Abstract

本发明实施例涉及服务器端与客户端鼠标同步的装置、方法和***。服务器端鼠标根据客户端的鼠标信息进行移动之后,服务器端还能够捕获服务器端最新的鼠标信息,并且将服务器端最新的鼠标信息返回到客户端,使得客户端在根据本端用户操作进行鼠标移动之后还能够根据服务器端的最新的鼠标信息再次调整客户端的光标显示,从而保证客户端与服务器鼠标的精准同步,使得用户获得准确的鼠标信息。

Description

鼠标同步的方法、 装置和***
技术领域
本发明实施例涉及计算机技术, 特别是一种鼠标同步的方法、 装置和系 统。 背景技术
云计算网络中包括具有强大计算能力的 "云服务器" 和用户终端, 云计 算的核心理念就是通过不断提高 "云服务器" 的处理能力, 进而减少用户终 端的处理负担, 最终使用户终端筒化成一个单纯的输入输出设备, 并能按需 享受 "云" 的强大计算处理能力。 用户终端访问云服务器可以通过远程桌面 实现。 桌面云是远程桌面中的一种, 为云计算技术提供的统一桌面服务, 桌 面云将所有桌面虚拟机在数据中心进行托管并统一管理; 同时用户能够获得 完整 PC的使用体验。 用户可以通过瘦客户端 (Thin Client, TC )或者类似 的设备 (筒称云终端)在局域网或者远程访问获得与传统 PC—致的用户体 验。
桌面云技术中, 需要将客户端的鼠标的操作信息传递到服务器端, 以使 得客户端的鼠标操作在服务器端执行并生效,例如,用户移动客户端的鼠标, 客户端通过本地***的鼠标控制应用程序接口 ( Application Programming Interface, API ) , 获得客户端鼠标按键状态和当前客户端鼠标的位置信息, 再通过协议通讯将其获取的客户端鼠标操作信息传递到服务器端,服务器端 接收到客户端鼠标操作信息后, 根据客户端鼠标操作信息再通过相关 API 将服务器端鼠标设置到相关位置和状态。
在上述过程中, 如何在客户端显示鼠标的操作信息是一个关键的技术。 现有技术中的一种方案是客户端获取到自己的鼠标操作信息之后, 先根据自 己鼠标的位置信息显示鼠标的位置移动, 使得用户立即看到鼠标位置的移 动, 再向服务器端传递本端鼠标的操作信息, 服务器端获取客户端鼠标操作 信息执行相关服务器端鼠标操作之后, 服务器端隐藏自己的鼠标光标, 并发 送自己的鼠标光标图形给客户端,客户端在之前已经显示给用户的鼠标的位 置上, 直接显示接收到的服务端鼠标光标形状即可。
然而上述技术方案, 实际上存在客户端显示的鼠标位置和服务端实际鼠 标位置不能精确同步的问题,如果服务器端还运行一些对鼠标位置进行控制 的特殊程序, 例如, 在虚拟桌面中运行即时通讯软件, 可以给他人共享自己 的桌面, 并允许他人远程控制鼠标, 此类软件会不断设置虚拟桌面鼠标位置 为他人远程控制的位置, 再例如, 虚拟桌面运行第一人称视角射击游戏时, 通常此类游戏都会强制设置鼠标到屏幕中央, 此时, 由于客户端显示的是自 己的鼠标位置, 因此会导致用户看不到服务器端鼠标光标的真实位置, 造成 不同步。 发明内容
本发明实施例提出了一种鼠标同步的方法、 装置和***, 以实现客户端 鼠标与服务器端鼠标的同步。
第一方面, 本发明实施例提出了一种鼠标同步的方法, 所述鼠标同步包 括客户端鼠标与服务器端鼠标的同步, 包括: 获取客户端鼠标的第一信息, 其中,所述客户端鼠标的第一信息是用户操作客户端鼠标之后客户端鼠标的 实时信息; 根据所述客户端鼠标的第一信息控制客户端光标移动; 向服务器 端上报所述客户端鼠标的第一信息, 以使得所述服务器端根据所述客户端鼠 标的第一信息进行鼠标重定向操作;接收所述服务器端返回的服务器端鼠标 的第二信息, 其中, 所述服务器端鼠标的第二信息为所述服务器端根据所述 客户端鼠标的第一信息进行鼠标重定向操作之后的服务器端鼠标的实时信 息; 根据所述服务器端鼠标的第二信息控制所述客户端光标再次移动。
结合第一方面, 在第一种可能的实现方式中, 所述向服务器端上报所 述客户端鼠标的第一信息之前, 还包括: 获取客户端鼠标信息记录模块记 录的客户端鼠标的上次移动后的记录信息; 比较所述客户端鼠标的上次移 动后的记录信息与所述客户端鼠标的第一信息, 当所述客户端鼠标的第一 信息相对所述客户端鼠标的上次移动后的记录信息发生变化时, 执行所述 向服务器端上报所述客户端鼠标的第一信息的步骤。
结合第一方面或者第一方面的第一种可能的实现方式, 在第二种可能 的实现方式中, 当所述客户端鼠标的第一信息相对所述客户端鼠标的上次 移动后的记录信息发生变化时, 还包括: 根据所述客户端鼠标的第一信息, 更新所述客户端鼠标信息记录模块记录的客户端鼠标的上次移动后的记录 信息。
结合第一方面或者第一方面的第二种可能的实现方式, 在第三种可能 的实现方式中, 所述根据所述服务器端鼠标的第二信息控制所述客户端光 标再次移动之前, 还包括: 再次获取客户端鼠标信息记录模块记录的客户 端鼠标的上次移动后的记录信息, 其中, 所述客户端鼠标的上次移动后的 记录信息为所述客户端鼠标的第一信息; 比较所述客户端鼠标的第一信息 与所述服务器端鼠标的第二信息, 当所述服务器端鼠标的第二信息相对所 述客户端鼠标的第一信息发生变化时, 执行根据所述服务器端鼠标的第二 信息控制所述客户端光标再次移动的步骤。
第二方面, 还提出了一种鼠标同步的方法, 所述鼠标同步包括客户端 鼠标与服务器端鼠标的同步, 包括: 接收客户端上报的客户端鼠标的第一 信息, 其中, 所述客户端鼠标的第一信息是用户操作客户端鼠标之后客户 端鼠标的实时信息;根据所述客户端鼠标的第一信息进行鼠标重定向操作; 获取服务器端鼠标的第二信息, 其中, 所述服务器端鼠标的第二信息为所 述服务器端根据所述客户端鼠标的第一信息进行鼠标重定向操作之后的服 务器端鼠标的实时信息; 向所述客户端发送所述服务器端鼠标的第二信息, 以使得所述客户端根据所述服务器端鼠标的第二信息控制所述客户端光标 再次移动。
结合第二方面, 在第一种可能的实现方式中, 所述根据所述客户端鼠 标的第一信息进行鼠标重定向操作之后, 还包括: 监测是否发生服务器端 鼠标再次移动事件, 如果检测到所述服务器端鼠标再次移动事件, 执行所 述获取服务器端鼠标的第二信息的步骤。
结合第二方面的第一种可能的实现方式,在第二种可能的实现方式中, 所述监测是否发生服务器端鼠标再次移动事件, 包括: 当发生第三方程序 调用所述服务器端鼠标控制接口, 并使得所述服务器端鼠标控制接口控制 服务器端鼠标再次移动, 监测到发生所述服务器端鼠标再次移动事件。
结合第二方面或者第二方面的第一种可能的实现方式, 在第二种可能 的实现方式中, 所述根据所述客户端鼠标的第一信息进行鼠标重定向操作 之前, 还包括: 获取服务器端鼠标信息记录模块记录的服务器端鼠标的上 次移动后的记录信息; 比较所述服务器端鼠标的上次移动后的记录信息与 所述客户端鼠标的第一信息, 当所述第一信息相对所述服务器端鼠标的上 次移动后的记录信息发生变化时, 执行根据所述客户端鼠标的第一信息进 行鼠标重定向操作的步骤。
结合第二方面或者第二方面的第二种可能的实现方式, 在第三种可能 的实现方式中, 所述根据所述客户端鼠标的第一信息进行鼠标重定向操作 之后, 还包括: 根据所述客户端鼠标的第一信息, 更新所述服务器端鼠标 信息记录模块记录的服务器端鼠标的上次移动后的记录信息。
结合第二方面或者第二方面的第三种可能的实现方式, 在第四种可能 的实现方式中, 所述向所述客户端发送所述服务器端鼠标的第二信息之前, 还包括: 再次获取服务器端鼠标信息记录模块记录的服务器端鼠标的上次 移动后的记录信息, 其中, 所述服务器端鼠标的上次移动后的记录信息为 所述客户端鼠标的第一信息; 比较所述客户端鼠标的第一信息与所述服务 器端鼠标的第二信息, 当所述服务器端鼠标的第二信息相对所述客户端鼠 标的第一信息发生变化时, 执行向所述客户端发送所述服务器端鼠标的第 二信息的步骤。 第三方面, 提出了一种用于客户端装置, 用于实现客户端鼠标与服务 器端鼠标的同步, 包括: 第一获取单元, 用于获取客户端鼠标的第一信息, 其中, 所述客户端鼠标的第一信息是用户操作客户端鼠标之后客户端鼠标 的实时信息; 客户端鼠标控制单元, 用于根据所述客户端鼠标的第一信息 控制客户端光标移动; 第一通信单元, 用于向服务器端上报所述客户端鼠 标的第一信息, 以使得所述服务器端根据所述客户端鼠标的第一信息进行 鼠标重定向操作; 所述第一获取单元, 还用于接收所述服务器端返回的服 务器端鼠标的第二信息, 其中, 所述服务器端鼠标的第二信息为所述服务 器端根据所述客户端鼠标的第一信息进行鼠标重定向操作之后的服务器端 鼠标的实时信息; 所述客户端鼠标控制单元, 还用于根据所述服务器端鼠 标的第二信息控制所述客户端光标再次移动。
第四方面, 提出一种服务器, 用于实现客户端鼠标与服务器端鼠标的 同步, 包括: 第二通信单元, 用于接收客户端上报的客户端鼠标的第一信 息, 其中, 所述客户端鼠标的第一信息是用户操作客户端鼠标之后客户端 鼠标的实时信息; 服务器端鼠标控制单元, 用于根据所述客户端鼠标的第 一信息进行鼠标重定向操作; 第二获取单元, 用于获取服务器端鼠标的第 二信息, 其中, 所述服务器端鼠标的第二信息为所述服务器端根据所述客 户端鼠标的第一信息进行鼠标重定向操作之后的服务器端鼠标的实时信 息; 所述第二通信单元, 还用于向所述客户端发送所述服务器端鼠标的第 二信息, 以使得所述客户端根据所述服务器端鼠标的第二信息控制所述客 户端光标再次移动。
第五方面, 提出一种通信***, 所述通信***包括客户端装置和服务 器, 用于实现客户端鼠标与服务器端鼠标的同步, 所述客户端装置用于获 取客户端鼠标的第一信息, 其中, 所述客户端鼠标的第一信息是用户操作 客户端鼠标之后客户端鼠标的实时信息, 根据所述客户端鼠标的第一信息 控制客户端光标移动, 以及向服务器端上报所述客户端鼠标的第一信息; 所述服务器用于接收客户端上报的所述客户端鼠标的第一信息, 根据所述 客户端鼠标的第一信息进行鼠标重定向操作, 获取服务器端鼠标的第二信 息, 其中, 所述服务器端鼠标的第二信息为所述服务器端根据所述客户端 鼠标的第一信息进行鼠标重定向操作之后的服务器端鼠标的实时信息, 以 及向所述客户端发送所述服务器端鼠标的第二信息; 所述客户端装置还用 于接收所述服务器端返回的所述服务器端鼠标的第二信息, 根据所述服务 器端鼠标的第二信息控制所述客户端光标再次移动。
第六方面, 提出一种客户端装置, 用于实现客户端鼠标与服务器端鼠 标的同步, 所述装置包括包括处理器、 存储器、 总线和通信接口; 所述存 储器用于存储计算机执行指令, 所述处理器与所述存储器通过所述总线连 接, 当所述客户端装置运行时, 所述处理器执行所述存储器存储的所述计 算机执行指令, 以使所述客户端装置执行如上第一方面所述的鼠标同步的 方法。
第七方面, 提出一种服务器, 用于实现客户端鼠标与服务器端鼠标的 同步; 所述服务器包括包括处理器、 存储器、 总线和通信接口; 所述存储 器用于存储计算机执行指令,所述处理器与所述存储器通过所述总线连接, 当所述客户端装置运行时, 所述处理器执行所述存储器存储的所述计算机 执行指令, 以使所述服务器执行如上第二方面所述的鼠标同步的方法。
第八方面, 提出一种计算机可读介质, 包括计算机执行指令, 以供计 算机的处理器执行所述计算机执行指令时, 所述计算机执行如上第一方面 所述的鼠标同步的方法。
第九方面, 提出又一种计算机可读介质, 包括计算机执行指令, 以供 计算机的处理器执行所述计算机执行指令时, 所述计算机执行如上第二方 面所述的鼠标同步的方法。
本发明实施例中,服务器端鼠标根据客户端的鼠标信息进行移动之后, 服务器端还能够捕获服务器端最新的鼠标信息, 并且将服务器端最新的鼠标 信息返回到客户端,使得客户端在根据本端用户操作进行鼠标移动之后还能 够根据服务器端的最新的鼠标信息再次调整客户端的光标显示,从而保证客 户端与服务器鼠标的精准同步, 使得用户获得准确的鼠标信息, 保证了某些 特殊的程序在桌面云场景下的正常执行, 带来客户的良好体验。
附图说明
为了更清楚地说明本发明实施例的技术方案, 下面将对现有技术或实施 例中所需要使用的附图作筒单地介绍, 显而易见地, 下面描述中的附图仅仅 是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳 动的前提下, 还可以根据这些附图获得其他的附图。
图 1是根据本发明实施例鼠标同步通信***的架构示意图;
图 2是根据本发明实施例一的鼠标同步方法的流程图;
图 3是根据本发明实施例二的鼠标同步方法的流程图;
图 4是根据本发明实施例三的鼠标同步方法的流程图;
图 5是根据本发明实施例客户端装置的组成示意图;
图 6是根据本发明实施例服务器的组成示意图;
图 7是根据本发明实施例通信***的组成示意图;
图 8是根据本发明又一实施例客户端装置的组成示意图;
图 9是根据本发明又一实施例服务器的组成示意图。 具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行 清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是 全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作出创 造性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。
图 1描绘了实施本发明实施例鼠标同步的方法的***架构的一个示例, 该架构描绘了桌面云的应用场景, 桌面云通常由客户端和服务器端组成, 客 户端的计算机 /终端设备通过访问服务器端的远程计算设备,将远程计算机的 桌面传送到客户端的终端设备。 图 1中客户端包括普通计算机(101 )、 平板 电脑( 102 )、 智能手机 ( 103 ) , 也可以包括瘦终端 TC (图未示 ), 客户端的 计算机或者终端设备通过网络(201 )使用远程桌面协议(202 )访问远程服 务器端。月良务器端包括月良务器 301、 302、 303....30η, 用户的虚拟桌面 (Virtual Desktop)以虚拟机(301a、 301b— 301η ) 的形式由服务器 301 实现, 服务器 302、 303....30η与服务器 301类似。 用户通过客户端访问服务器上分配给该 用户的虚拟机, 该虚拟机将用户访问的内容传输到用户的客户端进行显示。 服务器端还可以包括桌面云管理***等(图未示), 管理***可以装载在服 务器端的任意服务器上。
本发明实施例中的鼠标同步过程可以在图 1所示的桌面云的架构下实 施, 但是图 1所示的只是其中一种远程桌面场景为桌面云的场景, 本实施场 景仅是一种示例性说明, 图 1所示的各组成也只是给出了与本发明实施例相 关的组成部分, 并不是对本发明应用的具体限定。
在图 1所示的桌面云的架构下, 本发明实施例的鼠标同步的方法的实 施例一可以如图 2所示执行, 包括:
步骤 S201: 客户端装置获取客户端鼠标的第一信息, 其中, 所述客户 端鼠标的第一信息是用户操作客户端鼠标之后客户端鼠标的实时信息; 步骤 S202: 客户端装置根据所述客户端鼠标的第一信息控制客户端光 标移动;
步骤 S203: 客户端装置向服务器端上报所述客户端鼠标的第一信息; 步骤 S204: 服务器端接收客户端上报的客户端鼠标的第一信息, 根据 所述客户端鼠标的第一信息进行鼠标重定向操作;
步骤 S205: 获取月良务器端鼠标的第二信息, 其中, 所述服务器端鼠标 的第二信息为所述服务器端根据所述客户端鼠标的第一信息进行鼠标重定 向操作之后的服务器端鼠标的实时信息;
步骤 S206: 向所述客户端发送所述服务器端鼠标的第二信息; 步骤 S207:客户端接收所述服务器端返回的服务器端鼠标的第二信息, 根据所述服务器端鼠标的第二信息控制所述客户端光标再次移动。
本发明实施例中,服务器端鼠标根据客户端的鼠标信息进行移动之后, 服务器端还能够捕获服务器端最新的鼠标信息, 并且将服务器端最新的鼠标 信息返回到客户端,使得客户端在根据本端用户操作进行鼠标移动之后还能 够根据服务器端的最新的鼠标信息再次调整客户端的光标显示,从而保证客 户端与服务器鼠标的精准同步, 使得用户获得准确的鼠标信息, 保证了某些 特殊的程序在桌面云场景下的正常执行, 带来客户的良好体验。
以上实施例可以通过改造客户端装置与服务器的现有功能模块实现本 发明实施例的鼠标同步的方法,也可以通过在客户端装置与服务器中新增功 能模块的方式实现本发明实施例的鼠标同步的方法。 以下实施例将以客户端 装置和服务器中的鼠标控制应用程序接口 API和键鼠服务模块为例,来描述 几个具体实施例。
另外, 本发明实施例中的鼠标信息具体可以包括鼠标的位置信息和鼠 标的按键状态信息任意之一或者两者,在以下的具体实施例中将以包含两者 为例。
本发明实施例的鼠标同步的方法的实施例二可以如图 3所示, 包括: 步骤 S301: 用户移动鼠标, 客户端鼠标控制 API获取当前客户端鼠标 的第一位置信息和第一按键状态信息;
具体地, 客户端鼠标控制 API获取的当前客户端鼠标的第一位置信息 通过客户端屏幕 X与 y坐标信息表示。
步骤 S302: 客户端鼠标控制 API根据获取的客户端鼠标第一位置信息 和第一按键状态信息控制客户端光标移动, 以显示给用户;
步骤 S303: 客户端键鼠服务模块通过事件消息机制获取到所述客户端 鼠标第一位置信息和第一按键状态信息, 并通过客户端与服务器端的通信协 议将所述客户端鼠标第一位置信息和第一按键状态信息发送到服务器端; 步骤 S304: 服务器端键鼠服务模块接收所述客户端鼠标第一位置信息 和第一按键状态信息, 调用服务器端鼠标控制 API;
步骤 S305: 服务器端鼠标控制 API根据所述客户端鼠标第一位置信息 和第一按键状态信息, 进行鼠标重定向操作, 即控制服务器端鼠标移动到服 务器端鼠标第一位置和服务器端鼠标第一按键状态;
同时, 在本步骤中, 服务器端鼠标控制 API需要隐藏服务器端的鼠标 的光标位置, 以免客户端察觉鼠标移动的延迟;
步骤 S306: 第三方应用程序调用所述服务器端鼠标控制 API, 并使得 所述服务器端鼠标控制 API控制服务器端鼠标的位置或者按键状态进行改 变;
步骤 S307: 服务器端键鼠服务模块通过事件消息机制获取到所述服务 器端鼠标第二位置信息和第二按键状态信息, 第二位置信息和第二按键状态 信息为所述服务器端根据所述客户端鼠标的第一信息进行鼠标重定向操作 之后的服务器端鼠标的实时信息; 并通过客户端与服务器端的通信协议将所 述服务器端鼠标第二位置信息和第二按键状态信息发送到客户端;
步骤 S308: 客户端键鼠服务模块接收所述服务器端鼠标第二位置信息 和第二按键状态信息, 调用客户端鼠标控制 API;
步骤 S309: 客户端鼠标控制 API根据所述服务器端鼠标第二位置信息 和第二按键状态信息, 控制客户端光标移动到第二位置和实现第二按键状 态, 以显示给用户。
本发明实施例中, 服务器端鼠标根据客户端的鼠标位置和按键状态进 行移动之后, 服务器端还能够捕获服务器端最新的鼠标位置和按键状态, 并 且将服务器端最新的鼠标位置和按键状态返回到客户端,使得客户端能够根 据服务器端的最新的鼠标位置和按键状态调整客户端的光标显示, 能够保证 客户端与服务器鼠标的精准同步,从而使得用户获得准确的鼠标位置和按键 状态信息, 保证了某些特殊的程序在桌面云场景下的正常执行, 带来客户的 良好体验。 本发明实施例的鼠标同步的方法的实施例三可以如图 4所示, 包括: 步骤 S401: 在客户端和服务器端均设置鼠标信息记录模块, 如客户端 鼠标信息记录模块和服务器端鼠标信息记录模块,每端的鼠标信息记录模块 用于记录本端鼠标的上次移动后的记录信息 (位置上次移动后的记录信息, 按键状态上次移动后的记录信息), 当客户端和服务器端初始启动时, 每端 的鼠标信息记录模块记录本端鼠标的初始信息(初始位置信息, 初始按键状 态信息);
其中, 客户端鼠标信息记录模块记录的本端鼠标初始信息与服务器端 鼠标信息记录模块记录的本端鼠标初始信息默认为相同;
步骤 S402: 用户移动鼠标, 客户端鼠标控制 API获取当前客户端鼠标 的第一信息(第一位置信息, 第一按键状态信息);
具体地, 客户端鼠标控制 API获取的当前客户端鼠标的第一位置信息 通过客户端屏幕 X与 y坐标信息表示。
步骤 S403: 客户端键鼠服务模块通过事件消息机制获取到所述客户端 鼠标的信息 (第一位置信息, 第一按键状态信息), 客户端键鼠服务模块比 较当前客户端鼠标信息(第一位置信息, 第一按键状态信息)与客户端鼠标 信息记录模块记录的本端鼠标的初始信息(初始位置信息, 初始按键状态信 息), 如果发生变化, 执行步骤 S 404, 如果没有发生变化, 客户端鼠标控制 API返回执行步骤 S402;
步骤 S404: 客户端键鼠服务模块根据获取的当前客户端鼠标的第一信 息(第一位置信息, 第一按键状态信息)控制客户端光标移动, 并显示给用 户;
本实施例中, 还可以更新客户端鼠标信息记录模块记录的本端鼠标的 上次移动后的记录信息为当前值(第一位置信息, 第一按键状态信息); 步骤 S405: 客户端键鼠服务模块通过客户端与服务器端的通信协议将 所述客户端鼠标的第一信息(第一位置信息, 第一按键状态信息)发送到服 务器端;
步骤 S406:服务器端键鼠服务模块接收所述客户端鼠标的第一信息(第 一位置信息, 第一按键状态信息);
步骤 S407:服务器端键鼠服务模块比较当前客户端鼠标的第一信息(第 一位置信息, 第一按键状态信息)与服务器端鼠标信息记录模块记录的本端 鼠标的初始信息 (初始位置信息, 初始按键状态信息), 如果发生变化, 执 行步骤 S408, 如果没有发生变化, 则返回执行步骤 S406;
步骤 S408: 服务器端键鼠服务模块调用服务器端鼠标控制 API进行鼠 标重定向操作,即使得所述服务器端鼠标控制 API根据所述客户端鼠标第一 位置信息和第一按键状态信息,控制服务器端鼠标移动到服务器端鼠标第一 位置和服务器端鼠标第一按键状态;
本实施例中, 还可以更新服务器端鼠标信息记录模块记录的本端鼠标 的上次移动后的记录信息为当前值(第一位置信息, 第一按键状态信息); 同时, 在本步骤中, 如果移动服务器端鼠标, 服务器端鼠标控制 API 需要隐藏服务器端的鼠标的光标位置, 以免客户端察觉鼠标移动的延迟; 步骤 S409: 服务器端键鼠服务模块监测是否发生服务器端鼠标再次移 动事件, 如果检测到所述服务器端鼠标再次移动事件, 获取服务器端鼠标 的第二信息, 所述服务器端鼠标的第二信息为所述服务器端根据所述客户 端鼠标的第一信息进行鼠标重定向操作之后的服务器端鼠标的实时信息; 若第三方应用程序调用所述服务器端鼠标控制 API, 并使得所述服务 器端鼠标控制 API控制服务器端鼠标的位置或者按键状态进行改变,所述服 务器端键鼠服务模块获取更新后的服务器端鼠标的实时信息, 即第二信息 (第二位置信息, 第二按键状态信息);
步骤 S410: 服务器端键鼠服务模块比较该更新后的服务器端鼠标的第 二信息(第二位置信息, 第二按键状态信息)与服务器端鼠标信息记录模块 记录的本端鼠标的上次移动后的记录信息(第一位置信息和第一按键状态信 息 ),如果发生变化,执行步骤 S411 ,如果没有发生变化,返回执行步骤 S409; 步骤 S411: 所述服务器端键鼠服务通过客户端与服务器端的通信协议 将所述服务器端鼠标第二位置信息和第二按键状态信息发送到客户端;
步骤 S412: 客户端键鼠服务模块接收所述服务器端鼠标第二位置信息 和第二按键状态信息,客户端键鼠服务模块比较所述服务器端鼠标的第二信 息(第二位置信息, 第二按键状态信息)与客户端鼠标信息记录模块记录的 本端鼠标的上次移动后的信息 (第一位置信息, 第一按键状态信息), 如果 发生变化, 执行步骤 S413;
步骤 S413: 客户端键鼠服务模块调用客户端鼠标控制 API, 使得客户 端鼠标控制 API根据所述服务器端鼠标第二位置信息和第二按键状态信息, 控制客户端光标移动到第二位置和实现第二按键状态, 以显示给用户。
在本发明实施倒三中的另一个可以执行的实施例中, 当步骤 S403或者 步骤 S410在进行比较动作之后, 若确定发生变化之后, 还可以获得发生变 化的改变值(或者差值), 例如, 获取所述客户端鼠标的第一信息相对所述 客户端鼠标的上次移动后的记录信息的改变值, 并在步骤 S405 或者步骤 S411中向对端通知相应的改变值(或者差值), 那么相应地, 如果只是向对 端传递鼠标信息的改变值或者差值时, 对端需要根据本端的鼠标信息记录 模块记录的鼠标信息和所述改变值(或者差值) 恢复出当前鼠标信息的真 实位置或按键状态信息, 并进行相应地操作。
本发明实施例中, 服务器端鼠标根据客户端的鼠标位置和按键状态进 行移动之后, 服务器端还能够捕获服务器端最新的鼠标位置和按键状态, 并 且将服务器端最新的鼠标位置和按键状态返回到客户端,使得客户端能够根 据服务器端的最新的鼠标位置和按键状态调整客户端的光标显示, 能够保证 客户端与服务器鼠标的精准同步,从而使得用户获得准确的鼠标位置和按键 状态信息, 保证了某些特殊的程序在桌面云场景下的正常执行, 带来客户的 良好体验。 同时在本实施例中, 由于设置了鼠标信息记录模块, 因此本实施例中, 只在当前鼠标的位置信息或者按键状态发生变化时, 才向对端通知相应的鼠 标位置信息或者按键状态信息, 可以减少鼠标重定向操作的次数, 同时减少 客户端和服务器端消息的交互,减少带宽的占用,同时减轻相关设备的负载。
图 5为本发明实施例的客户端装置的结构组成示意图, 本发明实施例 的客户端装置可以通过瘦终端或者用户移动终端中的硬件实现或者软件组 件实现, 例如可以通过瘦终端中的键鼠服务模块实现。
所述客户端装置 500,用于实现客户端鼠标与服务器端鼠标的同步, 包 括:
第一获取单元 501 , 用于获取客户端鼠标的第一信息, 其中, 所述客户 端鼠标的第一信息是用户操作客户端鼠标之后客户端鼠标的实时信息; 客户端鼠标控制单元 502 ,用于根据所述客户端鼠标的第一信息控制客 户端光标移动;
第一通信单元 503 , 用于向服务器端上报所述客户端鼠标的第一信息, 以使得所述服务器端根据所述客户端鼠标的第一信息进行鼠标重定向操 作;
所述第一获取单元 501 ,还用于接收所述服务器端返回的服务器端鼠标 的第二信息, 其中, 所述服务器端鼠标的第二信息为所述服务器端根据所 述客户端鼠标的第一信息进行鼠标重定向操作之后的服务器端鼠标的实时 信息;
所述客户端鼠标控制单元 502,还用于根据所述服务器端鼠标的第二信 息控制所述客户端光标再次移动。
进一步地, 所述客户端装置还可以包括客户端鼠标信息记录模块 504, 用于保存客户端鼠标的上次移动后的记录信息;
则,所述第一获取单元 501 ,还用于获取所述客户端鼠标信息记录模块 记录的客户端鼠标的上次移动后的记录信息, 比较所述客户端鼠标的上次 移动后的记录信息与所述客户端鼠标的第一信息, 当所述客户端鼠标的第 一信息相对所述客户端鼠标的上次移动后的记录信息发生变化时, 触发所 述第一通信单元 503执行所述向服务器端上报所述客户端鼠标的第一信息。
所述客户端鼠标信息记录模块 504,还可以用于根据所述客户端鼠标的 第一信息, 更新所述客户端鼠标信息记录模块 504记录的客户端鼠标的上次 移动后的记录信息。
所述第一获取单元 501 ,还用于再次获取客户端鼠标信息记录模块记录 的客户端鼠标的上次移动后的记录信息, 其中, 所述客户端鼠标的上次移 动后的记录信息为所述客户端鼠标的第一信息, 比较所述客户端鼠标的第 一信息与所述服务器端鼠标的第二信息, 当所述服务器端鼠标的第二信息 相对所述客户端鼠标的第一信息发生变化时, 触发所述客户端鼠标控制单 元 502根据所述服务器端鼠标的第二信息控制所述客户端光标再次移动。
图 6为本发明实施例的服务器的结构组成示意图, 本发明实施例的服 务器可以是客户端远程登录的远端处理服务器,也可以是桌面云场景 /虚拟化 场景中提供虚拟机的服务器, 或者提供虚拟机管理的服务器; 该服务器实现 鼠标同步的功能可以通过硬件实现或者软件组件实现, 例如可以通过安装在 服务器中的键鼠服务模块实现。
所述服务器 600, 用于实现客户端鼠标与服务器端鼠标的同步, 包括: 第二通信单元 601 ,用于接收客户端上报的客户端鼠标的第一信息,其 中, 所述客户端鼠标的第一信息是用户操作客户端鼠标之后客户端鼠标的 实时信息;
服务器端鼠标控制单元 602,用于根据所述客户端鼠标的第一信息进行 鼠标重定向操作;
第二获取单元 603 , 用于获取服务器端鼠标的第二信息, 其中, 所述服 务器端鼠标的第二信息为所述服务器端根据所述客户端鼠标的第一信息进 行鼠标重定向操作之后的服务器端鼠标的实时信息; 所述第二通信单元 601 ,还用于向所述客户端发送所述服务器端鼠标的 第二信息, 以使得所述客户端根据所述服务器端鼠标的第二信息控制所述 客户端光标再次移动。
所述服务器还可以包括服务器端鼠标信息记录模块 604,用于保存服务 器端鼠标的上次移动后的记录信息;
贝' J ,所述第二获取单元 603 ,还用于获取所述服务器端鼠标信息记录模 块保存的服务器端鼠标的上次移动后的记录信息, 比较所述服务器端鼠标 的上次移动后的记录信息与所述客户端鼠标的第一信息, 当所述第一信息 相对所述服务器端鼠标的上次移动后的记录信息发生变化时, 触发所述服 务器端鼠标控制单元 602执行根据所述客户端鼠标的第一信息进行鼠标重 定向操作。
所述服务器端鼠标信息记录模块 604,还用于将根据所述客户端鼠标的 第一信息, 更新所述服务器端鼠标的上次移动后的记录信息。
所述第二获取单元 603 ,在获取服务器端鼠标的第二信息之后,还用于 再次获取服务器端鼠标信息记录模块记录的服务器端鼠标的上次移动后的 记录信息, 其中, 所述服务器端鼠标的上次移动后的记录信息为所述客户 端鼠标的第一信息, 比较所述客户端鼠标的第一信息与所述服务器端鼠标 的第二信息, 当所述服务器端鼠标的第二信息相对所述客户端鼠标的第一 信息发生变化时, 触发所述第二通信单元 601 向所述客户端发送所述服务 器端鼠标的第二信息。
所述服务器还包括监测单元 605 ,用于监测是否发生服务器端鼠标再次 移动事件, 如果检测到所述服务器端鼠标再次移动事件, 触发所述第二获 取单元 603获取服务器端鼠标的第二信息。
所述监测单元 605 ,具体用于监测是否发生第三方程序调用所述服务器 端鼠标控制接口, 并使得所述服务器端鼠标控制接口控制服务器端鼠标再 次移动, 如果是, 确定发生所述服务器端鼠标再次移动事件。 图 7为本发明实施例的通信***的结构组成示意图, 该通信*** 700 用于客户端远程登录的远端处理服务器的场景, 也可以是用户使用桌面云 场景 /虚拟化场景, 该***包括客户端装置 701和服务器 702, 用于实现客 户端鼠标与服务器端鼠标的同步;
所述客户端装置 701用于获取客户端鼠标的第一信息, 其中, 所述客 户端鼠标的第一信息是用户操作客户端鼠标之后客户端鼠标的实时信息, 根据所述客户端鼠标的第一信息控制客户端光标移动, 以及向服务器端上 报所述客户端鼠标的第一信息;
所述服务器 702用于接收客户端上报的所述客户端鼠标的第一信息, 根据所述客户端鼠标的第一信息进行鼠标重定向操作, 获取服务器端鼠标 的第二信息, 其中, 所述服务器端鼠标的第二信息为所述服务器端根据所 述客户端鼠标的第一信息进行鼠标重定向操作之后的服务器端鼠标的实时 信息, 以及向所述客户端发送所述服务器端鼠标的第二信息;
所述客户端装置 701还用于接收所述服务器端返回的所述服务器端鼠 标的第二信息, 根据所述服务器端鼠标的第二信息控制所述客户端光标再 次移动。
具体地, 该客户端装置 701可以包括如图 5所示的各功能子模块, 服务 器 702可以包括如图 6所示的各功能子模块, 为描述的方便和筒洁, 上述描 述的***、 装置和单元的具体工作过程, 可以参考前述方法实施例中的对应 过程, 在此不再赘述。
图 8为本发明实施例的客户端装置的结构组成示意图。 本发明实施例的 客户端装置用于实现客户端鼠标与服务器端鼠标的同步;
该客户端装置可包括:
处理器 801、 存储器 802、 ***总线 803和通信接口 804。 处理器 801、 存储器 802和通信接口 804之间通过***总线 803连接并完成相互间的通信。
处理器 801 可能为单核或多核中央处理单元 (Cent ra l Proces s ing Unit , CPU), 或者为特定集成电路 ( Application Specific Integrated Circuit, ASIC),或者为被配置成实施本发明实施例的一个或多个集成电路。
存储器 802 可以为高速 RAM 存储器, 也可以为非易失性存储器 ( non-volatile memory ), 例如至少一个磁盘存储器。
存储器 802用于存放程序 805。具体的,程序 805中可以包括程序代码, 所述程序代码包括计算机执行指令。
当虚拟机***资源管理装置运行时, 处理器 801运行程序 805, 以执行 以下指令:
获取客户端鼠标的第一信息, 其中, 所述客户端鼠标的第一信息是用 户操作客户端鼠标之后客户端鼠标的实时信息;
根据所述客户端鼠标的第一信息控制客户端光标移动;
向服务器端上报所述客户端鼠标的第一信息, 以使得所述服务器端根 据所述客户端鼠标的第一信息进行鼠标重定向操作;
接收所述服务器端返回的服务器端鼠标的第二信息, 其中, 所述服务 器端鼠标的第二信息为所述服务器端根据所述客户端鼠标的第一信息进行 鼠标重定向操作之后的服务器端鼠标的实时信息;
根据所述服务器端鼠标的第二信息控制所述客户端光标再次移动。 具体地,本发明实施例中的客户端装置还根据所述指令执行上述图 3或 4所示的鼠标同步方法, 具体在此不再赘述。
图 9为本发明实施例的服务器的结构组成示意图。 本发明实施例的服务 器用于实现客户端鼠标与服务器端鼠标的同步;
该服务器可包括:
处理器 901、 存储器 902、 ***总线 903和通信接口 904。 处理器 901、 存储器 902和通信接口 904之间通过***总线 803连接并完成相互间的通信。
处理器 901 可能为单核或多核中央处理单元 (Central Processing
Unit , CPU), 或者为特定集成电路 ( Application Specific Integrated C i rcui t , ASIC ),或者为被配置成实施本发明实施例的一个或多个集成电路。 存储器 902 可以为高速 RAM 存储器, 也可以为非易失性存储器 ( non-volat i le memory ), 例如至少一个磁盘存储器。
存储器 902用于存放程序 905。具体的,程序 905中可以包括程序代码, 所述程序代码包括计算机执行指令。
当虚拟机***资源管理装置运行时, 处理器 901运行程序 905 , 以执行 以下指令:
接收客户端上报的客户端鼠标的第一信息, 其中, 所述客户端鼠标的 第一信息是用户操作客户端鼠标之后客户端鼠标的实时信息;
根据所述客户端鼠标的第一信息进行鼠标重定向操作;
获取服务器端鼠标的第二信息, 其中, 所述服务器端鼠标的第二信息 为所述服务器端根据所述客户端鼠标的第一信息进行鼠标重定向操作之后 的服务器端鼠标的实时信息;
向所述客户端发送所述服务器端鼠标的第二信息, 以使得所述客户端 根据所述服务器端鼠标的第二信息控制所述客户端光标再次移动。
具体地,本发明实施例中的服务器还根据所述指令执行上述图 3或 4所 示的鼠标同步方法, 具体在此不再赘述。
本领域普通技术人员将会理解, 本发明的各个方面、 或各个方面的可 能实现方式可以被具体实施为***、 方法或者计算机程序产品。 因此, 本 发明的各方面、 或各个方面的可能实现方式可以采用完全硬件实施例、 完 全软件实施例 (包括固件、 驻留软件等等), 或者组合软件和硬件方面的实 施例的形式, 在这里都统称为"电路"、 "模块 "或者 "***"。 此外, 本发明的 各方面、 或各个方面的可能实现方式可以采用计算机程序产品的形式, 计 算机程序产品是指存储在计算机可读介质中的计算机可读程序代码。
计算机可读介质可以是计算机可读信号介质或者计算机可读存储介 质。 计算机可读存储介质包含但不限于电子、 磁性、 光学、 电磁、 红外或 半导体***、 设备或者装置, 或者前述的任意适当组合, 如随机存取存储 器 (RAM)、 只读存储器 (ROM)、 可擦除可编程只读存储器 (EPROM 或者 快闪存储器)、 光纤、 便携式只读存储器 (CD-ROM)。
计算机中的处理器读取存储在计算机可读介质中的计算机可读程序代 码, 使得处理器能够执行在流程图中每个步骤、 或各步骤的组合中规定的 功能动作; 生成实施在框图的每一块、 或各块的组合中规定的功能动作的 装置。
计算机可读程序代码可以完全在用户的计算机上执行、 部分在用户的 计算机上执行、 作为单独的软件包、 部分在用户的计算机上并且部分在远 程计算机上, 或者完全在远程计算机或者服务器上执行。 也应该注意, 在 某些替代实施方案中, 在流程图中各步骤、 或框图中各块所注明的功能可 能不按图中注明的顺序发生。 例如, 依赖于所涉及的功能, 接连示出的两 个步骤、 或两个块实际上可能被大致同时执行, 或者这些块有时候可能被 以相反顺序执行。
本领域普通技术人员可以意识到, 结合本文中所公开的实施例描述的 各示例的单元及算法步骤, 能够以电子硬件、 或者计算机软件和电子硬件 的结合来实现。 这些功能究竟以硬件还是软件方式来执行, 取决于技术方 案的特定应用和设计约束条件。 专业技术人员可以对每个特定的应用来使 用不同方法来实现所描述的功能, 但是这种实现不应认为超出本发明的范 围。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局 限于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可 轻易想到变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明 的保护范围应所述以权利要求的保护范围为准。

Claims

权利要求
1、 一种鼠标同步的方法, 其特征在于, 所述鼠标同步包括客户端鼠标 与服务器端鼠标的同步, 包括:
获取客户端鼠标的第一信息, 其中, 所述客户端鼠标的第一信息是用 户操作客户端鼠标之后客户端鼠标的实时信息;
根据所述客户端鼠标的第一信息控制客户端光标移动;
向服务器端上报所述客户端鼠标的第一信息, 以使得所述服务器端根 据所述客户端鼠标的第一信息进行鼠标重定向操作;
接收所述服务器端返回的服务器端鼠标的第二信息, 其中, 所述服务 器端鼠标的第二信息为所述服务器端根据所述客户端鼠标的第一信息进行 鼠标重定向操作之后的服务器端鼠标的实时信息;
根据所述服务器端鼠标的第二信息控制所述客户端光标再次移动。
2、 如权利要求 1所述的方法, 其特征在于, 所述向服务器端上报所述 客户端鼠标的第一信息之前, 还包括:
获取客户端鼠标信息记录模块记录的客户端鼠标的上次移动后的记录 信息;
比较所述客户端鼠标的上次移动后的记录信息与所述客户端鼠标的第 一信息, 当所述客户端鼠标的第一信息相对所述客户端鼠标的上次移动后 的记录信息发生变化时, 执行所述向服务器端上报所述客户端鼠标的第一 信息的步骤。
3、 如权利要求 2所述的方法, 其特征在于, 当所述客户端鼠标的第一 信息相对所述客户端鼠标的上次移动后的记录信息发生变化时, 还包括: 根据所述客户端鼠标的第一信息, 更新所述客户端鼠标信息记录模块 记录的客户端鼠标的上次移动后的记录信息。
4、 如权利要求 3所述的方法, 其特征在于, 所述根据所述服务器端鼠 标的第二信息控制所述客户端光标再次移动之前, 还包括: 再次获取客户端鼠标信息记录模块记录的客户端鼠标的上次移动后的 记录信息, 其中, 所述客户端鼠标的上次移动后的记录信息为所述客户端 鼠标的第一信息;
比较所述客户端鼠标的第一信息与所述服务器端鼠标的第二信息, 当 所述服务器端鼠标的第二信息相对所述客户端鼠标的第一信息发生变化 时, 执行根据所述服务器端鼠标的第二信息控制所述客户端光标再次移动 的步骤。
5、 一种鼠标同步的方法, 其特征在于, 所述鼠标同步包括客户端鼠标 与服务器端鼠标的同步, 包括:
接收客户端上报的客户端鼠标的第一信息, 其中, 所述客户端鼠标的 第一信息是用户操作客户端鼠标之后客户端鼠标的实时信息;
根据所述客户端鼠标的第一信息进行鼠标重定向操作;
获取服务器端鼠标的第二信息, 其中, 所述服务器端鼠标的第二信息 为所述服务器端根据所述客户端鼠标的第一信息进行鼠标重定向操作之后 的服务器端鼠标的实时信息;
向所述客户端发送所述服务器端鼠标的第二信息, 以使得所述客户端 根据所述服务器端鼠标的第二信息控制所述客户端光标再次移动。
6、 如权利要求 5所述的方法, 其特征在于, 所述根据所述客户端鼠标 的第一信息进行鼠标重定向操作之后, 还包括:
监测是否发生服务器端鼠标再次移动事件, 如果检测到所述服务器端 鼠标再次移动事件, 执行所述获取服务器端鼠标的第二信息的步骤。
7、 如权利要求 6所述的方法, 其特征在于, 所述监测是否发生服务器 端鼠标再次移动事件, 包括:
当发生第三方程序调用所述服务器端鼠标控制接口, 并使得所述服务 器端鼠标控制接口控制服务器端鼠标再次移动, 监测到发生所述服务器端 鼠标再次移动事件。
8、 如权利要求 5或 6所述的方法, 其特征在于, 所述根据所述客户端 鼠标的第一信息进行鼠标重定向操作, 包括:
根据所述客户端鼠标的第一信息, 控制所述服务器端鼠标移动。
9、 如权利要求 5或 6所述的方法, 其特征在于, 所述根据所述客户端 鼠标的第一信息进行鼠标重定向操作之前, 还包括:
获取服务器端鼠标信息记录模块记录的服务器端鼠标的上次移动后的 记录信息;
比较所述服务器端鼠标的上次移动后的记录信息与所述客户端鼠标的 第一信息, 当所述第一信息相对所述服务器端鼠标的上次移动后的记录信 息发生变化时, 执行根据所述客户端鼠标的第一信息进行鼠标重定向操作 的步骤。
10、 如权利要求 9所述的方法, 其特征在于, 所述根据所述客户端鼠 标的第一信息进行鼠标重定向操作之后, 还包括:
根据所述客户端鼠标的第一信息, 更新所述服务器端鼠标信息记录模 块记录的服务器端鼠标的上次移动后的记录信息。
11、 如权利要求 10所述的方法, 其特征在于, 所述向所述客户端发送 所述服务器端鼠标的第二信息之前, 还包括:
再次获取服务器端鼠标信息记录模块记录的服务器端鼠标的上次移动 后的记录信息, 其中, 所述服务器端鼠标的上次移动后的记录信息为所述 客户端鼠标的第一信息;
比较所述客户端鼠标的第一信息与所述服务器端鼠标的第二信息, 当 所述服务器端鼠标的第二信息相对所述客户端鼠标的第一信息发生变化 时, 执行向所述客户端发送所述服务器端鼠标的第二信息的步骤。
12、 如权利要求 11所述的方法, 其特征在于, 所述向所述客户端发送 所述服务器端鼠标的第二信息, 包括:
获得所述服务器端鼠标的第二信息相对所述客户端鼠标的第一信息的 改变值;
向所述客户端上报所述改变值。
13、 一种客户端装置, 其特征在于, 用于实现客户端鼠标与服务器端 鼠标的同步, 包括:
第一获取单元, 用于获取客户端鼠标的第一信息, 其中, 所述客户端 鼠标的第一信息是用户操作客户端鼠标之后客户端鼠标的实时信息;
客户端鼠标控制单元, 用于根据所述客户端鼠标的第一信息控制客户 端光标移动;
第一通信单元, 用于向服务器端上报所述客户端鼠标的第一信息, 以 使得所述服务器端根据所述客户端鼠标的第一信息进行鼠标重定向操作; 所述第一获取单元, 还用于接收所述服务器端返回的服务器端鼠标的 第二信息, 其中, 所述服务器端鼠标的第二信息为所述服务器端根据所述 客户端鼠标的第一信息进行鼠标重定向操作之后的服务器端鼠标的实时信 所述客户端鼠标控制单元, 还用于根据所述服务器端鼠标的第二信息 控制所述客户端光标再次移动。
14、 如权利要求 13所述的装置, 其特征在于, 还包括:
客户端鼠标信息记录模块, 用于保存客户端鼠标的上次移动后的记录 信息;
则, 所述第一获取单元, 还用于获取所述客户端鼠标信息记录模块记 录的客户端鼠标的上次移动后的记录信息, 比较所述客户端鼠标的上次移 动后的记录信息与所述客户端鼠标的第一信息, 当所述客户端鼠标的第一 信息相对所述客户端鼠标的上次移动后的记录信息发生变化时, 触发所述 第一通信单元执行所述向服务器端上报所述客户端鼠标的第一信息。
15、 如权利要求 14所述的装置, 其特征在于, 所述客户端鼠标信息记 录模块, 还用于根据所述客户端鼠标的第一信息, 更新所述客户端鼠标信 息记录模块记录的客户端鼠标的上次移动后的记录信息。
16、 如权利要求 15所述的装置, 其特征在于, 所述第一获取单元, 还 用于再次获取客户端鼠标信息记录模块记录的客户端鼠标的上次移动后的 记录信息, 其中, 所述客户端鼠标的上次移动后的记录信息为所述客户端 鼠标的第一信息, 比较所述客户端鼠标的第一信息与所述服务器端鼠标的 第二信息, 当所述服务器端鼠标的第二信息相对所述客户端鼠标的第一信 息发生变化时, 触发所述客户端鼠标控制单元根据所述服务器端鼠标的第 二信息控制所述客户端光标再次移动。
17、 一种服务器, 其特征在于, 用于实现客户端鼠标与服务器端鼠标 的同步, 包括:
第二通信单元, 用于接收客户端上报的客户端鼠标的第一信息, 其中, 所述客户端鼠标的第一信息是用户操作客户端鼠标之后客户端鼠标的实时 信息;
服务器端鼠标控制单元, 用于根据所述客户端鼠标的第一信息进行鼠 标重定向操作;
第二获取单元, 用于获取服务器端鼠标的第二信息, 其中, 所述服务 器端鼠标的第二信息为所述服务器端根据所述客户端鼠标的第一信息进行 鼠标重定向操作之后的服务器端鼠标的实时信息;
所述第二通信单元, 还用于向所述客户端发送所述服务器端鼠标的第 二信息, 以使得所述客户端根据所述服务器端鼠标的第二信息控制所述客 户端光标再次移动。
18、 如权利要求 17所述的服务器, 其特征在于, 还包括:
服务器端鼠标信息记录模块, 用于保存服务器端鼠标的上次移动后的 记录信息;
则, 所述第二获取单元, 还用于获取所述服务器端鼠标信息记录模块 保存的服务器端鼠标的上次移动后的记录信息, 比较所述服务器端鼠标的 上次移动后的记录信息与所述客户端鼠标的第一信息, 当所述第一信息相 对所述服务器端鼠标的上次移动后的记录信息发生变化时, 触发所述服务 器端鼠标控制单元执行根据所述客户端鼠标的第一信息进行鼠标重定向操 作。
19、 如权利要求 18所述的服务器, 其特征在于, 所述服务器端鼠标信 息记录模块, 还用于将根据所述客户端鼠标的第一信息, 更新所述服务器 端鼠标的上次移动后的记录信息。
20、 如权利要求 19所述的服务器, 其特征在于, 所述第二获取单元, 在获取服务器端鼠标的第二信息之后, 还用于再次获取服务器端鼠标信息 记录模块记录的服务器端鼠标的上次移动后的记录信息, 其中, 所述服务 器端鼠标的上次移动后的记录信息为所述客户端鼠标的第一信息, 比较所 述客户端鼠标的第一信息与所述服务器端鼠标的第二信息, 当所述服务器 端鼠标的第二信息相对所述客户端鼠标的第一信息发生变化时, 触发所述 第二通信单元向所述客户端发送所述服务器端鼠标的第二信息。
21、 如权利要求 17-20任一项所述的服务器, 其特征在于, 还包括: 监测单元, 用于监测是否发生服务器端鼠标再次移动事件, 如果检测 到所述服务器端鼠标再次移动事件, 触发所述第二获取单元获取服务器端 鼠标的第二信息。
22、 如权利要求 21所述的服务器, 其特征在于, 所述监测单元, 具体 用于监测是否发生第三方程序调用所述服务器端鼠标控制接口, 并使得所 述服务器端鼠标控制接口控制服务器端鼠标再次移动, 如果是, 确定发生 所述服务器端鼠标再次移动事件。
23、 一种通信***, 其特征在于, 所述通信***包括客户端装置和服 务器, 用于实现客户端鼠标与服务器端鼠标的同步,
所述客户端装置用于获取客户端鼠标的第一信息, 其中, 所述客户端 鼠标的第一信息是用户操作客户端鼠标之后客户端鼠标的实时信息, 根据 所述客户端鼠标的第一信息控制客户端光标移动, 以及向服务器端上报所 述客户端鼠标的第一信息;
所述服务器用于接收客户端上报的所述客户端鼠标的第一信息, 根据 所述客户端鼠标的第一信息进行鼠标重定向操作, 获取服务器端鼠标的第 二信息, 其中, 所述服务器端鼠标的第二信息为所述服务器端根据所述客 户端鼠标的第一信息进行鼠标重定向操作之后的服务器端鼠标的实时信 息, 以及向所述客户端发送所述服务器端鼠标的第二信息;
所述客户端装置还用于接收所述服务器端返回的所述服务器端鼠标的 第二信息, 根据所述服务器端鼠标的第二信息控制所述客户端光标再次移 动。
24、 如权利要求 23所述的通信***, 所述客户端装置还用于实现上述 权利要求 1-4任一项所述的方法,所述服务器还用于实现上述权利要求 5-12 任一项所述的方法。
25、 一种客户端装置, 其特征在于, 用于实现客户端鼠标与服务器端 鼠标的同步;
所述装置包括包括处理器、 存储器、 总线和通信接口;
所述存储器用于存储计算机执行指令, 所述处理器与所述存储器通过所 述总线连接, 当所述客户端装置运行时, 所述处理器执行所述存储器存储的 所述计算机执行指令, 以使所述客户端装置执行如权利要求 1-4中任一所述 的鼠标同步的方法。
26、 一种服务器, 其特征在于, 用于实现客户端鼠标与服务器端鼠标 的同步;
所述服务器包括包括处理器、 存储器、 总线和通信接口;
所述存储器用于存储计算机执行指令, 所述处理器与所述存储器通过所 述总线连接, 当所述客户端装置运行时, 所述处理器执行所述存储器存储的 所述计算机执行指令, 以使所述服务器执行如权利要求 5-13中任一所述的 鼠标同步的方法。
27、 一种计算机可读介质, 其特征在于, 包括计算机执行指令, 以供计 算机的处理器执行所述计算机执行指令时, 所述计算机执行如权利要求 1-4 中任一所述的鼠标同步的方法。
28、 一种计算机可读介质, 其特征在于, 包括计算机执行指令, 以供计 算机的处理器执行所述计算机执行指令时,所述计算机执行如权利要求 5-13 中任一所述的鼠标同步的方法。
PCT/CN2012/088099 2012-12-31 2012-12-31 鼠标同步的方法、装置和*** WO2014101213A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/CN2012/088099 WO2014101213A1 (zh) 2012-12-31 2012-12-31 鼠标同步的方法、装置和***
CN201280027915.0A CN104067202B (zh) 2012-12-31 2012-12-31 鼠标同步的方法、装置和***
CN201611201878.7A CN106843537B (zh) 2012-12-31 2012-12-31 鼠标同步的方法、装置和***

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2012/088099 WO2014101213A1 (zh) 2012-12-31 2012-12-31 鼠标同步的方法、装置和***

Publications (1)

Publication Number Publication Date
WO2014101213A1 true WO2014101213A1 (zh) 2014-07-03

Family

ID=51019805

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/088099 WO2014101213A1 (zh) 2012-12-31 2012-12-31 鼠标同步的方法、装置和***

Country Status (2)

Country Link
CN (2) CN106843537B (zh)
WO (1) WO2014101213A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111708533A (zh) * 2016-08-31 2020-09-25 华为技术有限公司 在应用瘦客户端中设置鼠标显示状态的方法及装置

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI497400B (zh) * 2014-06-10 2015-08-21 Aten Int Co Ltd 自動辨識游標所在螢幕之方法
CN107580068A (zh) * 2017-09-21 2018-01-12 深信服科技股份有限公司 一种光标同步的方法、相关设备及***
CN111049790B (zh) * 2018-10-15 2021-08-17 北京仁光科技有限公司 数据交互方法
CN109701265A (zh) * 2018-12-04 2019-05-03 上海达龙信息科技有限公司 远程桌面光标模式切换方法、***、客户端及远端服务器
CN109992184A (zh) * 2019-03-31 2019-07-09 山东超越数控电子股份有限公司 一种云桌面鼠标加速***及方法
CN110489042B (zh) * 2019-07-17 2021-10-19 视联动力信息技术股份有限公司 一种基于视联网模拟拖拽的方法及***
CN112631447A (zh) * 2020-12-24 2021-04-09 广州虎牙科技有限公司 鼠标同步处理方法、装置、电子设备及存储介质
CN113741744A (zh) * 2021-02-04 2021-12-03 上海达龙信息科技有限公司 基于远程桌面的光标显示方法、装置、介质及电子设备
CN113515213A (zh) * 2021-08-03 2021-10-19 恒安嘉新(北京)科技股份公司 一种光标形状同步方法、远程浏览***、设备及存储介质
CN114547047A (zh) * 2021-12-22 2022-05-27 广州工程技术职业学院 一种在线协作绘图方法、装置、设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5838300A (en) * 1995-06-19 1998-11-17 Canon Kabushiki Kaisha Window sharing system
CN1889026A (zh) * 2006-07-31 2007-01-03 华为技术有限公司 一种kvm切换***及其鼠标同步方法
CN101339473A (zh) * 2008-08-26 2009-01-07 华为技术有限公司 一种鼠标的同步方法、***和服务器
CN101685354A (zh) * 2008-09-26 2010-03-31 宏正自动科技股份有限公司 校准远程计算机光标对客户端计算机鼠标反应的方法及***

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7447995B2 (en) * 2002-06-28 2008-11-04 Hewlett-Packard Development Company, L.P. System and method for cursor calibration
CN100578429C (zh) * 2007-06-08 2010-01-06 广东威创视讯科技股份有限公司 对服务端的多鼠标远程控制方法
JP5127366B2 (ja) * 2007-08-29 2013-01-23 富士通コンポーネント株式会社 情報処理装置、kvmスイッチ、サーバ及び制御プログラム
JP5008007B2 (ja) * 2007-11-21 2012-08-22 富士通コンポーネント株式会社 情報処理装置、遠隔システム、プログラム及びコンピュータ読み取り可能な記録媒体
CN102591493B (zh) * 2011-12-30 2014-12-24 浙江海康科技有限公司 一种用于ipkvm***的鼠标光标同步方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5838300A (en) * 1995-06-19 1998-11-17 Canon Kabushiki Kaisha Window sharing system
CN1889026A (zh) * 2006-07-31 2007-01-03 华为技术有限公司 一种kvm切换***及其鼠标同步方法
CN101339473A (zh) * 2008-08-26 2009-01-07 华为技术有限公司 一种鼠标的同步方法、***和服务器
CN101685354A (zh) * 2008-09-26 2010-03-31 宏正自动科技股份有限公司 校准远程计算机光标对客户端计算机鼠标反应的方法及***

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111708533A (zh) * 2016-08-31 2020-09-25 华为技术有限公司 在应用瘦客户端中设置鼠标显示状态的方法及装置

Also Published As

Publication number Publication date
CN106843537B (zh) 2019-09-03
CN104067202B (zh) 2016-12-28
CN106843537A (zh) 2017-06-13
CN104067202A (zh) 2014-09-24

Similar Documents

Publication Publication Date Title
WO2014101213A1 (zh) 鼠标同步的方法、装置和***
AU2017341159B2 (en) Quick recovery method, device and system of a virtual machine
EP3142336B1 (en) Synchronization method for notification message of electronic device, and electronic device
US9801146B2 (en) Terminal and synchronization control method among terminals
CN112380093A (zh) 运维处理方法、装置及计算机设备
WO2018077041A1 (zh) 应用运行的方法及装置
US10547564B2 (en) Service-based load-balancing management of processes on remote hosts
JP2015513815A (ja) デバイス制御方法および装置
CN102109959A (zh) 屏幕旋转时java应用程序界面跟随旋转的方法
CN112328344A (zh) 一种投屏处理方法及第一设备
WO2022022132A1 (zh) 画面更新方法、装置、计算机设备和存储介质
CN115396521A (zh) 一种切换通信协议的方法、装置和***
JP2017534959A (ja) 端末機器においてスクリーンショットサービスを提供するための方法、装置、記憶媒体及び機器
CN112583898A (zh) 业务流程编排方法、装置、以及可读介质
CN112925652A (zh) 应用资源部署方法、装置、电子设备和介质
CN108401453B (zh) 一种控制显示屏的方法、装置和智能终端
US10409577B2 (en) Hybrid application delivery that combines download and remote access
US20170168582A1 (en) Click response processing method, electronic device and system for motion sensing control
CN108255547B (zh) 一种应用程序控制方法及装置
CN113609107A (zh) 数据库管理方法、装置、电子设备及存储介质
CN114647390A (zh) 一种增强的屏幕共享方法和***、电子设备
CN115904514B (zh) 基于三维场景中云渲染像素流实现方法及终端设备
CN112269631A (zh) 虚拟机共享键鼠***
CN114422572B (zh) 一种云手机控制方法、装置、电子设备和存储介质
JP6333434B1 (ja) 画面データ中継サーバ、画面データ中継プログラム、及び画面データ中継方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12890957

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12890957

Country of ref document: EP

Kind code of ref document: A1