A method for optimizing latency of extended laptop screens
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-16
- Publication Date
- 2026-04-03
AI Technical Summary
[0004]为克服上述问题,本发明的目的是提供一种笔记本扩展屏幕延迟优化方法解决由于hdmi采集器导致画面延迟,从而导致鼠标移动速度慢的问题
[0017]本发明的有益效果在于:本发明提供一种笔记本扩展屏幕延迟优化方法可以让鼠标延迟不受画面传输延迟的影响,提高工作效率。
Smart Images

Figure CN115794020B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computers, and in particular to a method for optimizing latency of extended screens on laptops. Background Technology
[0002] Currently, if you have two PCs and want to use one as an extended screen for the other, you typically use an HDMI capture device to capture, compress, and transmit the video signal to the other computer. Because of the large amount of data being transmitted, this results in significant latency, slow mouse movement, and reduced work efficiency.
[0003] Existing technologies generally reduce latency through two methods: 1. Improving hardware configuration, which is costly and requires high-end equipment, such as high-configuration laptops; 2. Reducing resolution, which results in blurry images. Summary of the Invention
[0004] To overcome the above problems, the purpose of this invention is to provide a method for optimizing the latency of a laptop extended screen to solve the problem of slow mouse movement caused by screen latency due to the HDMI sensor.
[0005] This invention is implemented using the following scheme:
[0006] A method for optimizing latency on extended screens of a laptop, the method comprising the following steps:
[0007] Step S1: The first laptop computer outputs an extended signal to the HDMI acquisition unit via HDMI;
[0008] Step S2: The HDMI capture device encodes and compresses the video signal, and then transmits the video stream to the second laptop via the USB port of the second laptop. The screen of the second laptop serves as an extended screen of the first laptop, and the resolution of the first laptop is the same as that of the second laptop.
[0009] Step S3: The first laptop locally obtains the current mouse pointer position A. If the current mouse pointer position A is within the screen area of the first laptop, the current mouse pointer position A is not sent to the second laptop. If the current mouse position is within the extended screen, the first laptop obtains the current mouse pointer position A at regular intervals through a collection process, and then the first laptop sends the mouse pointer position A to an execution process of the second laptop through the network.
[0010] Step S4: The execution process of the second laptop computer converts the received mouse pointer position A into the mouse pointer position B of the extended screen.
[0011] Step S5: The execution process of the second laptop modifies the mouse position of the extended screen and moves it to mouse pointer position B.
[0012] Furthermore, step S2 is further specified as follows: the HDMI acquisition device converts the video signal through encoding compression; the second laptop receives the video stream and displays it in full-screen or windowed mode.
[0013] Furthermore, the full-screen display or windowed display specifically means that if the second laptop is in full-screen display, the pixels are displayed one-to-one; if it is in windowed display, the pixels are displayed proportionally.
[0014] Furthermore, the first laptop locally obtains the current mouse position. If the current mouse position is within the screen area of the first laptop, the mouse position is not sent to the second laptop. If the current mouse position is within the extended screen, the acquisition process of the first laptop obtains the current mouse pointer position A every 1 millisecond. The acquisition process obtains the current mouse position information by calling the Windows system API. Then, the first laptop sends the mouse pointer position A to the execution process of the second laptop via the UDP protocol. The execution process is the process of the second laptop listening on the UDP port.
[0015] Furthermore, the process of converting the mouse pointer position A to the mouse pointer position B of the extended screen in step S4 is specifically as follows: during the conversion process, when the mouse moves to the position of the extended screen, the current mouse position is reduced by the width of the first screen.
[0016] Furthermore, step S5 is further specified as follows: the execution process of the second laptop calls the Windows API to modify the mouse position and moves the mouse position on the extended screen to the mouse pointer position B.
[0017] The beneficial effects of this invention are as follows: This invention provides a method for optimizing the latency of extended screens in laptops, which allows mouse latency to be unaffected by screen transmission latency, thereby improving work efficiency. Attached Figure Description
[0018] Figure 1 This is a flowchart of the present invention. Detailed Implementation
[0019] The invention will now be further described with reference to the accompanying drawings.
[0020] like Figure 1 As shown, a method for optimizing latency on a laptop extended screen includes the following steps:
[0021] Step S1: The first laptop computer outputs an extended signal to the HDMI acquisition unit via HDMI;
[0022] Step S2: The HDMI capture device encodes and compresses the video signal, and then transmits the video stream to the second laptop via the USB port of the second laptop. The screen of the second laptop serves as an extended screen of the first laptop, and the resolution of the first laptop is the same as that of the second laptop.
[0023] Step S3: The first laptop locally obtains the current mouse pointer position A. If the current mouse pointer position A is within the screen area of the first laptop, the current mouse pointer position A is not sent to the second laptop. If the current mouse position is within the extended screen, the first laptop obtains the current mouse pointer position A at regular intervals through a collection process, and then the first laptop sends the mouse pointer position A to an execution process of the second laptop through the network.
[0024] Step S4: The execution process of the second laptop computer converts the received mouse pointer position A into the mouse pointer position B of the extended screen.
[0025] Step S5: The execution process of the second laptop modifies the mouse position of the extended screen and moves it to mouse pointer position B.
[0026] The present invention will be further described below with reference to a specific embodiment:
[0027] Step S1: The first laptop computer outputs the extended screen signal to the HDMI receiver via HDMI.
[0028] Step S2: The HDMI acquisition device encodes and compresses the video signal; the second laptop receives the video stream and displays it in full-screen or windowed mode. If it is displayed in full-screen mode, the pixels are displayed one-to-one; if it is displayed in windowed mode, it needs to be displayed proportionally.
[0029] The HDMI capture device obtains and compresses the 1920*1080 60Hz signal output, transmitting it via the USB port of the second laptop. The compression algorithm can be H.265 or similar. The video stream is sent to the second laptop, which receives and displays it in full-screen or windowed mode. In full-screen mode, pixels are displayed one-to-one; in windowed mode, the display is scaled proportionally. For example, if the second laptop has a resolution of 1920*1080, scaling it to a 960*540 window yields approximate pixel values. The scaled coordinates (x, y) are calculated as (960 / 1920 * original coordinate X, 540 / 960 * original coordinate Y).
[0030] Step S3: The first laptop locally obtains the current mouse pointer position A. If the current mouse pointer position A is within the screen area of the first laptop, then the mouse pointer position A is not sent to the second laptop. If the current mouse pointer position A is within the extended screen, then the acquisition process of the first laptop obtains the current mouse pointer position A after a certain period of time. The acquisition process obtains the current mouse position information by calling the Windows system API. Then, the first laptop sends the mouse pointer position A to the execution process of the second laptop via the UDP protocol. The execution process is the UDP port process that the second laptop is listening on.
[0031] The first laptop locally obtains the current mouse position. For example, if the mouse position is within the 1920x1080 area, i.e., (0,0) to (1919,1079), then it does not send the mouse position to the second laptop. If the mouse moves into the extended screen, i.e., between (1920,0) and (3839,1079), then the first laptop calls the Windows system API every 1 millisecond to obtain the current mouse position. For example, if the current mouse position is (3800,1000), the first laptop sends the mouse position (3800,1000) to the UDP port 192.168.1.100:5000 that the second laptop is listening on.
[0032] Step S4: The execution process of the second laptop computer converts the received mouse pointer position A into the mouse pointer position B of the extended screen.
[0033] The second laptop's monitoring process receives the mouse pointer position A through 192.168.1.100:5000. During the conversion process, when the mouse moves to the position of the extended screen, the mouse position needs to be reduced by the width of the first laptop's screen; that is, the conversion is (3800-1920,1000)=(1880,1000).
[0034] Step S5: The execution process of the second laptop calls the Windows API to modify the mouse position and moves the mouse position on the extended screen to the mouse pointer position B.
[0035] The second laptop moves the mouse position on the extended screen to (1880, 1000) by calling the Windows API to modify the mouse position.
[0036] In summary, this invention provides a method for optimizing latency on extended laptop screens, which allows mouse latency to be unaffected by screen transmission delay, thereby improving work efficiency.
[0037] The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made within the scope of the claims of the present invention should be included in the scope of the present invention.
Claims
1. A method for optimizing latency on extended laptop screens, characterized in that, The method includes the following steps: Step S1: The first laptop computer outputs an extended signal to the HDMI acquisition unit via HDMI; Step S2: The HDMI capture device encodes and compresses the video signal, and then transmits the video stream to the second laptop via the USB port of the second laptop. The screen of the second laptop serves as an extended screen of the first laptop, and the resolution of the first laptop is the same as that of the second laptop. Step S3: The first laptop locally obtains the current mouse pointer position A. If the current mouse pointer position A is within the screen area of the first laptop, the current mouse pointer position A is not sent to the second laptop. If the current mouse position is within the extended screen, the first laptop obtains the current mouse pointer position A at regular intervals through a collection process, and then the first laptop sends the mouse pointer position A to an execution process of the second laptop through the network. Step S4: The execution process of the second laptop computer converts the received mouse pointer position A into the mouse pointer position B of the extended screen. Step S5: The execution process of the second laptop modifies the mouse position of the extended screen to the mouse pointer position B; The first laptop locally obtains the current mouse position. If the current mouse position is within the screen area of the first laptop, the mouse position is not sent to the second laptop. If the current mouse position is within the extended screen, the acquisition process of the first laptop obtains the current mouse pointer position A every 1 millisecond. The acquisition process obtains the current mouse position information by calling the Windows system API. Then, the first laptop sends the mouse pointer position A to the execution process of the second laptop via the UDP protocol. The execution process is the process of the second laptop listening on the UDP port.
2. The method for optimizing latency of a laptop extended screen according to claim 1, characterized in that, Step S2 is further specified as follows: the HDMI acquisition device converts the video signal through encoding and compression; the second laptop receives the video stream and displays it in full-screen or windowed mode.
3. The method for optimizing latency of a laptop extended screen according to claim 2, characterized in that, The full-screen or windowed display specifically means that if the second laptop is in full-screen mode, the pixels are displayed one-to-one; if it is in windowed mode, the pixels are displayed proportionally.
4. The method for optimizing latency of a laptop extended screen according to claim 1, characterized in that, The process of converting the mouse pointer position A to the mouse pointer position B of the extended screen in step S4 is as follows: during the conversion process, when the mouse moves to the position of the extended screen, the mouse position should be reduced by the width of the first laptop screen.
5. The method for optimizing latency of a laptop extended screen according to claim 1, characterized in that, Step S5 is further specified as follows: The execution process of the second laptop calls the Windows API to modify the mouse position and moves the mouse position on the extended screen to the mouse pointer position B.
Citation Information
Patent Citations
System and method for regenerating dynamic mouse pointer
CN101299172A