Method for realizing privacy screen
By obtaining UIAccess permissions and setting a borderless full-screen window in the remote desktop scenario, the problem of user privacy leakage during remote control is solved, efficient privacy screen protection is achieved, and the risk of data leakage is significantly reduced.
Patent Information
- Application Number
- CN202410695906.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2024-09-20
AI Technical Summary
In a remote desktop scenario, when the control terminal operates, the display screen of the controlled terminal displays the operation content in real time, resulting in the leakage of user privacy. The existing technology has shortcomings in user privacy protection.
Obtain UIAccess permissions by capturing the desktop screen on the controlled computer, create a borderless full-screen window and set the TOP_MOST attribute, exclude the window from the captured screen, use the DwmSetWindowAttribute function to achieve taskbar coverage, and adjust the window attributes through a timer after turning on the privacy screen. Overlay the on-screen keyboard.
The level of user privacy protection has been significantly improved, the risk of privacy leakage has been reduced to less than 0.1%, and data security has been enhanced, with the incidence of data leakage and tampering reduced by more than 80%.
Smart Images

Figure CN118673526A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of remote control technology, and in particular to a method for realizing a privacy screen. Background Art
[0002] Currently, in remote desktop scenarios, when the control end operates the remote computer, the display screen of the controlled end displays the operation content of the control end in real time, which may lead to the leakage of user privacy. Traditional remote desktop systems are insufficient in protecting user privacy.
[0003] Therefore, the prior art has defects and needs to be improved. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a method for implementing a privacy screen, thereby improving user privacy and data security levels and improving remote desktop operation experience.
[0005] The technical solution of the present invention is as follows: a method for realizing a privacy screen is provided, comprising the following steps.
[0006] S1: The program that captures the desktop screen in the controlled computer obtains UIAccess permission.
[0007] S2: Create a borderless full-screen window to block the desktop image, and this window needs to set the TOP_MOST attribute and the three parameters SWP_NOMOVE, SWP_NOSIZE, and SWP_NOACTIVATE, SetWindowPos(hwnd,TOP_MOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE), so that it is always on top and does not respond to mouse and keyboard messages.
[0008] S3: Set the window created in S2 to be displayed only on the monitor, SetWindowDisplayAffinity(hwnd,WDA_EXCLUDEFROMCAPTURE). After this processing, the screen captured by the program that captures the desktop will exclude this window. After excluding this window, the content the user sees on the control end is the original content, and the content displayed on the monitor is the content of the privacy screen window.
[0009] Furthermore, in step S1, the current session and token are copied through the service process, and the token is set to have a TokenUIAccess attribute, so that the program that captures the desktop screen obtains the UIAccess permission.
[0010] Furthermore, the DwmSetWindowAttribute function is set to: DwmSetWindowAttribute(hwnd,DWMWA_CLOAK,&bCloak,sizeof(bCloak)) to achieve that when the mouse is placed on other window previews on the taskbar, the privacy screen window covers the screen.
[0011] Furthermore, after the privacy screen is turned on, the screen keyboard is turned on again, and the privacy screen still cannot cover the screen keyboard, because the screen keyboard is started later, and the TOP_MOST attribute is set later, so it will cover the privacy screen. By adding a timer to the privacy screen, the TOP_MOST attribute is set again for the privacy screen window every time period, so that after the privacy screen is turned on, the screen keyboard can be opened again, and the privacy screen can cover the screen keyboard. The time period is 100ms-2s. Preferably, the time period is 300ms-800ms.
[0012] By adopting the above scheme, the present invention provides a method for implementing a privacy screen, protecting the privacy of the user of the controlled end, and ensuring that the control end cannot directly see the display screen content of the controlled end during remote operation. It can improve the user privacy and data security level and improve the remote desktop operation experience. By adopting the present invention, it is possible to improve the user privacy protection level and enhance data security during the remote control process. The present invention has the following technical effects:
[0013] 1. Improve the level of user privacy protection: Compared with traditional methods, the present invention significantly improves the level of user privacy protection. By real-time processing and encrypting the displayed content, the privacy screen window effectively prevents the control end user from directly observing the screen content of the controlled end during the remote desktop operation. According to experimental data, after adopting this solution, the risk of user privacy leakage is greatly reduced to less than 0.1%.
[0014] 2. Enhanced data security: This solution effectively protects the security of user sensitive data by encrypting and blurring the displayed content. Compared with traditional remote desktop systems, this solution introduces an additional security layer in the data transmission and display process, greatly reducing the risk of data being stolen or tampered with. Experimental results show that after adopting this solution, the incidence of data leakage and tampering has dropped by more than 80%. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0016] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0017] See also Figure 1The present invention provides a method for implementing a privacy screen, comprising the following steps.
[0018] S1: The program that captures the desktop screen in the controlled computer obtains UIAccess permission.
[0019] S2: Create a borderless full-screen window to block the desktop image, and this window needs to set the TOP_MOST attribute and the three parameters SWP_NOMOVE, SWP_NOSIZE, and SWP_NOACTIVATE, SetWindowPos(hwnd,TOP_MOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE), so that it is always on top and does not respond to mouse and keyboard messages.
[0020] S3: Set the window created in S2 to be displayed only on the monitor, SetWindowDisplayAffinity(hwnd,WDA_EXCLUDEFROMCAPTURE). After this processing, the screen captured by the program that captures the desktop will exclude this window. After excluding this window, the content the user sees on the control end is the original content, and the content displayed on the monitor is the content of the privacy screen window.
[0021] In this embodiment, in step S1, the current session and token are copied through the service process, and the token is set with the TokenUIAccess attribute, so that the program that captures the desktop screen obtains the UIAccess permission.
[0022] In this embodiment, the DwmSetWindowAttribute function is set to: DwmSetWindowAttribute(hwnd, DWMWA_CLOAK, &bCloak, sizeof(bCloak)), so that when the mouse is placed on other windows previewing on the taskbar, the privacy screen window covers the screen.
[0023] In this embodiment, after the privacy screen is turned on, the screen keyboard is opened again, and the privacy screen still cannot cover the screen keyboard, because the screen keyboard is started later, and the TOP_MOST attribute is set later, so it will cover the privacy screen. By adding a timer to the privacy screen, the TOP_MOST attribute is set again for the privacy screen window every time period, so that after the privacy screen is turned on, the screen keyboard can be opened again, and the privacy screen can cover the screen keyboard. The time period is 100ms-2s. Preferably, the time period is 300ms-800ms. In this embodiment, the time period is 500ms.
[0024] In summary, the present invention provides a method for implementing a privacy screen, protecting the privacy of the user of the controlled end, and ensuring that the control end cannot directly see the display screen content of the controlled end during remote operation. This improves the user privacy and data security level and improves the remote desktop operation experience. By adopting the present invention, the user privacy protection level can be improved and data security can be enhanced during the remote control process.
[0025] The present invention has the following technical effects:
[0026] 1. Improve the level of user privacy protection: Compared with traditional methods, the present invention significantly improves the level of user privacy protection. By real-time processing and encrypting the displayed content, the privacy screen window effectively prevents the control end user from directly observing the screen content of the controlled end during the remote desktop operation. According to experimental data, after adopting this solution, the risk of user privacy leakage is greatly reduced to less than 0.1%.
[0027] 2. Enhanced data security: This solution effectively protects the security of user sensitive data by encrypting and blurring the displayed content. Compared with traditional remote desktop systems, this solution introduces an additional security layer in the data transmission and display process, greatly reducing the risk of data being stolen or tampered with. Experimental results show that after adopting this solution, the incidence of data leakage and tampering has dropped by more than 80%.
[0028] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for implementing a privacy screen, characterized in that: The following steps are involved: S1: The program that captures the desktop screen in the controlled computer obtains UIAccess permissions; S2: Create a borderless full-screen window to block the desktop screen, and this window needs to set the TOP_MOST attribute and the three parameters SWP_NOMOVE, SWP_NOSIZE, and SWP_NOACTIVATE, SetWindowPos(hwnd,TOP_MOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE), so that it is always on top and does not respond to mouse and keyboard messages; S3: Set the window created in S2 to be displayed only on the monitor, SetWindowDisplayAffinity(hwnd,WDA_EXCLUDEFROMCAPTURE). After this processing, the screen captured by the program that captures the desktop will exclude this window. After excluding this window, the content the user sees on the control end is the original content, and the content displayed on the monitor is the content of the privacy screen window.
2. A method for implementing a privacy screen according to claim 1, characterized in that: In step S1, the current session and token are copied through the service process, and the token is set to have the TokenUIAccess attribute, so that the program that captures the desktop screen obtains the UIAccess permission.
3. A method for implementing a privacy screen according to claim 1, characterized in that: Set the DwmSetWindowAttribute function to DwmSetWindowAttribute(hwnd,DWMWA_CLOAK,&bCloak,sizeof(bCloak)) to enable the privacy screen window to cover the screen when the mouse is placed on other window previews on the taskbar.
4. A method for implementing a privacy screen according to claim 1, characterized in that: The privacy screen has a timer, which sets the TOP_MOST attribute of the privacy screen window once every period of time. This is used to open the screen keyboard again after turning on the privacy screen, and the privacy screen can cover the screen keyboard.
5. A method for implementing a privacy screen according to claim 4, characterized in that: The time period is 100ms-2s.
6. A method for implementing a privacy screen according to claim 4, characterized in that: The time period is 300ms-800ms.
