Screen watermark processing method and device and electronic equipment
The high-definition and transparent screen watermark are generated through the transparent processing of alpha channel, which solves the problem of poor visual display effect in the prior art and realizes high-quality screen watermark display.
Patent Information
- Application Number
- CN202410027911.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-08
- Publication Date
- 2025-07-08
AI Technical Summary
现有技术中,屏幕水印的视觉显示效果较差,尤其在使用灰度字体时容易出现锯齿或毛边,且无法支持图像作为水印。
The alpha channel is used for transparent processing, and a full-screen top window is created by obtaining the parameter information of the target application, and the background filling and clearing is used to generate a high-definition and transparent screen watermark.
It realizes high-definition and transparent screen watermarks, eliminates display problems such as jagged, burrs and hazy white masks, improves visual display effects, and supports rendering of any image as a watermark.
Smart Images

Figure CN120277644A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular, to a method, apparatus, and electronic device for processing screen watermarks. Background Art
[0002] In the security management scenario of office work, enterprises have a strong demand for data security and leakage prevention. Currently, the common way of data leakage is to capture sensitive data through screenshots and spread it through instant messaging (IM) tools, resulting in the leakage of enterprise sensitive data. Therefore, the risk of data leakage can be better reduced by drawing screen watermarks on the screen.
[0003] However, in related technologies, text is often directly drawn on a window with a white background and made transparent according to the color, that is, the white color is made transparent, so that the background of the window becomes transparent and only the text remains, forming a watermark effect. For the watermark processed in this way, when there are gray colors in some fonts, such as the Song typeface which is not very smooth, there will be jagged edges or fringing, and it cannot be eliminated, resulting in a poor visual display effect of the screen watermark. Moreover, the method of making transparent according to the color does not support images as watermarks.
[0004] In view of the above problems, no effective solution has been proposed yet. Summary of the Invention
[0005] Embodiments of this application provide a method, apparatus, and electronic device for processing screen watermarks to at least solve the technical problem that the visual display effect of the screen watermark is poor when the screen watermark is processed by the method of making transparent according to the color in related technologies.
[0006] According to one aspect of the embodiments of this application, a method for processing a screen watermark is provided, including: when it is detected that a target application program is started, obtaining target parameter information corresponding to the target application program, where the target parameter information is used to characterize the identity information of a target object using the target application program; creating a target window including a target watermark picture according to the target parameter information, where the target watermark picture is obtained by making the initial watermark picture transparent according to the alpha channel, and the target window is a full-screen topmost window; and displaying the target window on a display screen to display the target watermark picture full-screen, where the display screen is at least one of the following: the screen of a terminal running the target application program, a screen connected to the terminal.
[0007] Further, creating a target window including a target watermark picture based on target parameter information includes: obtaining a watermark configuration policy corresponding to a target application, creating a transparent window including target attributes according to the watermark configuration policy, and performing background filling on the transparent window according to a target color to obtain a window after background filling, where the target attributes are used to indicate that the transparent window is a full-screen topmost layered window, and the watermark configuration policy at least includes a target watermark style, and the target watermark style is used to determine a target alpha channel; creating a memory device context compatible with the window after background filling, and creating a memory bitmap compatible with the memory device context; performing background clearing processing on the memory bitmap to obtain a memory bitmap after background clearing, and generating an initial watermark picture based on the target parameter information, the target watermark style, and the memory bitmap after background clearing; obtaining a target display transparency, and updating the window after background filling according to the target display transparency and the initial watermark picture to obtain a target window including the target watermark picture, where the target display transparency is used to perform transparency processing on the initial watermark picture according to the target alpha channel.
[0008] Further, performing background clearing processing on the memory bitmap to obtain a memory bitmap after background clearing includes: configuring the alpha channel of the memory bitmap to be fully transparent to obtain a memory bitmap with a fully transparent alpha channel; using the memory bitmap with a fully transparent alpha channel as the memory bitmap after background clearing.
[0009] Further, generating an initial watermark picture based on the target parameter information, the target watermark style, and the memory bitmap after background clearing includes: performing watermark drawing on the memory bitmap after background clearing according to the target parameter information and the target watermark style to obtain a target memory bitmap; generating an initial watermark picture based on the target memory bitmap.
[0010] Further, performing watermark drawing on the memory bitmap after background clearing according to the target parameter information and the target watermark style to obtain a target memory bitmap includes: determining a target alpha channel according to the target watermark style, and performing watermark drawing on the memory bitmap after background clearing according to the target parameter information and the target alpha channel to obtain a watermark picture; combining the watermark picture and the memory bitmap after background clearing to form a target memory bitmap.
[0011] Further, generating an initial watermark picture based on the target memory bitmap includes: configuring a brush of a target operating system according to the target memory bitmap to obtain a target brush; performing drawing on the window after background filling according to the target brush to obtain an initial watermark picture.
[0012] Further, update the window filled with the background according to the target display transparency and the initial watermark image to obtain a target window containing the target watermark image, including: making the initial watermark image transparent according to the target display transparency and the target alpha channel to obtain the target watermark image; updating the window filled with the background according to the target watermark image to obtain the target window containing the target watermark image.
[0013] Further, after the target window is displayed on the display screen, the method further includes: obtaining a target screenshot, where the target screenshot at least includes the target watermark image; determining the identity information of the target object corresponding to the target screenshot according to the information in the target watermark image.
[0014] According to another aspect of the embodiments of the present application, there is also provided a method for processing a screen watermark, including: obtaining target parameter information corresponding to a target application uploaded by a client, where the target parameter information is used to represent the identity information of a target object using the target application; creating a target window containing a target watermark image in a cloud server according to the target parameter information, where the target watermark image is obtained by making the initial watermark image transparent according to an alpha channel, and the target window is a full-screen topmost window; feeding back the target window to the client to display the target window on the display screen to display the target watermark image full screen, where the display screen is at least one of the following: the screen of the terminal running the target application, the screen connected to the terminal.
[0015] According to another aspect of the embodiments of the present application, there is also provided a device for processing a screen watermark, including: a first obtaining unit, configured to obtain target parameter information corresponding to a target application when detecting the startup of the target application, where the target parameter information is used to represent the identity information of a target object using the target application; a first processing unit, configured to create a target window containing a target watermark image according to the target parameter information, where the target watermark image is obtained by making the initial watermark image transparent according to an alpha channel, and the target window is a full-screen topmost window; a first display unit, configured to display the target window on the display screen to display the target watermark image full screen, where the display screen is at least one of the following: the screen of the terminal running the target application, the screen connected to the terminal.
[0016] Further, the first processing unit includes: a first creation subunit, configured to obtain a watermark configuration policy corresponding to a target application, create a transparent window including target attributes according to the watermark configuration policy, and perform background filling on the transparent window according to a target color to obtain a window after background filling, where the target attributes are used to indicate that the transparent window is a full-screen topmost layered window, and the watermark configuration policy at least includes a target watermark style, and the target watermark style is used to determine a target alpha channel; a second creation subunit, configured to create a memory device context compatible with the window after background filling, and create a memory bitmap compatible with the memory device context; a first generation subunit, configured to perform background clearing processing on the memory bitmap to obtain a memory bitmap after background clearing, and generate an initial watermark image according to target parameter information, the target watermark style, and the memory bitmap after background clearing; a first update subunit, configured to obtain a target display transparency, and update the window after background filling according to the target display transparency and the initial watermark image to obtain a target window including a target watermark image, where the target display transparency is used to perform transparency processing on the initial watermark image according to the target alpha channel.
[0017] Further, the first generation subunit includes: a first configuration module, configured to configure the alpha channel of the memory bitmap to be fully transparent to obtain a memory bitmap with a fully transparent alpha channel; a first determination module, configured to use the memory bitmap with a fully transparent alpha channel as the memory bitmap after background clearing.
[0018] Further, the first generation subunit further includes: a first drawing module, configured to perform watermark drawing on the memory bitmap after background clearing according to the target parameter information and the target watermark style to obtain a target memory bitmap; a first generation module, configured to generate an initial watermark image according to the target memory bitmap.
[0019] Further, the first drawing module includes: a first determination sub-module, configured to determine a target alpha channel according to the target watermark style, and perform watermark drawing on the memory bitmap after background clearing according to the target parameter information and the target alpha channel to obtain a watermark image; a second determination sub-module, configured to form the watermark image and the memory bitmap after background clearing into a target memory bitmap.
[0020] Further, the first generation module includes: a first configuration sub-module, configured to configure a brush of the target operating system according to the target memory bitmap to obtain a target brush; a first drawing sub-module, configured to perform drawing on the window after background filling according to the target brush to obtain an initial watermark image.
[0021] Further, the first update subunit includes: a first processing module, configured to make the initial watermark image transparent according to the target display transparency and the target alpha channel to obtain a target watermark image; a second processing module, configured to update the window after background filling according to the target watermark image to obtain a target window including the target watermark image.
[0022] Further, the screen watermark processing device further includes: a second acquisition unit, configured to acquire a target screenshot after the target window is displayed on the display screen, where the target screenshot at least includes the target watermark image; a first determination unit, configured to determine the identity information of the target object corresponding to the target screenshot according to the information in the target watermark image.
[0023] According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium storing a program, where when the program runs, it controls the device where the storage medium is located to execute the screen watermark processing method described in any one of the above.
[0024] According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including: a memory storing an executable program; a processor configured to run the program, where when the program runs, it executes the screen watermark processing method described in any one of the above.
[0025] In the embodiment of the present application, a method of making it transparent according to the alpha channel is adopted. When it is detected that the target application program is started, the target parameter information corresponding to the target application program is obtained, where the target parameter information is used to represent the identity information of the target object using the target application program; a target window containing the target watermark picture is created according to the target parameter information, where the target watermark picture is obtained by making the initial watermark picture transparent according to the alpha channel, and the target window is a full-screen topmost window; the target window is displayed on the display screen to display the target watermark picture full screen, where the display screen is at least one of the following: the screen of the terminal running the target application program, the screen connected to the terminal. A high-definition transparent screen watermark is realized. Compared with the related art where transparency is achieved according to color, since the font has gray colors, there will be display problems such as jagged edges or fringing when adjusting the transparency according to color. That is, when making it transparent through color, for semi-transparent pixels, some are made transparent while some are not, resulting in a poor visual effect. In this solution, making it transparent according to the alpha channel can accurately define the transparency of each pixel through the alpha channel, enabling the picture to maintain smooth edges and natural transitions during the transparency process, effectively eliminating display problems such as jagged edges, fringing, and hazy white layers. It can also support rendering any incoming picture as a watermark, achieving the purpose of realizing a high-definition transparent screen watermark, thus achieving the technical effect of improving the visual display effect of the screen watermark, and further solving the technical problem that the visual display effect of the screen watermark is poor in the related art when using the method of making it transparent according to color to process the screen watermark. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation to the present application. In the drawings:
[0027] Figure 1 is a schematic diagram of a computer terminal provided in Embodiment 1 of the present application;
[0028] Figure 2 is a flowchart of a method for processing a screen watermark provided in Embodiment 1 of the present application;
[0029] Figure 3 is a schematic diagram of an optional target window containing a target watermark picture provided in Embodiment 1 of the present application;
[0030] Figure 4 is a schematic diagram of an optional target screenshot containing a target watermark picture provided in Embodiment 1 of the present application;
[0031] Figure 5It is a flowchart of the method for processing screen watermark provided in Embodiment 2 of the present application;
[0032] Figure 6 It is a schematic diagram of the device for processing screen watermark provided in Embodiment 3 of the present application;
[0033] Figure 7 It is a schematic diagram of the computing terminal provided in Embodiment 4 of the present application. Detailed implementation manners
[0034] In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances, so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0036] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards in the relevant regions, and corresponding operation entrances are provided for the user to choose to authorize or refuse.
[0037] First, some nouns or terms that appear in the process of describing the embodiments of the present application are applicable to the following explanations:
[0038] The Graphics Device Interface, with the full English name Graphics Device Interface and abbreviated as GDI, is the drawing application programming interface (Application Programming Interface, abbreviated as API) of the Windows operating system. It is responsible for the information exchange between the system and the drawing program and processes the graphic output of all Windows programs. GDI+ (Graphics Device Interface plus) is the successor of the previous version of GDI. GDI+ optimizes GDI in previous Windows versions and adds many new features.
[0039] Layered window: A mechanism supported by GDI and GDI+ in the Windows operating system for layered window drawing, which can update the pixel drawing information of a certain layer separately through the API.
[0040] Embodiment 1
[0041] According to the embodiments of the present application, a method for processing screen watermarks is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0042] The method embodiment provided by the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing the method for processing screen watermarks is shown. As Figure 1 shown, the computer terminal (or mobile device) 10 may include a processor set 102 (the processor set 102 may include, but is not limited to, processing devices such as a microprocessor MCU (Microcontroller Unit) or a field programmable gate array FPGA (Field Programmable Gate Array), and the processor set 102 may include a processor set, Figure 1 which is shown as 102a, 102b,..., 102n in Figure 1The structure shown is only schematic and does not limit the structure of the above-mentioned electronic device. For example, computer terminal 10 may also include more or fewer components than those shown in Figure 1 or have a different configuration from that shown in Figure 1 .
[0043] It should be noted that one or more of the above-mentioned processors 102 and / or other data processing circuits may generally be referred to as "data processing circuits" herein. The data processing circuit may be embodied in whole or in part as software, hardware, firmware, or any combination thereof. In addition, the data processing circuit may be a single independent processing module, or be incorporated in whole or in part into any one of other elements in computer terminal 10 (or mobile device).
[0044] Memory 104 may be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the screen watermark processing method in the embodiments of the present application. Processor 102 executes various functional applications and data processing by running the software programs and modules stored in memory 104, that is, implements the above-mentioned screen watermark processing method. Memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, memory 104 may further include memories remotely provided with respect to processor 102, and these remote memories may be connected to computer terminal 10 through a network. Examples of the above-mentioned network include but are not limited to the Internet, intranet, local area network, mobile communication network, and combinations thereof.
[0045] Transmission device 106 is used to receive or send data via a network. Specific examples of the above-mentioned network may include the wireless network provided by the communication provider of computer terminal 10. In one instance, transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC), which can be connected to other network devices through a base station and thus communicate with the Internet. In one instance, transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0046] The display may be, for example, a touch-screen liquid crystal display, which enables a user to interact with the user interface of computer terminal 10 (or mobile device).
[0047] In the scenario of office security management, enterprises have strong requirements for data security leakage prevention. Currently, a common way of data leakage is to capture sensitive data through screenshots and spread it through instant messaging (IM) tools, resulting in the leakage of enterprise sensitive data. Therefore, the risk of data leakage can be better reduced by drawing a screen watermark on the screen.
[0048] However, in related technologies, text is often directly drawn on a window with a white background and made transparent according to the color, that is, the white color is made transparent, so that the background of the window becomes transparent and only the text remains, forming a watermark effect. For the watermark processed in this way, when there are gray colors in some fonts, such as the Song typeface which is not very smooth, there will be jagged edges or fringing, and it cannot be eliminated, resulting in a poor visual display effect of the screen watermark. Moreover, the method of making transparent according to the color does not support images as watermarks.
[0049] Against the above technical background, the present application provides a Figure 2 processing method for screen watermarks as shown. Figure 2 It is a flowchart of the processing method for screen watermarks provided in Embodiment 1 of the present application. The method includes:
[0050] Step S201, when it is detected that the target application starts, obtain the target parameter information corresponding to the target application, where the target parameter information is used to characterize the identity information of the target object using the target application.
[0051] Optionally, when it is detected that the target application starts, the target parameter information corresponding to the target application can be obtained. Among them, the target application can be a client of a secure access service edge (SASE) for office, and the target parameter information can be user-related parameter information, at least including terminal identification information (for example, the address information of the terminal used to log in to the SASE client), user name information, etc.
[0052] For example, a user logs in to the SASE client through a user terminal, and the SASE client starts the endpoint data leakage prevention (EDLP) function. When the processing system of the screen watermark detects that the SASE client starts, it obtains the target parameter information corresponding to the SASE client.
[0053] Step S202, create a target window containing the target watermark picture according to the target parameter information, where the target watermark picture is obtained by making the initial watermark picture transparent according to the alpha channel, and the target window is a full-screen topmost window.
[0054] Optionally, after obtaining the target parameter information corresponding to the target application, a target window including the target watermark picture may be created according to the target parameter information, where the target watermark picture may be a full-screen picture with a watermark, and the target watermark picture is obtained by performing transparency processing on the initial watermark picture according to the alpha channel, and the target window is a full-screen topmost window.
[0055] For example, after obtaining the target parameter information corresponding to the SASE client, the Graphics Device Interface GDI+ may be called to draw the target watermark picture according to the target parameter information, and a full-screen topmost window including the target watermark picture may be created according to the watermark configuration policy.
[0056] Step S203, display the target window on the display screen to display the target watermark picture full screen, where the display screen is at least one of the following: the screen of the terminal running the target application, the screen connected to the terminal.
[0057] Optionally, by displaying the target window on the display screen, the target watermark picture can be displayed full screen, so as to better reduce the risk of data leakage. For example, during the running of the SASE client, the target watermark picture can be displayed full screen on the display screen of the user terminal (i.e., the terminal running the target application) with a specified watermark display transparency value, as Figure 3 shown, the target window including the target watermark picture is full-screen topmost on the display screen, so that any operation on the screen will be covered by the watermark. For example, Figure 3 in which the xxx folder in the Program Files folder of the local disk (C:) is opened, and the window is covered by the watermark. The target watermark picture includes the information of "Zhang San 1234", where "Zhang San" may be user name information or user name information, etc., and "1234" may be terminal identification information, or user number or user mobile phone number information, etc.
[0058] In this solution, a high-definition transparent screen watermark is implemented. Compared with the related technology where transparency is adjusted according to color, since fonts have grayscale colors, there will be display problems such as jagged edges or fringing when adjusting transparency according to color. That is, when making it transparent through color, for semi-transparent pixels, some are made transparent while some are not, resulting in a poor visual effect. In this solution, transparency is achieved according to the alpha channel, which can accurately define the transparency of each pixel through the alpha channel, enabling the picture to maintain smooth edges and natural transitions during the transparency process, effectively eliminating display problems such as jagged edges, fringing, and hazy white veils, improving the visual display effect of the screen watermark. It also supports rendering any incoming picture as a watermark and supports multi-screen display. For example, an extended screen connected to the terminal can also be full-screen displayed.
[0059] How to create a target window containing the target watermark picture is crucial. Therefore, in the method for processing a screen watermark provided in the first embodiment of this application, creating a target window containing the target watermark picture based on the target parameter information includes: obtaining the watermark configuration policy corresponding to the target application, creating a transparent window with target attributes based on the watermark configuration policy, and performing background filling on the transparent window according to the target color to obtain the window after background filling, where the target attributes are used to indicate that the transparent window is a full-screen topmost layered window, and the watermark configuration policy at least includes the target watermark style, and the target watermark style is used to determine the target alpha channel; creating a memory device context compatible with the window after background filling, and creating a memory bitmap compatible with the memory device context; performing background clearing processing on the memory bitmap to obtain the memory bitmap after background clearing, and generating an initial watermark picture based on the target parameter information, the target watermark style, and the memory bitmap after background clearing; obtaining the target display transparency, and updating the window after background filling according to the target display transparency and the initial watermark picture to obtain a target window containing the target watermark picture, where the target display transparency is used to perform transparency processing on the initial watermark picture according to the target alpha channel.
[0060] Optionally, the watermark configuration policy further includes a specified watermark display transparency value, a configuration process, etc. The configuration process can be a process of sequentially creating a transparent window, background filling, creating a memory device context (abbreviated as DC), creating a memory bitmap, background clearing, creating a target window, etc. The target watermark style is at least one of the following: text picture style, QR code picture style, image picture style.
[0061] For example, according to the configuration process, a transparent window can be created based on the interfaces provided by the Windows operating system. Configure the window property as the WS_EX_LAYERED property (i.e., the target property) to obtain a layered window, that is, a transparent window containing the WS_EX_LAYERED property. This window is a full-screen topmost window, that is, the window size is the same as the display screen, and it supports automatic scaling and extended screen. Then, use white (i.e., the target color) to fill the background of the transparent window to obtain a layered window with a white background (i.e., the window after background filling). Then, create a memory DC (i.e., memory device context) compatible with the window after background filling, and create a memory bitmap compatible with the memory DC. Then, perform background clearing processing on the memory bitmap. For example, use the Graphics Device Interface GDI+ to clear the background of the memory bitmap to obtain the memory bitmap after background clearing. Then, an initial watermark image can be generated based on the target parameter information, the target watermark style, and the memory bitmap after background clearing. Obtain the target display transparency, and update the window after background filling according to the target display transparency and the initial watermark image to obtain a target window containing the target watermark image.
[0062] It should be noted that creating a target window containing the target watermark image is achieved based on the target parameter information. Transparency according to the alpha channel can achieve a high-definition transparent screen watermark, effectively eliminating display problems such as jagged edges, fringing, and hazy white veils, and improving the visual display effect of the screen watermark.
[0063] In order to improve the visual display effect of the screen watermark, in the screen watermark processing method provided in the first embodiment of this application, background clearing processing is performed on the memory bitmap to obtain the memory bitmap after background clearing, including: configuring the alpha channel of the memory bitmap to be fully transparent to obtain a memory bitmap with a fully transparent alpha channel; using the memory bitmap with a fully transparent alpha channel as the memory bitmap after background clearing.
[0064] Optionally, in the process of performing background clearing processing on the memory bitmap to obtain the memory bitmap after background clearing, the alpha channel of the memory bitmap can be configured to be fully transparent. For example, use the Graphics Device Interface GDI+ to configure the alpha channel of the memory bitmap to be fully transparent to obtain a memory bitmap with a fully transparent alpha channel, and use the memory bitmap with a fully transparent alpha channel as the memory bitmap after background clearing.
[0065] It should be noted that by dynamically creating a bitmap with an alpha channel in memory, it provides a basis for subsequent transparency of the initial watermark image according to the alpha channel to obtain the target watermark image, thereby effectively eliminating display problems such as jagged edges, fringing, and hazy white veils, and improving the visual display effect of the screen watermark.
[0066] In order to be able to create a target window containing a target watermark image, in the method for processing screen watermarks provided in Embodiment 1 of this application, an initial watermark image is generated based on target parameter information, a target watermark style, and a memory bitmap after clearing the background, including: performing watermark drawing on the memory bitmap after clearing the background according to the target parameter information and the target watermark style to obtain a target memory bitmap; generating an initial watermark image based on the target memory bitmap.
[0067] Optionally, during the process of generating an initial watermark image based on target parameter information, a target watermark style, and a memory bitmap after clearing the background, watermark drawing can be performed on the memory bitmap after clearing the background according to the target parameter information and the target watermark style to obtain a target memory bitmap. For example, according to parameter information such as user name information (such as "Zhang San") and terminal identification information (such as "1234"), and text picture styles, QR code picture styles, or image picture styles, etc., watermark drawing can be performed on a bitmap with an alpha channel that is fully transparent (i.e., the memory bitmap after clearing the background) using the Graphics Device Interface GDI+ to obtain a drawn memory bitmap containing a watermark image of "Zhang San1234" (i.e., the target memory bitmap). Then, an initial watermark image can be generated based on the target memory bitmap. For example, a system brush can be constructed using the drawn memory bitmap, and the entire screen can be brushed with the system brush on the window after background filling to implement full-screen drawing of the watermark and obtain the initial watermark image.
[0068] In order to be able to obtain a target memory bitmap, in the method for processing screen watermarks provided in Embodiment 1 of this application, watermark drawing is performed on the memory bitmap after clearing the background according to the target parameter information and the target watermark style to obtain a target memory bitmap, including: determining a target alpha channel according to the target watermark style, and performing watermark drawing on the memory bitmap after clearing the background according to the target parameter information and the target alpha channel to obtain a watermark image; combining the watermark image and the memory bitmap after clearing the background to form a target memory bitmap.
[0069] Optionally, during the process of performing watermark drawing on the memory bitmap after clearing the background according to the target parameter information and the target watermark style to obtain a target memory bitmap, a target alpha channel can be determined according to the target watermark style, and watermark drawing can be performed on the memory bitmap after clearing the background according to the target parameter information and the target alpha channel to obtain a watermark image, and then the watermark image and the memory bitmap after clearing the background are combined to form a target memory bitmap.
[0070] For example, if the target watermark style is a text picture style or a QR code picture style, since the window after background filling has a white background, the black channel can be used as the target alpha channel. That is, a black channel map can be drawn on the memory bitmap after clearing the background according to the target parameter information, and the drawn black channel map can be superimposed on the memory bitmap to obtain the drawn memory bitmap (i.e., the target memory bitmap). If the target watermark style is an image picture style, the color channels other than white can be used as the target alpha channel. That is, multiple color channel maps other than white can be drawn on the memory bitmap after clearing the background according to the target parameter information, and the drawn multiple color channel maps can be superimposed on the memory bitmap to obtain the drawn memory bitmap (i.e., the target memory bitmap).
[0071] It should be noted that watermark drawing on the memory bitmap after clearing the background according to the target parameter information and the target alpha channel can implement a high-definition and transparent screen watermark, effectively eliminating display problems such as jagged edges, fringing, and hazy white veils, and improving the visual display effect of the screen watermark.
[0072] In order to obtain a target window containing the target watermark picture, in the screen watermark processing method provided in the first embodiment of the present application, generating an initial watermark picture based on the target memory bitmap includes: configuring a brush of the target operating system according to the target memory bitmap to obtain a target brush; and drawing on the window after background filling according to the target brush to obtain an initial watermark picture.
[0073] Optionally, in the process of generating an initial watermark picture based on the target memory bitmap, a brush of the target operating system can be configured according to the target memory bitmap to obtain a target brush, and then an initial watermark picture can be obtained by drawing on the window after background filling according to the target brush.
[0074] For example, based on the brush generation interface of the Windows operating system (i.e., the target operating system), the system brush can be configured according to the drawn memory bitmap (i.e., the target memory bitmap) to obtain a configured system brush (i.e., the target brush). Then, drawing on the window after background filling according to the configured system brush, that is, using the system brush to brush the entire screen, a full-screen large picture with a watermark picture (i.e., the initial watermark picture) can be obtained. Then, the window after background filling can be updated according to the specified watermark display transparency value (range 1% - 100%, for example, 1%) included in the watermark configuration policy and the initial watermark picture, and a target window containing the target watermark picture can be obtained.
[0075] It should be noted that using the system brush can achieve the effect of automatically covering the entire screen with multiple watermark pictures that need to be displayed full screen, without having to calculate the drawing positions of each watermark component by oneself, improving the processing efficiency of the screen watermark.
[0076] In order to obtain a target window containing the target watermark image, in the screen watermark processing method provided in the first embodiment of the present application, the window after background filling is updated according to the target display transparency and the initial watermark image to obtain a target window containing the target watermark image, including: making the initial watermark image transparent according to the target display transparency and the target alpha channel to obtain the target watermark image; updating the window after background filling according to the target watermark image to obtain a target window containing the target watermark image.
[0077] Optionally, in the process of updating the window after background filling according to the target display transparency and the initial watermark image to obtain a target window containing the target watermark image, the initial watermark image can be made transparent according to the target display transparency and the target alpha channel to obtain the target watermark image, and then the window after background filling can be updated according to the target watermark image, so as to obtain a target window containing the target watermark image.
[0078] For example, making the initial watermark image transparent according to the specified watermark display transparency (i.e., the target display transparency) and the corresponding alpha channel. For example, according to different watermark styles, the black channel or other color channels of the initial watermark image can be made transparent respectively to obtain a full-screen large image with a watermark after transparency (i.e., the target watermark image). Then, the window after background filling can be updated according to the full-screen large image with a watermark after transparency. For example, the UpdateLayeredWindow function (a function for updating a layered window) is used to update the window after background filling according to the specified watermark display transparency and the prepared image (i.e., the initial watermark image), and make it transparent according to the alpha channel, so as to obtain a target window containing the full-screen large image with a watermark after transparency.
[0079] It should be noted that using the alpha channel to update the layered window can support the opacity adjustment of the watermark from 1% to 100% without the appearance of hazy white, and there will be no jagged phenomenon when magnifying or reducing the font at 100% opacity, effectively eliminating display problems such as jagged edges, fringing, and hazy white veils, and improving the visual display effect of the screen watermark.
[0080] In order to effectively trace the data leakage, in the screen watermark processing method provided in the first embodiment of the present application, after the target window is displayed on the display screen, a target screenshot is obtained, where the target screenshot at least includes the target watermark image; the identity information of the target object corresponding to the target screenshot is determined according to the information in the target watermark image.
[0081] Optionally, since the target window is displayed on the display screen, that is, the target watermark picture is displayed full screen, the screen watermark is included in the screenshot (i.e., the target screenshot) obtained when the user (such as an enterprise employee) takes a screenshot (or a photo). Therefore, if an externally distributed screenshot is discovered, the screenshot can be obtained, and the person who distributed it can be traced back based on the watermark information (such as name, employee number, etc.) on the screenshot, quickly and conveniently locating the source of the screenshot, that is, determining the identity information of the target object corresponding to the target screenshot. For example, based on the screenshot as Figure 4 shown, it can be known that the data information "xxxxxxxxxxxxxxxxxxxx…xxxxxxxxxxxxxxxxxxxx" was leaked by the enterprise employee (i.e., Zhang San) corresponding to the watermark "Zhang San 1234".
[0082] In the embodiment of the present application, a method of making it transparent according to the alpha channel is adopted. When it is detected that the target application program is started, the target parameter information corresponding to the target application program is obtained, where the target parameter information is used to characterize the identity information of the target object using the target application program; a target window containing the target watermark picture is created based on the target parameter information, where the target watermark picture is obtained by making the initial watermark picture transparent according to the alpha channel, and the target window is a full-screen topmost window; the target window is displayed on the display screen to display the target watermark picture full screen, where the display screen is at least one of the following: the screen of the terminal running the target application program, the screen connected to the terminal. A high-definition transparent screen watermark is implemented. Compared with the related art where transparency is adjusted according to color, since the font has gray colors, there will be display problems such as jagged edges or fringing when adjusting transparency according to color. That is, when making it transparent through color, for semi-transparent pixels, some are made transparent and some are not, resulting in a poor visual effect. In this solution, making it transparent according to the alpha channel can accurately define the transparency of each pixel through the alpha channel, enabling the picture to maintain smooth edges and natural transitions during the transparency process, effectively eliminating display problems such as jagged edges, fringing, and hazy white veils, and can also support rendering any incoming picture as a watermark, achieving the purpose of implementing a high-definition transparent screen watermark, thereby achieving the technical effect of improving the visual display effect of the screen watermark, and further solving the technical problem that the visual display effect of the screen watermark is poor when using the method of making it transparent according to color in the related art.
[0083] It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0084] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of this application, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions to enable a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of this application.
[0085] Embodiment 2
[0086] According to an embodiment of this application, a method for processing a screen watermark is also provided. As Figure 5 shown, the method includes:
[0087] Step S501, obtaining target parameter information corresponding to a target application program uploaded by a client, where the target parameter information is used to characterize the identity information of a target object using the target application program;
[0088] Step S502, creating a target window including a target watermark picture in a cloud server according to the target parameter information, where the target watermark picture is obtained by performing transparency processing on an initial watermark picture according to an alpha channel, and the target window is a full-screen topmost window;
[0089] Step S503, feeding back the target window to the client to display the target window on a display screen, so as to display the target watermark picture full screen, where the display screen is at least one of the following: the screen of a terminal running the target application program, a screen connected to the terminal.
[0090] Through the above solution, a high-definition transparent screen watermark is realized, effectively eliminating display problems such as jagged edges, fringing, and hazy white layers, improving the visual display effect of the screen watermark, and also supporting rendering and passing in any picture as a watermark.
[0091] In the cloud server, the specific method for processing the screen watermark is the same as the method in Embodiment 1, and will not be elaborated here.
[0092] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0093] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to enable a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of this application.
[0094] Embodiment 3
[0095] According to an embodiment of this application, there is also provided a screen watermark processing device for implementing the above screen watermark processing method, as Figure 6 shown. The device includes: a first acquisition unit 601, a first processing unit 602, and a first display unit 603.
[0096] The first acquisition unit 601 is configured to acquire target parameter information corresponding to a target application program when detecting the start of the target application program, where the target parameter information is used to characterize the identity information of a target object using the target application program;
[0097] The first processing unit 602 is configured to create a target window including a target watermark picture according to the target parameter information, where the target watermark picture is obtained by performing transparency processing on an initial watermark picture according to an alpha channel, and the target window is a full-screen topmost window;
[0098] The first display unit 603 is configured to display the target window on a display screen to display the target watermark picture full screen, where the display screen is at least one of the following: the screen of a terminal running the target application program, a screen connected to the terminal.
[0099] In the processing device for screen watermark provided in Embodiment 3 of the present application, when the first acquisition unit 601 detects the start of a target application, it acquires target parameter information corresponding to the target application, where the target parameter information is used to characterize the identity information of the target object using the target application; the first processing unit 602 creates a target window containing a target watermark picture according to the target parameter information, where the target watermark picture is obtained by performing transparency processing on the initial watermark picture according to the alpha channel, and the target window is a full-screen topmost window; the first display unit 603 displays the target window on the display screen to display the target watermark picture full-screen, where the display screen is at least one of the following: the screen of the terminal running the target application, the screen connected to the terminal. In this solution, a high-definition transparent screen watermark is realized. Compared with the related art where transparency is performed according to color, since the font has gray colors, there will be display problems such as jagged edges or fringing when adjusting the transparency according to color. That is, when making it transparent by color, for semi-transparent pixels, some are made transparent while some are not, resulting in a poor visual effect. However, in this solution, transparency is performed according to the alpha channel, which can accurately define the transparency of each pixel through the alpha channel, enabling the picture to maintain smooth edges and natural transitions during the transparency processing, effectively eliminating display problems such as jagged edges, fringing, and hazy white veils. It can also support rendering any incoming picture as a watermark, achieving the purpose of realizing a high-definition transparent screen watermark, thus achieving the technical effect of improving the visual display effect of the screen watermark, and further solving the technical problem that the visual display effect of the screen watermark is poor in the related art when using the method of making it transparent according to color.
[0100] Optionally, in the screen watermark processing device provided in Embodiment 3 of this application, the first processing unit 602 includes: a first creation subunit, configured to obtain a watermark configuration policy corresponding to a target application, create a transparent window including target attributes according to the watermark configuration policy, and perform background filling on the transparent window according to a target color to obtain a window after background filling, where the target attributes are used to indicate that the transparent window is a full-screen topmost layered window, and the watermark configuration policy at least includes a target watermark style, and the target watermark style is used to determine a target alpha channel; a second creation subunit, configured to create a memory device context compatible with the window after background filling, and create a memory bitmap compatible with the memory device context; a first generation subunit, configured to perform background clearing processing on the memory bitmap to obtain a memory bitmap after background clearing, and generate an initial watermark picture according to target parameter information, the target watermark style, and the memory bitmap after background clearing; a first update subunit, configured to obtain a target display transparency, and update the window after background filling according to the target display transparency and the initial watermark picture to obtain a target window including a target watermark picture, where the target display transparency is used to perform transparency processing on the initial watermark picture according to the target alpha channel.
[0101] Optionally, in the screen watermark processing device provided in Embodiment 3 of this application, the first generation subunit includes: a first configuration module, configured to configure the alpha channel of the memory bitmap to be fully transparent to obtain a memory bitmap with a fully transparent alpha channel; a first determination module, configured to use the memory bitmap with a fully transparent alpha channel as the memory bitmap after background clearing.
[0102] Optionally, in the screen watermark processing device provided in Embodiment 3 of this application, the first generation subunit further includes: a first drawing module, configured to perform watermark drawing on the memory bitmap after background clearing according to target parameter information and the target watermark style to obtain a target memory bitmap; a first generation module, configured to generate an initial watermark picture according to the target memory bitmap.
[0103] Optionally, in the screen watermark processing device provided in Embodiment 3 of this application, the first drawing module includes: a first determination sub-module, configured to determine a target alpha channel according to the target watermark style, and perform watermark drawing on the memory bitmap after background clearing according to the target parameter information and the target alpha channel to obtain a watermark picture; a second determination sub-module, configured to form a target memory bitmap by combining the watermark picture and the memory bitmap after background clearing.
[0104] Optionally, in the screen watermark processing device provided in Embodiment 3 of this application, the first generation module includes: a first configuration sub-module, configured to configure a brush of a target operating system according to the target memory bitmap to obtain a target brush; a first drawing sub-module, configured to perform drawing on the window after background filling according to the target brush to obtain an initial watermark picture.
[0105] Optionally, in the screen watermark processing apparatus provided in Embodiment 3 of the present application, the first update subunit includes: a first processing module, configured to make the initial watermark picture transparent according to the target display transparency and the target alpha channel to obtain a target watermark picture; a second processing module, configured to update the window after background filling according to the target watermark picture to obtain a target window including the target watermark picture.
[0106] Optionally, in the screen watermark processing apparatus provided in Embodiment 3 of the present application, the screen watermark processing apparatus further includes: a second acquisition unit, configured to acquire a target screenshot after the target window is displayed on the display screen, where the target screenshot at least includes the target watermark picture; a first determination unit, configured to determine the identity information of the target object corresponding to the target screenshot according to the information in the target watermark picture.
[0107] It should be noted here that the above-mentioned first acquisition unit 601, first processing unit 602, and first display unit 603 correspond to steps S201 to S203 in Embodiment 1. The above units and the corresponding steps have the same implementation examples and application scenarios, but are not limited to the content disclosed in the above-mentioned Embodiment 1. It should be noted that the above modules, as a part of the apparatus, can run in the computer terminal 10 provided in Embodiment 1.
[0108] It should be noted that the preferred implementation schemes involved in the above embodiments of the present application are the same as the schemes, application scenarios, and implementation processes provided in Embodiment 1, but are not limited to the scheme provided in Embodiment 1.
[0109] Embodiment 4
[0110] An embodiment of the present application may provide a computer terminal, and the computer terminal may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the above computer terminal may also be replaced with a terminal device such as a mobile terminal.
[0111] Optionally, in this embodiment, the above computer terminal may be located in at least one of multiple network devices in a computer network.
[0112] In this embodiment, the above computer terminal may execute the program code of the following steps in the method for processing screen watermarks: when it is detected that the target application is started, obtain the target parameter information corresponding to the target application, where the target parameter information is used to characterize the identity information of the target object using the target application; create a target window including a target watermark picture according to the target parameter information, where the target watermark picture is obtained by performing transparency processing on the initial watermark picture according to the alpha channel, and the target window is a full-screen topmost window; display the target window on the display screen to display the target watermark picture full screen, where the display screen is at least one of the following: the screen of the terminal running the target application, the screen connected to the terminal.
[0113] The above computer terminal may also execute the program code of the following steps in the method for processing screen watermarks: creating a target window including a target watermark picture according to the target parameter information, including: obtaining the watermark configuration policy corresponding to the target application, creating a transparent window including target attributes according to the watermark configuration policy, and performing background filling on the transparent window according to the target color to obtain the window after background filling, where the target attributes are used to indicate that the transparent window is a full-screen topmost layered window, and the watermark configuration policy at least includes a target watermark style, and the target watermark style is used to determine the target alpha channel; creating a memory device context compatible with the window after background filling, and creating a memory bitmap compatible with the memory device context; performing background clearing processing on the memory bitmap to obtain the memory bitmap after background clearing, and generating an initial watermark picture according to the target parameter information, the target watermark style, and the memory bitmap after background clearing; obtaining the target display transparency, and updating the window after background filling according to the target display transparency and the initial watermark picture to obtain a target window including a target watermark picture, where the target display transparency is used to perform transparency processing on the initial watermark picture according to the target alpha channel.
[0114] The above computer terminal may also execute the program code of the following steps in the method for processing screen watermarks: performing background clearing processing on the memory bitmap to obtain the memory bitmap after background clearing, including: configuring the alpha channel of the memory bitmap to be fully transparent to obtain a memory bitmap with a fully transparent alpha channel; using the memory bitmap with a fully transparent alpha channel as the memory bitmap after background clearing.
[0115] The above computer terminal may also execute the program code of the following steps in the method for processing screen watermarks: generating an initial watermark picture according to the target parameter information, the target watermark style, and the memory bitmap after background clearing, including: performing watermark drawing on the memory bitmap after background clearing according to the target parameter information and the target watermark style to obtain a target memory bitmap; generating an initial watermark picture according to the target memory bitmap.
[0116] The above computer terminal can also execute the program code of the following steps in the method for processing screen watermarks: performing watermark drawing on the memory bitmap after clearing the background according to the target parameter information and the target watermark style to obtain the target memory bitmap, including: determining the target alpha channel according to the target watermark style, and performing watermark drawing on the memory bitmap after clearing the background according to the target parameter information and the target alpha channel to obtain the watermark picture; and forming the target memory bitmap by combining the watermark picture and the memory bitmap after clearing the background.
[0117] The above computer terminal can also execute the program code of the following steps in the method for processing screen watermarks: generating an initial watermark picture according to the target memory bitmap, including: configuring the brush of the target operating system according to the target memory bitmap to obtain the target brush; and performing drawing on the window after background filling according to the target brush to obtain the initial watermark picture.
[0118] The above computer terminal can also execute the program code of the following steps in the method for processing screen watermarks: updating the window after background filling according to the target display transparency and the initial watermark picture to obtain the target window including the target watermark picture, including: making the initial watermark picture transparent according to the target display transparency and the target alpha channel to obtain the target watermark picture; and updating the window after background filling according to the target watermark picture to obtain the target window including the target watermark picture.
[0119] The above computer terminal can also execute the program code of the following steps in the method for processing screen watermarks: after displaying the target window on the display screen, obtaining a target screenshot, where the target screenshot at least includes the target watermark picture; and determining the identity information of the target object corresponding to the target screenshot according to the information in the target watermark picture.
[0120] Optionally, Figure 7 is a structural block diagram of a computer terminal according to an embodiment of the present application. As Figure 7 shown, the computer terminal 10 may include: one or more ( Figure 7 only one is shown in the figure) processors 102, a memory 104. The computer terminal 10 may also include a storage controller for controlling and managing the memory 104 through the storage controller; the computer terminal 10 may also include a peripheral interface for connecting a radio frequency module, an audio module, a display screen, etc. through the peripheral interface.
[0121] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the screen watermark processing method and device in the embodiments of the present application. The processor runs the software programs and modules stored in the memory to execute various functional applications and data processing, that is, to implement the above-mentioned screen watermark processing method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory may further include a memory remotely set relative to the processor, and these remote memories can be connected to the terminal 10 through a network. Examples of the above network include but are not limited to the Internet, enterprise intranet, local area network, mobile communication network, and combinations thereof.
[0122] The processor can call the information and application programs stored in the memory through the transmission device to execute the following steps: when it detects the start of the target application program, obtain the target parameter information corresponding to the target application program, where the target parameter information is used to characterize the identity information of the target object using the target application program; create a target window containing the target watermark picture according to the target parameter information, where the target watermark picture is obtained by performing transparency processing on the initial watermark picture according to the alpha channel, and the target window is a full-screen topmost window; display the target window on the display screen to display the target watermark picture full-screen, where the display screen is at least one of the following: the screen of the terminal running the target application program, the screen connected to the terminal.
[0123] Optionally, the above-mentioned processor can also execute the program code of the following steps: creating a target window containing the target watermark picture according to the target parameter information, including: obtaining the watermark configuration policy corresponding to the target application program, creating a transparent window containing the target attributes according to the watermark configuration policy, and performing background filling on the transparent window according to the target color to obtain the window after background filling, where the target attributes are used to indicate that the transparent window is a full-screen topmost layered window, and the watermark configuration policy at least includes the target watermark style, and the target watermark style is used to determine the target alpha channel; creating a memory device context compatible with the window after background filling, and creating a memory bitmap compatible with the memory device context; performing background clearing processing on the memory bitmap to obtain the memory bitmap after background clearing, and generating the initial watermark picture according to the target parameter information, the target watermark style, and the memory bitmap after background clearing; obtaining the target display transparency, and updating the window after background filling according to the target display transparency and the initial watermark picture to obtain the target window containing the target watermark picture, where the target display transparency is used to perform transparency processing on the initial watermark picture according to the target alpha channel.
[0124] Optionally, the above-mentioned processor may also execute the program code of the following steps: perform background clearing processing on the memory bitmap to obtain the memory bitmap after background clearing, including: configuring the alpha channel of the memory bitmap to be fully transparent to obtain the memory bitmap with a fully transparent alpha channel; using the memory bitmap with a fully transparent alpha channel as the memory bitmap after background clearing.
[0125] Optionally, the above-mentioned processor may also execute the program code of the following steps: generate an initial watermark image based on the target parameter information, the target watermark style, and the memory bitmap after background clearing, including: perform watermark drawing on the memory bitmap after background clearing according to the target parameter information and the target watermark style to obtain the target memory bitmap; generate an initial watermark image based on the target memory bitmap.
[0126] Optionally, the above-mentioned processor may also execute the program code of the following steps: perform watermark drawing on the memory bitmap after background clearing according to the target parameter information and the target watermark style to obtain the target memory bitmap, including: determine the target alpha channel according to the target watermark style, and perform watermark drawing on the memory bitmap after background clearing according to the target parameter information and the target alpha channel to obtain the watermark image; combine the watermark image and the memory bitmap after background clearing to form the target memory bitmap.
[0127] Optionally, the above-mentioned processor may also execute the program code of the following steps: generate an initial watermark image based on the target memory bitmap, including: configure the brush of the target operating system according to the target memory bitmap to obtain the target brush; draw on the window after background filling according to the target brush to obtain the initial watermark image.
[0128] Optionally, the above-mentioned processor may also execute the program code of the following steps: update the window after background filling according to the target display transparency and the initial watermark image to obtain the target window containing the target watermark image, including: make the initial watermark image transparent according to the target display transparency and the target alpha channel to obtain the target watermark image; update the window after background filling according to the target watermark image to obtain the target window containing the target watermark image.
[0129] Optionally, the above-mentioned processor may also execute the program code of the following steps: after displaying the target window on the monitor screen, obtain the target screenshot, where the target screenshot at least includes the target watermark image; determine the identity information of the target object corresponding to the target screenshot according to the information in the target watermark image.
[0130] Those of ordinary skill in the art can understand, Figure 7The structure shown is only schematic. The computer terminal can also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a personal digital assistant, and terminal devices such as Mobile Internet Devices (MID), PAD, etc. Figure 7 It does not limit the structure of the above electronic device. For example, the computer terminal 10 may further include more or fewer components (such as a network interface, a display device, etc.) than those shown Figure 7 in the figure, or have a different configuration from that shown Figure 7 in the figure.
[0131] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program. The program can be stored in a computer-readable storage medium, and the storage medium can include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disc, etc.
[0132] Embodiment 5
[0133] The embodiment of the present application further provides a computer-readable storage medium. Optionally, in this embodiment, the above storage medium can be used to store the program code executed by the method for processing the screen watermark provided in the first embodiment above.
[0134] Optionally, in this embodiment, the above storage medium can be located in any one of the computer terminals in the computer terminal group in the computer network, or in any one of the mobile terminals in the mobile terminal group.
[0135] The serial numbers of the embodiments of the present application above are only for description and do not represent the advantages or disadvantages of the embodiments.
[0136] In the above embodiments of the present application, the descriptions of the various embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0137] In the several embodiments provided by the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the couplings or direct couplings or communication connections shown or discussed with each other can be through some interfaces, and the indirect couplings or communication connections of the units or modules can be in an electrical or other form.
[0138] The unit described as a separation component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, that is, it may be located in one place or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0139] In addition, each functional unit in various embodiments of the present application may be integrated in a processing unit, may exist separately as individual physical units, or two or more units may be integrated in one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit.
[0140] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: USB flash drives, read-only memory (ROM), random access memory (RAM), mobile hard disks, magnetic disks, or optical discs, etc., which can store program codes.
[0141] The above are only the preferred embodiments of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.
Claims
1. A method for processing screen watermark, characterized in that, Including: When it is detected that the target application is started, obtain the target parameter information corresponding to the target application, where the target parameter information is used to characterize the identity information of the target object using the target application; Create a target window including a target watermark picture according to the target parameter information, where the target watermark picture is obtained by performing transparency processing on the initial watermark picture according to the alpha channel, and the target window is a full-screen topmost window; Display the target window on the display screen to display the target watermark picture full screen, where the display screen is at least one of the following: the screen of the terminal running the target application, the screen connected to the terminal.
2. The method according to claim 1, wherein Creating a target window including a target watermark picture according to the target parameter information includes: Obtain the watermark configuration policy corresponding to the target application, create a transparent window including target attributes according to the watermark configuration policy, and perform background filling on the transparent window according to the target color to obtain a window after background filling, where the target attributes are used to indicate that the transparent window is a full-screen topmost layered window, and the watermark configuration policy at least includes a target watermark style, and the target watermark style is used to determine the target alpha channel; Create a memory device context compatible with the window after background filling, and create a memory bitmap compatible with the memory device context; Perform background clearing processing on the memory bitmap to obtain a memory bitmap with the background cleared, and generate the initial watermark picture according to the target parameter information, the target watermark style, and the memory bitmap with the background cleared; Obtain the target display transparency, and update the window after background filling according to the target display transparency and the initial watermark picture to obtain the target window including the target watermark picture, where the target display transparency is used to perform transparency processing on the initial watermark picture according to the target alpha channel.
3. The method according to claim 2, characterized in that Performing background clearing processing on the memory bitmap to obtain a memory bitmap with the background cleared includes: Configure the alpha channel of the memory bitmap to be fully transparent to obtain a memory bitmap with the alpha channel fully transparent; Use the memory bitmap with the alpha channel fully transparent as the memory bitmap with the background cleared.
4. The method according to claim 2, wherein Generating the initial watermark picture according to the target parameter information, the target watermark style, and the memory bitmap with the background cleared includes: Perform watermark drawing on the memory bitmap with the background cleared according to the target parameter information and the target watermark style to obtain a target memory bitmap; Generate the initial watermark picture according to the target memory bitmap.
5. The method according to claim 4, characterized in that Performing watermark drawing on the memory bitmap with the background cleared according to the target parameter information and the target watermark style to obtain a target memory bitmap includes: Determine the target alpha channel according to the target watermark style, and perform watermark drawing on the memory bitmap with the background cleared according to the target parameter information and the target alpha channel to obtain a watermark picture; Compose the target memory bitmap from the watermark image and the memory bitmap after clearing the background.
6. The method according to claim 5, wherein Generating the initial watermark image based on the target memory bitmap includes: Configuring a brush of a target operating system according to the target memory bitmap to obtain a target brush; Drawing on the window after background filling according to the target brush to obtain the initial watermark image.
7. The method according to claim 6, wherein Updating the window after background filling according to the target display transparency and the initial watermark image to obtain the target window including the target watermark image, including: Making the initial watermark image transparent according to the target display transparency and the target alpha channel to obtain the target watermark image; Updating the window after background filling according to the target watermark image to obtain the target window including the target watermark image.
8. The method according to any one of claims 1 to 7, characterized in that After the target window is displayed on the display screen, the method further includes: Obtaining a target screenshot, where the target screenshot at least includes the target watermark image; Determining the identity information of the target object corresponding to the target screenshot according to the information in the target watermark image.
9. A method for processing screen watermarks, characterized in that, Includes: Obtaining target parameter information corresponding to a target application uploaded by a client, where the target parameter information is used to characterize the identity information of a target object using the target application; Creating a target window including a target watermark image in a cloud server according to the target parameter information, where the target watermark image is obtained by making an initial watermark image transparent according to an alpha channel, and the target window is a full-screen topmost window; Feeding back the target window to the client to display the target window on the display screen to display the target watermark image full screen, where the display screen is at least one of the following: the screen of a terminal running the target application, a screen connected to the terminal.
10. A processing device for screen watermark, characterized in that, Includes: A first acquisition unit, configured to obtain target parameter information corresponding to the target application when it is detected that the target application is started, where the target parameter information is used to characterize the identity information of a target object using the target application; A first processing unit, configured to create a target window including a target watermark image according to the target parameter information, where the target watermark image is obtained by making an initial watermark image transparent according to an alpha channel, and the target window is a full-screen topmost window; A first display unit, configured to display the target window on the display screen to display the target watermark image full screen, where the display screen is at least one of the following: the screen of a terminal running the target application, a screen connected to the terminal.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, where when the program runs, it controls the device where the storage medium is located to execute the screen watermark processing method according to any one of claims 1 to 9.
12. An electronic device, characterized in that, Includes: A memory storing an executable program; A processor for running the program, where when the program runs, it executes the screen watermark processing method according to any one of claims 1 to 9.