Application window watermark processing method, device and electronic device

By monitoring new windows created by applications and generating watermark binding relationships, the problem of non-top windows being unable to be masked in the existing technology is solved, watermark masking of all windows is achieved, and data security is improved.

CN115904589BActive Publication Date: 2025-09-05BEIJING ANTIY NETWORK SAFETY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211477935.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-23
Publication Date
2025-09-05
Estimated Expiration
2042-11-23

AI Technical Summary

Technical Problem

Existing technologies cannot effectively perform watermark masking on non-top windows, resulting in the risk of data leakage.

Method used

By monitoring new windows created by applications, generating watermarks and establishing binding relationships, and monitoring window change events, the watermark's follow-up change processing is achieved.

Benefits of technology

Watermark masking is implemented for non-top windows, ensuring that all windows are covered with watermarks, thereby improving data security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115904589B_ABST
    Figure CN115904589B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, and electronic device for processing application window watermarks. The method comprises: whenever a target application is detected creating a new window requiring watermark masking, a watermark for the window is generated and a binding relationship between the window and the watermark is established; window change events are monitored for the windows with the established binding relationship, and when a target window with a window change event is detected, the target watermark bound to the target window is modified accordingly based on the window change event. This solution can achieve watermark masking for non-top windows.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a method, device and electronic device for processing watermarks in an application window. Background Art

[0002] Application window watermarking involves masking an application window with a watermark. This allows for effective traceability of window data through screenshots and photos, enabling proactive control and accountability for security incidents. Currently, the method for watermarking application windows involves using a hook function to monitor window pinning events and then watermarking the pinned window. However, when an application has multiple windows open, watermarking only the pinned window fails to effectively protect data in non-pinned windows. Summary of the Invention

[0003] The embodiment of the present invention provides an application window watermark processing method, device and electronic device, which can realize watermark masking of non-top windows.

[0004] In a first aspect, an embodiment of the present invention provides an application window watermark processing method, comprising:

[0005] Whenever a target application is monitored to create a new window that needs to be watermarked, a watermark for the window is generated and a binding relationship between the window and the watermark is established;

[0006] Window change events are monitored for windows with binding relationships. When a target window with a window change event is monitored, a target watermark with a binding relationship with the target window is changed accordingly according to the window change event.

[0007] In a possible implementation, the method further includes:

[0008] determining at least one process started by the target application;

[0009] Monitor whether each process started by the target application creates a new window.

[0010] In a possible implementation, the method further includes:

[0011] When monitoring the process started by the target application to create a new window, determine whether the new window meets the window characteristics pre-set for the target application. If so, determine the new window as a new window that needs to be watermarked.

[0012] In a possible implementation, the window change event includes: a window top event, a window adjustment event, and a window exit event.

[0013] In a possible implementation, monitoring window change events for windows with established binding relationships includes:

[0014] Monitor whether the input and output devices execute the window top event for the window with which the binding relationship is established.

[0015] In a possible implementation, monitoring window change events for windows with established binding relationships includes:

[0016] Register desktop events with the X service, and monitor the window adjustment event and the window exit event for the window with which the binding relationship is established based on the desktop events.

[0017] In a possible implementation, the desktop event includes at least one of: ReparentNotify, MapNotify, UnmapNotify, and ConfigureNotify;

[0018] The ReparentNotify is used to notify the parent window change event; the MapNotify is used to notify the new window creation event; the UnmapNotify is used to notify the window exit event; and the ConfigureNotify is used to notify the window adjustment event.

[0019] In a possible implementation, performing corresponding change processing on a target watermark that has a binding relationship with the target window according to the window change event includes:

[0020] When the window change event is the window top event, the target watermark that is bound to the target window is refreshed so that the target watermark follows the target window and is top-fixed;

[0021] When the window change event is the window adjustment event, the target watermark that is bound to the target window is refreshed so that the target watermark is adjusted according to the adjustment content of the target window; the adjustment content includes: window size and / or window position;

[0022] When the window change event is the window exit event, the target watermark that is bound to the target window is closed.

[0023] In a second aspect, an embodiment of the present invention further provides an application window watermark processing device, comprising:

[0024] The watermark generation unit is used to generate a watermark for a new window that needs to be watermarked and establish a binding relationship between the window and the watermark whenever a target application is monitored to create a new window that needs to be watermarked;

[0025] The watermark processing unit is used to monitor window change events of windows with which binding relationships are established. When a target window with a window change event is monitored, the target watermark with which the target window has a binding relationship is changed accordingly according to the window change event.

[0026] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in any embodiment of this specification is implemented.

[0027] The embodiments of the present invention provide a method, device, and electronic device for processing application window watermarks. By monitoring the creation of new windows by applications, whenever a target application is detected to have created a new window that requires watermark masking, a watermark is generated for the window and a binding relationship between the window and the watermark is established. That is, regardless of whether the window is a top-mounted window, the watermark is bound to the window. Furthermore, by monitoring window change events, when a target window is detected to have a window change event, the target watermark bound to the target window is modified accordingly based on the window change event, thereby enabling the watermark to follow the window. Thus, in this solution, each window has a corresponding watermark bound to it. Even if other windows are placed on top and the current window becomes a non-top window, the watermark bound to the non-top window still follows the window. Therefore, this solution can achieve watermark masking for non-top windows. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0029] Figure 1 This is a flow chart of a method for processing watermarks in an application window provided by one embodiment of the present invention;

[0030] Figure 2 This is a hardware architecture diagram of an electronic device provided by one embodiment of the present invention;

[0031] Figure 3 This is a structural diagram of an application window watermark processing device provided by one embodiment of the present invention;

[0032] Figure 4 This is a structural diagram of another application window watermark processing device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0033] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0034] As mentioned above, existing technologies all use window events as their starting point, monitoring window top events using a hook function. Upon detecting a window top event, they obtain window information and then mask the watermark window over the top window based on that information. However, when an application opens multiple windows, some content from non-top windows may be displayed on the screen. Since non-top windows do not have a watermark mask, this content may be leaked.

[0035] Taking into account that windows opened by certain applications may have data security issues, such as wps; therefore, the inventive concept of the present invention is: starting from the application, for windows created by the application that need to be watermarked, a watermark is generated for it, and the window is bound to the watermark, regardless of whether it is a top window or not.

[0036] The specific implementation of the above concept is described below.

[0037] Please refer to Figure 1 , an embodiment of the present invention provides an application window watermark processing method, the method comprising:

[0038] Step 100: Whenever a target application is monitored to create a new window that needs to be watermarked, a watermark for the window is generated, and a binding relationship between the window and the watermark is established;

[0039] Step 102: Monitor window change events for windows with established binding relationships. When a target window with a window change event is detected, perform corresponding changes on the target watermark with established binding relationships with the target window according to the window change event.

[0040] In an embodiment of the present invention, by monitoring the creation of new windows by an application, whenever a target application is detected to have created a new window that requires watermark masking, a watermark is generated for the window and a binding relationship between the window and the watermark is established. In other words, regardless of whether the window is a top-mounted window, the watermark is bound to the window. In addition, by monitoring window change events, when a target window is detected to have a window change event, the target watermark bound to the target window is modified accordingly based on the window change event, thereby enabling the watermark to follow the window. It can be seen that in this solution, each window has a corresponding watermark bound to it. Even if other windows are placed on top and the current window changes to a non-top window, the watermark bound to the non-top window still follows the window. Therefore, this solution can achieve watermark masking of non-top windows.

[0041] Described below Figure 1 How to perform the steps shown.

[0042] First, with respect to step 100, whenever it is monitored that the target application creates a new window that needs to be watermarked, a watermark for the window is generated, and a binding relationship between the window and the watermark is established.

[0043] The execution subject of the embodiment of the present invention may be a client, and watermark masking is performed on a window started by an application on the client.

[0044] Watermark masking can be applied to all applications on the client, or to specific applications on demand. Specifically, the applications to be watermarked can be pre-determined, and then corresponding watermark policies can be configured for these applications. These watermark policies can include, but are not limited to, watermark text, watermark image, watermark density, watermark angle, and transparency.

[0045] Starting from the application, to ensure that watermarks can be generated for new windows created by the application that need to be watermarked, it is necessary to monitor the creation of new windows by the application. Specifically, at least one process launched by the target application can be determined; then, each process launched by the target application can be monitored to see whether it creates a new window.

[0046] Among them, after an application directly starts a process, the process can also start other processes, that is, the process directly started by the application is the parent process, and the other processes started by the parent process are child processes. The child process can also create a new window that needs to be watermarked. Therefore, the child process needs to be monitored as a monitored object. In an embodiment of the present invention, a parent-child relationship can be established between processes, and the process directly started by the application and other processes with a parent-child relationship with the directly started process are determined as processes started by the application. In this way, it is possible to fully monitor whether all processes started by the application create new windows, thereby improving the monitoring coverage, thereby improving the watermark coverage rate, and further realizing more efficient and thorough protection of the entire window.

[0047] In order to monitor process events, in the embodiment of the present invention, a connector mechanism may be used to monitor whether each process creates a new window, so as to ensure the accuracy and timeliness of the monitoring results.

[0048] In an embodiment of the present invention, when a process started by a target application is monitored to create a new window, the new window can be directly determined as a new window that needs to be watermarked, or it can be further determined as required whether the new window is a new window that needs to be watermarked.

[0049] When further determining whether the new window is a new window that needs to be watermarked as required, specifically, it can include: after monitoring that the process started by the target application creates a new window, determining whether the new window meets the window characteristics pre-set for the target application; if so, determining the new window as a new window that needs to be watermarked.

[0050] Among them, the window characteristic that the new window that needs to be watermarked meets is that the window is used to edit data content. For example, the application is wps. When the new window created is a window for a new page, then the window is used to edit data content, which meets the window characteristic that the new window needs to be watermarked meets; when the application continues to create a subwindow called "font" window in the created new page window, the "font" window is used to set the font format of the data content in the new page. Therefore, the "font" window does not meet the window characteristic that the new window needs to be watermarked meets.

[0051] It should be noted that the window features set for the target application can be set based on demand, and there is no need to perform watermark masking on all windows to prevent confusion in the watermark masking.

[0052] In this embodiment of the present invention, whenever a target application is monitored to create a new window requiring watermark masking, a watermark is generated for that window, and a binding relationship between the window and the watermark is established. That is, if the target application successively creates windows 1, 2, and 3 requiring watermark masking, watermark 1 is generated for window 1, watermark 2 is generated for window 2, and watermark 3 is generated for window 3. The established binding relationships are: window 1 - watermark 1, window 2 - watermark 2, and window 3 - watermark 3. It can be understood that if windows 1, 2, and 3 are three windows created successively, when window 2 is created, window 2 is a top window and window 1 is a non-top window. When window 3 is created, window 3 is a top window, and both window 1 and window 2 are non-top windows. Since non-top windows have watermarks bound to them, they also have watermarks. Even if some content in windows 1 or 2 is displayed on the screen, that portion of content still has the corresponding watermarks for window protection.

[0053] Furthermore, when generating a window watermark, based on the Qt irregular window mechanism, the title bar of the window can be removed, the window transparent color and window background color can be set, and the window size can be obtained through the parent window ID so that the watermark mask completely covers the specified window. The X function XShapeCombineRectangles can be used to ignore input device (mouse, keyboard) events, solve the interface stacking effect of the input device on the watermark mask, and enable the watermark mask to be attached to the window.

[0054] Then, for step 102, the window change event of the window with the established binding relationship is monitored. When it is determined that a window change event occurs in the target window, the target watermark with the established binding relationship with the target window is changed accordingly according to the window change event.

[0055] Since all windows with established binding relationships have corresponding watermarks, these windows with established binding relationships are considered focused windows. When a focused window changes, the corresponding watermark also needs to change so that the watermark follows the window. This ensures that non-top windows can also be masked by the watermark. Therefore, it is necessary to monitor their window change events. In this embodiment of the present invention, window change events can include: window top events, window adjustment events, and window exit events. These window change events all affect watermark changes. Therefore, by monitoring these window change events, watermarks that have established binding relationships with windows can be accurately processed.

[0056] Regarding the monitoring of window change events, in one embodiment of the present invention, desktop events may be registered with the X service, and window change events of windows with established binding relationships may be monitored based on the desktop events.

[0057] The X service refers to the X Window server, which is responsible for displaying the graphical interface, processing keyboard and mouse events and passing them to the corresponding applications, managing the clipboard, managing the display, etc. By registering desktop events with the X service, the X service can monitor the registered desktop events and promptly notify the watermark processing application after the X service monitors the registered desktop events.

[0058] In one embodiment of the present invention, in order to implement application window watermark processing, the desktop event registered with the X service may include at least one of: ReparentNotify, MapNotify, UnmapNotify, and ConfigureNotify.

[0059] ReparentNotify is used to notify the watermark processing application of parent window change events. This notification is sent to the watermark processing application when the X service detects a change in the parent window of a window. For example, if the parent window of child window B changes from parent window A to parent window C, this notification is sent. At this time, it is necessary to determine whether parent window C is the window to be watermarked. If so, the parent window C is watermarked. Otherwise, the parent window C is not watermarked.

[0060] MapNotify is used to notify new window creation events. Similar to the Connector mechanism, when the X server monitors the creation of a new window, it sends a notification to the watermark processing application. The watermark processing application determines whether the newly created window is the window that needs to be watermarked. If so, it watermarks the new window; otherwise, it does not watermark the new window.

[0061] UnmapNotify is used to notify the window exit event; when the window exits from the X service, this notification is sent to the watermark processing application, and the window disappears from the desktop view.

[0062] ConfigureNotify is used to notify the user of window adjustment events. When the X service detects a window adjustment event, it sends this notification to the watermark processing application. This adjustment may include adjusting the window size or position, etc.

[0063] Therefore, window change events can be monitored based on these desktop events to obtain window change events of the focused window. Specifically, when a window change event notification sent by a desktop event is received, it is first determined whether the window corresponding to the notification is a window with which a binding relationship has been established. If so, it is determined that a window change event has occurred in the window with which the binding relationship has been established; otherwise, no processing is performed.

[0064] In one embodiment of the present invention, when a window change event is a window-to-top event, the window-to-top event can also be executed by monitoring input / output devices to see if they are executed for a window with which a binding relationship has been established. The monitoring node for the input / output device is located earlier than the monitoring notification node for X-service-based desktop events after the window change, thereby improving the response speed of watermark processing. Therefore, when monitoring whether the window-to-top event is executed for a window with which a binding relationship has been established by monitoring input / output devices, desktop events can be used to monitor window adjustment events and window exit events.

[0065] Furthermore, when it is determined that a window change event occurs in the target window, a corresponding change process is performed on the target watermark that has a binding relationship with the target window according to the window change event.

[0066] Specifically:

[0067] When the window change event is the window top event, the target watermark that is bound to the target window is refreshed so that the target watermark follows the target window and is top-fixed;

[0068] When the window change event is the window adjustment event, the target watermark that is bound to the target window is refreshed so that the target watermark is adjusted according to the adjustment content of the target window; the adjustment content includes: window size and / or window position;

[0069] When the window change event is the window exit event, the target watermark that is bound to the target window is closed.

[0070] It can be understood that the window in which the window adjustment event occurs is a top window. When the target window is top, and a window adjustment event occurs in the target window, the window information of the top window can be obtained based on the DefaultRootWindow function. Based on the window information, the target watermark bound to it can be refreshed so that it is top along with the target window, achieving the effect of integrating the window and the watermark.

[0071] When a window exit event occurs, the target window exit notification is obtained based on the UnmapNotify event registered by the X service, and the target window's watermark is also closed. The binding relationship between the target window and the target watermark is further deleted, so that the target window is no longer monitored as a focused window.

[0072] like Figure 2 、 Figure 3 As shown, the embodiment of the present invention provides an application window watermark processing device. The device embodiment can be implemented by software, or by hardware or a combination of software and hardware. From the hardware level, Figure 2 As shown in FIG. 1 , a hardware architecture diagram of an electronic device where an application window watermark processing device provided by an embodiment of the present invention is located is shown. Figure 2 In addition to the processor, memory, network interface, and non-volatile memory shown, the electronic device in the embodiment may also include other hardware, such as a forwarding chip responsible for processing messages, etc. Taking software implementation as an example, Figure 3 As shown, as a logical device, the CPU of the electronic device reads the corresponding computer program in the non-volatile memory into the internal memory and runs it. This embodiment provides an application window watermark processing device, including:

[0073] The watermark generation unit 301 is used to generate a watermark for a new window that needs to be watermarked whenever a target application is monitored to create the new window, and to establish a binding relationship between the window and the watermark;

[0074] The watermark processing unit 302 is used to monitor window change events of windows with established binding relationships. When a target window with a window change event is monitored, the target watermark with a binding relationship established with the target window is changed accordingly according to the window change event.

[0075] In one embodiment of the present invention, please refer to Figure 4 The application window watermark processing device may further include:

[0076] The process monitoring unit 303 is configured to determine at least one process started by the target application and monitor whether each process started by the target application creates a new window.

[0077] In one embodiment of the present invention, the process monitoring unit 303 is also used to determine whether the new window meets the window characteristics pre-set for the target application after monitoring the process started by the target application to create a new window. If so, the new window is determined to be a new window that needs to be watermarked.

[0078] In one embodiment of the present invention, the window change event includes: a window top event, a window adjustment event, and a window exit event.

[0079] In one embodiment of the present invention, when monitoring window change events for windows with established binding relationships, the watermark processing unit 302 is specifically configured to monitor whether an input / output device executes the window top event for the window with established binding relationships.

[0080] In one embodiment of the present invention, when monitoring window change events for windows with established binding relationships, the watermark processing unit 302 is specifically configured to: register desktop events with the X service, and monitor the window adjustment events and the window exit events for the windows with established binding relationships based on the desktop events.

[0081] In one embodiment of the present invention, the desktop event includes at least one of: ReparentNotify, MapNotify, UnmapNotify, and ConfigureNotify;

[0082] The ReparentNotify is used to notify the parent window change event; the MapNotify is used to notify the new window creation event; the UnmapNotify is used to notify the window exit event; and the ConfigureNotify is used to notify the window adjustment event.

[0083] In one embodiment of the present invention, the watermark processing unit 302 performs corresponding change processing on the target watermark that is bound to the target window according to the window change event that occurs, specifically for: when the window change event that occurs is the window top event, the target watermark that is bound to the target window is refreshed so that the target watermark is topped along with the target window; when the window change event that occurs is the window adjustment event, the target watermark that is bound to the target window is refreshed so that the target watermark is adjusted along with the adjustment content of the target window; the adjustment content includes: window size and / or window position; when the window change event that occurs is the window exit event, the target watermark that is bound to the target window is closed.

[0084] It should be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on an application window watermark processing device. In other embodiments of the present invention, an application window watermark processing device may include more or fewer components than shown in the figure, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0085] The information interaction, execution process, etc. between the modules in the above-mentioned device are based on the same concept as the embodiment of the method of the present invention. For specific contents, please refer to the description in the embodiment of the method of the present invention and will not be repeated here.

[0086] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, an application window watermark processing method in any embodiment of the present invention is implemented.

[0087] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the processor executes an application window watermark processing method according to any embodiment of the present invention.

[0088] Specifically, a system or device equipped with a storage medium can be provided, on which software program codes that implement the functions of any of the above-mentioned embodiments are stored, and a computer (or CPU or MPU) of the system or device can be enabled to read and execute the program codes stored in the storage medium.

[0089] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute part of the present invention.

[0090] Examples of storage media for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, the program code can be downloaded from a server computer via a communication network.

[0091] In addition, it should be clear that the functions of any of the above embodiments can be achieved not only by executing the program code read by the computer, but also by enabling the operating system operating on the computer to complete part or all of the actual operations based on the instructions of the program code.

[0092] In addition, it can be understood that the program code read from the storage medium is written into a memory provided in an expansion board inserted into the computer or into a memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or expansion module is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above embodiments.

[0093] It should be noted that, in this article, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical factors in the process, method, article or device comprising the elements.

[0094] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk, etc. Various media that can store program codes.

[0095] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. 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 various embodiments of the present invention.

Claims

1. A method for processing watermarks in an application window, characterized in that: include: Whenever a target application is monitored to create a new window that needs to be watermarked, a watermark for the window is generated and attached to the window, and a binding relationship between the window and the watermark is established; Monitor window change events for windows with established binding relationships. When a target window with a window change event is detected, perform corresponding changes to the target watermark with which the target window has established a binding relationship according to the window change event. The window change events include: window top event, window adjustment event and window exit event; Monitoring whether an input / output device executes the window top event for a window with which a binding relationship is established; registering a desktop event with an X service, and monitoring the window adjustment event and the window exit event for the window with which a binding relationship is established based on the desktop event; The target watermark having a binding relationship with the target window is subjected to corresponding change processing according to the window change event, including: when the window change event is the window top event, the target watermark having a binding relationship with the target window is refreshed so that the target watermark follows the target window and is topped; when the window change event is the window adjustment event, the target watermark having a binding relationship with the target window is refreshed so that the target watermark follows the adjustment content of the target window; the adjustment content includes: window size and / or window position; when the window change event is the window exit event, the target watermark having a binding relationship with the target window is closed.

2. The method according to claim 1, characterized in that Also includes: determining at least one process started by the target application; Monitor whether each process started by the target application creates a new window.

3. The method according to claim 2, characterized in that Also includes: When monitoring the process started by the target application to create a new window, determine whether the new window meets the window characteristics pre-set for the target application. If so, determine the new window as a new window that needs to be watermarked.

4. The method according to claim 1, wherein The desktop event includes at least one of: ReparentNotify, MapNotify, UnmapNotify and ConfigureNotify; The ReparentNotify is used to notify the parent window change event; the MapNotify is used to notify the new window creation event; the UnmapNotify is used to notify the window exit event; and the ConfigureNotify is used to notify the window adjustment event.

5. An application window watermark processing device, characterized in that: include: The watermark generation unit is configured to generate a watermark for a new window that needs to be watermarked whenever a target application is monitored to create the new window, attach the watermark to the window, and establish a binding relationship between the window and the watermark; The watermark processing unit is used to monitor window change events of windows with which a binding relationship is established, and when a target window with a window change event is detected, perform corresponding change processing on the target watermark with which the binding relationship is established according to the window change event; The window change events include: window top event, window adjustment event and window exit event; Monitoring whether an input / output device executes the window top event for a window with which a binding relationship is established; registering a desktop event with an X service, and monitoring the window adjustment event and the window exit event for the window with which a binding relationship is established based on the desktop event; The watermark processing unit, when executing the corresponding change processing of the target watermark that is bound to the target window according to the window change event that occurs, specifically includes: when the window change event that occurs is the window top event, refreshing the target watermark that is bound to the target window, so that the target watermark is topped along with the target window; when the window change event that occurs is the window adjustment event, refreshing the target watermark that is bound to the target window, so that the target watermark is adjusted along with the adjustment content of the target window; the adjustment content includes: window size and / or window position; when the window change event that occurs is the window exit event, closing the target watermark that is bound to the target window.

6. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method according to any one of claims 1 to 4 is implemented.

7. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Program window information protection method and system

    CN107239679A

  • Process processing method and device, electronic equipment and storage medium

    CN112685700A