CN112884631A - Watermark processing method, device, equipment and storage medium - Google Patents

Watermark processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN112884631A
CN112884631A CN202110209307.2A CN202110209307A CN112884631A CN 112884631 A CN112884631 A CN 112884631A CN 202110209307 A CN202110209307 A CN 202110209307A CN 112884631 A CN112884631 A CN 112884631A
Authority
CN
China
Prior art keywords
watermark
preset
background image
content
watermark information
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
CN202110209307.2A
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.)
Jiangsu Baowangda Software Technology Co ltd
Original Assignee
Jiangsu Baowangda Software Technology 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 Jiangsu Baowangda Software Technology Co ltd filed Critical Jiangsu Baowangda Software Technology Co ltd
Priority to CN202110209307.2A priority Critical patent/CN112884631A/en
Publication of CN112884631A publication Critical patent/CN112884631A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • G06T1/005Robust watermarking, e.g. average attack or collusion attack resistant
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2201/00General purpose image data processing
    • G06T2201/005Image watermarking
    • G06T2201/0065Extraction of an embedded watermark; Reliable detection

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a watermark processing method, a device, equipment and a storage medium, wherein the method comprises the following steps: acquiring watermark information in a binary format; configuring the content of preset positions of a plurality of color channels of a target pixel point in a background image according to the watermark information to obtain a watermark background image; and embedding the watermark background image into the target document. The watermark processing method provided by the embodiment of the invention can record the watermark information in the binary format in the preset bit of the color channel of the target pixel in the watermark background image. When the document content changes, the watermark background image does not change, so that the watermark information recorded in the preset bit of the color channel of the target pixel in the watermark background image does not change, and the robustness of the watermark is improved. Meanwhile, watermark information is recorded through the preset position of the color channel, and the change of the content of the preset position of the color channel enables the color of the corresponding pixel to change, so that the watermark which is not perceived by a user can be realized, and the information security is improved.

Description

Watermark processing method, device, equipment and storage medium
Technical Field
The embodiments of the present invention relate to information security technologies, and in particular, to a watermark processing method, apparatus, device, and storage medium.
Background
With the rapid development of the information age, a large amount of demands exist on a watermarking technology for text documents. For the dark watermark technology with no poor visual sense, the demand is more huge because the dark watermark technology has no influence on the vision.
At present, in order to prevent sensitive information content in a document from being leaked, watermark information is added by using a structure redundant field or a redundant bit of the structure field of a text document. For example, a watermark information attribute is added to attribute information of a certain paragraph of a document.
However, when a document is changed, the watermark information is unstable and the robustness is poor due to the fact that the redundant bits of the redundant field or the structure field in the document are changed when the content of the document is changed.
Disclosure of Invention
The invention provides a watermark processing method, a watermark processing device, watermark processing equipment and a watermark processing storage medium, which are used for improving the robustness of dark watermark information.
In a first aspect, an embodiment of the present invention provides a watermark processing method, where the method includes:
acquiring watermark information in a binary format;
configuring the content of preset positions of a plurality of color channels of a target pixel point in a background image according to the watermark information to obtain a watermark background image;
and embedding the watermark background image into the target document.
In a second aspect, an embodiment of the present invention further provides a watermarking method, where the watermarking method includes:
acquiring a document screenshot of a target document, wherein a watermark background image is embedded in the target document;
acquiring the content of preset positions of a plurality of color channels of a plurality of pixel points in a document screenshot;
and determining watermark information according to the acquired content of the preset bits of the multiple color channels.
In a third aspect, an embodiment of the present invention further provides a watermark processing apparatus, including:
the watermark information acquisition module is used for acquiring watermark information in a binary format;
the background image generation module is used for configuring the content of preset positions of a plurality of color channels of target pixel points in the background image according to the watermark information to obtain a watermark background image;
and the embedding module is used for embedding the watermark background image into the target document.
In a fourth aspect, an embodiment of the present invention further provides a watermark processing apparatus, where the watermark processing apparatus includes:
the document screenshot acquiring module is used for acquiring a document screenshot of a target document, and the watermark background image is embedded in the target document;
the channel content acquisition module is used for acquiring the content of preset positions of a plurality of color channels of a plurality of pixel points in the document screenshot;
and the watermark information determining module is used for determining the watermark information according to the acquired content of the preset bits of the multiple color channels.
In a fifth aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the watermark processing method according to the embodiment of the present application is implemented.
In a sixth aspect, the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform the watermarking method according to the embodiments of the present application.
The watermark processing method provided by the embodiment of the invention obtains the watermark information in binary format when the watermark is configured; configuring the content of preset positions of a plurality of color channels of a target pixel point in a background image according to the watermark information to obtain a watermark background image; and embedding the watermark background image into the target document. Compared with the prior art that the dark watermark can change with the content of the document, the robustness is poor. The watermark processing method provided by the embodiment of the invention can record the watermark information in the binary format in the preset bit of the color channel of the target pixel in the watermark background image. When the document content changes, the watermark background image does not change, so that the watermark information recorded in the preset bit of the color channel of the target pixel in the watermark background image does not change, and the robustness of the watermark is improved. Meanwhile, watermark information is recorded through the preset position of the color channel, and the change of the content of the preset position of the color channel enables the color of the corresponding pixel to change, so that the watermark which is not perceived by a user can be realized, and the information security is improved. In addition, at present, when watermark information is recorded through redundant bits, tracing of propagation after screenshot cannot be performed. According to the watermark processing method, the background color of the image obtained by screenshot is consistent with that of the original document, so that watermark information can be restored based on the preset positions of the color channels of the pixels in the screenshot, screenshot tracing resistance is further achieved, watermark information is restored based on the screenshot, tracing is achieved, and watermark robustness is improved.
Drawings
Fig. 1 is a flowchart of a watermarking method according to a first embodiment of the present invention;
fig. 2 is a flowchart of a watermarking method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a watermark processing apparatus in a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a watermark processing apparatus in a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device in the fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a watermarking method according to an embodiment of the present invention, where the embodiment is applicable to a case of adding a watermark to a document, the method may be executed by a computer device, and the computer device may be a personal computer, a notebook computer, a tablet computer, and the like, and the method specifically includes the following steps:
and step 110, acquiring watermark information in a binary format.
The watermark information is information added to the target document for tracing, and is used for preventing counterfeiting. The watermark information can be set according to requirements. Text data input by a user may be used as watermark information. For example, "XX company's interior materials must not leak" and the like.
And converting the watermark information into a binary format for caching. Illustratively, the watermark information in the text format may be binary-converted according to a national standard code (e.g., GB2312-80) or ASCII code, to obtain the watermark information in the binary format.
The watermark background image may include a plurality of binary watermark information, and at this time, in order to facilitate identification of the watermark information, a preset watermark start identifier is added to the binary watermark information, so that the start identification position of the watermark information can be accurately determined. Specifically, step 110 may be implemented by:
and step 111, acquiring watermark content in a text format.
Receiving watermark content in a text format input by a user. The watermark content in the literal format can include various characters such as Chinese, English, numbers and the like. The watermark content in the literal format takes characters as units.
And 112, converting the watermark content in the text format into a binary format to obtain binary watermark content.
Watermark content in the American Standard Code for Information Interchange (ASCII) Code text format is converted to a binary format, for example, non-chinese characters such as english and numbers are binary converted to obtain binary watermark content. And carrying out binary conversion on the Chinese characters according to the national standard code (GB2312-80) to obtain binary watermark content. Each character in the textual watermark content may be converted to an 8-bit (bit) binary watermark content.
And step 113, determining watermark information in a binary format according to the binary watermark content and a preset watermark initial identifier.
And adding a preset watermark initial identifier at the initial position of the binary watermark content to obtain the watermark information in the binary format. The content and length of the preset watermark starting identifier can be freely configured. Illustratively, the preset watermark start flag is "11111111".
The preset watermark initial identification is configured in the watermark information in the binary format, and the initial position of the binary watermark content can be marked through the preset watermark initial identification, so that the binary watermark content can be identified and positioned more accurately. When a plurality of watermarks exist in the target document, the identification obstacle of partial watermarks caused by the change process of the target document can be overcome, and the robustness of watermark generation and watermark identification is improved.
And step 120, configuring the content of preset positions of a plurality of color channels of a target pixel point in the background image according to the watermark information to obtain a watermark background image.
The watermark information is an array of binary components. The background image is composed of M rows by N columns of pixel points, and each pixel point can comprise a plurality of color channels.
Illustratively, the plurality of color channels of the target pixel includes a red color channel, a green color channel, and a blue color channel; the preset bit is the last bit of each color channel.
The target pixel includes a red color channel (R), a green color channel (G), and a blue color channel (B), each of which occupies 8 bits (bit), and is composed of a binary. Of the 8 bits of each color channel, the first bit is the high bit and the last bit is the low bit, and the 8 bits of the color channel represent a number X between 0 and 255. The change of the final position of the color channel has the minimum difference on visual sense, and can realize no color difference, thereby realizing the watermark configuration without sense of a user.
Further, before step 121, the method further includes: configuring a plurality of pixel points in the background image into preset colors; and determining the pixel points with the preset color in the background image as target pixel points.
Some of the pixels in the background image may be configured to have a predetermined color. All the pixel points in the background image can also be configured to be pure colors, that is, the colors of the pixel points in the background image are the same. In one implementation, the color of each pixel in the background image is a pure white pixel, and the color corresponding to RGB is represented as (255:255: 255). The target pixel points are pixel points with pure white color in the background image.
The last bit of the three channels of each pixel point can provide a data amount of three bits (bit). The watermark information can be sequentially configured into three bits (bit) provided by the pixel points according to the pixel sequence by taking the bit (bit) as a unit.
For example, the watermark information is 3 bytes, which corresponds to 24 bits. Then the 1 st, 2 nd, 3 rd bits of the watermark information are recorded by using the 1 st line of the 1 st pixel in the background image, the 4 th, 5 th, 6 th bits of the watermark information are recorded by using the 1 st line of the 2 nd pixel in the background image, the 7 th, 8 th, 9 th bits of the watermark information are recorded by using the 1 st line of the 3 rd pixel in the background image, the 10 th, 11 th, 12 th bits of the watermark information are recorded by using the 1 st line of the 4 th pixel in the background image, the 13 th, 14 th, 15 th bits of the watermark information are recorded by using the 1 st line of the 5 th pixel in the background image, the 16 th, 17 th, 18 th bits of the watermark information are recorded by using the 1 st line of the 6 th pixel in the background image, the 19 th, 20 th, 21 th bits of the watermark information are recorded by using the 1 st line of the 8 th pixel in the background image, the 22 th, 23 th, 24 th bits of.
After the configuration of one watermark information is completed, the watermark information can be configured in a circulating way by using the rest pixel points. And enabling the watermark background image to contain a plurality of watermark information, wherein the content of the plurality of watermark information is the same. Further, a fixed number or a non-fixed number of bits may be spaced between every two adjacent watermark information.
The format of the watermark background image can be a preset picture format. The preset picture format is, for example, a 24-bit bitmap (bmp) format, a 32-bit bitmap (bmp) format, or a Joint Photographic Experts Group (jpeg) format. And after the content of the pixel point color channel array is determined, generating a watermark background image according to a preset image format.
Illustratively, step 120 may be implemented by:
and step 121, acquiring the channel number of a plurality of color channels of the target pixel in the background image.
And acquiring the channel number of a plurality of color channels of the target pixel in the background image according to the image format of the background image. In the above embodiment, the number of channels is three.
And step 122, segmenting the watermark information according to the number of the channels to obtain a plurality of groups of segmented data.
The watermark information is binary data, the channel number is used as a window, the watermark information is divided to obtain a plurality of groups of divided data, and the combination of the plurality of groups of divided data is the binary watermark information.
And step 123, determining segmentation data for assignment according to the positions of the target pixel points in the background image.
And determining the assignment relation between the segmentation data and the pixel points according to the rows and the columns of the pixel points in the background image. For example, if the division data a has an assignment relationship with the pixel (x, y), three bits of data of the division data a are sequentially copied into three channels of the pixel (x, y), and each channel is assigned with one bit of data.
And 124, sequentially configuring the segmentation data to preset positions of a plurality of color channels of the target pixel point to obtain a watermark background image.
And after assigning the segmentation data to each pixel point in the background image in sequence, generating a watermark background image according to a preset image format.
The content of the preset bits in the multiple channels of the pixel points is assigned according to the segmentation data, so that the watermark information can be recorded more quickly and accurately, and the configuration efficiency of the watermark information is improved.
And step 130, embedding the watermark background image into the target document.
And embedding the watermark image into the target document as the background of the target document. The target document may be a text document (e.g., a Word document) or a spreadsheet document (e.g., an Excel document).
The watermark processing method provided by the embodiment of the invention obtains the watermark information in binary format when the watermark is configured; configuring the content of preset positions of a plurality of color channels of a target pixel point in a background image according to the watermark information to obtain a watermark background image; and embedding the watermark background image into the target document. Compared with the prior art that the dark watermark can change with the content of the document, the robustness is poor. The watermark processing method provided by the embodiment of the invention can record the watermark information in the binary format in the preset bit of the color channel of the target pixel in the watermark background image. When the document content changes, the watermark background image does not change, so that the watermark information recorded in the preset bit of the color channel of the target pixel in the watermark background image does not change, and the robustness of the watermark is improved. Meanwhile, watermark information is recorded through the preset position of the color channel, and the change of the content of the preset position of the color channel enables the color of the corresponding pixel to change, so that the watermark which is not perceived by a user can be realized, and the information security is improved.
In addition, at present, when watermark information is recorded through redundant bits, tracing of propagation after screenshot cannot be performed. According to the watermark processing method, the background color of the image obtained by screenshot is consistent with that of the original document, so that watermark information can be restored based on the preset positions of the color channels of the pixels in the screenshot, screenshot tracing resistance is further achieved, watermark information is restored based on the screenshot, tracing is achieved, and watermark robustness is improved.
Example two
Fig. 2 is a flowchart of a watermark processing method according to a second embodiment of the present invention, where the method is applicable to identifying a watermark in a document, and the method may be executed by a computer device, where the computer device may be a personal computer, a notebook computer, a tablet computer, and the like, and the method specifically includes the following steps:
step 210, obtaining a document screenshot of a target document, wherein the watermark background image is embedded in the target document.
When identifying a watermark in a target document, a watermark background map of the target document may be obtained. And screenshot can also be performed on the target document to obtain the document screenshot.
Step 220, obtaining the content of the preset positions of the color channels of the pixel points in the document screenshot.
Illustratively, step 220 may be implemented by:
and sequentially acquiring the content of preset positions of a plurality of color channels of a plurality of pixel points in the document screenshot according to the row and column sequence of the pixel points.
After the document screenshot is obtained, according to the sequence of the rows and the sequence of the columns of the pixel points, the content of the preset positions of the color channels of the pixel points is obtained in sequence after the row and the column are arranged.
The preset bit is the same as the preset bit when the watermark information is configured. Optionally, the plurality of color channels includes a red color channel, a green color channel, and a blue color channel; the preset bit is the last bit of each color channel.
In the above embodiment, the last bit of the 8-bit array representing the red color channel value, the last bit of the 8-bit array representing the green color channel value, and the last bit of the 8-bit array representing the blue color channel value of each pixel are all used to record watermark information, so that data in the three bits are extracted to obtain the content of the preset bit.
And step 230, determining watermark information according to the acquired content of the preset bits of the multiple color channels.
Each pixel point can extract the data content with the same number of bits as the number of the color channels, and in the above example, each pixel point can extract the data content with three bits. Combining the extracted data content may determine watermark information.
Illustratively, step 230 may be implemented by:
and 231, combining the acquired contents of the preset bits of the multiple color channels according to the preset byte length to obtain character data.
And combining the contents of the preset positions of the plurality of extracted color channels of the pixel points to obtain combined data. And segmenting the combination according to the character size to obtain character data. The character size may be 8 bits, i.e. in the combined data, every 8 bits determines one character data.
Step 232, determining watermark information according to the character data content.
Due to the change of the target document such as modification, the position of the background in the document screenshot, which is shielded, may change. The watermark information can be more accurately determined by:
judging whether the current character data is a preset watermark starting identifier or not; if the current character data is a preset watermark initial identification, determining watermark information according to the next character data of the current character data; and if the current character data is not the preset watermark initial identification, judging whether the next character data of the current character data is the preset watermark initial identification or not until the preset watermark initial identification is identified, and determining watermark information according to the next character data of the preset watermark initial identification.
One character data is determined as the current character data in order from the first character data. And if the current character data is consistent with the preset watermark initial identification, the next character data of the current character data is indicated as watermark information. If the current character data is inconsistent with the preset watermark starting identifier, judging whether the next character data of the current character data is the preset watermark starting identifier or not until the preset watermark starting identifier is identified, and acquiring watermark information based on the preset watermark starting identifier.
The watermark processing method provided by the embodiment of the invention obtains the document screenshot of the target document when identifying the watermark, and the watermark background image is embedded in the target document; acquiring the content of preset positions of a plurality of color channels of a plurality of pixel points in a document screenshot; and determining watermark information according to the acquired content of the preset bits of the multiple color channels. Compared with the prior art that the dark watermark can change with the content of the document, the robustness is poor. The watermark processing method provided by the embodiment of the invention can capture the target document, obtain the content of the preset positions of the multiple color channels of the multiple pixel points in the document capture, and determine the watermark information according to the obtained content of the preset positions of the multiple color channels. Therefore, when the content of the target document changes, because the document screenshot includes the watermark background image embedded in the target document, the binarized watermark information carried by the pixel in the watermark background image can be acquired according to the content of the preset bits of the multiple color channels in the pixel of the document screenshot. When the content of the target document changes, the extraction of watermark information can be realized by identifying pixels in the screenshot of the document, the identification and tracing of the watermark can be realized, and the robustness of the watermark can be improved.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a watermark processing apparatus according to a third embodiment of the present invention, where the present embodiment is applicable to a case of adding a watermark to a document, the apparatus may be located in a computer device, and the computer device may be a personal computer, a notebook computer, a tablet computer, and the like, and the apparatus specifically includes: a watermark information acquisition module 310, a background map generation module 320, and an embedding module 330.
A watermark information obtaining module 310, configured to obtain watermark information in a binary format;
the background image generating module 320 is configured to configure the content of preset bits of a plurality of color channels of a target pixel point in a background image according to the watermark information to obtain a watermark background image;
and the embedding module 330 is configured to embed the watermark background map into the target document.
On the basis of the foregoing embodiment, the background map generation module 320 is configured to:
acquiring the channel number of a plurality of color channels of a target pixel in a background image;
dividing the watermark information according to the number of the channels to obtain a plurality of groups of divided data;
determining segmentation data for assignment according to the position of the target pixel point in the background image;
and sequentially configuring the segmentation data to preset positions of a plurality of color channels of the target pixel point to obtain a watermark background image.
On the basis of the foregoing embodiment, the background map generation module 320 is further configured to:
configuring a plurality of pixel points in the background image into preset colors;
and determining the pixel points with the preset color in the background image as target pixel points.
On the basis of the above embodiment, the plurality of color channels of the target pixel include a red color channel, a green color channel, and a blue color channel;
the preset bit is the last bit of each color channel.
On the basis of the above embodiment, the watermark information obtaining module 310 is configured to:
acquiring watermark content in a text format;
converting the watermark content in the text format into a binary format to obtain binary watermark content;
and determining watermark information in a binary format according to the binary watermark content and a preset watermark initial identifier.
In the watermark processing apparatus provided in the embodiment of the present invention, when configuring a watermark, the watermark information obtaining module 310 obtains watermark information in a binary format; the background image generation module 320 configures the content of preset bits of a plurality of color channels of target pixel points in the background image according to the watermark information to obtain a watermark background image; the embedding module 330 embeds the watermark background map into the target document. Compared with the prior art that the dark watermark can change with the content of the document, the robustness is poor. The watermark processing device provided by the embodiment of the invention can record the watermark information in the binary format in the preset bit of the color channel of the target pixel in the watermark background image. When the document content changes, the watermark background image does not change, so that the watermark information recorded in the preset bit of the color channel of the target pixel in the watermark background image does not change, and the robustness of the watermark is improved. Meanwhile, watermark information is recorded through the preset position of the color channel, and the change of the content of the preset position of the color channel enables the color of the corresponding pixel to change, so that the watermark which is not perceived by a user can be realized, and the information security is improved. In addition, at present, when watermark information is recorded through redundant bits, tracing of propagation after screenshot cannot be performed. According to the watermark processing method, the background color of the image obtained by screenshot is consistent with that of the original document, so that watermark information can be restored based on the preset positions of the color channels of the pixels in the screenshot, screenshot tracing resistance is further achieved, watermark information is restored based on the screenshot, tracing is achieved, and watermark robustness is improved.
Example four
Fig. 4 is a schematic structural diagram of a watermark processing apparatus according to a fourth embodiment of the present invention, where the present embodiment is applicable to identifying a watermark in a document, the apparatus may be located in a computer device, and the computer device may be a personal computer, a notebook computer, a tablet computer, and the like, and the apparatus specifically includes: a document screenshot obtaining module 410, a channel content obtaining module 420, and a watermark information determining module 430.
A document screenshot obtaining module 410, configured to obtain a document screenshot of a target document, where a watermark background image is embedded in the target document;
a channel content obtaining module 420, configured to obtain contents of preset positions of multiple color channels of multiple pixel points in the document screenshot;
and a watermark information determining module 430, configured to determine watermark information according to the obtained content of the preset bits of the multiple color channels.
On the basis of the foregoing embodiment, the channel content obtaining module 420 is configured to:
and sequentially acquiring the content of preset positions of a plurality of color channels of a plurality of pixel points in the document screenshot according to the row and column sequence of the pixel points.
On the basis of the above embodiment, the watermark information determining module 430 is configured to:
combining the acquired contents of the preset bits of the multiple color channels according to the preset byte length to obtain character data;
and determining watermark information according to the character data content.
On the basis of the above embodiment, the watermark information determining module 430 is configured to:
judging whether the current character data is a preset watermark starting identifier or not;
if the current character data is a preset watermark initial identification, determining watermark information according to the next character data of the current character data;
and if the current character data is not the preset watermark initial identification, judging whether the next character data of the current character data is the preset watermark initial identification or not until the preset watermark initial identification is identified, and determining watermark information according to the next character data of the preset watermark initial identification.
In the watermark processing apparatus provided in the embodiment of the present invention, when a watermark is identified, the document screenshot obtaining module 410 obtains a document screenshot of a target document, and a watermark background image is embedded in the target document; the channel content obtaining module 420 obtains the content of preset positions of a plurality of color channels of a plurality of pixel points in the document screenshot; the watermark information determining module 430 determines watermark information according to the acquired content of the preset bits of the multiple color channels. Compared with the prior art that the dark watermark can change with the content of the document, the robustness is poor. The watermark processing device provided by the embodiment of the invention can capture the target document, obtain the content of the preset positions of the multiple color channels of the multiple pixel points in the document capture, and determine the watermark information according to the obtained content of the preset positions of the multiple color channels. Therefore, when the content of the target document changes, because the document screenshot includes the watermark background image embedded in the target document, the binarized watermark information carried by the pixel in the watermark background image can be acquired according to the content of the preset bits of the multiple color channels in the pixel of the document screenshot. When the content of the target document changes, the extraction of watermark information can be realized by identifying pixels in the screenshot of the document, the identification and tracing of the watermark can be realized, and the robustness of the watermark can be improved.
EXAMPLE five
Fig. 5 is a schematic structural diagram of a computer apparatus according to a fifth embodiment of the present invention, as shown in fig. 5, the computer apparatus includes a processor 50, a memory 51, an input device 52, and an output device 53; the number of processors 50 in the computer device may be one or more, and one processor 50 is taken as an example in fig. 5; the processor 50, the memory 51, the input device 52 and the output device 53 in the computer apparatus may be connected by a bus or other means, and the connection by the bus is exemplified in fig. 5.
The memory 51 is used as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the watermark processing method in the embodiment of the present invention (for example, the watermark information acquiring module 310, the background map generating module 320, and the embedding module 330 in the watermark processing apparatus; for example, the document screenshot acquiring module 410, the channel content acquiring module 420, and the watermark information determining module 430 in the watermark processing apparatus). The processor 50 executes various functional applications of the computer device and data processing by executing software programs, instructions and modules stored in the memory 51, namely, implements the above-described watermarking method.
The memory 51 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 51 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 51 may further include memory located remotely from the processor 50, which may be connected to a computer device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 52 is operable to receive input numeric or character information and to generate key signal inputs relating to user settings and function controls of the computer apparatus. The output device 53 may include a display device such as a display screen.
EXAMPLE six
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a watermarking method, when used for configuring a watermark, the method including:
acquiring watermark information in a binary format;
configuring the content of preset positions of a plurality of color channels of a target pixel point in a background image according to the watermark information to obtain a watermark background image;
and embedding the watermark background image into the target document.
On the basis of the above embodiment, configuring the content of the preset bits of the multiple color channels of the target pixel point in the background image according to the watermark information to obtain a watermark background image, including:
acquiring the channel number of a plurality of color channels of a target pixel in a background image;
dividing the watermark information according to the number of the channels to obtain a plurality of groups of divided data;
determining segmentation data for assignment according to the position of the target pixel point in the background image;
and sequentially configuring the segmentation data to preset positions of a plurality of color channels of the target pixel point to obtain a watermark background image.
On the basis of the above embodiment, before acquiring the channel numbers of the multiple color channels of the target pixel in the background image, the method further includes:
configuring a plurality of pixel points in the background image into preset colors;
and determining the pixel points with the preset color in the background image as target pixel points.
On the basis of the above embodiment, the plurality of color channels of the target pixel include a red color channel, a green color channel, and a blue color channel;
the preset bit is the last bit of each color channel.
On the basis of the above embodiment, acquiring watermark information in binary format includes:
acquiring watermark content in a text format;
converting the watermark content in the text format into a binary format to obtain binary watermark content;
and determining watermark information in a binary format according to the binary watermark content and a preset watermark initial identifier.
When used to identify a watermark, the method comprises:
acquiring a document screenshot of a target document, wherein a watermark background image is embedded in the target document;
acquiring the content of preset positions of a plurality of color channels of a plurality of pixel points in a document screenshot;
and determining watermark information according to the acquired content of the preset bits of the multiple color channels.
On the basis of the above embodiment, obtaining the content of the preset positions of the multiple color channels of the multiple pixel points in the document screenshot includes:
and sequentially acquiring the content of preset positions of a plurality of color channels of a plurality of pixel points in the document screenshot according to the row and column sequence of the pixel points.
On the basis of the above embodiment, determining watermark information according to the obtained content of the preset bits of the multiple color channels includes:
combining the acquired contents of the preset bits of the multiple color channels according to the preset byte length to obtain character data;
and determining watermark information according to the character data content.
On the basis of the above embodiment, determining watermark information according to the character data content includes:
judging whether the current character data is a preset watermark starting identifier or not;
if the current character data is a preset watermark initial identification, determining watermark information according to the next character data of the current character data;
and if the current character data is not the preset watermark initial identification, judging whether the next character data of the current character data is the preset watermark initial identification or not until the preset watermark initial identification is identified, and determining watermark information according to the next character data of the preset watermark initial identification.
On the basis of the above embodiment, the plurality of color channels include a red color channel, a green color channel, and a blue color channel;
the preset bit is the last bit of each color channel.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the above method operations, and may also perform related operations in the watermarking method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the watermark processing apparatus, the included units and modules are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A watermarking method, comprising:
acquiring watermark information in a binary format;
configuring the content of preset positions of a plurality of color channels of a target pixel point in a background image according to the watermark information to obtain a watermark background image;
and embedding the watermark background image into a target document.
2. The method according to claim 1, wherein the configuring, according to the watermark information, contents of preset bits of a plurality of color channels of a target pixel point in a background image to obtain a watermark background image includes:
acquiring the channel number of a plurality of color channels of a target pixel in a background image;
dividing the watermark information according to the number of the channels to obtain a plurality of groups of divided data;
determining segmentation data for assignment according to the position of a target pixel point in the background image;
and sequentially configuring the segmentation data to preset positions of a plurality of color channels of the target pixel point to obtain a watermark background image.
3. The method of claim 2, further comprising, prior to obtaining the channel numbers for the plurality of color channels for the target pixel in the background image:
configuring a plurality of pixel points in the background image into preset colors;
and determining the pixel points with the preset color in the background image as target pixel points.
4. The method of claim 1, wherein the obtaining watermark information in binary format comprises:
acquiring watermark content in a text format;
converting the watermark content in the text format into a binary format to obtain binary watermark content;
and determining watermark information in a binary format according to the binary watermark content and a preset watermark initial identifier.
5. A watermarking method, comprising:
acquiring a document screenshot of a target document, wherein a watermark background image is embedded in the target document;
acquiring the content of preset positions of a plurality of color channels of a plurality of pixel points in the document screenshot;
and determining watermark information according to the acquired content of the preset bits of the multiple color channels.
6. The method according to claim 5, wherein the obtaining of the content of the preset positions of the plurality of color channels of the plurality of pixel points in the document screenshot comprises:
and sequentially acquiring the content of preset positions of a plurality of color channels of a plurality of pixel points in the document screenshot according to the row and column sequence of the pixel points.
7. The method according to claim 6, wherein the determining watermark information according to the obtained content of the preset bits of the plurality of color channels comprises:
combining the acquired contents of the preset bits of the multiple color channels according to a preset byte length to obtain character data;
and determining watermark information according to the character data content.
8. The method of claim 7, wherein determining watermark information from the character data content comprises:
judging whether the current character data is a preset watermark starting identifier or not;
if the current character data is a preset watermark initial identification, determining watermark information according to the next character data of the current character data;
if the current character data is not the preset watermark initial identification, judging whether the next character data of the current character data is the preset watermark initial identification or not until the preset watermark initial identification is identified, and determining watermark information according to the next character data of the preset watermark initial identification.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the watermarking method according to any of claims 1-8 when executing the program.
10. A storage medium containing computer executable instructions for performing the watermarking method of any of claims 1-8 when executed by a computer processor.
CN202110209307.2A 2021-02-24 2021-02-24 Watermark processing method, device, equipment and storage medium Pending CN112884631A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110209307.2A CN112884631A (en) 2021-02-24 2021-02-24 Watermark processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110209307.2A CN112884631A (en) 2021-02-24 2021-02-24 Watermark processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112884631A true CN112884631A (en) 2021-06-01

Family

ID=76054406

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110209307.2A Pending CN112884631A (en) 2021-02-24 2021-02-24 Watermark processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112884631A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109325898A (en) * 2018-09-30 2019-02-12 阿里巴巴集团控股有限公司 Write-in and the method and device for reading digital watermarking
CN110457873A (en) * 2018-05-08 2019-11-15 中移(苏州)软件技术有限公司 A kind of watermark embedding and detection method and device
CN111223032A (en) * 2018-11-23 2020-06-02 浙江大学 Watermark embedding method, watermark extracting method, watermark embedding device, watermark extracting equipment and data processing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110457873A (en) * 2018-05-08 2019-11-15 中移(苏州)软件技术有限公司 A kind of watermark embedding and detection method and device
CN109325898A (en) * 2018-09-30 2019-02-12 阿里巴巴集团控股有限公司 Write-in and the method and device for reading digital watermarking
CN111223032A (en) * 2018-11-23 2020-06-02 浙江大学 Watermark embedding method, watermark extracting method, watermark embedding device, watermark extracting equipment and data processing method

Similar Documents

Publication Publication Date Title
US10339378B2 (en) Method and apparatus for finding differences in documents
JP4557866B2 (en) Mixed code, mixed code generation method and apparatus, and recording medium
CN106791937B (en) Video image annotation method and system
EP3410685B1 (en) Image processing device, image processing method, and program
US8254721B2 (en) Data input system, data input receiving device, data input receiving method and computer readable medium
CN110245469B (en) Webpage watermark generation method, watermark analysis method, device and storage medium
CN101625752A (en) Image processing apparatus and image processing method
CN113393471A (en) Image processing method and device
EP3410686B1 (en) Image processing device, image processing method, and program
CN110120003B (en) Method and system for acquiring webpage with watermark
EP3316173B1 (en) System and method for cheque image data masking
CN112884631A (en) Watermark processing method, device, equipment and storage medium
CN116089984A (en) Anti-disclosure management method and system for administrative files
CN116127419A (en) Data processing method, data identification method, font file generation method and device
CN114693955A (en) Method and device for comparing image similarity and electronic equipment
CN104424619A (en) Information processing apparatus and information processing method
CN111046096B (en) Method and device for generating graphic structured information
CN108388463A (en) Icon processing method, device, computer equipment and storage medium
CN114724170A (en) BOM generation method and device, electronic equipment and storage medium
CN112818301A (en) Method and device for embedding and extracting hidden information of OFD format electronic document
CN111913873A (en) Picture verification method, device and system and computer readable storage medium
CN112907429B (en) Digital signature setting and extracting method and device, storage medium and electronic equipment
JP2002236921A (en) Document image recognition method, document image recognition device and recording medium
CN111369422B (en) Data compression method and device, equipment and storage medium
JP2008186256A (en) Document processor, document processing method, and computer program

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