[go: up one dir, main page]

CN111610868A - Mouse data processing method and system - Google Patents

Mouse data processing method and system Download PDF

Info

Publication number
CN111610868A
CN111610868A CN202010286689.4A CN202010286689A CN111610868A CN 111610868 A CN111610868 A CN 111610868A CN 202010286689 A CN202010286689 A CN 202010286689A CN 111610868 A CN111610868 A CN 111610868A
Authority
CN
China
Prior art keywords
target
mouse
coordinates
instruction information
operation instruction
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.)
Pending
Application number
CN202010286689.4A
Other languages
Chinese (zh)
Inventor
杨璐
范志刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Wanxiang Electronics Technology Co Ltd
Original Assignee
Xian Wanxiang Electronics Technology Co Ltd
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 Xian Wanxiang Electronics Technology Co Ltd filed Critical Xian Wanxiang Electronics Technology Co Ltd
Priority to CN202010286689.4A priority Critical patent/CN111610868A/en
Publication of CN111610868A publication Critical patent/CN111610868A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04812Interaction techniques based on cursor appearance or behaviour, e.g. being affected by the presence of displayed objects
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction 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/0488Interaction 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 a touch-screen or digitiser, e.g. input of commands through traced gestures

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)

Abstract

The invention provides a mouse data processing method and a mouse data processing system, relates to the technical field of electronic information, and can solve the problems that the data accuracy is low or a mouse event cannot be responded due to the problem of mouse coordinates in the process of transmitting the mouse event. The specific technical scheme is as follows: after the terminal device receives the mouse event, in order to realize that the terminal device and the server synchronously execute the mouse event, on one hand, the server receives a mouse operation instruction sent by the terminal device and executes an operation corresponding to the mouse event according to the mouse operation instruction; and on the other hand, the server sends the operation result to the terminal equipment, and after receiving the operation result, the terminal equipment draws the target mouse according to the operation result and executes the operation corresponding to the mouse event. The method is used for processing the mouse data.

Description

鼠标数据处理方法及系统Mouse data processing method and system

技术领域technical field

本公开涉及电子信息技术领域,尤其涉及鼠标数据处理方法及系统。The present disclosure relates to the field of electronic information technology, and in particular, to a mouse data processing method and system.

背景技术Background technique

随着鼠标的操作技术的迅速发展,为了进一步提高鼠标的适用场景,现有技术通过VDI(Virtual Desktop Infrastructure,即虚拟桌面基础架构)将鼠标操作VDI(VirtualDesktop Infrastructure,即虚拟桌面基础架构)。现有技术中,零终端将用户输入的鼠标事件,发送给VM(Virtual Machine虚拟机),VM根据鼠标事件来执行操作,并将操作后的显示画面传输到零终端并显示给用户,用户就可以通过零终端完成对VM的操作。而其中,鼠标光标是由零终端绘制并叠加在显示画面上的。With the rapid development of mouse operation technology, in order to further improve the applicable scene of the mouse, the existing technology operates the mouse to VDI (Virtual Desktop Infrastructure, ie virtual desktop infrastructure) through VDI (Virtual Desktop Infrastructure, ie virtual desktop infrastructure). In the prior art, the zero terminal sends the mouse event input by the user to the VM (Virtual Machine virtual machine), and the VM performs the operation according to the mouse event, and transmits the displayed image after the operation to the zero terminal and displays it to the user. The operation of the VM can be done through zero terminal. Among them, the mouse cursor is drawn by the zero terminal and superimposed on the display screen.

但是,在绘制鼠标光标的时候,需先获取鼠标的坐标,鼠标的坐标分为绝对坐标和相对坐标。However, when drawing the mouse cursor, the coordinates of the mouse need to be obtained first. The coordinates of the mouse are divided into absolute coordinates and relative coordinates.

若鼠标的坐标是相对坐标的时候,在VDI系统中,由于VM与零终端之间的交互信息会出现偶然丢失,若鼠标事件中的鼠标坐标是以相对坐标体现出的,只要出现一次鼠标事件的丢失,就会导致后续VM获取到的鼠标坐标不准确,并造成用户操作鼠标的体验差。If the coordinates of the mouse are relative coordinates, in the VDI system, the interaction information between the VM and the zero terminal will be lost accidentally. The loss of the mouse coordinates will lead to inaccurate mouse coordinates obtained by the subsequent VM, resulting in poor user experience when operating the mouse.

若鼠标的坐标是绝对坐标的时候,在VDI系统中,虽然VM与零终端之间的交互信息出现偶然丢失,不会影响后续的鼠标坐标的准确性,但是,某些应用程序仅能够识别以相对坐标体现出来的鼠标坐标,从而导致在VDI系统下,用户对这些应用程序的操作失效。If the coordinates of the mouse are absolute coordinates, in the VDI system, although the interaction information between the VM and the zero terminal is accidentally lost, the accuracy of the subsequent mouse coordinates will not be affected. The mouse coordinates reflected by the relative coordinates make the user's operation of these applications invalid under the VDI system.

发明内容SUMMARY OF THE INVENTION

本公开实施例提供一种鼠标数据处理方法及系统,能够解决在传输鼠标事件的过程中因鼠标坐标问题导致数据准确率低或者无法响应鼠标事件的问题。所述技术方案如下:Embodiments of the present disclosure provide a mouse data processing method and system, which can solve the problem of low data accuracy or failure to respond to mouse events due to mouse coordinates in the process of transmitting mouse events. The technical solution is as follows:

根据本公开实施例的第一方面,提供一种鼠标数据处理方法,应用于终端设备,该方法包括:According to a first aspect of the embodiments of the present disclosure, a mouse data processing method is provided, which is applied to a terminal device, and the method includes:

获取操作指令信息,该操作指令信息用于指示根据目标鼠标的目标鼠标事件执行相应的操作,该操作指令信息包括目标坐标,该目标坐标包括该目标鼠标的目标相对坐标和目标绝对坐标;Obtaining operation instruction information, the operation instruction information is used to instruct to perform a corresponding operation according to the target mouse event of the target mouse, the operation instruction information includes target coordinates, and the target coordinates include the target relative coordinates and the target absolute coordinates of the target mouse;

向服务器发送该操作指令信息;Send the operation instruction information to the server;

根据该操作指令信息,接收该服务器发送的操作结果;According to the operation instruction information, receive the operation result sent by the server;

根据该操作结果和该目标坐标,绘制目标鼠标的目标图像。According to the operation result and the target coordinates, the target image of the target mouse is drawn.

在一个实施例中,该方法中获取目标信息,包括In one embodiment, obtaining target information in the method includes

获取目标鼠标事件,该目标鼠标事件包括该目标鼠标的目标相对坐标;Obtain the target mouse event, where the target mouse event includes the target relative coordinates of the target mouse;

根据该目标相对坐标和该终端设备的显示信息,获取该目标鼠标的目标绝对坐标;Obtain the target absolute coordinates of the target mouse according to the relative coordinates of the target and the display information of the terminal device;

根据该目标相对坐标和该目标绝对坐标,生成该目标坐标;Generate the target coordinates according to the target relative coordinates and the target absolute coordinates;

根据该目标坐标和该目标鼠标事件,生成该操作指令信息。The operation instruction information is generated according to the target coordinates and the target mouse event.

在一个实施例中,该方法还包括:In one embodiment, the method further includes:

根据该目标图像和该操作指令信息,执行与该目标鼠标事件相对应的目标操作。According to the target image and the operation instruction information, the target operation corresponding to the target mouse event is performed.

根据本公开实施例的第二方面,提供一种鼠标数据处理方法,应用于服务器,包括:According to a second aspect of the embodiments of the present disclosure, a mouse data processing method is provided, applied to a server, including:

获取操作指令信息,该操作指令信息用于指示根据目标鼠标的目标鼠标事件执行相应的操作,该操作指令信息包括目标坐标,该目标坐标包括该目标鼠标的目标相对坐标和目标绝对坐标;Obtaining operation instruction information, the operation instruction information is used to instruct to perform a corresponding operation according to the target mouse event of the target mouse, the operation instruction information includes target coordinates, and the target coordinates include the target relative coordinates and the target absolute coordinates of the target mouse;

根据该目标鼠标的预设状态,确定该目标鼠标对应的目标类型,该目标类型用于指示该目标鼠标的坐标是相对坐标类型或者绝对坐标类型;According to the preset state of the target mouse, determine the target type corresponding to the target mouse, and the target type is used to indicate that the coordinates of the target mouse are relative coordinate types or absolute coordinate types;

根据该目标坐标中与该目标类型相对应的坐标,执行该目标鼠标事件对应的目标操作,并获取操作结果。According to the coordinates corresponding to the target type in the target coordinates, the target operation corresponding to the target mouse event is executed, and the operation result is obtained.

在一个实施例中,该方法中确定该目标鼠标对应的目标类型,包括:In one embodiment, determining the target type corresponding to the target mouse in the method includes:

当该预设状态为隐藏状态时,确定该目标鼠标的目标类型是相对坐标类型;When the preset state is a hidden state, it is determined that the target type of the target mouse is a relative coordinate type;

当该预设状态为显示状态时,确定该目标鼠标的目标类型是绝对坐标类型。When the preset state is the display state, it is determined that the target type of the target mouse is the absolute coordinate type.

在一个实施例中,该方法中获取操作结果,包括:In one embodiment, obtaining the operation result in the method includes:

当该目标类型是相对坐标类型时,获取隐藏信息,该隐藏信息用于指示隐藏该目标鼠标;When the target type is a relative coordinate type, obtain hidden information, and the hidden information is used to indicate that the target mouse is hidden;

根据该隐藏信息,获取操作结果。Obtain the operation result according to the hidden information.

或者,当该目标类型是绝对坐标类型时,根据该鼠标事件,获取该目标鼠标的目标数据,该目标数据包括:目标图像、目标标识符和目标映射,该目标映射用于指示该目标图像和该目标标识符之间的对应关系;Or, when the target type is an absolute coordinate type, obtain target data of the target mouse according to the mouse event, the target data including: a target image, a target identifier and a target map, where the target map is used to indicate the target image and the correspondence between the target identifiers;

对该目标数据进行编码处理后,获取操作结果。After encoding the target data, the operation result is obtained.

在一个实施例中,该方法中获取该目标鼠标的目标数据,包括:In one embodiment, acquiring the target data of the target mouse in the method includes:

当第一次获取该目标鼠标的目标数据时,该目标数据包括:目标图像、目标标识符和目标映射,该目标映射用于指示该目标图像和该目标标识符之间的对应关系;When acquiring the target data of the target mouse for the first time, the target data includes: a target image, a target identifier and a target map, where the target map is used to indicate the correspondence between the target image and the target identifier;

当第N次获取该目标鼠标的目标数据时,该目标数据包括:目标标识符,该N大于1。When the target data of the target mouse is acquired for the Nth time, the target data includes: a target identifier, where N is greater than 1.

根据本公开实施例的第三方面,提供一种鼠标数据处理系统,该系统包括:服务器和终端设备;According to a third aspect of the embodiments of the present disclosure, a mouse data processing system is provided, the system comprising: a server and a terminal device;

该服务器和终端设备相连接;the server is connected to the terminal device;

该终端设备,用于获取操作指令信息,该操作指令信息用于指示根据目标鼠标的目标鼠标事件执行相应的操作,该操作指令信息包括目标坐标,该目标坐标包括该目标鼠标的目标相对坐标和目标绝对坐标;The terminal device is used for acquiring operation instruction information, where the operation instruction information is used to instruct to perform a corresponding operation according to a target mouse event of the target mouse, the operation instruction information includes target coordinates, and the target coordinates include the target relative coordinates of the target mouse and target absolute coordinates;

向服务器发送该操作指令信息;Send the operation instruction information to the server;

根据该操作指令信息,接收该服务器发送的操作结果;According to the operation instruction information, receive the operation result sent by the server;

根据该操作结果和该目标坐标,绘制目标鼠标的目标图像;Draw the target image of the target mouse according to the operation result and the target coordinates;

该服务器,用于获取操作指令信息,该操作指令信息用于指示根据目标鼠标事件执行相应的操作,该操作指令信息包括该目标鼠标的目标相对坐标和目标绝对坐标;The server is used to obtain operation instruction information, the operation instruction information is used to instruct to perform a corresponding operation according to the target mouse event, and the operation instruction information includes the target relative coordinates and the target absolute coordinates of the target mouse;

根据该目标鼠标的预设状态,确定该目标数据对应的目标坐标,该目标坐标包括该目标鼠标的相对坐标或者绝对坐标,该预设状态是根据操作系统确定的;Determine the target coordinates corresponding to the target data according to the preset state of the target mouse, where the target coordinates include relative coordinates or absolute coordinates of the target mouse, and the preset state is determined according to the operating system;

根据该目标坐标,执行该鼠标事件对应的操作,并获取操作结果。According to the target coordinates, the operation corresponding to the mouse event is performed, and the operation result is obtained.

向终端设备发送该操作结果。Send the operation result to the terminal device.

在一个实施例中,该系统中的服务器还用于:In one embodiment, the server in the system is also used to:

当该预设状态为显示状态时,根据该鼠标事件,获取该目标鼠标的目标数据,该目标数据包括:目标图像、目标标识符和目标映射,该目标映射用于指示该目标图像和该目标标识符之间的对应关系;When the preset state is the display state, the target data of the target mouse is acquired according to the mouse event, the target data includes: a target image, a target identifier and a target map, the target map is used to indicate the target image and the target correspondence between identifiers;

对该目标数据进行编码处理后,生成操作结果;After encoding the target data, an operation result is generated;

当该预设状态为隐藏状态时,根据该隐藏状态生成隐藏信息,该隐藏信息用于指示隐藏该目标鼠标;When the preset state is a hidden state, generate hidden information according to the hidden state, and the hidden information is used to instruct to hide the target mouse;

根据该隐藏信息,获取操作结果。Obtain the operation result according to the hidden information.

在一个实施例中,该系统中的终端设备还用于,In one embodiment, the terminal device in the system is further used to:

根据该目标图像和该操作指令信息,执行与该目标鼠标事件相对应的目标操作。According to the target image and the operation instruction information, the target operation corresponding to the target mouse event is performed.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.

附图说明Description of drawings

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description serve to explain the principles of the disclosure.

图1是本公开实施例提供的一种鼠标数据处理方法的流程图;1 is a flowchart of a mouse data processing method provided by an embodiment of the present disclosure;

图2是本公开实施例提供的一种鼠标数据处理方法的流程图1;2 is a flowchart 1 of a mouse data processing method provided by an embodiment of the present disclosure;

图3是本公开实施例提供的一种鼠标数据处理系统的结构图;3 is a structural diagram of a mouse data processing system provided by an embodiment of the present disclosure;

图3a是本公开实施例提供的一种鼠标数据处理系统的结构图1。FIG. 3 a is a structural diagram 1 of a mouse data processing system provided by an embodiment of the present disclosure.

具体实施方式Detailed ways

这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. Where the following description refers to the drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the illustrative examples below are not intended to represent all implementations consistent with this disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as recited in the appended claims.

实施例一Example 1

本公开实施例提供一种鼠标数据处理方法,应用于服务器,如图1所示,该鼠标数据处理方法包括以下步骤:An embodiment of the present disclosure provides a mouse data processing method, which is applied to a server. As shown in FIG. 1 , the mouse data processing method includes the following steps:

101、获取操作指令信息。101. Obtain operation instruction information.

该操作指令信息用于指示根据目标鼠标的目标鼠标事件执行相应的操作,该操作指令信息包括该目标鼠标的目标相对坐标和目标绝对坐标。The operation instruction information is used to instruct to perform a corresponding operation according to the target mouse event of the target mouse, and the operation instruction information includes the target relative coordinates and the target absolute coordinates of the target mouse.

该数据请求信息用于请求发送与目标鼠标事件相对应的目标数据;The data request information is used to request to send target data corresponding to the target mouse event;

进一步的,上述的目标鼠标事件,可以是基于预设时间段内的连续鼠标事件。其中,每一个事件是一组相对偏移量,代表在屏幕上移动的方向及移动长度。这些数据,称之为相对坐标,代表基于当前位置沿x,y轴的偏移,一连串的偏移就够成了鼠标移动轨迹。如(n,-m),计算过程为基于当前位置,右移n个单元,同时,再上移m个单元,如此计算得出的位置是当前鼠标位置。(n,-m)也就是此处说明的相对坐标了。Further, the above-mentioned target mouse events may be based on continuous mouse events within a preset time period. Among them, each event is a set of relative offsets, representing the direction and length of the movement on the screen. These data, called relative coordinates, represent the offset along the x, y axis based on the current position, and a series of offsets is enough to become the mouse movement track. For example (n,-m), the calculation process is based on the current position, move n units to the right, and at the same time, move up m units, so the calculated position is the current mouse position. (n,-m) is also the relative coordinate described here.

例如,当前鼠标在显示屏幕坐标系中的坐标值为(10,100),此时产生一个鼠标事件(2,-3),那鼠标最终位置为(12,97)。For example, the coordinate value of the current mouse in the display screen coordinate system is (10, 100), and a mouse event (2, -3) is generated at this time, and the final position of the mouse is (12, 97).

具体的,绝对坐标是指鼠标在显示屏幕坐标系中的坐标值。Specifically, the absolute coordinate refers to the coordinate value of the mouse in the coordinate system of the display screen.

上述的获取操作指令信息,可以通过终端设备接收,其终端设备可以是该服务器上可以设置的VM(Virtual Machine,虚拟机)。例如,用户通过终端设备在VM上进行操作,VM根据该操作,获取操作指令信息后向服务器发送。The above-mentioned acquisition operation instruction information may be received through a terminal device, and the terminal device may be a VM (Virtual Machine, virtual machine) that can be set on the server. For example, the user operates on the VM through the terminal device, and the VM obtains the operation instruction information and sends it to the server according to the operation.

102、根据该目标鼠标的预设状态,确定该目标鼠标对应的目标类型。102. Determine a target type corresponding to the target mouse according to the preset state of the target mouse.

该目标类型用于指示该目标鼠标的坐标是相对坐标类型或者绝对坐标类型;The target type is used to indicate that the coordinates of the target mouse are relative coordinate type or absolute coordinate type;

该预设状态包括显示状态或者隐藏状态。The preset state includes a displayed state or a hidden state.

上述的目标鼠标的预设状态由服务器的操作系统确定,可以通过操作系统提供的接口获取。The above-mentioned preset state of the target mouse is determined by the operating system of the server, and can be obtained through an interface provided by the operating system.

由于预设状态由服务器的操作系统提供,与上层应用无关,即可以兼容多种类型的应用,同时也能提高用户的操作体验。Since the preset state is provided by the operating system of the server and has nothing to do with upper-layer applications, it can be compatible with various types of applications, and can also improve the user's operating experience.

在可选实施例中,本公开所提供的方法中该确定该目标鼠标对应的目标类型,包括:In an optional embodiment, in the method provided by the present disclosure, determining the target type corresponding to the target mouse includes:

当该预设状态为隐藏状态时,确定该目标鼠标的目标类型是相对坐标类型;When the preset state is a hidden state, it is determined that the target type of the target mouse is a relative coordinate type;

当该预设状态为显示状态时,确定该目标鼠标的目标类型是绝对坐标类型。When the preset state is the display state, it is determined that the target type of the target mouse is the absolute coordinate type.

103、根据该目标坐标中与该目标类型相对应的坐标,执行该目标鼠标事件对应的目标操作,并获取操作结果。103. Execute the target operation corresponding to the target mouse event according to the coordinates corresponding to the target type in the target coordinates, and obtain the operation result.

在可选实施例中,本公开所提供的方法中执行该目标鼠标事件对应的目标操作,包括:In an optional embodiment, executing the target operation corresponding to the target mouse event in the method provided by the present disclosure includes:

根据目标类型获取目标坐标中对应的鼠标坐标数据,并将该鼠标坐标数据输入操作系统中;Obtain the corresponding mouse coordinate data in the target coordinates according to the target type, and input the mouse coordinate data into the operating system;

操作系统根据鼠标坐标数据和操作指令信息,执行该目标鼠标事件对应的目标操作。The operating system executes the target operation corresponding to the target mouse event according to the mouse coordinate data and the operation instruction information.

在鼠标显示状态下,无论是哪种应用,绝对坐标都可以生效;而在鼠标隐藏状态下,鼠标位置信息此时不重要,操作系统上报给应用的数据应当是鼠标原始数据,即本发明中所说明的相对坐标。In the mouse display state, no matter what kind of application, the absolute coordinates can take effect; while in the mouse hidden state, the mouse position information is not important at this time, and the data reported by the operating system to the application should be the original mouse data, that is, in the present invention The relative coordinates described.

绝对坐标无需依靠前一个坐标,因此每发一个绝对坐标就相当于是一次校准,而在相对坐标时,因为鼠标本身不显示,所以也无需要校准。Absolute coordinates do not need to rely on the previous coordinate, so each time an absolute coordinate is sent is equivalent to a calibration, and in the case of relative coordinates, because the mouse itself does not display, there is no need for calibration.

即,目标鼠标的这种处理方式与将注入不同类型数据的时机与应用分离解耦,只关注操作系统当前鼠标状态。That is, this processing method of the target mouse is decoupled from the separation of the timing of injecting different types of data from the application, and only the current mouse state of the operating system is concerned.

在鼠标的预设状态为显示状态下,无论是哪种应用,绝对坐标都可以生效;而在鼠标的预设状态为隐藏状态下,鼠标位置信息此时不重要,操作系统上报给应用的数据应当是鼠标原始数据,即本方法中所说明的相对坐标。When the default state of the mouse is the display state, the absolute coordinates can take effect no matter what kind of application it is; and when the default state of the mouse is the hidden state, the mouse position information is not important at this time, and the data reported by the operating system to the application It should be the mouse raw data, that is, the relative coordinates described in this method.

比如,当前服务器中虚拟机运行一个3D射击游戏,此时,用户会看到画面中间有一个准星,而这个准星永远在窗口或屏幕正中间,此时没有鼠标,画面的运动全是基于当前画面的偏移,此时操作系统只有上报相对坐标才有效;当用户退出或设置游戏时,调出鼠标,此时鼠标显示,操作系统上报绝对坐标生效。For example, the virtual machine in the current server runs a 3D shooting game. At this time, the user will see a crosshair in the middle of the screen, and the crosshair is always in the middle of the window or screen. At this time, there is no mouse, and the movement of the screen is all based on the current screen. When the user exits or sets the game, the mouse is called up, the mouse is displayed at this time, and the operating system reports the absolute coordinates to take effect.

在可选实施例中,本公开所提供的方法在执行完毕目标操作后,还包括获取操作结果,并向终端设备发送,其中获取操作结果,包括:In an optional embodiment, after completing the target operation, the method provided by the present disclosure further includes acquiring an operation result and sending it to the terminal device, wherein acquiring the operation result includes:

当该目标类型是相对坐标类型时,根据该隐藏状态生成隐藏信息,该隐藏信息用于指示隐藏该目标鼠标;When the target type is a relative coordinate type, hidden information is generated according to the hidden state, and the hidden information is used to indicate that the target mouse is hidden;

根据该隐藏信息,获取操作结果;Obtain the operation result according to the hidden information;

当该目标类型是绝对坐标类型时,根据该鼠标事件,获取该目标鼠标的目标数据,该目标数据包括:目标图像、目标标识符和目标映射,该目标映射用于指示该目标图像和该目标标识符之间的对应关系;When the target type is an absolute coordinate type, the target data of the target mouse is obtained according to the mouse event, and the target data includes: a target image, a target identifier and a target map, and the target map is used to indicate the target image and the target correspondence between identifiers;

对该目标数据进行编码处理后,获取操作结果。After encoding the target data, the operation result is obtained.

进一步的,在发送该目标鼠标的目标数据时,可以先判断该目标数据是否为第一次获取。Further, when the target data of the target mouse is sent, it can be determined whether the target data is acquired for the first time.

当第一次获取该目标鼠标的目标数据时,该目标数据包括:目标图像、目标标识符和目标映射,该目标映射用于指示该目标图像和该目标标识符之间的对应关系;When acquiring the target data of the target mouse for the first time, the target data includes: a target image, a target identifier and a target map, where the target map is used to indicate the correspondence between the target image and the target identifier;

当第N次获取该目标鼠标的目标数据时,该目标数据包括:目标标识符,该N大于1。When the target data of the target mouse is acquired for the Nth time, the target data includes: a target identifier, where N is greater than 1.

本公开实施例提供的鼠标数据处理方法,在终端设备接收到鼠标事件之后,为了实现终端设备和服务器保持同步执行该鼠标事件,一方面服务器接收终端设备发送的鼠标操作指令,并根据该鼠标操作指令,执行与鼠标事件相对应的操作;另一方面服务器根据操作结果,向终端设备发送该操作结果,终端设备在接收到该操作结果之后,根据该操作结果绘制目标鼠标的目标图像,并执行与鼠标事件相对应的操作。In the mouse data processing method provided by the embodiment of the present disclosure, after the terminal device receives the mouse event, in order to keep the terminal device and the server executing the mouse event synchronously, on the one hand, the server receives the mouse operation instruction sent by the terminal device, and executes the mouse operation instruction according to the mouse operation. instruction, execute the operation corresponding to the mouse event; on the other hand, the server sends the operation result to the terminal device according to the operation result, and after receiving the operation result, the terminal device draws the target image of the target mouse according to the operation result, and executes the operation result. The action corresponding to the mouse event.

本公开所提供的方法保证了终端设备和服务器在执行与鼠标事件相对应的操作时的同步性,也保证了鼠标事件执行的准确性和效率性。具体体现在以下两方面:The method provided by the present disclosure ensures the synchronization between the terminal device and the server when performing operations corresponding to mouse events, and also ensures the accuracy and efficiency of mouse event execution. Specifically reflected in the following two aspects:

第一方面,在根据目标信息执行与鼠标事件相对应的操作时,本公开所提供的方法,根据不同的鼠标应用场景,确定鼠标对应的预设状态,根据鼠标的预设状态为显示状态或隐藏状态,确定与状态对应的鼠标坐标。In the first aspect, when an operation corresponding to a mouse event is performed according to the target information, the method provided by the present disclosure determines a preset state corresponding to the mouse according to different mouse application scenarios, and the preset state of the mouse is the display state or the display state. Hide the state and determine the mouse coordinates corresponding to the state.

该鼠标坐标包括绝对坐标数据或者相对坐标数据。在鼠标在显示状态下,无论是哪种应用,绝对坐标都可以生效,此时与显示状态相对应的鼠标数据包为绝对坐标数据;而在鼠标隐藏状态下,鼠标位置信息此时不重要,操作系统上报给应用的数据应当是鼠标原始数据,此时与隐藏状态相对应的鼠标数据包为相对坐标数据。The mouse coordinates include absolute coordinate data or relative coordinate data. When the mouse is in the display state, no matter what kind of application, the absolute coordinates can take effect. At this time, the mouse data packet corresponding to the display state is the absolute coordinate data; while in the hidden state of the mouse, the mouse position information is not important at this time. The data reported by the operating system to the application should be the original data of the mouse, and the mouse data packet corresponding to the hidden state at this time is the relative coordinate data.

第二方面,在根据目标信息向终端设备发送目标数据时,本公开所提供的方法,在终端避免了鼠标数据在传输过程中丢失的情况,仅向终端设备发送对应的目标数据,因此无需对服务器与终端设备之间的鼠标位置进行校准。基于鼠标坐标的特性,即提高了数据处理的效率,也提高了数据处理的准确性。In the second aspect, when the target data is sent to the terminal device according to the target information, the method provided by the present disclosure avoids the situation that the mouse data is lost during the transmission process, and only sends the corresponding target data to the terminal device, so there is no need to The mouse position between the server and the end device is calibrated. Based on the characteristics of mouse coordinates, the efficiency of data processing is improved, and the accuracy of data processing is also improved.

实施例二Embodiment 2

本公开实施例提供一种鼠标数据处理方法,应用于终端设备,如图2所示,该鼠标数据处理方法包括以下步骤:An embodiment of the present disclosure provides a mouse data processing method, which is applied to a terminal device. As shown in FIG. 2 , the mouse data processing method includes the following steps:

201、获取操作指令信息。201. Obtain operation instruction information.

该操作指令信息用于指示根据目标鼠标的目标鼠标事件执行相应的操作,该操作指令信息包括目标坐标,该目标坐标包括该目标鼠标的目标相对坐标和目标绝对坐标;The operation instruction information is used to instruct to perform a corresponding operation according to the target mouse event of the target mouse, and the operation instruction information includes target coordinates, and the target coordinates include target relative coordinates and target absolute coordinates of the target mouse;

本公开所提供的方法中获取操作指令信息的步骤可以包括:The step of acquiring operation instruction information in the method provided by the present disclosure may include:

获取目标鼠标事件,该目标鼠标事件包括该目标鼠标的目标相对坐标;Obtain the target mouse event, where the target mouse event includes the target relative coordinates of the target mouse;

根据该目标相对坐标和该终端设备的显示信息,获取该目标鼠标的目标绝对坐标,该显示信息包括显示分辨率;Obtain the target absolute coordinates of the target mouse according to the relative coordinates of the target and the display information of the terminal device, where the display information includes the display resolution;

根据该目标相对坐标和该目标绝对坐标,生成该目标坐标;Generate the target coordinates according to the target relative coordinates and the target absolute coordinates;

根据该目标坐标和该目标鼠标事件,生成该操作指令信息。The operation instruction information is generated according to the target coordinates and the target mouse event.

202、向服务器发送该操作指令信息。202. Send the operation instruction information to the server.

在可选实施例中,当终端设备为零终端设备时,该服务器可以是部署该零终端的服务器。In an optional embodiment, when the terminal device is a zero-terminal device, the server may be a server that deploys the zero-terminal device.

203、根据该操作指令信息,接收该服务器发送的操作结果。203. Receive an operation result sent by the server according to the operation instruction information.

在可选实施例中,本公开所提供方法中,接收到服务器发送的操作结果,该操作结果可以包括目标数据和隐藏信息;其中,该隐藏信息用于指示隐藏该目标鼠标;该目标数据可以包括:预设状态、目标图像、目标标识符和目标映射,该目标映射用于指示目标图像和目标标识符之间的对应关系。In an optional embodiment, in the method provided by the present disclosure, an operation result sent by a server is received, and the operation result may include target data and hidden information; wherein, the hidden information is used to instruct to hide the target mouse; the target data may be It includes: a preset state, a target image, a target identifier, and a target map, where the target map is used to indicate the correspondence between the target image and the target identifier.

进一步的,若接收到的操作结果为隐藏信息,即明确了该目标鼠标的预设状态为隐藏状态时,则确定不绘制目标鼠标的目标图像。Further, if the received operation result is hidden information, that is, when it is clarified that the preset state of the target mouse is a hidden state, it is determined that the target image of the target mouse is not drawn.

进一步的,若接收到目标数据为目标标识符时,可以根据该目标标识符及预存的目标映射,查找到与目标标识符对应的目标图像。Further, if the received target data is the target identifier, the target image corresponding to the target identifier can be found according to the target identifier and the pre-stored target mapping.

在可选实施例中,本公开所提供方法中,当第一次接收到目标数据之后,存储该目标数据中整套的目标鼠标的目标图像、目标标识符以及目标映射,当第二次之后在接收该目标数据后,只需获取该目标标识符即可,通过该目标标识符和预存的目标映射,查找到对应的目标鼠标的目标图像,从而提高数据处理的效率。即使服务器中的鼠标图形发生变化后的第一次,也无需再发送鼠标图像,直接发送鼠标图像对应的标识符即可。In an optional embodiment, in the method provided by the present disclosure, after the target data is received for the first time, the target image, target identifier and target mapping of the entire set of target mouse in the target data are stored, and after the second time After receiving the target data, it is only necessary to obtain the target identifier, and through the target identifier and the pre-stored target mapping, the target image of the corresponding target mouse is found, thereby improving the efficiency of data processing. Even if the mouse image in the server changes for the first time, there is no need to send the mouse image, and the identifier corresponding to the mouse image can be sent directly.

204、根据该操作结果和该目标坐标,绘制目标鼠标的目标图像。204. Draw a target image of the target mouse according to the operation result and the target coordinates.

在可选实施例中,本公开所提供方法在绘制目标鼠标的目标图像之后,将绘制后的目标鼠标向显示器发送,显示器显示该目标鼠标。In an optional embodiment, after drawing the target image of the target mouse, the method provided by the present disclosure sends the drawn target mouse to the display, and the display displays the target mouse.

本公开所提供的方法还包括:根据该目标图像和该操作指令信息,执行与该鼠标事件相对应的目标操作。The method provided by the present disclosure further includes: performing a target operation corresponding to the mouse event according to the target image and the operation instruction information.

本公开实施例提供的鼠标数据处理方法,在终端设备接收到鼠标事件之后,为了实现终端设备和服务器保持同步执行该鼠标事件,一方面服务器接收终端设备发送的鼠标操作指令,并根据该鼠标操作指令,执行与鼠标事件相对应的操作;另一方面服务器根据操作结果,向终端设备发送该操作结果,终端设备在接收到该操作结果之后,根据该操作结果绘制目标鼠标的目标图像,并执行与鼠标事件相对应的操作。In the mouse data processing method provided by the embodiment of the present disclosure, after the terminal device receives the mouse event, in order to keep the terminal device and the server executing the mouse event synchronously, on the one hand, the server receives the mouse operation instruction sent by the terminal device, and executes the mouse operation instruction according to the mouse operation. instruction, execute the operation corresponding to the mouse event; on the other hand, the server sends the operation result to the terminal device according to the operation result, and after receiving the operation result, the terminal device draws the target image of the target mouse according to the operation result, and executes the operation result. The action corresponding to the mouse event.

本公开所提供的方法保证了终端设备和服务器在执行与鼠标事件相对应的操作时的同步性,也保证了鼠标事件执行的准确性和效率性。具体体现在以下两方面:The method provided by the present disclosure ensures the synchronization between the terminal device and the server when performing operations corresponding to mouse events, and also ensures the accuracy and efficiency of mouse event execution. Specifically reflected in the following two aspects:

第一方面,在根据目标信息执行与鼠标事件相对应的操作时,本公开所提供的方法,根据不同的鼠标应用场景,确定鼠标对应的预设状态,根据鼠标的预设状态为显示状态或隐藏状态,确定与状态对应的鼠标坐标。In the first aspect, when an operation corresponding to a mouse event is performed according to the target information, the method provided by the present disclosure determines a preset state corresponding to the mouse according to different mouse application scenarios, and the preset state of the mouse is the display state or the display state. Hide the state and determine the mouse coordinates corresponding to the state.

该鼠标坐标包括绝对坐标数据或者相对坐标数据。在鼠标在显示状态下,无论是哪种应用,绝对坐标都可以生效,此时与显示状态相对应的鼠标数据包为绝对坐标数据;而在鼠标隐藏状态下,鼠标位置信息此时不重要,操作系统上报给应用的数据应当是鼠标原始数据,此时与隐藏状态相对应的鼠标数据包为相对坐标数据。The mouse coordinates include absolute coordinate data or relative coordinate data. When the mouse is in the display state, no matter what kind of application, the absolute coordinates can take effect. At this time, the mouse data packet corresponding to the display state is the absolute coordinate data; while in the hidden state of the mouse, the mouse position information is not important at this time. The data reported by the operating system to the application should be the original data of the mouse, and the mouse data packet corresponding to the hidden state at this time is the relative coordinate data.

第二方面,在根据目标信息向终端设备发送目标数据时,本公开所提供的方法,在终端避免了鼠标数据在传输过程中丢失的情况,仅向终端设备发送对应的目标数据,因此无需对服务器与终端设备之间的鼠标位置进行校准。基于鼠标坐标的特性,即提高了数据处理的效率,也提高了数据处理的准确性。In the second aspect, when the target data is sent to the terminal device according to the target information, the method provided by the present disclosure avoids the situation that the mouse data is lost during the transmission process, and only sends the corresponding target data to the terminal device, so there is no need to The mouse position between the server and the end device is calibrated. Based on the characteristics of mouse coordinates, the efficiency of data processing is improved, and the accuracy of data processing is also improved.

实施例三Embodiment 3

基于上述图1对应的实施例中所描述的鼠标数据处理方法,下述为本公开装置实施例,可以用于执行本公开方法实施例。Based on the mouse data processing method described in the above-mentioned embodiment corresponding to FIG. 1 , the following is an apparatus embodiment of the present disclosure, which can be used to execute the method embodiment of the present disclosure.

本公开实施例提供一种鼠标数据处理系统,如图3所示,该鼠标数据处理系统30包括:An embodiment of the present disclosure provides a mouse data processing system. As shown in FIG. 3 , the mouse data processing system 30 includes:

该服务器302和该终端设备301相连接;The server 302 is connected to the terminal device 301;

该终端设备301,用于获取操作指令信息,该操作指令信息用于指示根据目标鼠标的目标鼠标事件执行相应的操作,该操作指令信息包括目标坐标,该目标坐标包括该目标鼠标的目标相对坐标和目标绝对坐标;The terminal device 301 is configured to acquire operation instruction information, where the operation instruction information is used to instruct to perform a corresponding operation according to a target mouse event of the target mouse, the operation instruction information includes target coordinates, and the target coordinates include target relative coordinates of the target mouse and the absolute coordinates of the target;

向服务器302发送该操作指令信息;Send the operation instruction information to the server 302;

根据该操作指令信息,接收该服务器302发送的操作结果;According to the operation instruction information, receive the operation result sent by the server 302;

根据该操作结果和该目标坐标,绘制目标鼠标的目标图像;Draw the target image of the target mouse according to the operation result and the target coordinates;

该服务器302,用于获取操作指令信息,该操作指令信息用于指示根据目标鼠标事件执行相应的操作,该操作指令信息包括该目标鼠标的目标相对坐标和目标绝对坐标;The server 302 is configured to obtain operation instruction information, where the operation instruction information is used to instruct to perform a corresponding operation according to the target mouse event, and the operation instruction information includes the target relative coordinates and the target absolute coordinates of the target mouse;

根据该目标鼠标的预设状态,确定该目标数据对应的目标坐标,该目标坐标包括该目标鼠标的相对坐标或者绝对坐标,该预设状态是根据操作系统确定的;Determine the target coordinates corresponding to the target data according to the preset state of the target mouse, where the target coordinates include relative coordinates or absolute coordinates of the target mouse, and the preset state is determined according to the operating system;

根据该目标坐标,执行该鼠标事件对应的操作,并获取操作结果。According to the target coordinates, the operation corresponding to the mouse event is performed, and the operation result is obtained.

向终端设备301发送该操作结果。The operation result is sent to the terminal device 301 .

在可选实施例中,本公开实施例提供的系统30在进行启动时,终端设备301和服务器302之间需先同步一次鼠标的初始位置及状态信息。若此时服务器302根据系统设定获取预设鼠标状态信息为显示状态,则服务器302将鼠标初始数据发送给终端设备301;如果预设鼠标状态信息为隐藏状态,则服务器将鼠标的隐藏状态发送至终端设备。与之相对应,终端设备在获取预设鼠标状态信息之后,如果预设鼠标状态信息为显示状态,则将初始绝对位置设为(0,0)即终端设备显示屏的左上角,并将该绝对位置数据发送回服务器;如果鼠标初始状态为隐藏,则终端设备不做处理。In an optional embodiment, when the system 30 provided by the embodiment of the present disclosure is started, the terminal device 301 and the server 302 need to synchronize the initial position and state information of the mouse first. At this time, if the server 302 obtains the preset mouse state information according to the system settings as the display state, the server 302 sends the initial mouse data to the terminal device 301; if the preset mouse state information is the hidden state, the server sends the hidden state of the mouse to the terminal device 301. to the terminal device. Correspondingly, after the terminal device obtains the preset mouse state information, if the preset mouse state information is the display state, the initial absolute position is set to (0, 0), that is, the upper left corner of the display screen of the terminal device, and the The absolute position data is sent back to the server; if the initial state of the mouse is hidden, the terminal device does not process it.

此处列举具体示例阐述,如附图3a所示,鼠标数据处理系统中服务器302和终端设备301之间如何进行的鼠标数据处理,其中终端设备301包括显示设备30101、播放控制设备30102、图像解码设备30103、声音解码设备30104、鼠键编码设备30105、USB处理设备30106、声音输入设备30107、传输控制设备30108、网卡30109、鼠标绘制设备30110、鼠键解码设备30111;服务器302包括:发送设备303和主板30201、CPU30202、内存30203、图像处理设备30204、声音处理设备30205、USB设备30206、传输控制设备30207、声音输入设备30208、网卡30209。Specific examples are listed here to illustrate how mouse data processing is performed between the server 302 and the terminal device 301 in the mouse data processing system, as shown in FIG. device 30103, sound decoding device 30104, mouse key encoding device 30105, USB processing device 30106, sound input device 30107, transmission control device 30108, network card 30109, mouse drawing device 30110, mouse key decoding device 30111; server 302 includes: sending device 303 And motherboard 30201, CPU30202, memory 30203, image processing device 30204, sound processing device 30205, USB device 30206, transmission control device 30207, sound input device 30208, network card 30209.

终端设备301,用于处理接收到的数据,具体的通过传输控制设备30108接收网络发送来的数据,分别送入图像解码设备30103和声音解码设备30104,由图像解码设备30103和声音解码设备30104送入播放控制设备30102,由播放控制设备30102决定何时送入显示设备30101中进行显示或播放;传输控制设备30108还接收用户操作生成的鼠标图形数据,送入鼠键解码设备30111中进行解码,然后送入鼠标绘制设备30110;鼠标绘制设备30110同时接收USB处理设备30106输入的鼠标操作数据。The terminal device 301 is used to process the received data. Specifically, the data sent by the network is received through the transmission control device 30108, and sent to the image decoding device 30103 and the sound decoding device 30104 respectively, and sent by the image decoding device 30103 and the sound decoding device 30104. Enter the playback control device 30102, and the playback control device 30102 decides when to send it to the display device 30101 for display or playback; the transmission control device 30108 also receives the mouse graphic data generated by the user operation, and sends it into the mouse key decoding device 30111 for decoding, Then it is sent to the mouse drawing device 30110; the mouse drawing device 30110 simultaneously receives the mouse operation data input by the USB processing device 30106.

服务器302,用于处理计算机生成的图像和声音数据;其数据处理的过程:计算机将生成画面、声音数据分别送入图像处理设备30204及声音处理设备30205进行处理,发送设备303分别通过图像采集设备30301,声音采集设备30302获取这些数据,分别送入图像编码设备30305和声音编码设备30306进行编码,然后将编码结果发送给传输控制设备30309,由传输控制设备30309决定如何发送;传输控制设备30309同时接收从终端设备301发送来的用户的反向控制数据和声音数据,并将接收到的数据分别送入声音解码设备30308及控制解码设备30307中进行解码,解码结果送入计算机系统的声音输入设备30208和传输控制设备30307中;传输控制设备30309还有可能接收终端设备301送来的USB重定向数据,直接送入系统的USB设备30206。The server 302 is used to process the image and sound data generated by the computer; the data processing process: the computer sends the generated picture and sound data to the image processing device 30204 and the sound processing device 30205 respectively for processing, and the sending device 303 passes through the image acquisition device respectively. 30301, the sound acquisition device 30302 obtains these data, respectively sends the data to the image encoding device 30305 and the sound encoding device 30306 for encoding, and then sends the encoding result to the transmission control device 30309, which decides how to send; the transmission control device 30309 simultaneously Receive the reverse control data and voice data of the user sent from the terminal device 301, and send the received data to the voice decoding device 30308 and the control decoding device 30307 for decoding, and the decoding result is sent to the voice input device of the computer system 30208 and the transmission control device 30307; the transmission control device 30309 may also receive the USB redirection data sent by the terminal device 301 and directly send it to the USB device 30206 of the system.

步骤一,终端设备301获取目标鼠标事件,该目标鼠标事件包括相对坐标数据,并根据该目标鼠标事件获取目标坐标,该目标坐标包括相对坐标数据和绝对坐标数据,其中绝对坐标数据是通过终端设备301的显示分辨率和相对坐标数据获取的。Step 1, the terminal device 301 acquires a target mouse event, which includes relative coordinate data, and acquires target coordinates according to the target mouse event, where the target coordinates include relative coordinate data and absolute coordinate data, wherein the absolute coordinate data is obtained through the terminal device. The display resolution and relative coordinate data of 301 are obtained.

该目标鼠标事件可以是终端设备301通过目标鼠标事件中的通过USB处理设备30106获取用户终端设备上的鼠标操作后生成。The target mouse event may be generated after the terminal device 301 obtains the mouse operation on the user terminal device through the USB processing device 30106 in the target mouse events.

终端设备301根据目标鼠标事件和目标坐标,生成操作指令信息。该操作指令信息用于指示根据目标鼠标事件执行相应的操作The terminal device 301 generates operation instruction information according to the target mouse event and the target coordinates. The operation instruction information is used to instruct to perform the corresponding operation according to the target mouse event

步骤二、终端设备通过USB处理设备30106将绝对坐标数据上报给鼠标绘制设备30110,鼠标绘制设备30110根据绝对坐标数据绘制第一鼠标数据。同时,USB处理设备30106还会将操作指令信息向鼠标编码设备30105发送,由鼠标编码设备30105对鼠标数据进行编码压缩后送入传输控制设备30108,再经终端设备301的网卡30109和服务器302的网卡30209向服务器302中的发送设备303发送。Step 2: The terminal device reports the absolute coordinate data to the mouse drawing device 30110 through the USB processing device 30106, and the mouse drawing device 30110 draws the first mouse data according to the absolute coordinate data. At the same time, the USB processing device 30106 will also send the operation instruction information to the mouse encoding device 30105. The mouse encoding device 30105 encodes and compresses the mouse data and sends it to the transmission control device 30108. The network card 30209 sends to the sending device 303 in the server 302 .

具体的,服务器302中的传输控制设备30207将操作指令信息送入服务器302的操作系统。服务器中的发送设备303在获取操作指令信息时,先获取操作系统中当前鼠标的预设鼠标状态是显示状态还是隐藏状态;当预设鼠标状态为隐藏状态时,获取相对坐标数据;当预设鼠标状态为显示状态时,获取绝对坐标数据。发送设备303中的控制输入设备30303相当于模拟键盘和鼠标,可以根据确定后的坐标数据模拟键盘和鼠标,。Specifically, the transmission control device 30207 in the server 302 sends the operation instruction information to the operating system of the server 302 . When acquiring the operation instruction information, the sending device 303 in the server first acquires whether the preset mouse state of the current mouse in the operating system is the displayed state or the hidden state; when the preset mouse state is the hidden state, it acquires relative coordinate data; When the mouse state is displayed, the absolute coordinate data is obtained. The control input device 30303 in the sending device 303 is equivalent to simulating a keyboard and a mouse, and can simulate a keyboard and a mouse according to the determined coordinate data.

步骤三、服务器302根据操作指令信息执行相应的操作,并获取操作结果,该操作结果包括图像。Step 3: The server 302 performs a corresponding operation according to the operation instruction information, and acquires an operation result, where the operation result includes an image.

具体的,当预设鼠标状态为隐藏状态,则发送设备303将服务器302上显示的预设鼠标状态置为隐藏状态,同时生成隐藏信息,并将隐藏状态通过服务器302的网卡30209和终端设备301的网卡30109向终端设备301的传输控制设备30108发送。Specifically, when the preset mouse state is the hidden state, the sending device 303 sets the preset mouse state displayed on the server 302 to the hidden state, generates hidden information, and transmits the hidden state through the network card 30209 of the server 302 and the terminal device 301 The network card 30109 of the terminal device 301 sends it to the transmission control device 30108.

当预设鼠标状态为隐藏状态时,服务器302获取相应的目标图像,其中,目标图像可以包括箭头图形、手形图形、竖杠图形等。When the preset mouse state is a hidden state, the server 302 acquires a corresponding target image, where the target image may include arrow graphics, hand graphics, vertical bar graphics, and the like.

进一步的,当预设鼠标状态为隐藏状态时,服务器302还可以并判断该目标数据是否为第一次出现。Further, when the preset mouse state is a hidden state, the server 302 can also determine whether the target data appears for the first time.

若为是第一次出现,则发送设备303通过图像编码设备30305对目标鼠标对应的目标图像进行编码,并设置该目标图像对应的目标标识符。根据目标图像和目标标识符,建立目标映射。将已编码的目标图像、目标标识符及目标映射,经服务器302的网卡30209和终端设备的网卡30109发送给终端设备301的传输控制设备30108。If it is the first occurrence, the sending device 303 encodes the target image corresponding to the target mouse through the image encoding device 30305, and sets the target identifier corresponding to the target image. Based on the target image and target identifier, a target map is established. The encoded target image, target identifier and target map are sent to the transmission control device 30108 of the terminal device 301 via the network card 30209 of the server 302 and the network card 30109 of the terminal device.

若不是第一次出现,则发送设备303可以将鼠标图像对应的目标标识符经服务器302的网卡30209和终端设备的网卡30109发送给终端设备301的传输控制设备30108。If it is not the first time, the sending device 303 can send the target identifier corresponding to the mouse image to the transmission control device 30108 of the terminal device 301 via the network card 30209 of the server 302 and the network card 30109 of the terminal device.

步骤四、传输控制设备30108在接收到服务器302发送的操作结果,并通过鼠键解码设备30111进行解码处理,该操作结果可以包括隐藏信息或者目标数据,该目标数据可以包括:鼠标预设状态、目标图像、目标标识符和目标映射、鼠标图形数据。Step 4. The transmission control device 30108 receives the operation result sent by the server 302, and performs decoding processing through the mouse key decoding device 30111. The operation result may include hidden information or target data, and the target data may include: mouse preset state, Target image, target identifier and target map, mouse graphics data.

若解码处理后该操作结果为隐藏信息,则直接命令鼠标绘制设备30110不再绘制鼠标。If the result of the operation after the decoding process is hidden information, the mouse drawing device 30110 is directly instructed to no longer draw the mouse.

若解码处理后该操作结果为鼠标图形数据和标识符,则保存该鼠标图形和标识符的对应关系,以及对该编码鼠标图形数据进行解码后发送给播放控制设备30102;鼠标绘制设备30110将鼠标坐标发送给播放控制设备30102,播放控制设备30102根据图像、鼠标图像和鼠标坐标在显示器30101上进行显示。If the operation result after the decoding process is the mouse graphic data and the identifier, the corresponding relationship between the mouse graphic and the identifier is stored, and the encoded mouse graphic data is decoded and sent to the playback control device 30102; the mouse drawing device 30110 sends the mouse The coordinates are sent to the playback control device 30102, and the playback control device 30102 displays on the display 30101 according to the image, the mouse image and the mouse coordinates.

若解码处理后该操作结果为目标标识符后,根据该目标标识符及预存的目标映射,查找到与目标标识符对应的目标图像,并将该目标图像向鼠标绘制设备30110发送。鼠标绘制设备30110根据目标数据绘制目标鼠标的目标图像。If the operation result after the decoding process is the target identifier, the target image corresponding to the target identifier is found according to the target identifier and the pre-stored target map, and the target image is sent to the mouse drawing device 30110 . The mouse drawing device 30110 draws the target image of the target mouse according to the target data.

鼠标绘制设备30110将目标坐标、目标数据向显示器30101发送,显示器30101显示该目标鼠标。The mouse drawing device 30110 sends the target coordinates and target data to the display 30101, and the display 30101 displays the target mouse.

本公开实施例提供的鼠标数据处理系统,该鼠标数据处理系统包括服务器和终端设备,终端设备获取目标鼠标的操作指令信息,该操作指令信息包括鼠标相对坐标数据及鼠标绝对坐标数据。终端设备向服务器发送操作指令信息,服务器将操作指令信息输入进系统后,获取目标鼠标的预设状态,根据该预设状态和操作指令信息,执行相应的操作,并获取操作结果。服务器将操作结果向终端设备发送后,终端设备根据该操作结果和鼠标坐标数据,绘制目标鼠标的目标图像并执行相应的操作。The mouse data processing system provided by the embodiment of the present disclosure includes a server and a terminal device. The terminal device obtains operation instruction information of a target mouse, and the operation instruction information includes mouse relative coordinate data and mouse absolute coordinate data. The terminal device sends the operation instruction information to the server. After the server inputs the operation instruction information into the system, it obtains the preset state of the target mouse, performs the corresponding operation according to the preset state and the operation instruction information, and obtains the operation result. After the server sends the operation result to the terminal device, the terminal device draws the target image of the target mouse and performs the corresponding operation according to the operation result and the mouse coordinate data.

基于上述图1和图2对应的实施例中所描述的鼠标数据处理方法,本公开实施例还提供一种计算机可读存储介质,例如,非临时性计算机可读存储介质可以是只读存储器(英文:Read Only Memory,ROM)、随机存取存储器(英文:Random Access Memory,RAM)、CD-ROM、磁带、软盘和光数据存储装置等。该存储介质上存储有计算机指令,用于执行上述图1和图2对应的实施例中所描述的鼠标数据处理方法,此处不再赘述。Based on the mouse data processing method described in the above embodiments corresponding to FIG. 1 and FIG. 2 , an embodiment of the present disclosure further provides a computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be a read-only memory ( English: Read Only Memory, ROM), random access memory (English: Random Access Memory, RAM), CD-ROM, magnetic tape, floppy disk and optical data storage device, etc. The storage medium stores computer instructions for executing the mouse data processing method described in the embodiments corresponding to FIG. 1 and FIG. 2 , and details are not described herein again.

本领域技术人员在考虑说明书及实践这里公开的公开后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the present disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or techniques in the technical field not disclosed by the present disclosure . The specification and examples are to be regarded as exemplary only, with the true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1.一种鼠标数据处理方法,其特征在于,应用于终端设备,所述方法包括:1. a mouse data processing method, is characterized in that, is applied to terminal equipment, and described method comprises: 获取操作指令信息,所述操作指令信息用于指示根据目标鼠标的目标鼠标事件执行相应的操作,所述操作指令信息包括目标坐标,所述目标坐标包括所述目标鼠标的目标相对坐标和目标绝对坐标;Obtain operation instruction information, the operation instruction information is used to instruct to perform a corresponding operation according to the target mouse event of the target mouse, the operation instruction information includes target coordinates, and the target coordinates include the target relative coordinates and target absolute coordinates of the target mouse coordinate; 向服务器发送所述操作指令信息;Send the operation instruction information to the server; 根据所述操作指令信息,接收所述服务器发送的操作结果;According to the operation instruction information, receive the operation result sent by the server; 根据所述操作结果和所述目标坐标,绘制所述目标鼠标的目标图像。Drawing the target image of the target mouse according to the operation result and the target coordinates. 2.根据权利要求1所述的方法,其特征在于,所述获取目标信息,包括获取目标鼠标事件,所述目标鼠标事件包括所述目标鼠标的目标相对坐标;2. The method according to claim 1, wherein the obtaining target information comprises obtaining a target mouse event, and the target mouse event includes the target relative coordinates of the target mouse; 根据所述目标相对坐标和所述终端设备的显示信息,获取所述目标鼠标的目标绝对坐标;Obtain the target absolute coordinates of the target mouse according to the target relative coordinates and the display information of the terminal device; 根据所述目标相对坐标和所述目标绝对坐标,生成所述目标坐标;generating the target coordinates according to the target relative coordinates and the target absolute coordinates; 根据所述目标坐标和所述目标鼠标事件,生成所述操作指令信息。The operation instruction information is generated according to the target coordinates and the target mouse event. 3.根据权利要求2所述的方法,其特征在于,所述方法还包括:3. The method according to claim 2, wherein the method further comprises: 根据所述目标图像和所述操作指令信息,执行与所述目标鼠标事件相对应的目标操作。According to the target image and the operation instruction information, a target operation corresponding to the target mouse event is performed. 4.一种鼠标数据处理方法,其特征在于,应用于服务器,所述方法包括:4. a mouse data processing method, is characterized in that, is applied to server, described method comprises: 获取操作指令信息,所述操作指令信息用于指示根据目标鼠标的目标鼠标事件执行相应的操作,所述操作指令信息包括目标坐标,所述目标坐标包括所述目标鼠标的目标相对坐标和目标绝对坐标;Obtain operation instruction information, the operation instruction information is used to instruct to perform a corresponding operation according to the target mouse event of the target mouse, the operation instruction information includes target coordinates, and the target coordinates include the target relative coordinates and target absolute coordinates of the target mouse coordinate; 根据所述目标鼠标的预设状态,确定所述目标鼠标对应的目标类型,所述目标类型用于指示所述目标鼠标的坐标是相对坐标类型或者绝对坐标类型;According to the preset state of the target mouse, determine the target type corresponding to the target mouse, and the target type is used to indicate that the coordinates of the target mouse are relative coordinate types or absolute coordinate types; 根据所述目标坐标中与所述目标类型相对应的坐标,执行与所述目标鼠标事件相对应的目标操作,并获取操作结果。According to the coordinates corresponding to the target type in the target coordinates, the target operation corresponding to the target mouse event is performed, and the operation result is obtained. 根据所述目标坐标中与所述目标类型相对应的坐标。According to the coordinates corresponding to the target type in the target coordinates. 5.根据权利要求1所述的方法,其特征在于,所述确定所述目标鼠标对应的目标类型,包括:5. The method according to claim 1, wherein the determining the target type corresponding to the target mouse comprises: 当所述预设状态为隐藏状态时,确定所述目标鼠标的目标类型是相对坐标类型;When the preset state is a hidden state, determine that the target type of the target mouse is a relative coordinate type; 当所述预设状态为显示状态时,确定所述目标鼠标的目标类型是绝对坐标类型。When the preset state is the display state, it is determined that the target type of the target mouse is an absolute coordinate type. 6.根据权利要求1所述的方法,其特征在于,所述获取操作结果,包括:6. The method according to claim 1, wherein the obtaining operation result comprises: 当所述目标类型是相对坐标类型时,获取隐藏信息,所述隐藏信息用于指示隐藏所述目标鼠标;When the target type is a relative coordinate type, obtain hidden information, where the hidden information is used to indicate that the target mouse is hidden; 根据所述隐藏信息,获取操作结果;Obtain the operation result according to the hidden information; 或者,当所述目标类型是绝对坐标类型时,根据所述鼠标事件,获取所述目标鼠标的目标数据,所述目标数据包括:目标图像、目标标识符和目标映射,所述目标映射用于指示所述目标图像和所述目标标识符之间的对应关系;Or, when the target type is an absolute coordinate type, acquire target data of the target mouse according to the mouse event, where the target data includes: a target image, a target identifier and a target map, where the target map is used for indicating a correspondence between the target image and the target identifier; 对所述目标数据进行编码处理后,获取操作结果。After encoding the target data, an operation result is obtained. 7.根据权利要求6所述的方法,其特征在于,所述获取所述目标鼠标的目标数据,包括:7. The method according to claim 6, wherein the acquiring the target data of the target mouse comprises: 当第一次获取所述目标鼠标的目标数据时,所述目标数据包括:目标图像、目标标识符和目标映射,所述目标映射用于指示所述目标图像和所述目标标识符之间的对应关系;When the target data of the target mouse is acquired for the first time, the target data includes: a target image, a target identifier and a target map, where the target map is used to indicate the difference between the target image and the target identifier Correspondence; 当第N次获取所述目标鼠标的目标数据时,所述目标数据包括:目标标识符,所述N大于1。When the target data of the target mouse is acquired for the Nth time, the target data includes: a target identifier, and the N is greater than 1. 8.一种鼠标数据处理系统,其特征在于,包括:服务器和终端设备;8. A mouse data processing system, comprising: a server and a terminal device; 所述服务器和所述终端设备相连接;the server and the terminal device are connected; 所述终端设备,用于获取操作指令信息,所述操作指令信息用于指示根据目标鼠标的目标鼠标事件执行相应的操作,所述操作指令信息包括目标坐标,所述目标坐标包括所述目标鼠标的目标相对坐标和目标绝对坐标;The terminal device is used to obtain operation instruction information, where the operation instruction information is used to instruct to perform a corresponding operation according to a target mouse event of the target mouse, the operation instruction information includes target coordinates, and the target coordinates include the target mouse target relative coordinates and target absolute coordinates; 向服务器发送所述操作指令信息;Send the operation instruction information to the server; 根据所述操作指令信息,接收所述服务器发送的操作结果;According to the operation instruction information, receive the operation result sent by the server; 根据所述操作结果和所述目标坐标,绘制所述目标鼠标的目标图像;Drawing the target image of the target mouse according to the operation result and the target coordinates; 所述服务器,用于获取操作指令信息,所述操作指令信息用于指示根据目标鼠标事件执行相应的操作,所述操作指令信息包括所述目标鼠标的目标相对坐标和目标绝对坐标;The server is used to obtain operation instruction information, the operation instruction information is used to instruct to perform a corresponding operation according to a target mouse event, and the operation instruction information includes the target relative coordinates and the target absolute coordinates of the target mouse; 根据所述目标鼠标的预设状态,确定所述目标数据对应的目标坐标,所述目标坐标包括所述目标鼠标的相对坐标或者绝对坐标,所述预设状态是根据操作系统确定的;Determine the target coordinates corresponding to the target data according to the preset state of the target mouse, where the target coordinates include relative coordinates or absolute coordinates of the target mouse, and the preset state is determined according to the operating system; 根据所述目标坐标,执行所述鼠标事件对应的操作,并获取操作结果。According to the target coordinates, the operation corresponding to the mouse event is performed, and the operation result is obtained. 向所述终端设备发送所述操作结果。Send the operation result to the terminal device. 9.根据权利要求8所述的系统,其特征在于,所述服务器还用于:9. The system according to claim 8, wherein the server is further configured to: 当所述预设状态为显示状态时,根据所述鼠标事件,获取所述目标鼠标的目标数据,所述目标数据包括:目标图像、目标标识符和目标映射,所述目标映射用于指示所述目标图像和所述目标标识符之间的对应关系;When the preset state is the display state, the target data of the target mouse is acquired according to the mouse event, the target data includes: a target image, a target identifier and a target map, and the target map is used to indicate the target mouse. the correspondence between the target image and the target identifier; 对所述目标数据进行编码处理后,生成操作结果;After encoding the target data, an operation result is generated; 当所述预设状态为隐藏状态时,根据所述隐藏状态生成隐藏信息,所述隐藏信息用于指示隐藏所述目标鼠标;When the preset state is a hidden state, generating hidden information according to the hidden state, where the hidden information is used to instruct to hide the target mouse; 根据所述隐藏信息,获取操作结果。Obtain the operation result according to the hidden information. 10.根据权利要求8所述的系统,其特征在于,所述终端设备还用于,10. The system according to claim 8, wherein the terminal device is further configured to: 根据所述目标图像和所述操作指令信息,执行与所述目标鼠标事件相对应的目标操作。According to the target image and the operation instruction information, a target operation corresponding to the target mouse event is performed.
CN202010286689.4A 2020-04-13 2020-04-13 Mouse data processing method and system Pending CN111610868A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010286689.4A CN111610868A (en) 2020-04-13 2020-04-13 Mouse data processing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010286689.4A CN111610868A (en) 2020-04-13 2020-04-13 Mouse data processing method and system

Publications (1)

Publication Number Publication Date
CN111610868A true CN111610868A (en) 2020-09-01

Family

ID=72203718

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010286689.4A Pending CN111610868A (en) 2020-04-13 2020-04-13 Mouse data processing method and system

Country Status (1)

Country Link
CN (1) CN111610868A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113407043A (en) * 2021-06-29 2021-09-17 杭州海康威视数字技术股份有限公司 Data processing method, device, equipment and system
CN113515213A (en) * 2021-08-03 2021-10-19 恒安嘉新(北京)科技股份公司 Cursor shape synchronization method, remote browsing system, equipment and storage medium
CN114428651A (en) * 2022-02-07 2022-05-03 杭州雾联科技有限公司 Absolute position mouse configuration method, device, equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060195800A1 (en) * 2005-02-25 2006-08-31 Fujitsu Limited Apparatus for displaying screen and recording medium recording a program thereof
JP2011076282A (en) * 2009-09-30 2011-04-14 Nec Personal Products Co Ltd Client device, method of controlling remote operation, and remote operation control program
CN103324348A (en) * 2013-06-28 2013-09-25 华南理工大学 Windows desktop control method based on intelligent mobile terminals
CN103970290A (en) * 2013-01-30 2014-08-06 云联(北京)信息技术有限公司 Cloud-gaming-based mouse signal processing device and method
CN107911353A (en) * 2017-11-06 2018-04-13 西安万像电子科技有限公司 Data transmission method, apparatus and system
CN109701265A (en) * 2018-12-04 2019-05-03 上海达龙信息科技有限公司 Remote desktop cursor mode switching method, system, client and remote server

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060195800A1 (en) * 2005-02-25 2006-08-31 Fujitsu Limited Apparatus for displaying screen and recording medium recording a program thereof
JP2011076282A (en) * 2009-09-30 2011-04-14 Nec Personal Products Co Ltd Client device, method of controlling remote operation, and remote operation control program
CN103970290A (en) * 2013-01-30 2014-08-06 云联(北京)信息技术有限公司 Cloud-gaming-based mouse signal processing device and method
CN103324348A (en) * 2013-06-28 2013-09-25 华南理工大学 Windows desktop control method based on intelligent mobile terminals
CN107911353A (en) * 2017-11-06 2018-04-13 西安万像电子科技有限公司 Data transmission method, apparatus and system
CN109701265A (en) * 2018-12-04 2019-05-03 上海达龙信息科技有限公司 Remote desktop cursor mode switching method, system, client and remote server

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113407043A (en) * 2021-06-29 2021-09-17 杭州海康威视数字技术股份有限公司 Data processing method, device, equipment and system
CN113407043B (en) * 2021-06-29 2023-09-05 杭州海康威视数字技术股份有限公司 Data processing method, device, equipment and system
CN113515213A (en) * 2021-08-03 2021-10-19 恒安嘉新(北京)科技股份公司 Cursor shape synchronization method, remote browsing system, equipment and storage medium
CN114428651A (en) * 2022-02-07 2022-05-03 杭州雾联科技有限公司 Absolute position mouse configuration method, device, equipment and medium

Similar Documents

Publication Publication Date Title
US11451619B2 (en) App remote control method and related devices
US10397627B2 (en) Desktop-cloud-based media control method and device
US8839112B2 (en) Cloning or extending a computer desktop on a wireless display surface
CN111354063B (en) Three-dimensional element rendering method, desktop cloud server and desktop cloud system
US10728613B2 (en) Method and apparatus for content insertion during video playback, and storage medium
CN111610868A (en) Mouse data processing method and system
WO2022166927A1 (en) Cursor display method and apparatus based on remote desktop, medium, and electronic device
WO2022048097A1 (en) Single-frame picture real-time rendering method based on multiple graphics cards
JP6379107B2 (en) Information processing apparatus, control method therefor, and program
JP7506171B2 (en) Method for controlling a cursor control unit, and an apparatus, electronic device, and computer program thereof
WO2016197590A1 (en) Method and apparatus for providing screenshot service on terminal device and storage medium and device
CN111491208A (en) Video processing method, apparatus, electronic device and computer readable medium
CN107509080A (en) A coded image display method, device and electronic equipment
CN113839829A (en) Cloud game delay testing method, device and system and electronic equipment
Li et al. Enhancing 3d applications using stereoscopic 3d and motion parallax
CN111870948A (en) Window management method and system under cloud game single-host multi-user environment
CN111870962A (en) A cloud game data processing method and system
CN115248714A (en) Method for improving VDI remote desktop performance by using VGPU
CN111013131A (en) Delayed data acquisition method, electronic device and storage medium
CN111177167A (en) Augmented reality map update method, device, system, storage and device
CN111338721A (en) Online interaction method, system, electronic device and storage medium
CN111475240B (en) Data processing method and system
US20220279234A1 (en) Live stream display method and apparatus, electronic device, and readable storage medium
CN115393477A (en) Video generation method, device, device and storage medium
CN119415001B (en) Virtual desktop display method and related equipment

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200901