Screen watermark generation method, system, device and storage medium

By detecting changes in virtual screen parameters, obtaining and displaying the key and storage identifier of the watermark window, the problem of watermark display under the Wayland display protocol is solved, enabling effective watermark display in newly added workspaces or windows and improving information security.

CN115205087BActive Publication Date: 2025-12-16PING AN TECH (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210829073.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-15
Publication Date
2025-12-16
Estimated Expiration
2042-07-15

AI Technical Summary

Technical Problem

Existing screen watermarking technologies cannot support watermark display in newly added workspaces or windows under the Wayland display protocol, leading to an increased risk of information leakage.

Method used

By detecting changes in preset parameters of the virtual screen, the key document and storage identifier of the newly added watermark window are obtained, the key and target address are parsed, the watermark is displayed on the newly added watermark window using a watermark display program, and security is enhanced through key verification.

Benefits of technology

It enables effective watermark display of newly added workspaces or windows under the Wayland display protocol, improving information security and preventing accidental operations and information leaks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115205087B_ABST
    Figure CN115205087B_ABST
Patent Text Reader

Abstract

The application provides a screen watermark generation method, system, device and storage medium. The method comprises the following steps: if it is detected that a preset parameter of a virtual screen changes, an added watermark window on an added virtual screen is acquired, a secret key document corresponding to the added watermark window and a storage identifier are acquired, the storage identifier is used to indicate a target address of a watermark display program for adding a watermark, the secret key document and the storage identifier are analyzed to acquire a secret key and the target address, and the watermark is displayed on the added watermark window through the watermark display program according to the secret key and the target address. In the embodiment of the application, a watermark window is actively created on an added screen after the added screen is detected, and the watermark is displayed on the added watermark window through a watermark display program. Moreover, the security of the screen watermark method is improved through the secret key document.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a screen watermark generation method, system, device and storage medium. BACKGROUND

[0002] With the development of terminal technology, the current computer terminal is configured with a screenshot function, which can capture the picture of the display screen. At present, smart phones generally have high-definition photographing function. If the user accesses important or sensitive information within the organization, unauthorized screenshots or photographs may cause information security incidents such as information leakage.

[0003] Screen watermark design is a functional identification designed to prevent malicious screenshots or photographs of information viewers, so as to set up watermark protection on the screen to prevent information leakage, so that information viewers will be afraid to take screenshots or photographs in advance, and the information leakage source can be quickly locked after information leakage. Common screen display protocols include X11 display protocol for CPU architecture x86 and Wayland display protocol for CPU architecture arm. The existing screen watermark technology is generally a screen watermark generation program developed for X11 protocol with CPU architecture x86, and for Wayland display protocol with CPU architecture arm, when the watermark has been displayed on the current work area or window, if a new work area or window is created, the protocol cannot display the watermark in the new work area.

[0004] Therefore, there is an urgent need for a screen watermark generation method suitable for Wayland display protocol. SUMMARY

[0005] The present application provides a screen watermark generation method, system, device and storage medium, which mainly aims at the system of Wayland display protocol, after detecting the new work area, calling the watermark display thread, and displaying the watermark in the new work area.

[0006] In the first aspect, the present application provides a screen watermark generation method, comprising:

[0007] If it is detected that the preset parameter of the virtual screen changes, the newly added watermark window on the newly added virtual screen is obtained, and the key document and storage identifier corresponding to the newly added watermark window are obtained, wherein the storage identifier is used to indicate the target address of the watermark display program adding watermark;

[0008] The key document and the storage identifier are parsed to obtain the key and the target address;

[0009] Through the watermark display program, the watermark is displayed on the newly added watermark window according to the key and the target address.

[0010] Preferably, if the virtual screen preset parameter is detected to change, it includes:

[0011] Adding a virtual screen change event package;

[0012] Through the listening function of the virtual screen change event package, the current virtual screen dynamic change parameter or the virtual screen preset parameter change is listened to, and if the current virtual screen dynamic change parameter or the virtual screen preset parameter is detected to change, it is judged that the virtual screen preset parameter changes, wherein the current virtual screen dynamic change parameter includes the increase and decrease parameter of the number of virtual screens, the moving parameter and the resolution of the current virtual screen, and the virtual screen preset parameter includes the total number of virtual screens.

[0013] Preferably, if the virtual screen preset parameter is detected to change, a watermark window is added on the new virtual screen, and the previous also includes:

[0014] Creating a watermark service file under a preset directory to form a watermark generation thread;

[0015] Binding the watermark service file with the virtual screen preset parameter;

[0016] If the virtual screen preset parameter changes, the watermark service file changes data to automatically start the watermark generation thread.

[0017] Preferably, the watermark window added on the new virtual screen includes:

[0018] Creating an initial watermark window through the window form display function in the watermark generation thread, and standardizing the initial watermark window to form a standard field of view window;

[0019] Through the hidden function in the watermark generation thread, the frame and taskbar icon of the watermark generation thread are automatically hidden, so that the standard field of view window is converted into a hidden standard field of view window;

[0020] Through a preset fixed plug-in, the watermark generation thread is automatically fixed, the watermark generation thread is permanently placed on top, and a preset penetration mechanism is used to make the mouse operation transparent to the lower layer application of the hidden standard field of view window;

[0021] Convert the drawing coordinate system of the watermark text, make the watermark text in the form of M*N matrix distribution, and make the watermark text in a preset angle inclination, to fill the hidden standard field of view window, and finally get the window as the new watermark window.

[0022] Preferably, the window display function comprises a foreground window display function and a background window display function, the foreground window display function is used to automatically make the content foreground of the initial watermark window semi-transparent, and the background window display function is used to automatically make the background of the initial watermark window fully transparent.

[0023] Preferably, the parsing the key document and the storage identifier to obtain a key and a target address comprises:

[0024] According to the user permission, the watermark display program is started by the watermark generation thread, and the key document and the storage identifier are input into the watermark display program.

[0025] The watermark display program obtains display port information according to the storage identifier.

[0026] According to the display port information, a target address for watermark generation is obtained.

[0027] The key document is parsed to obtain the key.

[0028] Preferably, the key is a pre-generated character used to match the watermark generation thread.

[0029] In a second aspect, an embodiment of the present application provides a screen watermark generation system, comprising:

[0030] A detection module is configured to, if it is detected that a preset parameter of a virtual screen changes, obtain a newly added watermark window on a newly added virtual screen, and obtain a key document and a storage identifier corresponding to the newly added watermark window, wherein the storage identifier is used to indicate a target address for which a watermark display program adds a watermark.

[0031] A parsing module is configured to parse the key document and the storage identifier to obtain a key and a target address.

[0032] A display module is configured to, according to the key and the target address, display a watermark on the newly added watermark window by using the watermark display program.

[0033] In a third aspect, an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the screen watermark generation method when executing the computer program.

[0034] In a fourth aspect, an embodiment of the present application provides a computer storage medium, which stores a computer program, and the computer program implements the steps of the screen watermark generation method when executed by a processor.

[0035] The application provides a screen watermark generation method, system, device and storage medium. BRIEF DESCRIPTION OF DRAWINGS

[0036] Figure 1 A scene schematic diagram of a screen watermark generation method provided by the embodiment of the application is shown in the figure.

[0037] Figure 2 A flowchart of a screen watermark generation method provided by the embodiment of the application is shown in the figure.

[0038] Figure 3 A structure schematic diagram of a screen watermark generation system provided by the embodiment of the application is shown in the figure.

[0039] Figure 4 A structure schematic diagram of a computer device provided in the embodiment of the application is shown in the figure.

[0040] The implementation, functional features and advantages of the application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION

[0041] It should be understood that the specific embodiments described herein are merely intended to explain the application and not to limit the application.

[0042] Figure 1 A scene schematic diagram of a screen watermark generation method provided by the embodiment of the application is shown in the figure. Figure 1 As shown in the figure, when it is detected that the virtual screen preset parameter of the client changes, the server executes the screen watermark generation method to display the watermark on the newly added watermark window.

[0043] It should be noted that the server can be implemented by an independent server or a server cluster composed of multiple servers. The client can be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc., but is not limited thereto. The client and the server can be connected through Bluetooth, a USB (Universal Serial Bus) or other communication connection modes, and the embodiment of the application does not limit this.

[0044] Figure 2A flowchart of a screen watermark generation method provided by an embodiment of the present application is shown in FIG. 1, which includes the following steps. Figure 2

[0045] In S210, if it is detected that the virtual screen preset parameter has changed, a new watermark window on the new virtual screen is obtained, and a secret key document and a storage identifier corresponding to the new watermark window are obtained, wherein the storage identifier is used to indicate a target address of the watermark display program to add a watermark.

[0046] First, the virtual screen preset parameter is monitored. In the embodiment of the present application, the virtual screen refers to a virtual desktop, which is a function of the WIN10 system desktop. Multiple application programs can be used, and many computer screens can be created according to the use needs, and different programs are used on each screen. The virtual screen preset parameter is a parameter used to describe various characteristics of the virtual screen, such as a name parameter of the current virtual screen, a position parameter of the current virtual screen, a resolution of the current virtual screen, and a total number of virtual screens, etc. Once any one or any several of these parameters has changed, it is generally considered that the virtual screen preset parameter has changed. The specific content of the preset parameter can be determined according to the actual situation, which is not limited in the embodiment of the present application.

[0047] If it is detected that the virtual screen preset parameter has changed, it is determined that a new virtual screen has been added. The traditional watermark display method for the X11 display protocol cannot display a watermark on the new virtual screen for the Wayland display protocol. To solve this problem, in the embodiment of the present application, a new watermark window is created on the new virtual screen, which is called a new watermark window. At the same time, the secret key document and the storage identifier corresponding to the new watermark window are obtained. In the embodiment, the storage identifier is the graphical terminal authorized access information and the display port information of the current user session on the client, and the secret key document is the path of the file where the new watermark window is located. A new watermark window is created each time, and a file is automatically generated in the home directory of the system. This file records a set of secret keys, which is called a secret key document. After the user program obtains the secret key, it has the right to connect the user's storage identifier, and can output the image to the display window. Therefore, if the storage identifier is the address of the user's house, the secret key document is the key to open the door.

[0048] In S220, the secret key document and the storage identifier are parsed to obtain the secret key and the target address.

[0049] ​When the new watermark window is created, the virtual screen preset parameter changes, the watermark service file is mobilized, the encryption program in the watermark service file generates a storage identifier and a secret key document according to the file address of the new watermark window, so that the watermark generation thread analyzes or decodes according to the storage identifier and the secret key document according to the preset rule, and finally obtains the target address and file information of the new watermark window.

[0050] S230, through the watermark display program, watermarks are displayed on the new watermark window according to the secret key and the target address.

[0051] Then according to the watermark display program, the new watermark window is found according to the target address, and then the secret key is verified according to the secret key. If it is correct, the watermark is displayed on the new watermark window through the watermark display program.

[0052] The screen watermark generation method provided in the embodiment of the application first monitors the virtual screen preset parameter. When it is detected that the virtual screen preset parameter changes, the newly added virtual screen is acquired, and the secret key and the storage identifier of the newly added virtual screen are acquired. The watermark display program is found according to the storage identifier, and the watermark is displayed on the new watermark window. After the new screen is detected, the watermark window is actively created on the new screen, and the watermark is displayed on the new watermark window through the watermark display program. Moreover, the security of the screen watermark method is increased through the secret key file, and the security is avoided.

[0053] On the basis of the above embodiment, preferably, if the virtual screen preset parameter changes are detected, the method comprises the following steps.

[0054] A virtual screen change event package is added;

[0055] The current virtual screen dynamic change parameter or the virtual screen preset parameter change is monitored through the listening function of the virtual screen change event package. If the current virtual screen dynamic change parameter or the virtual screen preset parameter changes are monitored, it is judged that the virtual screen preset parameter changes. The current virtual screen dynamic change parameter comprises the increase and decrease parameter of the virtual screen quantity, the movement parameter and the resolution of the current virtual screen. The virtual screen preset parameter comprises the total number of virtual screens.

[0056] In the embodiment of the present application, the change of the virtual screen is added in the virtual screen change event package, and the change of the virtual screen includes the dynamic change of the current virtual screen, and the current virtual screen refers to the virtual screen in the active state at the current time. In the common WIN10 system and UOS system, a virtual screen can be newly created through the desktop function, and the UOS system can switch the work area through start and left and right direction keys, and the function is similar to the screen switching of Windows. In the traditional X11 display protocol, because the watermark is drawn on a top transparent window, even if the screen is switched, the window can still be overlaid on the screen. Because the working principles are different, the computer in the UOS system using the Wayland display protocol has a problem that the watermark cannot be displayed in the newly created work area.

[0057] In the embodiment of the present application, in order to solve the problem that the watermark cannot be displayed after the virtual screen is newly created in the UOS system, it is necessary to detect whether the virtual screen is newly created. Because the parameters related to the screen will change after the virtual screen is newly created, in the embodiment of the present application, whether the virtual screen is newly created is judged by monitoring the parameters related to the screen. In the specific implementation, the virtual screen change event package is first added, and the virtual screen preset parameters are monitored through the virtual screen change event package. The virtual screen preset parameters include the current virtual screen dynamic change parameter and the virtual screen preset parameter. The current virtual screen dynamic change parameter includes the increase and decrease parameter of the virtual screen number, the movement parameter and the virtual screen resolution. For example, the virtual screen number is increased by newly creating a virtual screen, the virtual screen number is reduced by closing a virtual screen, and the position of the virtual screen is changed by moving the virtual screen. Therefore, as long as one of the parameters changes, the parameters related to the virtual screen will change. The virtual screen preset parameter also includes the total number of virtual screens, and the total number of virtual screens refers to the total number of all virtual screens. When a virtual screen is newly created or a virtual screen is closed, the total number of virtual screens will also change.

[0058] In the embodiment of the present application, the virtual screen change event package is Window Manager Monitor, and Window Manager Monitor is used to monitor the total number of virtual screens and the change of the current virtual screen through the onboard function. The watermark window is added on the newly created virtual screen to solve the problem that the watermark software cannot be displayed after the work area is switched. After the newly created virtual screen is detected, Water Manager is used to open the newly added watermark window, and then the watermark is normally displayed. When the virtual screen is closed, Water Manager can also be used to close the newly added watermark window.

[0059] The screen watermark method provided by the embodiment of the application comprehensively supports watermark display of X11 and Wayland display protocols, is compatible with mainstream operating systems such as UOS / WIN / MAC on the market, and can completely support watermark display of a domestic information creation machine.

[0060] On the basis of the above embodiment, preferably, if it is detected that the virtual screen preset parameter changes, a watermark window is added on the newly added virtual screen, and the above embodiment further comprises the following steps:

[0061] A watermark service file is created in a preset directory to form a watermark generation thread.

[0062] The watermark service file is bound to the virtual screen preset parameter.

[0063] If the virtual screen preset parameter changes, the watermark service file changes data, so that the watermark generation thread is automatically started.

[0064] Before creating the watermark generation thread, the development environment of the watermark generation thread needs to be determined first, and the development platform and framework need to be considered: ① whether the platform and framework support the Wayland display protocol; ② whether the platform and framework have good portability; ③ whether the platform and framework can facilitate the deployment of the final product; and ④ whether the platform and framework can support efficient development of the developer.

[0065] First, the operating system corresponding to the Wayland display protocol commonly used is the UOS operating system, the UOS operating system distribution version is self-provided with a python3 and pyQt5 running environment, so the python3 and pyQt5 running environment is selected to support the operating system. Second, the python language is a cross-platform language, which can also be used on other mainstream operating systems, pyQt5 is based on python and qt5, and is cross-platform and portable. Third, since the UOS system is self-provided with a python3 and pyQt5 environment, the application program developed by selecting this combination does not need to be additionally installed with a running environment, so that the final product deployment becomes simpler. Finally, based on the python3 and pyQt5 framework to develop a screen watermark client, the simple and efficient development characteristics of the python language can be fully utilized, and the work of memory management and garbage collection does not need to be additionally processed, so that the development work becomes more efficient.

[0066] In the embodiment of the application, a pyQt5 environment is taken as an example for illustration, a watermark service file is created in a preset system, that is, a screenwatermark.service file is created in the embodiment; the watermark service file is placed in a preset directory in the preset system, and a user permission can also be set for the watermark service file, the user permission being a preset user permission; and the user permission includes a superuser permission and a normal user permission. The superuser permission is used to authorize normal accounts to form a user permission. In the embodiment, the superuser permission is a root permission; the root permission user refers to a user with the highest permission in a LINUX system or a UOS system, that is, a super administrator, and the account of the user is default "root", and other accounts except "root" can also perform the operation of the highest permission level after being authorized by the root user, and the other accounts with the root authorization and the root account are collectively referred to as root permission users; the normal user refers to a user other than the root permission user in the LINUX system or the UOS system, and in an organization in which the screen watermark is applied, the normal employees are normal user permissions, and only the system administrator in the organization has the root permission. In the embodiment, the preset system adopts a UOS system (UnionTech Operation System, UOS system), the watermark service file is a screenwatermark.service file, and the preset directory is an / etc / systemd / system directory, and the directory has a default superuser permission level in the UOS system in the embodiment, that is, only a user with the superuser permission authorization can modify the directory, and a user with a normal user permission and a user without the permission cannot modify the directory, so as to ensure the original security of the directory.

[0067] The watermark service file is created in the preset directory according to the above directory, a watermark generation thread is formed, the watermark generation thread is bound with the virtual screen preset parameter, if the virtual screen preset parameter changes, the watermark service file is triggered, and the watermark generation thread is started automatically.

[0068] On the basis of the above embodiment, preferably, the newly added watermark window on the newly added virtual screen is obtained, and the method comprises the following steps.

[0069] An initial watermark window is created by using a window display function in the watermark generation thread, and the initial watermark window is processed to form a standard visual field window;

[0070] The newly added watermark window is processed to form a standard visual field window by using a window display function in the watermark generation thread according to the key and the target address;

[0071] The border and the taskbar icon of the watermark generation thread are automatically hidden by a hidden function in the watermark generation thread, so that the normal view window is converted into a hidden normal view window;

[0072] The watermark generation thread is automatically fixed by a preset fixed plug-in, so that the watermark generation thread is permanently pinned to the top, and a preset penetration mechanism is used to make the operation of the mouse transparently transmitted to the underlying application of the hidden normal view window;

[0073] The drawing coordinate system of the converted watermark text is converted, so that the watermark text is distributed in an M*N matrix, and the watermark text is inclined at a preset angle to fill the hidden normal view window to form the new watermark window.

[0074] On the basis of the above-mentioned embodiments, preferably, the window display function comprises at least a foreground window display function and a background window display function;

[0075] The foreground window display function is used to automatically make the content foreground of the initial watermark window semi-transparent;

[0076] The background window display function is used to automatically make the background of the initial watermark window fully transparent.

[0077] Specifically, in the embodiments of the present application, first, the window transparency is set to 0.22 by using the semi-transparent function setWindowOpacity function, so that all components of the window including the window background present a semi-transparent effect. At the same time, the semi-transparent effect of the window makes the screen present a kind of hazy blur. In order to eliminate this blur, the transparent function setAttribute(Qt.WA_TranslucentBackground) is used, which can make the background of the window fully transparent without affecting the transparency of the components in the window, so that the watermark no longer affects the normal use of the operator. The hidden function includes a first hidden function and a second hidden function. The screen watermark does not need to display the taskbar icon, so in this step, the border and the taskbar icon of the watermark generation thread are automatically hidden, that is, the first hidden function setWindowFlags(Qt.Tool) of the Qt library is used to hide the icon of the application in the taskbar. At the same time, the second hidden function setWindowFlags(Qt.FramelessWindowHint) of the Qt library is used to hide the border and the button of the screen watermark program;

[0078] Generally, when other program windows are opened, the display content of the watermark program is covered. The fixed plug-in setWindowFlags (Qt. WindowStaysOnTopHint) of the Qt library can keep the window on top, but when the "show desktop" button in the lower right corner is clicked, the screen watermark program will be minimized, causing the screen watermark effect to disappear. Therefore, the fixed plug-in uses the setWindowFlags (Qt. BypassWindowManagerHint) function. This fixed plug-in can make the application program escape from the management of the window manager generated by the watermark generation thread. That is, after calling this function, the watermark application will no longer be affected by the "show desktop", switching work area and other operations. The watermark program will always remain on top.

[0079] Because of the transparency, users can see the interface content of other programs below the watermark. However, because the watermark generation thread is permanently on top and occupies the top layer, the user's mouse click operation is received by the top layer watermark generation thread and cannot be received by the lower layer other application. In fact, the watermark generation thread does not need to receive and process any mouse events. Therefore, the user's mouse operation event needs to be passed to the lower layer other application. Therefore, the penetration mechanism is set, that is, the setAttribute (WA_TransparentForMouseEvents) function, and the entire window is setmask to realize the mouse event penetration under the wayland protocol. The specific implementation is win. windowHandle (). setMask (QRegion (0, 0, 1, 1)). Through the penetration mechanism, the mouse operation is transmitted to the lower layer application of the hidden specification field window, that is, the mouse event received by the program is transparently transmitted to the next layer application without condition.

[0080] Because the watermark usually needs to be displayed at a certain angle and form an M row * N column watermark character matrix, in this embodiment, first, the watermark characters are inclined at a preset angle, that is, the brush is set to an inclination angle (set to a degree). The entire coordinate system will be synchronously rotated and inclined, so that the developer cannot draw the watermark characters and images according to the standard coordinate system. The coordinate transformation formula is as follows:

[0081] w = screenwidth / N;

[0082] h = screenheight / M;

[0083] x1 = w*j-tan (π / 180*|a|)*h*i;

[0084] y1 = h * i + tan (π / 180 * |a|) * w * j;

[0085] o = h / 4;

[0086] The final function is:

[0087] x = f(w, h, i, j, a) = x1 - tan (π / 180 * |a|) * o;

[0088] y = g(w, h, i, j, a) = y1 + o;

[0089] Wherein, screenwidth is the screen resolution width, screenheight is the screen resolution height, M is the number of rows of the watermark matrix, N is the number of columns of the watermark matrix, the calculation result x1 is the x coordinate axis basic value, the calculation result y1 is the y coordinate axis basic value, o is the vertical offset of the starting point of the watermark drawing, w is the width of each watermark grid, j is the column number of the current drawing watermark, a is the watermark tilt angle, h is the height of each watermark grid, i is the row number of the current drawing watermark, x and y are the coordinate values of the final drawing watermark respectively.

[0090] Through the above calculation, the starting coordinate point (x, y) of the watermark text to be drawn can be obtained. By using the QPainter.drawText function of the Qt library, the x and y coordinate values are input, and the watermark text can be drawn to form the final watermark window.

[0091] On the basis of the above embodiment, preferably, the parsing of the key document and the storage identifier, obtaining the key and the target address, comprises:

[0092] According to the user permission, the watermark display program is started by the watermark generation thread, and the key document and the storage identifier are input into the watermark display program;

[0093] The watermark display program obtains display port information according to the storage identifier;

[0094] According to the display port information, the target address of watermark generation is obtained;

[0095] The key document is parsed to obtain the key, and the watermark key is verified at the target address.

[0096] In the embodiment of the present application, the watermark display program process is started as a root user, but by default, the program started by the system is a background program. After the watermark display program receives the key document and storage identifier parameter information, the key document and storage identifier are generally empty, i.e., the display terminal is unknown, and the graphical interface content cannot be output to the newly added watermark window. In the embodiment, the key document and storage identifier information received by the watermark generation thread sets the key document and storage identifier environment variables in the watermark display program process, and the operating system can know the graphical output of the process to which user screen, and the watermark can be displayed on the user screen pointed by the storage identifier. In the embodiment, a watermark generation running as a root user is created for each user. The normal user cannot terminate or interfere with the process of other users, especially the process of the root user, to prevent the entire watermark generation process from being damaged without reason and improve the security of the watermark generation.

[0097] When the newly added watermark window is created, the virtual screen preset parameter changes, the watermark service file is mobilized, and the encryption program in the watermark service file generates the storage identifier and the key document according to the file address of the newly added watermark window according to the preset rule, so that the watermark generation thread decodes according to the storage identifier and the key document according to the preset rule, and finally obtains the target address and file information of the newly added watermark window.

[0098] In addition, the screen watermark generation method is by default a root permission level, which cannot be modified by a normal user. Only a root permission user can modify it. Therefore, the user cannot damage the terminal script, and the terminal script sends a message immediately after being started and ends running in a flash, without a resident process, and there is no case of maliciously ending the process by the user. The watermark display program is run by a root permission, and a normal user cannot terminate the root user process. This design makes it impossible for a normal user to damage the display of the screen watermark, thereby greatly improving the security.

[0099] Preferably, in the above embodiment, the key is a pre-generated character for matching the watermark generation thread.

[0100] Figure 3 A structure diagram of a screen watermark generation system provided in the embodiment of the present application is shown. The system includes a detection module 310, an analysis module 320, and a display module 330.

[0101] The detection module 310 is configured to, if it is detected that the virtual screen preset parameter changes, acquire a newly added watermark window on a newly added virtual screen, and acquire a key document and a storage identifier corresponding to the newly added watermark window, wherein the storage identifier is used to indicate a target address of which the watermark display program adds a watermark.

[0102] The parsing module 320 is configured to parse the key document and the storage identifier, and obtain a key and a target address;

[0103] The display module 330 is configured to display a watermark on the new watermark window according to the key and the target address by using the watermark display program.

[0104] The embodiment is a system embodiment corresponding to the above method embodiment, and the specific implementation process is the same as that of the above method embodiment. Therefore, the system embodiment will not be described here.

[0105] On the basis of the above embodiment, preferably, the detection module comprises an adding unit and a listening unit, wherein:

[0106] The adding unit is configured to add a virtual screen change event package;

[0107] The listening unit is configured to listen to a current virtual screen dynamic change parameter or a virtual screen preset parameter change through a listening function of the virtual screen change event package. If the current virtual screen dynamic change parameter or the virtual screen preset parameter is found to have changed, it is determined that the virtual screen preset parameter has changed. The current virtual screen dynamic change parameter comprises a virtual screen number increase / decrease parameter, a movement parameter and a resolution of the current virtual screen. The virtual screen preset parameter comprises a total number of virtual screens.

[0108] On the basis of the above embodiment, preferably, the system further comprises a creating module, a binding module and a starting module, wherein:

[0109] The creating module is configured to create a watermark service file in a preset directory to form a watermark generation thread;

[0110] The binding module is configured to bind the watermark service file with the virtual screen preset parameter;

[0111] The starting module is configured to cause the watermark service file to change data if the virtual screen preset parameter changes, so that the watermark generation thread is automatically started.

[0112] On the basis of the above embodiment, preferably, the detection module further comprises a specification unit, a hiding unit, a top unit and a coordinate conversion unit, wherein:

[0113] The specification unit is configured to create an initial watermark window through a window display function in the watermark generation thread, and to perform specification processing on the initial watermark window to form a specification view window;

[0114] The hiding unit is configured to automatically hide the frame and the taskbar icon of the watermark generation thread by a hiding function in the watermark generation thread, so as to convert the normal view window into a hidden normal view window.

[0115] The top unit is configured to automatically fix the watermark generation thread by a preset fixed plug-in, so as to permanently fix the top of the watermark generation thread, and make the operation of the mouse transparent to the lower layer application of the hidden normal view window by a preset penetration mechanism.

[0116] The coordinate conversion unit is configured to convert the drawing coordinate system of the watermark text, so as to make the watermark text in a matrix of M*N and to make the watermark text inclined at a preset angle, so as to fill the hidden normal view window to form the new watermark window.

[0117] In the above embodiment, preferably, the window display function includes at least a foreground window display function and a background window display function.

[0118] The foreground window display function is configured to automatically make the content foreground of the initial watermark window semi-transparent.

[0119] The background window display function is configured to automatically make the background of the initial watermark window fully transparent.

[0120] In the above embodiment, preferably, the analysis module includes a storage unit, a port unit, a generation unit and a key unit, wherein:

[0121] The storage unit is configured to start the watermark display program by the watermark generation thread according to the user authority, and input the key document and the storage identifier into the watermark display program.

[0122] The port unit is configured to acquire display port information according to the storage identifier by the watermark display program.

[0123] The generation unit is configured to acquire a target address of watermark generation according to the display port information.

[0124] The key unit is configured to analyze the key document to acquire the key, and verify the watermark key at the target address.

[0125] In the above embodiment, preferably, the key is a pre-generated character for matching the watermark generation thread.

[0126] Each module in the aforementioned screen watermark generation system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0127] Figure 4 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a computer storage medium and internal memory. The computer storage medium stores the operating system, computer programs, and the database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the computer storage medium. The database stores data generated or acquired during the execution of the screen watermark generation method, such as virtual screen preset parameters. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a screen watermark generation method.

[0128] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the screen watermark generation method in the above embodiment. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in the embodiment of the screen watermark generation system.

[0129] In one embodiment, a computer storage medium is provided, on which a computer program is stored. When executed by a processor, the computer program implements the steps of the screen watermark generation method described in the above embodiment. Alternatively, when executed by a processor, the computer program implements the functions of each module / unit in this embodiment of the screen watermark generation system.

[0130] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, storage, database or other medium used in the embodiments provided by the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0131] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of functional units and modules is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the above-described functions.

[0132] The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, but not limit it. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features. Such modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

Claims

1. A method for screen watermark generation for a Wayland display protocol, the method comprising: receiving a request for a screen watermark; determining a screen watermark image; and sending the screen watermark image to a Wayland compositor. The application relates to a method for automatically adding a watermark to a virtual screen, and belongs to the technical field of watermark display. The method comprises the following steps: a watermark service file is created under a preset directory to form a watermark generation thread; the watermark service file is bound with virtual screen preset parameters; if the virtual screen preset parameters change, the watermark service file changes in data, so that the watermark generation thread is automatically started; if it is detected that the virtual screen preset parameters change, a new watermark window on a new virtual screen is acquired, and a key document corresponding to the new watermark window and a storage identifier are acquired, wherein the storage identifier is used for indicating a target address of a watermark display program for adding a watermark; the key document and the storage identifier are parsed to acquire a key and a target address; the watermark display program is started according to the key and the target address through the watermark generation thread, and the watermark is displayed on the new watermark window, and WaterManager is called to manage the opening and closing of the watermark window; the new watermark window on the new virtual screen is acquired by the following steps: an initial watermark window is created through a window display function in the watermark generation thread, and the initial watermark window is standardized to form a standardized visual field window; the frame and the taskbar icon of the watermark generation thread are automatically hidden through a hiding function in the watermark generation thread, so that the standardized visual field window is converted into a hidden standardized visual field window; the watermark generation thread is automatically fixed through a preset fixed plug-in, so that the watermark generation thread is permanently placed on top, and a preset penetration mechanism is used to make the operation of a mouse transparent to an underlying application of the hidden standardized visual field window; 2. The screen watermark generation method of claim 1, wherein, the drawing coordinate system of watermark text is converted, so that the watermark text is distributed in an M*N matrix and is inclined at a preset angle, so as to fill the hidden standardized visual field window, and the finally obtained window is used as the new watermark window. if it is detected that the virtual screen preset parameters change, the following steps are included: a virtual screen change event package is added; 3. The screen watermark generation method of claim 1, wherein, a listening function of the virtual screen change event package is used to listen to the dynamic change parameters of a current virtual screen or the change of virtual screen preset parameters, if it is detected that the dynamic change parameters of the current virtual screen or the virtual screen preset parameters change, it is judged that the virtual screen preset parameters change, wherein the dynamic change parameters of the current virtual screen include increase / decrease parameters, movement parameters and resolution of the current virtual screen, and the virtual screen preset parameters include total number of virtual screens.

4. The screen watermark generation method of claim 1, wherein, The window display function at least includes a foreground window display function and a background window display function, the foreground window display function is used for automatically making the content foreground of the initial watermark window semi-transparent, and the background window display function is used for automatically making the background of the initial watermark window fully transparent. The key document and the storage identifier are parsed to acquire a key and a target address, which comprises the following steps: the watermark display program is started through the watermark generation thread according to user authority, and the key document and the storage identifier are input into the watermark display program; display port information is acquired according to the storage identifier through the watermark display program; the target address of watermark generation is acquired according to the display port information; parsing the key document to obtain the key.

5. The screen watermark generation method according to any one of claims 1 to 4, characterized by, The key is a pre-generated character matching the watermark generation thread.

6. A screen watermark generation system for the Wayland display protocol, characterized in that, The method comprises the steps of: a creating module, configured to create a watermark service file under a preset directory to form a watermark generation thread; a binding module, configured to bind the watermark service file with virtual screen preset parameters; a starting module, configured to make the watermark service file change data if the virtual screen preset parameters change, so that the watermark generation thread is automatically started; a detecting module, configured to obtain a new watermark window on a new virtual screen, and obtain a key document corresponding to the new watermark window and a storage identifier if it is detected that the virtual screen preset parameters change, wherein the storage identifier is used to indicate a target address of a watermark display program adding a watermark; The method comprises the steps of: creating an initial watermark window through a window display function in the watermark generation thread, and performing standard processing on the initial watermark window to form a standard visual field window; automatically hiding the border and taskbar icon of the watermark generation thread through a hidden function in the watermark generation thread, so that the standard visual field window is converted into a hidden standard visual field window; automatically fixing the watermark generation thread through a preset fixed plug-in, so that the watermark generation thread is permanently placed on top, and a preset penetration mechanism is used to make the operation of the mouse transparent to the underlying application of the hidden standard visual field window; converting the drawing coordinate system of the watermark text, so that the watermark text is distributed in an MxN matrix and is inclined at a preset angle to fill the hidden standard visual field window, and the finally obtained window is used as the new watermark window; a parsing module, configured to parse the key document and the storage identifier to obtain a key and a target address; a display module, configured to display a watermark on the new watermark window through the watermark display program according to the key and the target address, and call WaterManager to open and close the watermark window.

7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to realize the steps of the screen watermark generation method according to any one of claims 1 to 5.

8. A computer storage medium storing a computer program, the computer program comprising instructions, which, when executed on a computer, cause the computer to perform the method according to any one of claims 1 to 7. The computer program is executed by the processor to realize the steps of the screen watermark generation method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Screen watermark display method and device, electronic equipment and storage medium

    CN112650993A

  • Screen watermark generation method and device, electronic equipment and storage medium

    CN112650994A

  • Method for realizing cloud application exclusive window watermarking through grid matrix drawing mechanism

    CN113742026A