A method and system for synchronizing a mouse and a returned image for remote control
Through the decoding and image recognition processing of the returned image on the control end, the mouse and the returned image are synchronized, which solves the problem of cursor lag in remote control and improves the user experience and control efficiency.
Patent Information
- Application Number
- CN202110980595.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-25
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2041-08-25
AI Technical Summary
In the existing remote control technology, the delay in returning the image and the synchronization of the mouse cursor are poor, causing the cursor to lag when the user controls it, affecting the user experience.
At the control end, the received returned picture is decoded and image recognized, the original coordinates of the mouse cursor are obtained, and combined with the mouse displacement command from the control end, the pixels are interpolated and redrawn to realize the interaction between the mouse and the returned picture. synchronous.
It improves the eye-hand coordination of managers and enhances the remote control experience. At the same time, it does not affect the movement of the mouse cursor on the real-time screen of the controlled host, maintaining the original working conditions.
Smart Images

Figure CN113849073B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of remote control and video transmission, and in particular to a synchronization method and system for a remote-controlled mouse and a returned image. Background Art
[0002] With the development of audio and video coding and decoding technology and human-computer interaction technology, remote control technology has been widely used in the fields of distributed seat management, collaborative office and desktop sharing. The current IP-based remote control technology mainly implements encoding and transmission of keyboard and mouse signals and host video signals and remote decoding, so that managers can remotely control remote computers through keyboard and mouse in different geographical locations, thereby reducing the number of personnel on duty in the system and improving the real-time response of system scheduling.
[0003] When using the keyboard and mouse for remote control, the administrator needs to use the remote host's transmitted image as a reference image, so the synchronization of the keyboard and mouse with the transmitted image is very important. In particular, the movement of the mouse will cause continuous changes in the transmitted image. Whether the mouse cursor can reach the target point in time and how large the administrator's movement range is, these largely determine the remote control experience.
[0004] Furthermore, the real-time performance of the mouse cursor of the returned image mainly depends on the following two aspects: the real-time performance of the mouse cursor of the remote controlled host and the real-time performance of the returned image of the controlled host locally after encoding, transmission and decoding.
[0005] The data encoding and decoding flow of the keyboard, mouse and video screen is as follows Figure 1 As shown. The encoding and transmission of keyboard and mouse signals in the local area network is generally about 5 to 20ms, and this delay is basically negligible for the operator. The delay of high-definition video images at 60fps through encoding, network transmission, and decoding is about 100ms, and the delay of 4K images can even reach 200ms. This causes the mouse cursor on the controlled host screen to actually be in place, but the mouse cursor seen on the returned screen lags behind. When the delay difference between the returned screen and the real-time screen of the controlled host is too large, when the user controls the remote host with the local mouse, it is easy for the mouse cursor on the returned screen to not be able to move to the target position as desired, and there are delays, lags, and difficulty in alignment. Therefore, how to solve the synchronization problem of the delay of the returned screen and the actual movement speed of the mouse cursor is a key issue to improve the remote control experience.
[0006] Currently, no patents have been found specifically for improving the real-time performance of the mouse and the transmitted images. From a technical perspective, in order to achieve this goal, a method of reducing the delay of the transmitted images is usually used to improve the synchronization between the transmitted images and the mouse. Currently, there are two main technical approaches to reduce the delay of image transmission:
[0007] 1. Reduce delay from video encoding technology, such as the current mainstream shallow compression technology and optical fiber video transmission technology. For example, "A display capable of remotely controlling a host", application number: 201621043186.X, uses coaxial optical fiber to modulate the KVM interface signal to achieve long-distance transmission. Although the image transmitted back by the controlled host has high real-time performance, it does not perform video compression and does not support a distributed architecture based on IP switching. It is a traditional video signal extension processing method and cannot achieve simultaneous transmission of audio and video data and IP data; the shallow compression traffic is also basically around 300M, which has great limitations on system architecture and application flexibility.
[0008] 2. Improve the efficiency of video streaming network communication to reduce the delay of returning the picture. In the patent "A method and system for realizing zero-copy transmission of streaming media data" (application number: 2008101429.2) and "A streaming media decoding method, system and mobile terminal" (application number: 201310122798.2), the fields of the video message are identified and the protocol is unloaded by optimizing the network protocol stack or shared memory. This method mainly reduces the number of times the network message enters and exits the stack and is copied from the software perspective to improve the real-time performance of video transmission, but the delay of video encoding and decoding cannot be optimized, and the network performance is highly correlated with the hardware platform, so the improvement ability is limited. Summary of the invention
[0009] The present invention provides a method and system for synchronizing a mouse and a returned image for remote control, so as to overcome the above technical deficiencies.
[0010] In order to achieve the above technical objectives, the technical solution of the present invention provides a method for synchronizing a mouse and a returned image for remote control in a first aspect, which comprises the following steps:
[0011] Decode the returned image sent back by the controlled end to obtain the original image of the host screen, and obtain the original coordinates of the mouse cursor from the original image of the host screen;
[0012] The control end intercepts and analyzes the control command of the mouse, obtains the destination coordinates of the corresponding mouse cursor, and migrates the pixel point corresponding to the mouse cursor in the host screen from the original coordinates to the destination coordinates;
[0013] The pixel points of the original coordinates of the mouse cursor in the host screen are interpolated, and the processed host screen is displayed and output as a reference screen during operation.
[0014] A second aspect of the present invention provides a remote control-oriented mouse and return image synchronization system, which includes the following functional modules:
[0015] The original coordinate acquisition module is used to decode the returned image sent back by the controlled terminal to obtain the original image of the host screen, and obtain the original coordinates of the mouse cursor from the original image of the host screen;
[0016] The destination coordinate migration module is used to intercept and analyze the mouse control command at the control end, obtain the destination coordinates corresponding to the mouse cursor, and migrate the pixel point corresponding to the mouse cursor in the host screen from the original coordinates to the destination coordinates;
[0017] The pixel processing output module is used to perform interpolation processing on the pixel points of the original coordinates of the mouse cursor in the host screen, and display and output the processed host screen as a reference screen during operation.
[0018] The third aspect of the present invention provides a server, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method for synchronizing a mouse and a returned image for remote control when executing the computer program.
[0019] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned method for synchronizing a mouse and a returned image for remote control are implemented.
[0020] Compared with the prior art, the present invention discloses a method and system for synchronizing a mouse and a returned image for remote control. The method decodes and performs image recognition processing on the returned image received from the controlled end at the control end to obtain the original coordinates of the mouse cursor in the returned image, and combines the mouse displacement command intercepted by the control end to modify the corresponding pixel points to redraw the returned image, thereby realizing synchronization between the mouse and the returned image.
[0021] This method not only allows managers to improve the eye-hand coordination experience when performing remote control by referring to the redrawn return screen, but also does not affect the movement of the mouse cursor on the real-time screen of the controlled host and does not change the original working condition of the controlled host. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a schematic diagram of the data encoding and decoding flow of the keyboard, mouse and video screen;
[0023] Figure 2 It is a flowchart of a method for synchronizing a mouse and a returned image for remote control according to an embodiment of the present invention;
[0024] Figure 3 is a schematic diagram of a remote control application according to an embodiment of the present invention;
[0025] Figure 4yes Figure 1 Sub-flow chart of step S1 in FIG.
[0026] Figure 5 yes Figure 1 Another sub-flow diagram of step S1 in FIG.
[0027] Figure 6 yes Figure 1 Sub-flow chart of step S2;
[0028] Figure 7 This is a diagram of the redrawing process of the returned screen according to an embodiment of the present invention;
[0029] Figure 8 It is a module block diagram of a synchronization system for a remote-controlled mouse and a returned image according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0031] Based on the above content, an embodiment of the present invention provides a method for synchronizing a mouse and a returned image for remote control, such as Figure 2 As shown, it includes the following steps:
[0032] S1. Decode the returned image sent back by the controlled terminal to obtain the original image of the host screen, and obtain the original coordinates of the mouse cursor from the original image of the host screen.
[0033] like Figure 3 As shown, in the embodiment of the present invention, the video encoder and video decoder at the control end both adopt Hi3531DV200 HiSilicon embedded image processing chip to realize the H264 decoding function of the host screen, and the built-in NNIE engine supports the hardware unit for accelerating the processing of deep learning convolutional neural networks, and supports most of the existing image recognition, image segmentation and image positioning algorithms; the Qinheng CH9350 chip is adopted to realize the encoding and decoding of USB keyboard and mouse signals, and the encoded keyboard and mouse control instructions are sent to Hi3531DV200 through UART; the video stream and keyboard and mouse control instructions are remotely interacted through the Ethernet interface of Hi3531DV200.
[0034] When the image characteristics of the mouse cursor are included in the preset mouse cursor characteristics, such as Figure 4 As shown, step S1 includes the following steps:
[0035] S11, decoding the returned image sent back by the controlled terminal to obtain the original image of the host screen;
[0036] S12, the preset mouse cursor features are segmented from the latest returned image frame to obtain the original outline of the mouse cursor;
[0037] S13. Extract the image clip area related to the mouse cursor attribute in the current returned image frame, and record the original pixel point coordinates MS (X, Y) and YUV components ∑ Yuv (x, y) of the mouse cursor.
[0038] That is, when Hi3531DV200 receives the network video stream of the returned image from the remote host, it uses the built-in VDEC unit of Hi3531DV200 to decode and form a single frame image, and the corresponding YUV component value of each pixel point of the generated image.
[0039] Then, according to the preset mouse cursor features, the NNIE engine is used to segment the current latest returned screen frame to obtain the original outline of the mouse cursor; the image clip area related to the mouse cursor attributes is extracted in the current returned screen frame, and the original pixel point coordinates MS (X, Y) and YUV components ∑Yuv (x, y) of the mouse cursor are recorded.
[0040] However, when the image characteristics of the mouse cursor are not included in the preset mouse cursor characteristics, such as Figure 5 As shown, step S1 includes the following steps:
[0041] S11, decoding the returned image sent back by the controlled terminal to obtain the original image of the host screen;
[0042] S12, comparing the difference between the three most recently received and decoded continuous frames of images to obtain the motion trajectory of the moving target in the returned image;
[0043] S13, combining the motion trajectory of the moving target with the preset mouse cursor features, and segmenting the original outline of the mouse cursor from the latest returned picture frame;
[0044] S14. Extract the image clip area related to the mouse cursor attribute in the current returned image frame, and record the original pixel point coordinates MS (X, Y) and YUV components ∑ Yuv (x, y) of the mouse cursor.
[0045] That is, when Hi3531DV200 receives the network video stream of the returned image from the remote host, it uses the built-in VDEC unit of Hi3531DV200 to decode and form a single frame image, and the corresponding YUV component value of each pixel point of the generated image.
[0046] Then, by comparing the difference between the three most recently received and decoded continuous image frames, the motion trajectory of the moving target in the returned image can be obtained; the motion trajectory of the moving target is combined with the preset mouse cursor features, and the NNIE engine is used to segment the current latest returned image frame to obtain the original outline of the mouse cursor; the image clip area related to the mouse cursor attributes is extracted in the current returned image frame, and the original pixel point coordinates MS (X, Y) and YUV components ∑Yuv (x, y) of the mouse cursor are recorded.
[0047] S2. The control terminal intercepts and analyzes the control command of the mouse, obtains the destination coordinates corresponding to the mouse cursor, and migrates the pixel points corresponding to the mouse cursor in the host screen from the original coordinates to the destination coordinates.
[0048] like Figure 6 As shown, step S2 includes the following steps:
[0049] S21, intercepting and parsing the mouse control command at the control end, and extracting the movement increment △M (X, Y) of the mouse cursor;
[0050] S22, adding the movement increment △M(X, Y) to the original pixel point coordinates MS(X, Y) of the mouse cursor to obtain the destination pixel point coordinates corresponding to the mouse cursor;
[0051] S23, fill the YUV value of the original pixel of the mouse cursor to the YUV value of the target pixel one by one.
[0052] That is, when Hi3531DV200 receives the mouse command data through UART, it extracts the mouse cursor movement increment △M(X, Y), and fills the YUV component ∑Yuv(x, y) one-to-one pixel by pixel according to the coordinates of the original pixel point MS(X, Y) of the mouse cursor plus the movement increment △M(X, Y), so as to realize the movement operation of the mouse cursor image fragment to the destination coordinates.
[0053] S3. Interpolate the pixel points of the original coordinates of the mouse cursor in the host screen, and display and output the processed host screen as a reference screen during manipulation.
[0054] In order to avoid the problem of two cursors appearing at the same time in the returned image, the original pixel points of the mouse cursor after the move need to be interpolated. Specifically, based on the original outline of the mouse cursor, the adjacent pixel points outside the outline are used to cover the pixel points in the original outline area of the mouse cursor. Some pixels in the interpolated area may be slightly blurred, but it will only affect the current frame and will return to normal display in the next frame, because in the next frame of the image, the mouse position has moved to the current position.
[0055] Finally, the redrawn return image is output through the HDMI interface by calling the Hi3531DV200 interface function Hi_VO_Sendframe(). This display image can be used as a reference image when the control end performs mouse control, which can not only improve the hand-eye coordination of the management personnel, but also ensure that the mouse cursor movement of the controlled host is also real-time, thereby improving the remote control experience.
[0056] The present invention provides a method for synchronizing a mouse and a returned image for remote control. The method decodes and performs image recognition processing on the returned image received from the controlled end at the control end to obtain the original coordinates of the mouse cursor in the returned image, and combines the mouse displacement command intercepted by the control end to modify the corresponding pixel points to redraw the returned image, thereby realizing synchronization between the mouse and the returned image. The returned image redrawing process described in the embodiment of the present invention is as follows: Figure 7 shown.
[0057] This method not only allows managers to improve the eye-hand coordination experience when performing remote control by referring to the redrawn return screen, but also does not affect the movement of the mouse cursor on the real-time screen of the controlled host and does not change the original working condition of the controlled host.
[0058] like Figure 8 As shown, an embodiment of the present invention further provides a synchronization system for a remotely controlled mouse and a returned image, which includes the following functional modules:
[0059] The original coordinate acquisition module 10 is used to decode the returned image sent back by the controlled terminal to obtain the original image of the host screen, and obtain the original coordinates of the mouse cursor from the original image of the host screen;
[0060] The destination coordinate migration module 20 is used to intercept and analyze the mouse control command at the control end, obtain the destination coordinates corresponding to the mouse cursor, and migrate the pixel point corresponding to the mouse cursor in the host screen from the original coordinates to the destination coordinates;
[0061] The pixel processing and output module 30 is used to perform interpolation processing on the pixel points of the original coordinates of the mouse cursor in the host screen, and display and output the processed host screen as a reference screen during operation.
[0062] The execution method of the synchronization system for a remote-controlled mouse and a returned image in this embodiment is substantially the same as the synchronization method for a remote-controlled mouse and a returned image described above, and thus will not be described in detail.
[0063] The server of this embodiment is a device that provides computing services, generally referring to a computer with high computing power that is provided to multiple consumers through a network. The server of this embodiment includes: a memory, a processor, and a system bus, wherein the memory includes executable programs stored thereon. It can be understood by those skilled in the art that the terminal device structure of this embodiment does not constitute a limitation on the terminal device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange components differently.
[0064] The memory can be used to store software programs and modules. The processor executes various functional applications and data processing of the terminal by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the terminal (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0065] The memory includes an executable program for a synchronization method of a remotely controlled mouse and a returned image, the executable program can be divided into one or more modules / units, the one or more modules / units are stored in the memory and executed by the processor to complete the information acquisition and implementation process, the one or more modules / units can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the server. For example, the computer program can be divided into an original coordinate acquisition module 10, a destination coordinate migration module 20, and a pixel processing output module 30.
[0066] The processor is the control center of the server, which uses various interfaces and lines to connect various parts of the entire terminal device, and executes various functions of the terminal and processes data by running or executing software programs and / or modules stored in the memory, and calling data stored in the memory, so as to monitor the terminal as a whole. Optionally, the processor may include one or more processing units; preferably, the processor may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor.
[0067] The system bus is used to connect the various functional components inside the computer. It can transmit data information, address information, and control information. Its types can be, for example, PCI bus, ISA bus, VESA bus, etc. The processor's instructions are transmitted to the memory through the bus, and the memory feeds back data to the processor. The system bus is responsible for the data and instruction exchange between the processor and the memory. Of course, the system bus can also be connected to other devices, such as network interfaces, display devices, etc.
[0068] The server should at least include a CPU, a chipset, a memory, a disk system, etc., and other components will not be described in detail here.
[0069] In an embodiment of the present invention, the executable program executed by the processor included in the terminal is specifically: a synchronization method for a remotely controlled mouse and a returned image, which comprises the following steps:
[0070] Decode the returned image sent back by the controlled end to obtain the original image of the host screen, and obtain the original coordinates of the mouse cursor from the original image of the host screen;
[0071] The control end intercepts and analyzes the control command of the mouse, obtains the destination coordinates of the corresponding mouse cursor, and migrates the pixel point corresponding to the mouse cursor in the host screen from the original coordinates to the destination coordinates;
[0072] The pixel points of the original coordinates of the mouse cursor in the host screen are interpolated, and the processed host screen is displayed and output as a reference screen during operation.
[0073] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0074] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for synchronizing a mouse and a returned image for remote control. It is characterized in that The steps include: The video decoder at the control end decodes the returned image sent by the controlled host through the video encoder to obtain the original image of the host screen; The video decoder compares the difference between the three most recently received and decoded continuous image frames to obtain the motion trajectory of the moving target in the returned image, and combines the motion trajectory of the moving target with the preset mouse cursor features. The deep learning convolutional neural network hardware unit built into the video decoder is used to segment the current most recently returned image frame to obtain the original outline of the mouse cursor. The deep learning convolutional neural network hardware unit includes an image recognition algorithm, an image segmentation algorithm, and an image positioning algorithm. Extract the image clip area related to the mouse cursor attribute in the current returned picture frame, and record the original pixel point coordinates MS (X, Y) and YUV components ∑ Yuv (x, y) of the mouse cursor; The video decoder intercepts the mouse control command sent by the keyboard and mouse encoder through the UART at the control end, and extracts the movement increment △M (X, Y) of the mouse cursor, wherein the mouse control command is the keyboard and mouse control instruction encoded by the keyboard and mouse encoder; Add the original pixel coordinates MS (X, Y) of the mouse cursor to the movement increment △ M (X, Y) to obtain the target pixel coordinates of the mouse cursor; The video decoder fills the YUV component ∑Yuv(x,y) of the original pixel point of the recorded mouse cursor into the YUV component ∑Yuv(x,y) of the target pixel point coordinates one by one; Based on the original outline of the mouse cursor, the pixel points within the original outline area of the mouse cursor are covered with adjacent pixel points on the periphery of the outline to obtain a redrawn return image, and the redrawn return image is output and displayed through the HDMI interface of the video decoder.
2. A synchronization system for remotely controlled mouse and returned images, It is characterized in that Includes the following functional modules: The original coordinate acquisition module is used for the video decoder of the control end to decode the returned picture sent back by the controlled end host through the video encoder to obtain the original image of the host screen; the video decoder compares the difference between the three consecutive frames of images that have been received and decoded the most recently, obtains the motion trajectory of the moving target in the returned picture, and combines the motion trajectory of the moving target with the preset mouse cursor features, and uses the deep learning convolutional neural network hardware unit built into the video decoder to segment the current latest returned picture frame to obtain the original outline of the mouse cursor; extracts the image clip area related to the mouse cursor attributes in the current returned picture frame, and records the original pixel point coordinates MS (X, Y) and YUV components ∑Yuv (x, y) of the mouse cursor; A pixel processing output module, used for the video decoder to perform interpolation processing on the pixel points of the original coordinates of the mouse cursor in the controlled host screen, and to display and output the processed host screen as a reference screen during control; The destination coordinate migration module is also used to intercept the mouse control command sent by the keyboard and mouse encoder through the UART at the control end through the video decoder, and extract the movement increment △M(X, Y) of the mouse cursor; add the original pixel point coordinates MS(X, Y) of the mouse cursor to the movement increment △M(X, Y) to obtain the destination pixel point coordinates corresponding to the mouse cursor; the video decoder fills the YUV component ∑Yuv(x, y) of the original pixel point of the mouse cursor recorded in the original coordinate acquisition module into the YUV component ∑Yuv(x, y) of the destination pixel point coordinate one by one pixel by pixel; The pixel processing output module is also used to cover the pixel points within the original outline area of the mouse cursor with the adjacent pixel points outside the outline based on the original outline of the mouse cursor, obtain a redrawn return image, and output and display the redrawn return image through the HDMI interface of the video decoder.
3. A server comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of the method for synchronizing a mouse and a returned image for remote control as claimed in claim 1 are implemented.
4. A computer-readable storage medium storing a computer program, It is characterized in that When the computer program is executed by the processor, the steps of the method for synchronizing a mouse and a returned image for remote control as claimed in claim 1 are implemented.
Citation Information
Patent Citations
Streaming media decoding method, system and mobile terminal
CN103281528A
Display of remotely controlled host computer
CN206133380U
Image and cursor image transmitting display system and method thereof
CN101097507A
Mouse cursor synchronization method for internet protocol K virtual machine (IPKVM) system
CN102591493A
Trigger control method and system of man-machine interaction operating instruction and laser emission device
CN103092432A
