CN115760532A - Watermark processing method, watermark extracting method, watermark processing device, watermark extracting device, and storage medium - Google Patents

Watermark processing method, watermark extracting method, watermark processing device, watermark extracting device, and storage medium Download PDF

Info

Publication number
CN115760532A
CN115760532A CN202211321327.XA CN202211321327A CN115760532A CN 115760532 A CN115760532 A CN 115760532A CN 202211321327 A CN202211321327 A CN 202211321327A CN 115760532 A CN115760532 A CN 115760532A
Authority
CN
China
Prior art keywords
watermark
information
screen
image
target picture
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211321327.XA
Other languages
Chinese (zh)
Inventor
莫华晓
杨锐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
Alibaba China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN202211321327.XA priority Critical patent/CN115760532A/en
Publication of CN115760532A publication Critical patent/CN115760532A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

The embodiment of the application provides a watermark processing method, a watermark extracting method, equipment and a medium. After the watermark image composed of a plurality of watermark units is obtained, the watermark image can be displayed in the top layer of the display screen, and the target data to be accessed can be displayed in the display screen in a superposition mode with the watermark image. The transparency of the watermark unit is lower than a set threshold value, so that a watermark image is difficult to capture by human eyes, displayed target data is ensured to have higher visual quality, and the influence on data access operation is reduced. The watermark image is displayed in the top layer of the screen, so that the watermark image is not blocked, the watermark image can be successfully captured by screen capture operation or shooting operation, and evasiveness of the watermark image is reduced. The watermark image is composed of a plurality of watermark units, so that a watermark block containing complete information in the watermark image has a smaller area, and the integrity of the intercepted or shot watermark information can be improved even if a screen is intercepted or shot by a smaller part, thereby improving the data protection strength.

Description

Watermark processing method, watermark extracting method, watermark processing device, watermark extracting device, and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a watermark processing method, a watermark extraction device, and a storage medium.
Background
The rapid development of internet and multimedia technology accelerates the information transmission and communication, and people can conveniently transmit various information through the network. However, various divulgence channels are bred in the convenient information transmission mode, so that many non-public data are leaked. In the prior art, there are some ways to watermark data to locate a source of compromise. However, the conventional watermark is easy to be removed by an image processing tool, and thus data cannot be well protected. Therefore, a solution is yet to be proposed.
Disclosure of Invention
Aspects of the present application provide a method, device and storage medium for watermark processing and extraction, so as to reduce perceptibility of watermarks and improve data security.
An embodiment of the present application provides a watermark processing method, including: acquiring a watermark image composed of a plurality of watermark units, wherein the watermark units are generated according to tracing information; displaying the watermark image in a top layer of a display screen; the transparency of the watermark image is lower than a set threshold value, and the set threshold value is used for reducing the visual perception of the watermark image; and displaying target data to be accessed in the display screen in an overlapping manner with the watermark image.
Optionally, obtaining a watermark image composed of a plurality of watermark units includes: generating the watermark unit according to the tracing information; and responding to the starting operation of a first application program or responding to the operation of reading specified data of a second application program to acquire the watermark image containing a plurality of watermark units.
Optionally, generating the watermark unit according to the tracing information includes: obtaining the tracing information for positioning a divulgence source; adding check information into the tracing information to obtain data to be coded; coding the data to be coded by adopting a preset coding algorithm to obtain a coding result; and carrying out information spread spectrum on the encoding result according to a preset spread spectrum sequence to obtain the watermarking unit.
Optionally, in a top layer of the display screen, a watermark image is presented, comprising: determining a window component; the non-transparent element in the window component is in an invisible state; in the window component, drawing the watermark image to obtain a watermark window; displaying the watermark window on the top layer of the display screen; the watermark window has a mouse-through property.
Optionally, determining a window component comprises: acquiring at least one sub-screen contained in the display screen; the at least one sub-screen belongs to different display devices; acquiring the respective resolution of the at least one sub-screen according to the respective equipment parameter of the at least one sub-screen; and determining the resolution of the window component corresponding to each of the at least one sub-screen according to the resolution of each of the at least one sub-screen.
Optionally, in the window component, rendering the watermark image includes: according to the resolution of each sub-screen, drawing a watermark image corresponding to each sub-screen; in watermark images corresponding to the sub-screens with different resolutions, the tiling modes of the watermark units are different; and drawing a watermark image corresponding to each of the at least one sub-screen in a window component corresponding to each of the at least one sub-screen.
Optionally, the method further comprises: setting a first transparency for a low-order pixel value in the watermark unit and setting a second transparency for a high-order pixel value in the watermark unit in the process of drawing the watermark image of any one of the at least one sub-screen; wherein the first transparency is greater than the second transparency.
Optionally, the method further comprises: acquiring a target picture to be sent out; the target picture is obtained by screen capture or shooting of a display screen; extracting watermark information from the target picture; the watermark information comprises at least one watermark unit; and decoding the watermark information according to the at least one watermark unit to obtain the information of the divulgence source.
Optionally, after the watermark information is decoded to obtain the information of the divulgence source, the method further includes: and blocking the outgoing operation of the target picture.
Optionally, before extracting the watermark information from the target picture, the method further includes: carrying out perspective transformation on the target picture according to the geometric information of the target picture; acquiring the size proportion of a target watermark unit from a target picture after perspective transformation; and carrying out scaling correction on the target picture after perspective transformation according to the size proportion of the correction template of the watermark unit and the size proportion of the target watermark unit.
Optionally, decoding the watermark information to obtain information of a divulgence source, where the decoding includes: performing correlation calculation on the target picture according to a preset spread spectrum sequence to obtain a suspicious information matrix; and decoding the suspicious information matrix by adopting a decoding algorithm corresponding to the coding algorithm to obtain information of the divulgence source.
The embodiment of the present application further provides a watermark extraction method, including: acquiring a target picture to be detected; the target picture is obtained by screen capture or shooting of a display screen; a watermark image is displayed on the display screen and generated according to the watermark processing method provided by the embodiment of the application; extracting watermark information from the target picture; the watermark information comprises at least one watermark unit; and decoding the watermark information according to the at least one watermark unit to obtain the information of the divulgence source.
Optionally, before extracting the watermark information from the target picture, the method further includes: carrying out perspective transformation on the target picture according to the geometric information of the target picture; acquiring the size proportion of a target watermark unit from a target picture after perspective transformation; and carrying out scaling correction on the target picture after perspective transformation according to the size proportion of the correction template of the watermark unit and the size proportion of the target watermark unit.
An embodiment of the present application further provides a terminal device, including: a memory, a processor, and a display component; the memory is to store one or more computer instructions; the processor is to execute the one or more computer instructions to: and calling the display component to execute the steps in the method provided by the embodiment of the application.
Embodiments of the present application further provide a computer-readable storage medium storing a computer program, where the computer program, when executed by a processor, can implement the steps in the method provided in the embodiments of the present application.
In the watermark processing method provided by the embodiment of the application, after the watermark image composed of a plurality of watermark units is obtained, the watermark image can be displayed in the top layer of the display screen, and the target data to be accessed is displayed in the display screen in a superposition manner with the watermark image. The transparency of the watermark unit is lower than a set threshold value so as to reduce the visual perception of the watermark unit. Furthermore, the watermark image is difficult to be captured by human eyes, the displayed target data is ensured to have higher visual quality, and the influence on data access operation is reduced. The watermark image is displayed in the top layer of the screen, so that the watermark image is not shielded, and can be successfully captured by screen capture operation or shooting operation, and evasiveness of the watermark image is reduced.
Preferably, the watermark image is not changed along with the operation on the display screen, so that the risk that the watermark image is covered or removed is reduced, and the stability of the watermark image is improved.
In addition, the watermark image is composed of a plurality of watermark units, so that the watermark block containing complete information in the watermark image has a smaller area, and the integrity of the intercepted or shot watermark information can be improved even if a screen is shot or a small part of the screen is shot, and the data protection strength is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic flowchart of a watermarking method according to an exemplary embodiment of the present application;
fig. 2 is a schematic diagram of a watermarking unit provided in an exemplary embodiment of the present application;
FIG. 3 is a schematic diagram of a display screen and a screenshot image provided in an exemplary embodiment of the present application;
fig. 4-1 is a schematic flowchart of a watermark extraction method according to an exemplary embodiment of the present application;
fig. 4-2 is a schematic flowchart of watermark generation and watermark extraction provided in an exemplary embodiment of the present application;
FIG. 5 is a flowchart of an encoded information generating operation provided by an exemplary embodiment of the present application;
FIG. 6 is a flow chart of generating an operational watermark pattern from encoded information as provided by an exemplary embodiment of the present application;
fig. 7 is a flowchart of a watermark information extraction operation provided in an exemplary embodiment of the present application;
fig. 8 is a schematic structural diagram of a terminal device according to an exemplary embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the invention and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise, and "the plural" typically includes at least two, but does not exclude the presence of at least one.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a good or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such good or system. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in articles of commerce or systems including such elements.
In some embodiments of the present application, a solution is provided, and the technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a flowchart illustrating a watermarking method according to an exemplary embodiment of the present application, where the method may include the steps shown in fig. 1:
step 101, obtaining a watermark image composed of a plurality of watermark units, wherein the watermark units are generated according to tracing information.
102, displaying the watermark image in the top layer of a display screen; the transparency of the watermark image is lower than a set threshold value, and the set threshold value is used for reducing the visual perception of the watermark image.
And 103, displaying target data to be accessed in the display screen in an overlapping mode with the watermark image.
The embodiment can be executed by a terminal device, and the terminal device runs a watermarking program. The terminal device may include, but is not limited to, a mobile phone, a computer, a tablet computer, and the like. The terminal device is provided with a display screen, and the watermark processing program can be called by the terminal device to display the watermark image on the screen. After the terminal equipment is started, the watermark processing program can be automatically run, and the watermark processing program is kept to run continuously and silently. Alternatively, the terminal device may execute the watermark processing program under the trigger of the user event or the system event, which is not limited in this embodiment.
The watermark unit refers to a unit image for forming a watermark image, and may be referred to as a unit watermark image. Each watermark unit is the minimum unit containing complete watermark information. The size of the watermark unit can be set to be a smaller value, a plurality of watermark units form a watermark image, and the intercepted or shot image can contain more complete watermark information in a scene of a smaller screen area.
The watermark unit may be generated by a watermark processing program or a server, and this embodiment is not limited. Taking the watermark processing program as an example, when the watermark processing program runs, the tracing information can be obtained, and the watermark unit is generated according to the tracing information. The tracing information is used for positioning a divulgence source of the target data. The watermark processing program can generate the watermark unit according to the currently acquired tracing information when running each time. The watermark processing program may also generate a watermark unit in advance according to different tracing information, and store the watermark unit of different tracing information in the local terminal device or on the server side for use, which is not limited in this embodiment.
Optionally, in this embodiment, the tracing information used for generating the watermarking unit may include, but is not limited to: at least one of an identification of a user of the target data, an equipment identification, and a browsing time. The identification of the user of the target data may be a job number or an account number of the user. The device identifier may be at least one of an IP (Internet Protocol) address, a hardware address, and a device serial number of a device currently accessing the target data.
The watermark unit may be a text watermark or an image watermark. If the watermark is a character watermark, the watermark unit can be generated by the characters corresponding to the tracing information. If the image is an image watermark, the watermark unit may be generated by encoding the tracing information, and an optional encoding method will be described in the subsequent embodiments, which is not described herein again.
After determining the watermark units, the watermark processing program may display a watermark image including a plurality of watermark units in the top layer of the display screen. In the watermark image, the transparency of the watermark unit is lower than a set threshold value so as to reduce the visual perception of the watermark unit. The threshold is set according to the perception degree of the transparency by human eyes, and this embodiment is not particularly limited. In some embodiments, the watermark processing program may adjust the transparency of the watermark unit according to the brightness of the screen display and the human visual perception characteristic, so that the watermark unit is not perceived by the user visual, thereby reducing the risk that the watermark image is forcibly closed or the watermark information is artificially removed. For example, in some embodiments, the transparency of the watermark elements may be set to be between 0.015 and 0.020 to balance the visual effect with the traceability effect.
The watermark image is not changed along with the operation on the display screen, namely when the operation occurs on the display screen, the watermark image is kept fixedly displayed on the top layer of the display screen. Wherein the operation on the display screen includes: a click operation, a drag operation, a zoom operation, or a scroll operation, which is not limited in this embodiment. The above operations on the display screen may be triggered by the system or by the user. The above operation on the display screen can penetrate the watermark image and be received by the window positioned at the bottom layer of the watermark image. Furthermore, when a page (such as a document page) displayed on the lower layer of the watermark image is scrolled, the watermark image is not scrolled; when the page (for example, an image page) displayed on the lower layer of the watermark image is zoomed, the watermark image is not zoomed therewith; when a page (for example, a browser page) displayed on the lower layer of the watermark image is dragged, the watermark image is also dragged along with the page.
Based on the embodiment, on one hand, the risk that the watermark image changes so as to enhance the visual perception of the user is reduced; on the other hand, the risk that the watermark image is covered or removed is reduced, and the stability of the watermark image is improved.
In some embodiments, the watermark image may be displayed on a display screen in a full screen manner to expand the watermark range, thereby reducing the risk of the watermark image being subjectively evaded. In other embodiments, the display range of the watermark image may be consistent with the display range of the window where the target data is located, that is, the watermark image is displayed according to the size and the position of the window where the target data is located, so as to ensure that the watermark image can be overlaid on the target data.
When the terminal equipment displays the watermark image through the watermark processing program, the target data to be accessed can be displayed in a display screen in a superposition mode with the watermark image. Wherein the target data refers to data with privacy property shown in the screen. The watermark image is located on the top layer of the display screen, so that the watermark image cannot be shielded by a window of a program where the target data is located. Thus, it is possible to ensure that the user can intercept or photograph the content in the watermark image when the user intercepts or photographs the screen.
In this embodiment, after obtaining the watermark image composed of the plurality of watermark units, the watermark image may be displayed in the top layer of the display screen, and the target data to be accessed may be displayed in the display screen in a manner of being superimposed on the watermark image. The transparency of the watermark unit is lower than a set threshold value so as to reduce the visual perception of the watermark unit. Furthermore, the watermark image is difficult to be captured by human eyes, the displayed target data is ensured to have higher visual quality, and the influence on data access operation is reduced. The watermark image is displayed in the top layer of the screen, so that watermark information in the watermark image can be successfully captured by screen capture operation or shooting operation, and evasiveness of the watermark information is reduced. In addition, the watermark image is composed of a plurality of watermark units, so that the watermark block containing complete information in the watermark image has a smaller area, and the integrity of the intercepted or shot watermark information can be improved even if a screen is shot or a small part of the screen is shot, and the data protection strength is improved.
In some optional embodiments, when the watermark processing program obtains the watermark image composed of multiple watermark units, the watermark unit may be generated according to the tracing information, and the watermark image including multiple watermark units may be obtained under the triggering operation of a user event or a system event. Wherein the user event or the system event can be set by a user (such as an administrator) through the watermark processing program. Among other things, system events may include: a timed arrival event or a device start (restart) event. The user event may include an event that a user starts an application on the terminal device, or an event that a user accesses specific data through some applications. The following are exemplary descriptions, respectively.
In some embodiments, the watermark processing program may generate a watermark image including a plurality of watermark units in response to a launch operation of the first application. The first program may include, but is not limited to, an office program, a design program, or a browser. Based on the embodiment, the terminal device can display the watermark image in the process of running the first program so as to form protection for the data access process of the specific program.
For example, when the terminal device detects that the user starts office software, the watermark processing program may be invoked to present a watermark image on a display screen of the terminal device. During the process of working with office software, the watermark image is covered on the interface of the office software with low transparency. When the page of the office software is scrolled or zoomed, the watermark image cannot move along with the page, and any interface (such as an editing interface and a preview interface) displayed by the office software can be effectively protected.
For another example, when the terminal device detects that the user activates the code editing tool, the watermark processing program may be invoked to present the watermark image on the display screen of the terminal device. During the process that a user edits the code by using the code editing tool, the watermark image is covered on the interface of the code editing tool with low transparency. When the page of the code editing tool is rolled or the interface is switched, the watermark image is kept to be always displayed on the top layer of the display screen, and any interface displayed by the code editing tool (such as a code editing interface, a debugging interface and a log output interface) can be effectively protected.
In other embodiments, the watermark processing program may generate a watermark image including a plurality of watermark units in response to an operation of the second application to read the specified data. Wherein the second program may comprise an office program, a design program or a browser. The specified data may include, but is not limited to: documents with a particular name, pictures with a particular signature, or files authored by a specified user, etc. Based on the embodiment, the watermark processing program can expose the watermark window in the process of accessing the specified data by the second program so as to form protection for the specified data.
For example, when a terminal device detects that a user accesses a document whose file name includes the typeface of "internal file" through office software, a watermark processing program may be invoked to present a watermark image on a display screen of the terminal device. When a user accesses the document by using office software, the watermark image is covered on an interface of the office software with lower transparency, so that the document with the characters of the internal file displayed by the office software can be effectively protected while the display effect of the document content is not influenced.
For another example, when the terminal device detects that the user accesses a specific link address (e.g., an intranet) through a browser, the watermark processing program may be invoked to display a watermark image on a display screen of the terminal device. When a user accesses the address by using the browser, the watermark image is covered on the interface of the browser with lower transparency, so that the specific page accessed by the browser can be effectively protected while the picture quality of the interface of the browser is not influenced.
In the above embodiment, the watermark processing program can flexibly acquire and display the watermark image under the triggering of a user event or a system event, and can meet the watermark display requirements in various scenes. Meanwhile, the event triggering the watermark display operation can be customized and designed through the watermark processing program, and the personalized and differentiated watermark display requirements of different users or enterprises can be met.
After the watermark processing program is started, a coding mode can be adopted to generate a watermark unit according to the tracing information. As will be exemplified below.
Optionally, the watermark processing program may add check information to the obtained tracing information to obtain the data to be encoded; wherein the check information is used to check the accuracy of the watermarking unit at the decoding stage. Assuming that the obtained tracing information is described by using a character string with the length of K, the watermark processing program can add an L-bit check code into the character string with the length of K to obtain data to be encoded with the length of K + L, where K and L are positive integers.
After the data to be coded is obtained, a preset coding algorithm can be adopted to code the data to be coded, and a coding result is obtained. The predetermined encoding algorithm may include, but is not limited to: any one of a Polar Code (Polar Code), a Convolutional Code (Convolutional Code), a Low Density Parity Check Code (LDPC), and a Turbo Code (Turbo Code), which is not limited in this embodiment. The following is an exemplary explanation of the polarization code.
Wherein, the polar code is a forward error correction coding method for signal transmission. The core of the structure is that through channel polarization processing, a method is adopted at the encoding side to enable each sub-channel to present different reliability, when the code length is continuously increased, one part of channels tend to perfect channels (without error codes) with the capacity close to 1, the other part of channels tend to pure noise channels with the capacity close to 0, and the channels with the capacity close to 1 are selected to directly transmit information to approximate the channel capacity.
Following the above example, after the data to be encoded with the length of K + L is obtained, the redundant error correction bits may be added to the data to be encoded, so as to obtain a character string with the code length of N, where N is a positive integer. When the polar code is adopted to code the character string with the length of N, K + L sub-channels with the minimum Babbitt parameter can be calculated to serve as effective information storage positions, and (N-K-L) sub-channels serve as appointed information storage positions to construct a generating matrix to obtain the N-bit polar code.
After the coding result is obtained based on the steps, information spreading can be carried out on the coding result according to a preset spreading sequence, and a watermark unit is obtained. Following the above example, a spreading sequence template R may be obtained, and a watermark unit may be generated according to the N-bit polarization code and the spreading sequence template R. Assuming that the length of the spreading sequence template R is T, the N-bit polarization code is represented by 01011101 in binary. In information spreading, 1 in the polarization code may be converted into (1 × r), and 0 in the polarization code may be converted into (-1 × r), so as to obtain sequence information with a length of N × T. And converting the sequence information into a two-dimensional matrix to obtain a final watermark unit.
In this embodiment, the encoding method based on the polar code can calculate the reliability of the channel and define the error probability at the encoding stage, transmit information bits in the channel with the highest reliability, and reduce the energy of the watermark based on the improvement of the error correction capability, thereby ensuring the high robustness and the high visual quality of the watermark information.
After the watermark unit is generated based on the foregoing embodiment, the watermark image including the watermark unit can be displayed in the display screen.
In some alternative embodiments, the watermarking process may employ a watermark window to present the watermark image. Alternatively, the watermark handler may determine a window component; wherein the non-transparent element in the window assembly is in an invisible state. The non-transparent component may include: at least one of a border, a background color, and a button of the window assembly. For example, taking an OSX (operating system) system as an example, a watermark handler may instantiate a NSWindow class, resulting in a NSWindow object as a window component. Alternatively, the watermark handler may instantiate a NSPanel (a Window type) class, resulting in a NSPanel object as a window component, which is not limited to this embodiment. After the watermark processing program instantiates the window assembly, non-transparent elements such as a frame, a background color, a button and the like in the window assembly can be removed, so that the window assembly is in a transparent state.
After the window component is determined based on the above steps, a watermark image may be drawn in the window component. Wherein, the watermark image can be tiled by a plurality of watermark units. In some alternative embodiments, after determining the window component, the watermark unit may be rendered in the window component in a tiled manner to obtain the watermark window. In other alternative embodiments, the watermark image may be generated in advance by a tile watermark unit, and then the watermark image is displayed in the window component, which is not limited in this embodiment.
Wherein, tiling means that the watermark unit is repeatedly drawn in the window component to fill the window component. There may be a small gap or no gap between adjacent watermark units, and this embodiment is not limited. The watermark image obtained by tiling comprises a plurality of watermark units which are arranged closely, so that clipping attack can be effectively resisted, screenshot or photographing can be carried out at any position on a display screen, and a complete watermark pattern can be shot. After the watermark window is obtained by drawing the watermark unit in the window component, the transparency of the watermark window can be adjusted so that the watermark window is not obvious to human eyes. For example, the watermark transparency may be set to 0.015, 0.02, etc. to achieve a balance between visual and traceability effects. As shown in fig. 2, after the transparency of the watermark pattern on the left side is adjusted, the relatively invisible watermark unit shown on the right side can be obtained, so that a screen watermark with high robustness that can resist social media transmission attack and screen shot attack is obtained, and the possibility that the watermark is perceived by a user is reduced.
Wherein the watermark window has a mouse-through property. That is, the operation of the mouse, keyboard, etc. of the user received by the watermark window can penetrate the watermark window and is finally received by the window where the target data is located. That is, the watermark window does not respond to the mouse, keyboard, etc. operation of the user, so the watermark window can be always displayed in the top layer of the display screen and does not move, so as to effectively protect the data in any window at the bottom layer of the watermark window. The mouse penetration attribute of the watermark window may be implemented by an API (Application Program Interface) function provided by an operating system, such as SetWindowLong (a function for changing the attribute of the designated window) and GetWindowLong (a function for obtaining window parameters), which is not described again.
As shown in fig. 3, the watermark window with lower transparency may be displayed on the top layer of the display screen. The target data (i.e., the document shown in fig. 3) may be displayed in an intermediate layer of the display screen so that the watermark image and the target data may be displayed in a merged manner. When a screen capture event occurs, the watermark image at the top of the screen can be captured to obtain a picture with the watermark unit fused as shown in fig. 3.
In such an embodiment, multiple watermark units may be exposed in the watermark window by tiling the watermark units in the window component. On the one hand, can make the less watermark unit of size can cover more screen scope, and on the other hand, the watermark unit size that contains complete information is less, even the little part on intercepting or shooting screen also can catch comparatively complete watermark information to promote the accuracy of analysis results of tracing to the source.
In some optional embodiments, when the watermark processing program displays the watermark window, the size of the watermark window may be adapted to the resolution of the display screen of the terminal device. That is, the watermark window may fill the entire display screen. Optionally, the watermark processing program may obtain at least one sub-screen included in the display screen when determining the window component; the at least one sub-screen belongs to a different display device. According to the respective device parameters of the at least one sub-screen, the respective resolution of the at least one sub-screen can be obtained. Accordingly, the resolution of the window component corresponding to each of the at least one sub-screen can be determined according to the resolution of each of the at least one sub-screen.
For example, in some scenarios, when a user employs a multi-screen display, one host is connected to multiple displays, and target data can be displayed on the multiple displays in a split-screen manner. In this case, the watermark processing program may display the watermark window including the watermark image on the top layer of the screen of each of the plurality of displays according to the screen resolution of each of the plurality of displays, and the watermark window of each of the displays is adapted to the screen resolution of the display, so that the watermark image may be overlaid on each of the display screens without being stretched or scaled, and thus, when any one of the displays is cut or photographed, the watermark information may be intercepted or photographed, thereby improving the data security in the split-screen display scene.
Optionally, when the watermark image is rendered, the watermark image corresponding to each of the at least one sub-screen may be rendered according to the resolution of each of the at least one sub-screen; and drawing the watermark image corresponding to each of the at least one sub-screen in the window component corresponding to each of the at least one sub-screen. And in the watermark images corresponding to the sub-screens with different resolutions, the tiling modes of the watermark units are different.
The tiling mode is different, and can be at least one of the following: the number of the watermark units adopted by tiling is different, the gaps between adjacent watermark units are different when tiling is carried out, the tiling starting positions of different rows are different, and the tiling starting positions of different columns are different.
For example, if the resolution of a sub-screen is 1366 × 768 and the size of the watermark units is 128 × 128, 10 watermark units may be tiled in each row and 6 watermark units may be tiled in each column; in each row, the gap between adjacent watermark units is 9 pixels; in each column, the gap between adjacent watermark units is 0 pixels. For another example, if the resolution of a sub-screen is 1600 × 1200, 12 watermark units may be tiled in each row and 9 watermark units may be tiled in each column; in each row, the gap between adjacent watermark units is 5.5 pixels; in each column, the gap between adjacent watermark units is 6 pixels.
In this embodiment, for any sub-screen, the corresponding tiling mode is adapted to the screen resolution thereof, so that the tiled watermark image can be tiled to cover the window component corresponding to the whole sub-screen without stretching deformation and without scaling deformation. Therefore, the watermark units displayed on each sub-screen have higher image quality and smaller deformation, and the accuracy of subsequent watermark extraction is favorably improved. Wherein, when the tiling starting position of different rows is different or the tiling starting position of different columns is different, the watermarks of different rows or different columns can be staggered. Furthermore, when any position is cut or shot on the screen, the probability that the watermark pattern is completely cut or shot can be improved, and therefore the cutting resistance and screen shot resistance of the watermark image are effectively improved.
In some optional embodiments, during the process of rendering the watermark image of any sub-screen, different transparencies can be set for different pixel values in the watermark unit to adapt to different ground colors of the display screen. Alternatively, considering that the human eye is visually insensitive to pixel differences of white background and sensitive to pixel differences of gray and black background, a first transparency a may be set for a lower-order pixel value in the watermark unit, and a second transparency β may be set for a higher-order pixel value in the watermark unit, the first transparency a being greater than the second transparency β. The low-order pixel value is a smaller pixel value in the binary matrix corresponding to the watermark unit, and the high-order pixel value is a larger value in the binary image. Based on the embodiment, when the window (hereinafter referred to as a bottom window) below the watermark image is a white-bottom window, the display intensity of the watermark image can be improved, and when the bottom window is a grey-bottom window, the visual perception of the watermark image can be reduced. As will be exemplified below.
After the watermark image and the bottom layer window are superposed, pixels on the display screen can be changed, and the method specifically comprises the following steps:
R`=R(1)*(1-t)+R(2)*(a)
G`=G(1)*(1-t)+G(2)*(a)
B`=B(1)*(1-t)+B(2)*(a)
wherein, R' represents the value of the red channel component at the corresponding position after the watermark is superimposed on the bottom layer window, R (1) represents the value of the red channel component at the corresponding position when no watermark is superimposed on the bottom layer window, R (2) represents the value of the red channel component at the corresponding position of the watermark image, and G and B represent the values of the green channel component and the blue channel component. t represents a value of transparency at a position corresponding to the watermark image, and when the transparency includes 0 to 255 levels, t = a/255 or t = β/255.
In the binarization matrix corresponding to the watermark unit, the lower-order pixel value is usually 0, and the higher-order pixel value is marked as P, where P may be 255, 128, 64, or 32, and the like, which is not limited in this embodiment. The following embodiments will be exemplified by taking P as 255.
If the bottom window displayed by the display screen is a white background image, and the value of the high-order pixel of the white background image is 255, when the watermark image is superimposed on the bottom window, the value of the screen display pixel corresponding to the low-order pixel of the watermark image is: 255: ((255-a)/255) + 0: (a/255) =255-a; the values of the screen display pixels corresponding to the high order pixels on the watermark image are: 255 × ((255- β)/255) + P × (β/255) =255- β + (P × β)/255 =255.
If the bottom window displayed by the display screen is a gray bottom image, and the value of the high-order pixel of the gray bottom image is 128, when the watermark image is overlapped on the bottom window, the value of the screen display pixel corresponding to the low-order pixel of the watermark image is: 128 ((255-a)/255) + 0: (a/255) =128-0.5 × a; the values of the screen display pixels corresponding to the high order pixels on the watermark image are: 128: ((255- β)/255) + P: (β/255) = 128-0.5: + (255:/β)/255 =128+0.5 +β.
Based on the above, when the bottom layer window with white background is displayed on the bottom layer of the display screen, the pixel difference generated by the high-order pixel and the low-order pixel on the watermark image to the bottom layer window is a. When the bottom layer window with a grey bottom is displayed on the bottom layer of the display screen, the pixel difference caused by the lower-order pixels and the upper-order pixels on the watermark image to the bottom layer window is 0.5 x (a + beta).
Considering that the human eye is visually insensitive to pixel differences in white background and sensitive to pixel differences in gray black background, a may be set larger than β, e.g., a is set to 3 and β is set to 1, or a is set to 4 and β is set to 2.
Taking a as 3 and β as 1 as an example, if the bottom layer window displayed by the display screen is a white bottom image, and the watermark image is superimposed on the bottom layer window, the values of the screen display pixels corresponding to the lower-order pixels on the watermark image are: 255-a =252; the value of the screen display pixel corresponding to the high order pixel on the watermark image is 255. The lower order pixels and the higher order pixels on the watermark image produce a pixel difference of 3 for the underlying image. The pixel difference can enhance the watermark strength, and the easy extraction of the watermark image is improved under the condition that human eyes are insensitive to the pixel difference of the white background window.
If the bottom window displayed by the display screen is a grey bottom image, when the watermark image is overlapped on the bottom window, the value of the screen display pixel corresponding to the low-order pixel on the watermark image is as follows: 128-0.5 a =126.5, 127 after rounding; the values of the screen display pixels corresponding to the high-order pixels on the watermark image are: 128+0.5 β =128.5, and is 129 after rounding. The lower order pixels and the higher order pixels on the watermark image produce a pixel difference of 2 for the underlying image. The pixel difference can weaken the watermark strength, and the watermark is less easily perceived by human eyes under the condition that the human eyes are sensitive to the pixel difference of the grey bottom window.
When the high-order pixel values P on the watermark units are different, the values of a and beta are also different. For example, when P is 128, a is preferably 4 and β is preferably 2. If the bottom window displayed by the display screen is a white bottom image, and the watermark image is superposed on the bottom window, the value of the screen display pixel corresponding to the low-order pixel on the watermark image is 251; the value of the screen display pixel corresponding to the high-order pixel on the watermark image is 254. The lower order pixels and the higher order pixels on the watermark image produce a pixel difference of 3 for the underlying image. If the bottom layer window displayed by the display screen is a grey bottom image, when the watermark image is overlapped on the bottom layer window, the value of the screen display pixel corresponding to the low-order pixel on the watermark image is 126; the value of the screen display pixel corresponding to the high order pixel on the watermark image is 128. The low order pixels and the high order pixels on the watermark image produce a pixel difference of 2 for the underlying image.
Similarly, when the high-order pixel value P on the watermark unit is 64, a may be 6, and β may be 4. When the high-order pixel value P on the watermark unit is 32, a is 10, and β is 8. The transparency value can enable the pixel difference of the watermark image to be 3 caused by a white background window and the pixel difference of the watermark image to be 2 caused by a gray background window, and the detail is omitted.
In this embodiment, in the process of rendering the watermark image, the transparency of each of the high-order pixels and the low-order pixels in the watermark unit is adjusted, so that the generated watermark image can adapt to the bottom windows with different bottom colors in the process of displaying. When the bottom window displayed on the display screen is a white-bottom window, the pixel difference after the watermark image is superimposed on the white-bottom window is larger, the watermark strength is stronger, and the watermark effect can be enhanced under the condition that the human eyes are insensitive to the pixel change of a white area, so that the accuracy of the subsequent watermark extraction result is improved. When the bottom window is switched from a white bottom window to a gray bottom window, the pixel difference after the watermark image is superimposed on the gray bottom window is small, the watermark strength is weak, and the visual perception of the watermark image can be automatically reduced under the condition that human eyes are sensitive to the pixel change of a gray area. In addition, the preset transparency can achieve the effect of adaptively adjusting the transparency of the watermark according to the background color of the bottom window without detecting the background color of the bottom window in real time in the process of displaying the watermark image, and reduce the performance loss in the process of displaying the watermark.
On the basis of the above embodiments, the watermark processing method provided by the embodiment of the present application can also perform divulgence tracing based on the watermark image. When the divulgence tracing is carried out, the watermark processing program can identify whether the picture sent out by the terminal equipment is a sensitive picture or not according to the watermark unit, and trace the divulgence of the sensitive picture. As will be exemplified below.
Alternatively, the watermark processing program may obtain the target picture to be sent out. The target picture is obtained by screen capture or shooting of a display screen. The display screen displays the watermark image described in the foregoing embodiment. The watermark processing program can extract the watermark information from the target picture and decode the watermark information to obtain the information of the divulgence source. Wherein the watermark information comprises at least one watermark unit.
In some optional embodiments, after the watermark processing program decodes the watermark information to obtain the information of the divulgence source, the outgoing operation of the target picture may be further blocked. Therefore, the loss caused by information leakage can be effectively reduced. Optionally, when the watermark processing program runs on the terminal device, a prompt message may be returned after the outgoing operation of the target picture is blocked, where the prompt message may be used to prompt that the sending fails or prohibit sending of the type of information, which is not limited in this embodiment.
In some scenarios, the target picture is taken by taking a screen. In this embodiment, before extracting the watermark information from the target picture, the target picture may be corrected to reduce the influence of image deformation caused by the shooting view angle on the decoding result. Optionally, the target picture may be subjected to perspective transformation according to the geometric information of the target picture. The geometric information of the target picture comprises positions of four vertexes of a rectangle corresponding to a text box in the target picture or positions of vertexes on an outer frame of the display screen. The position of the vertex is used as a reference, and perspective transformation can be performed on the target picture.
Further, the size ratio of the target watermark unit can be obtained from the target picture after perspective transformation, and the target watermark unit can be any one of the watermark units extracted from the target picture. And according to the size proportion of the correction template of the watermark unit and the size proportion of the target watermark unit, zooming and correcting the target picture after perspective transformation. For example, in the correction template of the watermark unit, the aspect ratio is 1:1, extracting the aspect ratio of a watermark unit from a target picture after perspective transformation to be 2:1, it can be determined that the target picture needs to be reduced by one time horizontally or enlarged by one time vertically.
In the embodiment, the target picture is corrected, so that the influence of image deformation generated by a shooting visual angle on a decoding result can be reduced, and the accuracy of a tracing result is improved.
Optionally, when the watermark processing program decodes the watermark information to obtain the divulgence source information, the traceable information may be decoded and removed from the watermark unit by using the inverse process of the generation process of the watermark unit. Taking the generation process described in the foregoing embodiment as an example, optionally, the inverse process may include: and performing correlation calculation on the target picture according to a preset spread spectrum sequence to obtain a suspicious information matrix, and decoding the suspicious information matrix by adopting a decoding algorithm corresponding to the coding algorithm to obtain leakage source information. Wherein, different coding algorithms correspond to different decoding algorithms.
Alternatively, if the watermark unit is generated by a polar code encoding method, the information of the divulgence source may be obtained by decoding from the suspicious information matrix by at least one of a Successive Cancellation decoding (SC) algorithm and a Successive Cancellation List decoding (SCL) method.
Alternatively, if the watermark unit is generated by encoding of a convolutional code, a Viterbi (Viterbi) decoding algorithm may be used to decode from the suspicious information matrix to obtain the information of the divulgence source.
Optionally, if the watermark unit is generated by a Turbo code encoding manner, the information of the divulgence source may be obtained by decoding from the suspicious information matrix by using at least one of iterative decoding, a maximum a posteriori probability Algorithm (MAP), a modified MAP Algorithm, a Max-Log-MAP Algorithm, and a Soft Output Viterbi Algorithm (SOVA).
Optionally, if the watermark unit is generated by an LDPC encoding method, at least one of a hard decision decoding algorithm, a hybrid decision decoding algorithm, and a soft decision decoding algorithm may be adopted to decode the suspicious information matrix to obtain the information of the divulgence source.
In the foregoing example, when the watermark unit is generated by using a polar code encoding method, the tracing information may be decoded from the suspicious information matrix obtained by spreading by using an SCL algorithm. In the decoding process based on the SCL algorithm, the information bits in the suspicious information matrix can be judged, the transition probability of the decoding tree is calculated, and the error information bits in the suspicious information matrix are corrected, so that the tracing information is quickly and accurately output.
In addition to the watermark processing method provided in the foregoing embodiment, an embodiment of the present application further provides a watermark extraction method, as shown in fig. 4-1, where the method includes:
step 401, obtaining a target picture to be detected; the target picture is obtained by screen capture or shooting of a display screen; a watermark image is displayed on the display screen, the transparency of the watermark image is lower than a set threshold value, and the set threshold value is used for reducing the visual perception of the watermark image; the watermark image is invariant to operations on the display screen.
Step 402, extracting watermark information from the target picture; the watermark information comprises at least one watermark unit.
And step 403, decoding the watermark information according to the at least one watermark unit to obtain information of the divulgence source.
The watermark image displayed on the display screen can be generated according to the methods described in the foregoing embodiments, which is not described herein again.
The main execution body of this embodiment may be a terminal device, a server, or an intermediate device in the information transmission process, for example, a gateway, a router, or other devices, as shown in fig. 4-2. The device can run a watermark processing program which can be used for receiving an input target picture to be detected and scanning whether the target picture has a watermark image or not. And if the watermark image is contained, extracting the watermark information and tracing the source of the target image according to the watermark information.
In some embodiments, the watermarking program is run on a terminal device for use by a user. When the screen-sensitive content screenshot is leaked out in an external environment (external social media), an operator can acquire the picture from the outside and input the acquired leaked picture into the terminal equipment. The terminal equipment can utilize a watermark processing program to extract watermarks from the leaked pictures, position leaked personnel and display source tracing information.
In other embodiments, the watermark processing program runs on the terminal device and can be called by other programs on the terminal device to perform the scanning and extracting operations of the watermark image. The screen capture tool on the terminal equipment can call a watermark processing program after capturing the target picture according to the user instruction, scan whether the watermark image exists on the target picture, and trace the source of the target picture according to the watermark information when the target picture contains the watermark image. And after receiving the tracing result returned by the watermark processing program, the screenshot tool can block the copying, forwarding or storing operation of the target picture.
In still other embodiments, the watermarking program is run in the gateway device. The gateway equipment can identify whether the picture contains watermark information or not based on the screen watermark extraction module when the picture to be sent out is obtained every time. If the image contains the watermark information, the image can be regarded as a sensitive image, and the watermark information can be decoded based on a watermark decoding algorithm provided by a decoding module, so that the tracing information is extracted. If the tracing information is extracted, the gateway can block the outgoing operation of the picture and can return the prompt information of failed sending or the prompt information of forbidden outgoing to the sender of the picture. Therefore, the loss caused by information leakage can be effectively reduced.
In some scenarios, the target picture is taken by taking a screen. In this embodiment, before extracting the watermark information from the target picture, the target picture may be corrected to reduce the influence of image deformation caused by the shooting view angle on the decoding result. Optionally, the target picture may be subjected to perspective transformation according to the geometric information of the target picture. The geometric information of the target picture comprises positions of four vertexes of a rectangle corresponding to a text box in the target picture or positions of vertexes on an outer frame of the display screen. The position of the vertex is used as a reference, and perspective transformation can be performed on the target picture.
Further, the size ratio of the target watermark unit can be obtained from the target picture after perspective transformation, and the target watermark unit can be any one of the watermark units extracted from the target picture. And carrying out scaling correction on the target picture after perspective transformation according to the size proportion of the correction template of the watermark unit and the size proportion of the target watermark unit. For example, in the correction template of the watermark unit, the aspect ratio is 1:1, extracting the aspect ratio of a watermark unit from a target picture after perspective transformation to be 2:1, it can be determined that the target picture needs to be horizontally reduced by one time or vertically enlarged by one time.
In the embodiment, the target picture is corrected, so that the influence of image deformation generated by a shooting visual angle on a decoding result can be reduced, and the accuracy of a tracing result is improved.
Optionally, when the watermark processing program decodes the watermark information to obtain the divulgence source information, the traceable information may be decoded and removed from the watermark unit by using the inverse process of the generation process of the watermark unit. Taking the generating process described in the foregoing embodiment as an example, optionally, the inverse process may include: and performing correlation calculation on the target picture according to a preset spread spectrum sequence to obtain a suspicious information matrix, and decoding the suspicious information matrix by adopting a decoding algorithm corresponding to the coding algorithm to obtain leakage source information. Wherein, different coding algorithms correspond to different decoding algorithms.
Optionally, if the watermark unit is generated by a polar code encoding method, the information of the divulgence source may be obtained by decoding the suspicious information matrix by at least one of a successive cancellation decoding algorithm and a serial cancellation list decoding method.
Optionally, if the watermark unit is generated by an encoding manner of a convolutional code, a viterbi decoding algorithm may be used to decode from the suspicious information matrix to obtain the information of the compromised source.
Optionally, if the watermark unit is generated by a Turbo code encoding method, at least one of iterative decoding, a maximum posterior probability algorithm, a modified MAP algorithm, a maximum logarithmized maximum posterior probability algorithm, and a soft output viterbi algorithm may be used to decode the information of the divulgence source from the suspicious information matrix.
Optionally, if the watermark unit is generated by an LDPC coding method, at least one of a hard decision decoding algorithm, a hybrid decision decoding algorithm, and a soft decision decoding algorithm may be used to decode the suspicious information matrix to obtain the information of the divulged source.
By using the foregoing example, when the watermark unit is generated by using a coding method of a polar code, the tracing information may be decoded from the suspicious information matrix obtained by spreading spectrum by using an SCL algorithm. In the decoding process based on the SCL algorithm, the information bits in the suspicious information matrix can be judged, the transition probability of the decoding tree is calculated, and the error information bits in the suspicious information matrix are corrected, so that the tracing information is quickly and accurately output.
In the embodiment, the picture to be detected is obtained by screen capture or shooting of the display screen, and the watermark image on the display screen is composed of a plurality of watermark units, so that the watermark block containing complete information in the watermark image has a smaller area, and the integrity of the captured or shot watermark information can be improved even if the screen is captured or shot by a smaller part, thereby improving the accuracy of the tracing result.
The method provided by the embodiments of the present application can be applied to the protection of various data and the leakage tracing scene. For example, the data of an enterprise are protected and subjected to a divulgence tracing scene, the illegal screen shooting operation of film and television works is protected and subjected to a divulgence scene, the infringement behavior of the film and television works is protected and subjected to a divulgence scene, and the like. The following description will take enterprise data protection and divulgence tracing scenarios as an example with reference to the accompanying drawings. In an enterprise data protection and leakage tracing scenario, protected data may include documents, design drafts, code, and other data of an enterprise.
After the computer is started, the watermark processing program can be called to obtain a watermark image, and a screen containing watermark content is displayed on the screen. In the process of using a computer to view data, a pirate or screen capture outgoing behavior may exist. If the computer detects the outgoing behavior of the screenshot picture, whether the screenshot picture contains the watermark or not can be judged, and whether the screenshot picture contains sensitive information or not can be judged. The watermark processing program can judge that the screen capture image contains sensitive information when the watermark is extracted from the screen capture image. Alternatively, the watermark processing program may determine that the screenshot image contains sensitive information when a specified check code is decoded from the watermark information. If sensitive information is contained, the computer can block the outgoing behavior of the screen capture image so as to reduce the risk of outgoing confidential documents of the enterprise.
If the pictures shot by theft or screen shot are exposed in the external environment, the related management personnel of the enterprise can obtain the pictures from the outside and extract the watermark by utilizing the watermark processing program to obtain the traceability information contained in the watermark. According to the traceability information, the enterprise management personnel can position the divulging personnel.
The following will further exemplarily explain the watermarking method provided by the embodiment of the present application by taking enterprise data protection and divulgence tracing scenarios as examples with reference to the accompanying drawings.
The watermark processing program for executing the watermark processing method includes: the device comprises a screen watermark generating module, a screen watermark generating module and a screen watermark extracting module.
After the user starts the device, the screen watermark generating module may generate a unit watermark image of M × M size according to the employee job number ID, the device ID (Identity), and the current system time, where the unit watermark image size may be 128 × 128, and represents the minimum unit for encoding a complete watermark information.
As shown in fig. 5, in the process of generating the unit watermark image, the screen watermark generating module may map the user identifier of the device holder, the device identifier, and the current system timestamp (i.e., browsing time) into a binary effective information character string having a length of K. And adding an L-bit check code into the effective information character string with the length of K to obtain K + L-bit character string information, and adding redundant error correction bits into the K + L-bit character string information to obtain the character string information with the code length of N. And then, coding the character string information by using a polarization code, calculating K + L subchannels with the minimum Babbitt parameters as effective information storage positions, and using the rest subchannels as appointed information storage positions, and constructing a generating matrix to obtain an N-bit polarization code.
Next, as shown in fig. 6, the screen watermark generating module may obtain a spreading sequence template R, and generate a unit watermark image according to the N-bit binary string information and the spreading sequence template R.
After the unit watermark image is determined, the screen watermark display module can acquire basic parameters of the equipment, such as the number of external displays, the screen resolution and the like. And the screen watermark display module can be used for tiling and rendering the unit watermark image to the whole terminal screen according to the acquired parameters. Taking an OSX system as an example, when a screen watermark display module renders a unit watermark image, NSWindow can be instantiated as a window, and a frame, a background color and the like of the window are removed to obtain a transparent window. And circularly drawing the unit watermark pattern in the window body, and adjusting the transparency of the watermark window to make the watermark window insensitive to human eyes. Wherein, the watermark transparency can be set to 0.015, and the balance between the visual effect and the tracing effect is achieved.
When the screen capture of the screen content is leaked to the outside by a user, the screen watermark extraction module can extract the watermark from the screen capture picture in real time and judge whether the screen capture picture belongs to sensitive information or not so as to block the outgoing operation.
As shown in fig. 7, after the picture to be detected is inputted into the screen watermark extraction module, the screen watermark extraction module can locate four corner points of a rectangle in the picture, and perform perspective transformation correction on the picture according to the four corner points to obtain a corrected picture a. Next, a scaling factor of the image is calculated. The screen watermark extraction module can calculate a scaling factor through a correction template in the watermark, and performs scaling correction on the picture A according to the scaling factor to obtain a corrected picture B. The screen watermark extraction module can also traverse the correction picture A by an exhaustive method to finally obtain a correction picture B. After the correction of the picture is completed, the screen watermark extraction module can perform correlation calculation on the corrected picture and the spread spectrum sequence to obtain a suspicious information matrix, judge information bits in the suspicious information matrix by using a serial offset list decoding method, calculate the transition probability of a decoding tree, correct error information bits in the suspicious information matrix and output correct watermark information.
It should be noted that the screen watermark extraction module in the watermark processing program may be separately run on a terminal device, or separately run on an intermediate device in the information transmission process, such as a gateway, a router, and the like.
In some scenarios, the screen watermark extraction module in the watermark processing program may be run on the terminal device separately. As shown in fig. 4-2, when the screen-sensitive content screenshot has been leaked out in an external environment (external social media), an operator may acquire a picture from the outside and input the acquired leaked picture into the screen watermark extraction module. The screen watermark extraction module can extract watermarks from the leaked pictures and position the leaked persons. When a user uses camera equipment such as a mobile phone to photograph the screen content and leaks, the operator can input the acquired leaked picture into the screen watermark extraction module. The screen watermark extraction module can extract watermarks from the leaked pictures and position the leaked persons.
In other scenarios, the screen watermark extraction module in the watermark processing program may be independently operated in the gateway device, and the gateway device may identify whether the picture includes watermark information based on the screen watermark extraction module each time the picture to be sent out is acquired. If the image contains the watermark information, the image can be considered as a sensitive image, and the watermark information can be decoded based on a watermark decoding algorithm provided by a decoding module, so that the tracing information is extracted. As shown in fig. 4-2, after the tracing information is extracted, the gateway can block the outgoing operation of the picture. According to the tracing information, the gateway can return the prompt information of failure sending or the prompt information of forbidding sending to the sender of the picture, and the details are not repeated.
In the implementation mode, the screen watermark extraction module in the terminal equipment or the intermediate equipment in the information transmission process can realize the automatic identification and outgoing blocking operation of the sensitive picture, so that the data security is further improved.
It should be noted that the execution subjects of the steps of the methods provided in the above embodiments may be the same device, or different devices may be used as the execution subjects of the methods. For example, the execution subject of steps 101 to 103 may be the apparatus A1; for another example, the execution subject of steps 101 and 102 may be device A1, and the execution subject of step 103 may be device A2; and so on.
In addition, in some of the flows described in the above embodiments and the drawings, a plurality of operations occurring in a specific order are included, but it should be clearly understood that these operations may be executed out of order or in parallel as they appear herein, and the sequence numbers of the operations, such as 101, 102, etc., are used merely to distinguish various operations, and the sequence numbers themselves do not represent any execution order. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit the types of "first" and "second".
Fig. 8 illustrates a schematic structural diagram of a terminal device according to an exemplary embodiment of the present application, and as shown in fig. 8, the terminal device includes: a memory 801, a processor 802, and a display component 803.
A memory 801 for storing computer programs and may be configured to store other various data to support operations on the terminal device. Examples of such data include instructions for any application or method operating on the terminal device.
The memory 801 may be implemented, for example, by any type or combination of volatile and non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
A processor 802, coupled to the memory 801, for executing computer programs in the memory 801 for: acquiring a watermark image composed of a plurality of watermark units, wherein the watermark units are generated according to tracing information; calling a display component 803 to display the watermark image in the top layer of the display screen; the transparency of the watermark image is lower than a set threshold value, and the set threshold value is used for reducing the visual perception of the watermark image; the watermark image is not changed along with the operation on the display screen; and displaying target data to be accessed in the display screen in an overlapping manner with the watermark image.
Optionally, when acquiring a watermark image composed of a plurality of watermark units, the processor 802 is specifically configured to: generating the watermark unit according to the tracing information; and generating the watermark image containing a plurality of watermark units in response to the starting operation of the first application program or in response to the operation of reading the specified data by the second application program.
Optionally, when the processor 802 generates the watermark unit according to the tracing information, it is specifically configured to: obtaining the tracing information for positioning a divulgence source; adding check information into the tracing information to obtain data to be coded; the verification information is used for verifying the accuracy of the watermark unit; coding the data to be coded by adopting a preset coding algorithm to obtain a coding result; and carrying out information spread spectrum on the encoding result according to a preset spread spectrum sequence to obtain the watermarking unit.
Optionally, the processor 802 invokes the display component 803 to display the watermark image in the top layer of the display screen, specifically to: determining a window component; the non-transparent element in the window component is in an invisible state; in the window component, drawing the watermark image to obtain a watermark window; the watermark image is obtained by tiling a plurality of watermark units; displaying the watermark window on the top layer of the display screen; the watermark window has a mouse-through property.
Optionally, when determining the window component, the processor 802 is specifically configured to: acquiring at least one sub-screen contained in the display screen; the at least one sub-screen belongs to different display devices; acquiring the respective resolution of the at least one sub-screen according to the respective equipment parameter of the at least one sub-screen; and determining the resolution of the window component corresponding to each of the at least one sub-screen according to the resolution of each of the at least one sub-screen.
Optionally, when the processor 802 draws the watermark image in the window component, it is specifically configured to: according to the resolution of each sub-screen, drawing a watermark image corresponding to each sub-screen; in watermark images corresponding to the sub-screens with different resolutions, the tiling modes of the watermark units are different; and drawing a watermark image corresponding to each of the at least one sub-screen in a window component corresponding to each of the at least one sub-screen.
Optionally, the processor 802 is further configured to: setting a first transparency for a low-order pixel value in the watermark unit and setting a second transparency for a high-order pixel value in the watermark unit in the process of drawing the watermark image of any one of the at least one sub-screen; wherein the first transparency is greater than the second transparency.
Optionally, the processor 802 is further configured to: acquiring a target picture to be sent out; the target picture is obtained by screen capture or shooting of a display screen; extracting watermark information from the target picture; the watermark information comprises at least one watermark unit; and decoding the watermark information to obtain the information of the divulgence source.
Optionally, after the processor 802 decodes the watermark information to obtain the information of the divulgence source, it is further configured to: and blocking the outgoing operation of the target picture.
Optionally, before the processor 802 extracts the watermark information from the target picture, it is further configured to: carrying out perspective transformation on the target picture according to the geometric information of the target picture; acquiring the size proportion of a target watermark unit from a target picture after perspective transformation; and carrying out scaling correction on the target picture after perspective transformation according to the size proportion of the correction template of the watermark unit and the size proportion of the target watermark unit.
Optionally, when the processor 802 decodes the watermark information to obtain the information of the divulgence source, the method is specifically configured to: performing correlation calculation on the target picture according to a preset spread spectrum sequence to obtain a suspicious information matrix; and decoding the suspicious information matrix by adopting a decoding algorithm corresponding to the coding algorithm to obtain the information of the divulgence source.
Further, as shown in fig. 8, the terminal device further includes: communication component 804, power component 805, audio component 806, and the like. Only some of the components are schematically shown in fig. 8, and the terminal device is not meant to include only the components shown in fig. 8.
Wherein the communication component 804 is configured to facilitate communication between the device in which the communication component resides and other devices in a wired or wireless manner. The device on which the communication component is located may Access a wireless network based on a communication standard, such as WiFi,2G (e.g., global System for Mobile Communications, GSM), 3G (e.g., wideband Code Division Multiple Access (WCDMA), 4G (e.g., long Term Evolution (LTE), etc.), or 5G, or a combination thereof.
The power supply 805 is used to provide power to various components of the device in which the power supply is located. The power components may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device in which the power component is located.
In this embodiment, after obtaining the watermark image composed of the plurality of watermark units, the watermark image may be displayed in the top layer of the display screen, and the target data to be accessed may be displayed in the display screen in a manner of being superimposed on the watermark image. The transparency of the watermark unit is lower than a set threshold value so as to reduce the visual perception of the watermark unit. Furthermore, the watermark image is difficult to be captured by human eyes, the displayed target data is ensured to have higher visual quality, and the influence on data access operation is reduced. The watermark image is displayed in the top layer of the screen, so that watermark information in the watermark image can be successfully captured by screen capture operation or shooting operation, and evasiveness of the watermark information is reduced. In addition, the watermark image is composed of a plurality of watermark units, so that the watermark block containing complete information in the watermark image has a smaller area, and the integrity of the intercepted or shot watermark information can be improved even if a screen is shot or a small part of the screen is shot, and the data protection strength is improved.
In addition to the foregoing embodiments, the terminal device shown in fig. 8 is further configured to execute a watermark extraction method, where the processor 802 is specifically configured to: acquiring a target picture to be detected; the target picture is obtained by screen capture or shooting of a display screen; displaying a watermark image on the display screen, wherein the watermark image is generated according to the watermark image processing method provided by each embodiment of the application; extracting watermark information from the target picture; the watermark information comprises at least one watermark unit; and decoding the watermark information according to the at least one watermark unit to obtain the information of the divulgence source. Optionally, after the processor 802 decodes the watermark information to obtain the information of the divulgence source, it is further configured to: and blocking the outgoing operation of the target picture.
Optionally, before the processor 802 extracts the watermark information from the target picture, it is further configured to: carrying out perspective transformation on the target picture according to the geometric information of the target picture; acquiring the size proportion of a target watermark unit from a target picture after perspective transformation; and carrying out scaling correction on the target picture after perspective transformation according to the size proportion of the correction template of the watermark unit and the size proportion of the target watermark unit.
Optionally, when the processor 802 decodes the watermark information to obtain the information of the divulgence source, the method is specifically configured to: performing correlation calculation on the target picture according to a preset spread spectrum sequence to obtain a suspicious information matrix; and decoding the suspicious information matrix by adopting a decoding algorithm corresponding to the coding algorithm to obtain information of the divulgence source.
In this embodiment, the picture to be detected is obtained by screen capturing or shooting the display screen, and the watermark image on the display screen is composed of a plurality of watermark units, so that the watermark block containing complete information in the watermark image has a smaller area, and even if the screen is captured or the screen is shot by a smaller part, the integrity of the captured or shot watermark information can be improved, and the accuracy of the tracing result is improved.
Accordingly, the present application further provides a computer-readable storage medium storing a computer program, where the computer program is capable of implementing each step that can be executed by a terminal device in the foregoing method embodiments when executed.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of other like elements in a process, method, article, or apparatus comprising the element.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art to which the present application pertains. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of the present application shall be included in the scope of the claims of the present application.

Claims (15)

1. A method of watermarking, comprising:
acquiring a watermark image composed of a plurality of watermark units, wherein the watermark units are generated according to tracing information;
displaying the watermark image in a top layer of a display screen; the transparency of the watermark image is lower than a set threshold value, and the set threshold value is used for reducing the visual perception of the watermark image;
and displaying target data to be accessed in the display screen in an overlapping manner with the watermark image.
2. The method of claim 1, wherein obtaining a watermark image composed of a plurality of watermark units comprises:
generating the watermark unit according to the tracing information;
and responding to the starting operation of the first application program or responding to the operation of reading the specified data of the second application program to acquire the watermark image containing a plurality of watermark units.
3. The method of claim 1, wherein generating the watermarking unit according to tracing information comprises:
obtaining the tracing information for positioning a divulgence source;
adding check information into the tracing information to obtain data to be coded;
adopting a preset coding algorithm to code the data to be coded to obtain a coding result;
and carrying out information spread spectrum on the coding result according to a preset spread spectrum sequence to obtain the watermarking unit.
4. The method of claim 1, wherein presenting the watermark image in a top layer of a display screen comprises:
determining a window component; a non-transparent element in the window component is in an invisible state;
drawing the watermark image in the window component to obtain a watermark window; the watermark image is obtained by tiling a plurality of watermark units;
displaying the watermark window on the top layer of the display screen; the watermark window has a mouse-through property.
5. The method of claim 4, wherein determining a window component comprises:
acquiring at least one sub-screen contained in the display screen; the at least one sub-screen belongs to different display devices;
acquiring the respective resolution of the at least one sub-screen according to the respective equipment parameter of the at least one sub-screen;
and determining the resolution of the window component corresponding to each of the at least one sub-screen according to the resolution of each of the at least one sub-screen.
6. The method of claim 5, wherein rendering the watermark image in the window component comprises:
according to the resolution of each sub-screen, drawing a watermark image corresponding to each sub-screen; in watermark images corresponding to the sub-screens with different resolutions, the tiling modes of the watermark units are different;
and drawing a watermark image corresponding to each of the at least one sub-screen in a window component corresponding to each of the at least one sub-screen.
7. The method of claim 6, further comprising:
setting a first transparency for a low-order pixel value in the watermark unit and setting a second transparency for a high-order pixel value in the watermark unit in the process of drawing the watermark image of any one of the at least one sub-screen; wherein the first transparency is greater than the second transparency.
8. The method of any of claims 2-7, further comprising:
acquiring a target picture to be sent out; the target picture is obtained by screen capture or shooting of a display screen;
extracting watermark information from the target picture; the watermark information comprises at least one watermark unit;
and decoding the watermark information according to the at least one watermark unit to obtain the information of the divulgence source.
9. The method of claim 8, wherein after decoding the watermark information to obtain the information of the compromised source, further comprising: and blocking the outgoing operation of the target picture.
10. The method of claim 8, further comprising, prior to extracting watermark information from the target picture:
carrying out perspective transformation on the target picture according to the geometric information of the target picture;
acquiring the size proportion of a target watermark unit from a target picture after perspective transformation;
and carrying out scaling correction on the target picture after perspective transformation according to the size proportion of the correction template of the watermark unit and the size proportion of the target watermark unit.
11. The method of claim 8, wherein decoding the watermark information to obtain information of a compromised source comprises:
performing correlation calculation on the target picture according to a preset spread spectrum sequence to obtain a suspicious information matrix;
and decoding the suspicious information matrix by adopting a decoding algorithm corresponding to the coding algorithm to obtain information of the divulgence source.
12. A watermark extraction method, comprising:
acquiring a target picture to be detected; the target picture is obtained by screen capture or shooting of a display screen; a watermark image is displayed on the display screen, and the watermark image is generated according to the method of any one of claims 1-7;
extracting watermark information from the target picture; the watermark information comprises at least one watermark unit;
and decoding the watermark information according to the at least one watermark unit to obtain the information of the divulgence source.
13. The method of claim 12, wherein prior to extracting watermark information from the target picture, further comprising:
carrying out perspective transformation on the target picture according to the geometric information of the target picture;
acquiring the size proportion of a target watermark unit from a target picture after perspective transformation;
and carrying out scaling correction on the target picture after perspective transformation according to the size proportion of the correction template of the watermark unit and the size proportion of the target watermark unit.
14. A terminal device, comprising: a memory, a processor, and a display component;
the memory is to store one or more computer instructions;
the processor is to execute the one or more computer instructions to: invoking the display component to perform a step in the method of any one of claims 1-11 or 12-13.
15. A computer-readable storage medium storing a computer program, wherein the computer program is capable of implementing the watermarking method according to any one of claims 1 to 11 or 12 to 13 when executed by a processor.
CN202211321327.XA 2022-10-26 2022-10-26 Watermark processing method, watermark extracting method, watermark processing device, watermark extracting device, and storage medium Pending CN115760532A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211321327.XA CN115760532A (en) 2022-10-26 2022-10-26 Watermark processing method, watermark extracting method, watermark processing device, watermark extracting device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211321327.XA CN115760532A (en) 2022-10-26 2022-10-26 Watermark processing method, watermark extracting method, watermark processing device, watermark extracting device, and storage medium

Publications (1)

Publication Number Publication Date
CN115760532A true CN115760532A (en) 2023-03-07

Family

ID=85353417

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211321327.XA Pending CN115760532A (en) 2022-10-26 2022-10-26 Watermark processing method, watermark extracting method, watermark processing device, watermark extracting device, and storage medium

Country Status (1)

Country Link
CN (1) CN115760532A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117237177A (en) * 2023-11-15 2023-12-15 杭州海康威视数字技术股份有限公司 Watermark processing method and device and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117237177A (en) * 2023-11-15 2023-12-15 杭州海康威视数字技术股份有限公司 Watermark processing method and device and electronic equipment
CN117237177B (en) * 2023-11-15 2024-03-19 杭州海康威视数字技术股份有限公司 Watermark processing method and device and electronic equipment

Similar Documents

Publication Publication Date Title
US20150371014A1 (en) Obscurely rendering content using masking techniques
US11489984B2 (en) Frequency and spatial domain image processing method for image marking and mark detection, apparatus, and storage medium
CN113259721B (en) Video data sending method and electronic equipment
CN111310134B (en) Screen watermark generation method, device and equipment
WO2022116493A1 (en) Screen information protection method and apparatus, and computer device and readable storage medium
CN115760532A (en) Watermark processing method, watermark extracting method, watermark processing device, watermark extracting device, and storage medium
CN101359360A (en) Graphics context fused electronic ticket coding/decoding method
CN114418825B (en) Image processing method, image processing device, computer equipment and storage medium
CN115344835A (en) Picture processing method, storage medium and computer terminal
CN115527101A (en) Image tampering detection method and processor
CN108256360B (en) Sensitive information display method and terminal
English Comparison of high capacity steganography techniques
CN104504075A (en) Fuzzy information processing method and device
CN117115287A (en) Image generation method, device, electronic equipment and readable storage medium
US20160295036A1 (en) Image processing device, image processing method, program, and recording medium
CN115774866A (en) Blind watermark adding method and device, processor and electronic equipment
CN115270084A (en) Blind watermark encryption implementation method based on screenshot information protection
CN108388463A (en) Icon processing method, device, computer equipment and storage medium
CN116028901A (en) Watermark embedding method, device, equipment and storage medium
US20230325961A1 (en) Zoom agnostic watermark extraction
CN116391200A (en) Scaling agnostic watermark extraction
CN117237177B (en) Watermark processing method and device and electronic equipment
CN115270191B (en) Dynamic information protection method and device based on API (application program interface)
WO2024040474A1 (en) Encrypted image watermark processing method and apparatus, and display device
US20220058777A1 (en) Mitigating people distractors in images

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination