CN114817873A - Watermark generating and reading method and device based on deformation - Google Patents

Watermark generating and reading method and device based on deformation Download PDF

Info

Publication number
CN114817873A
CN114817873A CN202210437636.7A CN202210437636A CN114817873A CN 114817873 A CN114817873 A CN 114817873A CN 202210437636 A CN202210437636 A CN 202210437636A CN 114817873 A CN114817873 A CN 114817873A
Authority
CN
China
Prior art keywords
symbol
deformation
watermark
sequence
coding
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
CN202210437636.7A
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.)
Shenzhen International Graduate School of Tsinghua University
Original Assignee
Shenzhen International Graduate School of Tsinghua University
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 Shenzhen International Graduate School of Tsinghua University filed Critical Shenzhen International Graduate School of Tsinghua University
Priority to CN202210437636.7A priority Critical patent/CN114817873A/en
Publication of CN114817873A publication Critical patent/CN114817873A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/16Program or content traceability, e.g. by watermarking

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Processing (AREA)

Abstract

The invention provides a watermark generating and reading method and a watermark generating and reading device based on deformation, wherein the method comprises the following steps: acquiring watermark information to be loaded, and converting the watermark information into a watermark coding sequence; and according to the sequence of the watermark coding sequence, sequentially carrying out corresponding deformation on the target carrier symbol according to the corresponding relation between preset different coding values and the symbol deformation rule. The method carries out corresponding deformation on the target carrier symbol through the corresponding relation between the coding value and the symbol deformation rule, realizes the loading of the watermark information, does not need to add extra information to the carrier symbol, avoids the problems of large number of characters, complex radical architecture and lower efficiency of a mode of simply manually drawing the outline of the watermark font in a Chinese character scene, improves the generation efficiency and feasibility of a watermark font library, and can be applied to various complex symbol scenes.

Description

Watermark generating and reading method and device based on deformation
Technical Field
The invention relates to the technical field of digital watermarks, in particular to a deformation-based watermark generating and reading method and device.
Background
The text watermarking technology is to hide specific watermarking information in a document, and finally detect and extract the watermarking information embedded in a carrier document through a machine. Compared with the carrier forms such as images and the like, the text watermark has the greatest technical limitation that the text watermark has lower redundancy, less embeddable space and easily limited watermark capacity. Therefore, among the text watermark construction methods, a method based on character perturbation deformation is attracting attention because of its large watermark capacity.
Existing methods for embedding watermarks based on font transformation can be divided into two categories: firstly, a watermark font is constructed by manually modifying character shapes. In view of the large number of Chinese characters and complex radical architecture, the method of manually drawing the watermark font outline has low efficiency, large time consumption and low feasibility. And because of manual drawing, the difference between each alternative character form is difficult to quantify, and the randomness is high. And secondly, generating a watermark font through deep learning, font flow tube and other modes. The method automatically generates a complete character type through a corresponding algorithm, is mainly applied to generation of Latin language series characters, and is poor in similarity. For example, because the Chinese character has a complex structure, it is difficult to generate a Chinese character pattern with an attractive appearance through a similar algorithm, and the invisibility of the watermark is poor.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a watermark generating and reading method and device based on deformation.
The invention provides a watermark generation method based on deformation, which comprises the following steps: acquiring watermark information to be loaded, and converting the watermark information into a watermark coding sequence; and according to the sequence of the watermark coding sequence, sequentially carrying out corresponding deformation on the target carrier symbol according to the corresponding relation between preset different coding values and the symbol deformation rule.
According to the watermark generation method based on deformation provided by the invention, the step of converting the watermark information into the watermark coding sequence comprises the following steps: converting the watermark information into a binary bit stream, and encrypting the binary bit stream based on a preset encryption algorithm to obtain an encrypted bit stream; and adding redundant check bits to the encrypted bit stream to obtain the watermark coding sequence.
According to the watermark generation method based on deformation provided by the invention, according to the sequence of the watermark coding sequence and the corresponding relation between the preset different coding values and the symbol deformation rule, the corresponding deformation is carried out on the target carrier symbol in sequence, and the method comprises the following steps: dividing the watermark coding sequence into a plurality of groups according to preset digits; determining a replacement symbol corresponding to each group of codes from a preset replacement symbol code table according to each group of code values in sequence, and replacing the target carrier symbol with the replacement symbol; the replacement symbol coding table is a corresponding relation between a replacement symbol and a coding value, and the replacement symbol is a deformation symbol obtained by a standard symbol under different deformation rules.
According to the watermark generation method based on the deformation provided by the invention, the generation method of the alternative symbol coding table comprises the following steps: according to each standard symbol, obtaining a plurality of replacement symbols corresponding to each standard symbol based on a plurality of symbol deformation rules and different deformation degrees of the deformation rules; determining a replacement symbol corresponding to each code value in the preset digit code range according to the plurality of replacement symbols to generate a replacement symbol code table; and the number of the replacement characters corresponding to each standard symbol in the replacement symbol coding table is the same as the total number of all codes of the preset digit.
According to the watermark generation method based on the deformation, provided by the invention, the symbol deformation rule comprises any one or more of changing symbol character weight, symbol stroke offset and symbol integral rotation; the different deformation degrees respectively comprise the steps of changing the character weight of the symbol, the stroke offset of the symbol and the integral rotation of the symbol.
According to the watermark generation method based on the deformation provided by the invention, the step of obtaining a plurality of replacement symbols corresponding to each standard symbol based on a plurality of symbol deformation rules and different deformation degrees of the deformation rules according to each standard symbol comprises the following steps: establishing a corresponding coordinate axis for each deformation rule, and determining the deformation range of each coordinate axis; and based on the OpenType variable font, interpolating to generate a plurality of replacement symbols according to the interpolation step length and the deformation range of each deformation mode.
According to the watermark generation method based on the deformation provided by the invention, after the watermark information is converted into the watermark coding sequence, the method further comprises the following steps: and selecting a plurality of bits according to the watermark coding sequence and preset rules to form a control sequence, wherein the control sequence is used for determining the combination mode of different deformation rules or determining the position of a target carrier symbol embedded with the watermark.
The invention also provides a watermark reading method based on deformation, which comprises the following steps: comparing each symbol in the target text with the standard symbol, and determining all deformed symbols with deformation; based on the corresponding relation between a preset symbol deformation rule and different coding values, decoding each deformation symbol in sequence to obtain the coding value of each deformation symbol; obtaining a watermark coding sequence according to the coding values of all the deformed symbols; and converting the watermark coding sequence into watermark information.
According to the watermark reading method based on the deformation provided by the invention, based on the corresponding relation between the preset symbol deformation rule and different coding values, each deformation symbol is decoded in sequence to obtain the coding value of each deformation symbol, and the method comprises the following steps: for all the deformation symbols, determining a coding value corresponding to each deformation symbol from a preset substitution symbol coding table; the replacement symbol coding table is a corresponding relation between a replacement symbol and a coding value, and the replacement symbol is a deformation symbol obtained by a standard symbol under different deformation rules.
According to the watermark reading method based on deformation provided by the invention, the step of converting the watermark coding sequence into watermark information comprises the following steps: reading a redundancy check code from the watermark coding sequence, wherein the rest part in the watermark coding sequence is used as an effective sequence; based on the redundant check code, checking and correcting the effective sequence to obtain an encrypted bit stream after error correction; decrypting the encrypted bit stream according to a preset encryption algorithm to obtain a decrypted binary bit stream; and converting the decrypted binary bit stream into watermark information.
The invention also provides a watermark generating device based on deformation, which comprises: the encoding processing module is used for acquiring watermark information to be loaded and converting the watermark information into a watermark encoding sequence; and the font processing module is used for sequentially carrying out corresponding deformation on the target carrier symbols according to the sequence of the watermark coding sequence and the corresponding relation between the preset different coding values and the symbol deformation rule.
The invention also provides a watermark reading device based on deformation, which comprises: the deformation determining module is used for comparing each symbol in the target text with the standard symbol and determining all deformed symbols with deformation; the deformation decoding module is used for sequentially decoding each deformation symbol based on the corresponding relation between a preset symbol deformation rule and different coding values to obtain the coding value of each deformation symbol; the decoding and summarizing module is used for obtaining a watermark coding sequence according to the coding values of all the deformed symbols; and the watermark decoding module is used for converting the watermark coding sequence into watermark information.
The present invention also provides an electronic device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement any of the above-mentioned watermark generating or reading methods based on deformation.
The present invention also provides a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of deformation-based watermark generation or reading as described in any of the above.
The invention also provides a computer program product comprising a computer program which, when executed by a processor, implements a method of deformation-based watermark generation or reading as described in any of the above.
According to the method and the device for generating and reading the watermark based on the deformation, after the watermark information is converted into the watermark coding sequence, the target carrier symbol is correspondingly deformed through the corresponding relation between the preset different coding values and the symbol deformation rule, so that the loading of the watermark information is realized, the carrier symbol is not required to be added with additional information, the problems of large number of characters, complex radical architecture and low efficiency of a mode of simply manually drawing the outline of the watermark font in a Chinese character scene are solved, the generation efficiency and the feasibility of a watermark font library are improved, and various complex symbol scenes can be applied. Meanwhile, all the carrier symbols in the method can realize deformation and encoding, so that the capacity of the watermark is improved, and the method can be widely applied to application scenes with high-capacity watermark adding requirements.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a deformation-based watermark generation method provided by the present invention;
FIG. 2 is a schematic diagram of an alternative symbol encoding table provided by the present invention;
FIG. 3 is a schematic diagram of a re-morphing of a change symbol word provided by the present invention;
FIG. 4 is a schematic diagram of changing symbol word weights and symbol stroke offsets provided by the present invention;
FIG. 5 is a schematic diagram of changing symbol word weight, symbol stroke offset, and symbol overall rotation provided by the present invention;
fig. 6 is a schematic flow chart of a deformation-based watermark reading method provided by the present invention;
fig. 7 is a schematic structural diagram of a distortion-based watermark generation apparatus provided in the present invention;
fig. 8 is a schematic structural diagram of a distortion-based watermark reading apparatus provided in the present invention;
fig. 9 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. 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 invention.
The deformation-based watermark generation method and apparatus of the present invention are described below with reference to fig. 1-9. Fig. 1 is a schematic flow chart of a deformation-based watermark generation method provided by the present invention, and as shown in fig. 1, the present invention provides a deformation-based watermark generation method, including:
101. and acquiring watermark information to be loaded, and converting the watermark information into a watermark coding sequence.
The symbols in the present invention include text symbols, but are not limited to text symbols. Where the text symbols include, but are not limited to, chinese characters. For example, the method can be migrated and applied to characters and other graphic symbols in all languages such as Hanzang language family, Hindu language family, and Asian-African language family. The following embodiments are described by taking the symbol as a Chinese character as an example.
The watermark information is information to be loaded, such as a string of words including the name of the owner, and is encoded before being loaded. For example, watermark information composed of chinese characters may be converted into a binary bit stream according to Unicode encoding, and a watermark encoding sequence W may be obtained h . The carrier symbol is a text symbol used for hiding watermark information in the present invention, such as a conventional article. The target carrier symbol is a carrier symbol to which watermark information needs to be loaded, that is, an embedding point of the watermark information in a carrier text, such as a plurality of characters in an article, can be any position or characters at any interval.
102. Sequentially carrying out corresponding deformation on the target carrier symbols according to the sequence of the watermark coding sequence and the corresponding relation between preset different coding values and symbol deformation rules;
based on the method of the invention, the watermark coding sequence can be obtained by decoding the deformed target carrier symbol according to the corresponding relation between the same symbol deformation rule and different coding values.
For example, different code values such as 000, 001, 010, 011, 100, 101, 110, and 111 correspond to different symbol transformations. And under the condition that the watermark coding sequence is determined, sequentially determining corresponding symbol deformation modes according to the watermark coding sequence. In the target carrier symbol, these symbol deformation modes, that is, the deformation modes corresponding to the encoding values, are applied to deform the target carrier symbol, so as to write the watermark information into the carrier symbol.
According to the watermark generation method based on deformation, after watermark information is converted into a watermark coding sequence, corresponding deformation is carried out on a target carrier symbol through the corresponding relation between preset different coding values and symbol deformation rules, so that loading of the watermark information is achieved, extra information does not need to be added to the carrier symbol, the problems that in a Chinese character scene, the number of characters is large, a radical architecture is complex, and the efficiency is low due to the fact that a watermark font outline mode is simply drawn manually are solved, the generation efficiency and feasibility of a watermark font library are improved, and various complex symbol scenes can be applied. Meanwhile, all the carrier symbols in the method can realize deformation and encoding, so that the capacity of the watermark is improved, and the method can be widely applied to application scenes with high-capacity watermark adding requirements.
In one embodiment, the converting the watermark information into a watermark encoding sequence includes: converting the watermark information into a binary bit stream, and encrypting the binary bit stream based on a preset encryption algorithm to obtain an encrypted bit stream; and adding redundant check bits to the encrypted bit stream to obtain the watermark coding sequence.
For example, the generated binary bit stream is encrypted using the Salsa20 algorithm to obtain W e Then, using Hamming code to add redundant check bit to the enciphered result, finally obtaining binary sequence W of the above-mentioned watermark coding sequence h The other steps are the same. By the method, the watermark information can be encrypted, and tampering is avoided.
In an embodiment, sequentially deforming the target carrier symbol according to the sequence of the watermark encoding sequence and according to the preset correspondence between different encoding values and symbol deformation rules includes: dividing the watermark coding sequence into a plurality of groups according to preset digits; determining a replacement symbol corresponding to each group of codes from a preset replacement symbol code table according to each group of code values in sequence, and replacing the target carrier symbol with the replacement symbol; the replacement symbol coding table is a corresponding relation between a replacement symbol and a coding value, and the replacement symbol is a deformation symbol obtained by a standard symbol under different deformation rules.
The standard symbols are symbols that have not been distorted, such as all standard fonts in a font library. In the invention, different rules are deformed in advance according to standard symbols to obtain a plurality of replacement characters, the deformation rules of each replacement character are different, the replacement characters correspond to all values of codes one by one, and the replacement symbol coding table is obtained based on the replacement characters and the coding values, as shown in fig. 2. The predetermined number of bits is the number of coded bits, such as 000, 001 as mentioned in the above embodiment, and the predetermined number of bits is three bits. And after the watermark coding sequence is determined, performing character replacement according to a preset digit.
Specifically, for W h Grouping is performed, with each three bit (bit) as a group,
Figure BDA0003604353940000081
Figure BDA0003604353940000082
each group of
Figure BDA0003604353940000083
A glyph replacement corresponding to an insertion site.
Identifying a corresponding watermark information packet for each embedded site
Figure BDA0003604353940000084
Finding out the Chinese character in the embedded point carrier text corresponding to the code as
Figure BDA0003604353940000085
The replacement character shapes of (2). E.g. corresponding embedded watermark information when the carrier text is a "book
Figure BDA0003604353940000086
If it is 010, the replacing character shape with 010 code corresponding to the 'book' in the replacing character shape table is searched, and the original carrier symbol is processedThe standard character form "book" of (1) is replaced with a replacement word for the character variant.
By the method, the quick generation and automatic loading of the watermark can be realized only by searching the replacing characters corresponding to the code values from the replacing symbol code table.
In one embodiment, the method for generating the replacement symbol encoding table includes: according to each standard symbol, obtaining a plurality of replacement symbols corresponding to each standard symbol based on a plurality of symbol deformation rules and different deformation degrees of the deformation rules; determining a replacement symbol corresponding to each code value in the preset digit code range according to the plurality of replacement symbols to generate a replacement symbol code table; and the number of the replacement characters corresponding to each standard symbol in the replacement symbol coding table is the same as the total number of all codes of the preset digit.
In one embodiment, the symbol morphing rules include changing any one or more of a symbol character weight, a symbol stroke offset, and a symbol overall rotation; the different deformation degrees respectively comprise the steps of changing the character weight of the symbol, the stroke offset of the symbol and the integral rotation of the symbol.
Taking Chinese characters as an example, according to the structural characteristics of Chinese characters, the visual concealment of watermark fonts is considered, and the embodiment of the invention provides three types of geometric micro-forms as examples: changing the weight of the font character refers to the thickness degree of the continuously changed strokes. And secondly, character stroke deviation, namely performing left-right translation or up-down translation on the selected stroke. And thirdly, the character shape rotates integrally, namely the character shape rotates clockwise or anticlockwise around the center of the character to make a reading.
In the actual process of constructing the watermark font, a single geometric micro-deformation transformation can be applied, or a plurality of geometric micro-deformation transformations can be jointly used.
The watermark generation method based on the deformation quantifies the conversion degree of different conversion modes of the alternative character shape, and improves the generation efficiency and feasibility of the character deformation.
In an embodiment, the obtaining, according to each standard symbol, a plurality of replacement symbols corresponding to each standard symbol based on a plurality of symbol deformation rules and different deformation degrees of the deformation rules includes: establishing a corresponding coordinate axis for each deformation rule, and determining the deformation range of each coordinate axis; and based on the OpenType variable font, interpolating to generate a plurality of replacement symbols according to the interpolation step length and the deformation range of each deformation mode.
And establishing corresponding coordinate axes for each selected geometric micro-deformation transformation. If only one transformation is used, the character variant space is 1-dimensional, see fig. 3. If two transformations of (i) and (ii) are adopted, a character retransformation axis and an offset transformation axis are established, and the established character variant design space is two-dimensional, as shown in fig. 4. If the three transformations are used jointly, the character variant design space is three-dimensional, see FIG. 5.
The replacement character-shaped outline generated by the invention is determined by the coordinate position of the character in the variant design space. The original font is defined as x, and the converted font is defined as x', so that three geometric micro-deformation transformation examples are applied simultaneously. Defining the character weight transformation as ChgWeight (), the stroke offset as PanStroke (), and the character rotation transformation as Slant (), the character shape outline after replacement can be described by the following formula (1):
x′=λ 1 ·ChgWeight(x)+λ 2 ·PanStroke(x)+λ 3 ·Slant(x);
wherein λ is 1 、λ 2 、λ 3 The weight coefficient representing the corresponding deformation mode can be set according to the design requirement of the watermark algorithm.
And establishing a transformation range for each coordinate axis in the character variant design space, wherein the value range of each coordinate axis is the transformation character type at the design endpoint of each transformation coordinate axis. If the value range of the character word retransformation axis is [ -N, N ], designing the character shape outline at the left end point of the axis with the value of-N corresponding to the thinnest character and the character shape outline at the right end point corresponding to the thickest character.
After the interpolation step length of each transformation axis is determined, a series of replacement character shapes with smoothly changing characteristics can be generated through automatic interpolation by utilizing the OpenType variable font characteristics. The replacement glyph can be derived from incremental interpolation of the coordinates of the replacement glyph from the endpoint, and the change in the outline of the interpolated glyph from the outline of the endpoint glyph is determined by the difference between the coordinates of the two.
If a plurality of geometric micro-deformation transformation methods are adopted at the same time, the automatically generated replacement character shapes represent three transformation effects at the same time, and different values can be set according to actual needs.
An infinite number of smoothly varying character shapes can be generated theoretically, but given that the alternative character shapes should be visually hidden to the human eye and recognizable by detection methods on the machine side, a difference threshold for the alternative character shapes compared to the standard character shapes can be determined. The threshold is such that it is invisible to the human eye and machine recognizable. The setting of the threshold value can be established through detection experiments, the invisibility of character shapes is determined through a subjective evaluation method, and the detectability of the machine is measured by utilizing a watermark extraction technology.
According to the watermark generation method based on the deformation, a series of characteristic character types which change smoothly can be generated through automatic interpolation based on the character variant design space, the generation efficiency and the feasibility of a watermark character library are improved, for the determined character variant design space, the number of the replacement character shapes with different outline forms can be obtained through selecting different interpolation step lengths, the method is extremely flexible, the variable font design based on the OpenType is based, and the application scene is wide.
In one embodiment, after converting the watermark information into a watermark encoding sequence, the method further includes: and selecting a plurality of bits according to the watermark coding sequence and preset rules to form a control sequence, wherein the control sequence is used for determining the combination mode of different deformation rules or determining the position of a target carrier symbol embedded with the watermark.
For example, the watermark encoding sequence W h The former and the latter two bits form a joint coding mode control sequence W c The role of the control sequence can be seen in the following joint coding control table, from which the multi-character joint embedding scheme is confirmed.
Figure BDA0003604353940000101
Figure BDA0003604353940000111
Fig. 6 is a deformation-based watermark reading method provided by the present invention, and as shown in fig. 6, the deformation-based watermark reading method includes:
601. comparing each symbol in the target text with the standard symbol, and determining all deformed symbols with deformation;
602. based on the corresponding relation between a preset symbol deformation rule and different coding values, decoding each deformation symbol in sequence to obtain the coding value of each deformation symbol;
603. obtaining a watermark coding sequence according to the coding values of all the deformed symbols;
604. and converting the watermark coding sequence into watermark information.
The target text is a symbol set loaded with watermark information, and hidden watermark information needs to be read from the symbol set. Optionally, the distorted symbol is determined by the distortion amount being greater than a preset threshold. Wherein the deformation amount is a quantification of the degree of deformation of the standard character.
For a specific process of the method, reference may be made to the above embodiment of the watermark generation method based on deformation, which is not described herein again.
In one embodiment, the decoding, based on a correspondence between a preset symbol deformation rule and different coding values, each deformation symbol in turn to obtain a coding value of each deformation symbol includes: for all the deformation symbols, determining a coding value corresponding to each deformation symbol from a preset substitution symbol coding table; the replacement symbol coding table is a corresponding relation between a replacement symbol and a coding value, and the replacement symbol is a deformation symbol obtained by a standard symbol under different deformation rules.
In the embodiment of the invention, different rules are deformed in advance according to standard symbols to obtain a plurality of replacement characters, the deformation rules of each replacement character are different, the replacement characters correspond to all values of codes one by one, and the replacement symbol code table is obtained based on the replacement characters and the code values. The replacement symbol encoding table in the embodiment of the present invention is the same as the replacement symbol encoding table in the watermark generation method based on the deformation.
In the decoding stage, the scanned character image separated from the watermark text is compared and matched with the replacing character patterns in all the character replacing tables. Reading the code value corresponding to the corresponding character form
Figure BDA0003604353940000121
For example, if the target text "book" is a deformed symbol, and the encoding information of the deformation rule corresponding to the deformed symbol in the replacement symbol encoding table is 010, it is determined that the encoding value corresponding to the deformed symbol "book" is 010.
In one embodiment, said converting said watermark encoding sequence into watermark information comprises: reading a redundancy check code from the watermark coding sequence, wherein the rest part in the watermark coding sequence is used as an effective sequence; based on the redundant check code, checking and correcting the effective sequence to obtain an encrypted bit stream after error correction; decrypting the encrypted bit stream according to a preset encryption algorithm to obtain a decrypted binary bit stream; and converting the decrypted binary bit stream into watermark information.
W 'in watermark coding sequence' h Separation into valid sequences containing watermark information
Figure BDA0003604353940000122
And redundant check sequence
Figure BDA0003604353940000123
For redundant check sequence
Figure BDA0003604353940000124
Parity check calculation is carried out to obtain an encrypted watermark sequence W 'after error correction' e
The error of any bit can cause the parity bit notIf the calculated check bit is matched with the received check sequence
Figure BDA0003604353940000131
If the watermark sequence is matched with the encryption key, the watermark sequence is not tampered, and an encrypted watermark sequence W 'is obtained' e . If the check bit can not pass the detection, confirming the error position according to the alignment condition of the check code and correcting to obtain the encrypted watermark sequence W 'after error correction' e . The watermark sequence W 'is encrypted using an encryption stage, e.g. Salsa, using a pre-stored key' e Decrypting to obtain decrypted watermark information binary bit stream W' b
For example, binary bitstream W' b Conversion to hexadecimal sequence W' b-hex And a hexadecimal sequence W 'according to Unicode encoding' b-hex And converting into Chinese watermark information.
The following describes the watermark generating and reading apparatus based on deformation provided by the present invention, and the watermark generating and reading apparatus based on deformation described below and the watermark generating and reading method based on deformation described above may respectively refer to each other correspondingly.
Fig. 7 is a schematic structural diagram of a watermark generation apparatus based on deformation according to the present invention, as shown in fig. 7, the watermark generation apparatus based on deformation includes: an encoding processing module 701 and a glyph processing module 702. The encoding processing module 701 is configured to obtain watermark information to be loaded, and convert the watermark information into a watermark encoding sequence; the font processing module 702 is configured to sequentially deform the target carrier symbol according to the sequence of the watermark encoding sequence and according to the correspondence between the preset different encoding values and the symbol deformation rule.
Fig. 8 is a schematic structural diagram of a watermark reading apparatus based on deformation according to the present invention, and as shown in fig. 8, the watermark reading apparatus based on deformation includes: a warp determination module 801, a warp decoding module 802, a decoding summary module 803 and a watermark decoding module 804. The deformation determining module 801 is configured to compare each symbol in the target text with a standard symbol, and determine all deformed symbols with deformation; the deformation decoding module 802 is configured to decode each deformation symbol in sequence based on a correspondence between a preset symbol deformation rule and different encoding values to obtain an encoding value of each deformation symbol; the decoding and summarizing module 803 is used for obtaining a watermark encoding sequence according to the encoding values of all the deformation symbols; the watermark decoding module 804 is configured to convert the watermark encoding sequence into watermark information.
The device embodiment provided in the embodiment of the present invention is for implementing the above method embodiments, and for specific flows and details, reference is made to the above method embodiment, which is not described herein again.
The implementation principle and the technical effect of the watermark generation and reading device based on deformation provided by the embodiment of the invention are the same as those of the watermark generation and reading method based on deformation, and for brief description, reference may be made to the corresponding content in the watermark generation and reading method based on deformation.
Fig. 9 is a schematic structural diagram of an electronic device provided in the present invention, and as shown in fig. 9, the electronic device may include: a processor (processor)901, a communication Interface (Communications Interface)902, a memory (memory)903 and a communication bus 904, wherein the processor 901, the communication Interface 902 and the memory 903 are communicated with each other through the communication bus 904. The processor 901 may call logic instructions in the memory 903 to perform a method of deformation-based watermark generation, the method comprising: acquiring watermark information to be loaded, and converting the watermark information into a watermark coding sequence; and according to the sequence of the watermark coding sequence, sequentially carrying out corresponding deformation on the target carrier symbol according to the corresponding relation between preset different coding values and the symbol deformation rule.
In addition, the logic instructions in the memory 903 may be implemented in a software functional unit and stored in a computer readable storage medium when the logic instructions are sold or used as a separate product. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, the computer program product comprising a computer program, the computer program being storable on a non-transitory computer-readable storage medium, wherein when the computer program is executed by a processor, a computer is capable of executing the deformation-based watermark generation method provided by the above methods, the method comprising: acquiring watermark information to be loaded, and converting the watermark information into a watermark coding sequence; and according to the sequence of the watermark coding sequence, sequentially carrying out corresponding deformation on the target carrier symbol according to the corresponding relation between preset different coding values and the symbol deformation rule.
In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium having stored thereon a computer program, which when executed by a processor implements a method for generating a watermark based on deformation provided by the above methods, the method including: acquiring watermark information to be loaded, and converting the watermark information into a watermark coding sequence; and according to the sequence of the watermark coding sequence, sequentially carrying out corresponding deformation on the target carrier symbol according to the corresponding relation between preset different coding values and the symbol deformation rule.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. Based on the understanding, the above technical solutions substantially or otherwise contributing to the prior art may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the various embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (14)

1. A watermark generation method based on deformation is characterized by comprising the following steps:
acquiring watermark information to be loaded, and converting the watermark information into a watermark coding sequence;
and according to the sequence of the watermark coding sequence, sequentially carrying out corresponding deformation on the target carrier symbol according to the corresponding relation between preset different coding values and the symbol deformation rule.
2. A deformation-based watermark generation method according to claim 1, wherein the converting the watermark information into a watermark encoding sequence comprises:
converting the watermark information into a binary bit stream, and encrypting the binary bit stream based on a preset encryption algorithm to obtain an encrypted bit stream;
and adding redundant check bits to the encrypted bit stream to obtain the watermark coding sequence.
3. The deformation-based watermark generation method of claim 1, wherein the sequentially performing corresponding deformation on the target carrier symbol according to the sequence of the watermark encoding sequence and the corresponding relationship between the preset different encoding values and the symbol deformation rule comprises:
dividing the watermark coding sequence into a plurality of groups according to preset digits;
determining a replacement symbol corresponding to each group of codes from a preset replacement symbol code table according to each group of code values in sequence, and replacing the target carrier symbol with the replacement symbol;
the replacement symbol coding table is a corresponding relation between a replacement symbol and a coding value, and the replacement symbol is a deformation symbol obtained by a standard symbol under different deformation rules.
4. A method for watermark generation based on deformation according to claim 3, wherein the method for generating the alternative symbol encoding table comprises:
according to each standard symbol, obtaining a plurality of replacement symbols corresponding to each standard symbol based on a plurality of symbol deformation rules and different deformation degrees of the deformation rules;
determining a replacement symbol corresponding to each code value in the preset digit code range according to the plurality of replacement symbols to generate a replacement symbol code table;
and the number of the replacement characters corresponding to each standard symbol in the replacement symbol coding table is the same as the total number of all codes of the preset digit.
5. A distortion-based watermark generation method according to claim 4, wherein the symbol distortion rules include changing any one or more of symbol weight, symbol stroke offset and symbol overall rotation; the different deformation degrees respectively comprise the steps of changing the character weight of the symbol, the stroke offset of the symbol and the integral rotation of the symbol.
6. A deformation-based watermark generation method according to claim 5, wherein obtaining a plurality of replacement symbols corresponding to each standard symbol based on a plurality of symbol deformation rules and different deformation degrees of the deformation rules according to each standard symbol comprises:
establishing a corresponding coordinate axis for each deformation rule, and determining the deformation range of each coordinate axis;
and based on the OpenType variable font, interpolating to generate a plurality of replacement symbols according to the interpolation step length and the deformation range of each deformation mode.
7. A deformation-based watermark generation method according to any of claims 1-6, wherein after converting the watermark information into a watermark encoding sequence, further comprising:
and selecting a plurality of bits according to the watermark coding sequence and preset rules to form a control sequence, wherein the control sequence is used for determining the combination mode of different deformation rules or determining the position of a target carrier symbol embedded with the watermark.
8. A watermark reading method based on deformation, comprising:
comparing each symbol in the target text with the standard symbol, and determining all deformed symbols with deformation;
based on the corresponding relation between a preset symbol deformation rule and different coding values, decoding each deformation symbol in sequence to obtain the coding value of each deformation symbol;
obtaining a watermark coding sequence according to the coding values of all the deformed symbols;
and converting the watermark coding sequence into watermark information.
9. The deformation-based watermark reading method according to claim 8, wherein the decoding of each deformed symbol in sequence based on the correspondence between the preset symbol deformation rule and the different encoding values to obtain the encoding value of each deformed symbol includes:
for all the deformation symbols, determining a coding value corresponding to each deformation symbol from a preset substitution symbol coding table;
the replacement symbol coding table is a corresponding relation between a replacement symbol and a coding value, and the replacement symbol is a deformation symbol obtained by a standard symbol under different deformation rules.
10. A distortion-based watermark reading method according to claim 8, wherein the converting the watermark encoding sequence into watermark information comprises:
reading a redundancy check code from the watermark coding sequence, wherein the rest part in the watermark coding sequence is used as an effective sequence;
based on the redundant check code, checking and correcting the effective sequence to obtain an encrypted bit stream after error correction;
decrypting the encrypted bit stream according to a preset encryption algorithm to obtain a decrypted binary bit stream;
and converting the decrypted binary bit stream into watermark information.
11. A watermark generation apparatus based on deformation, comprising:
the encoding processing module is used for acquiring watermark information to be loaded and converting the watermark information into a watermark encoding sequence;
and the font processing module is used for sequentially carrying out corresponding deformation on the target carrier symbols according to the sequence of the watermark coding sequence and the corresponding relation between the preset different coding values and the symbol deformation rule.
12. A watermark reading apparatus based on deformation, comprising:
the deformation determining module is used for comparing each symbol in the target text with the standard symbol and determining all deformed symbols with deformation;
the deformation decoding module is used for sequentially decoding each deformation symbol based on the corresponding relation between a preset symbol deformation rule and different coding values to obtain the coding value of each deformation symbol;
the decoding and summarizing module is used for obtaining a watermark coding sequence according to the coding values of all the deformed symbols;
and the watermark decoding module is used for converting the watermark coding sequence into watermark information.
13. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method for generating a watermark based on deformations according to any of claims 1 to 7 or the method for reading a watermark based on deformations according to any of claims 8 to 10 when executing the program.
14. A non-transitory computer-readable storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the distortion-based watermark generation method according to any one of claims 1 to 7 or the distortion-based watermark reading method according to any one of claims 8 to 10.
CN202210437636.7A 2022-04-19 2022-04-19 Watermark generating and reading method and device based on deformation Pending CN114817873A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210437636.7A CN114817873A (en) 2022-04-19 2022-04-19 Watermark generating and reading method and device based on deformation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210437636.7A CN114817873A (en) 2022-04-19 2022-04-19 Watermark generating and reading method and device based on deformation

Publications (1)

Publication Number Publication Date
CN114817873A true CN114817873A (en) 2022-07-29

Family

ID=82507898

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210437636.7A Pending CN114817873A (en) 2022-04-19 2022-04-19 Watermark generating and reading method and device based on deformation

Country Status (1)

Country Link
CN (1) CN114817873A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115455966A (en) * 2022-11-14 2022-12-09 合肥高维数据技术有限公司 Safe word stock construction method and safe code extraction method thereof

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115455966A (en) * 2022-11-14 2022-12-09 合肥高维数据技术有限公司 Safe word stock construction method and safe code extraction method thereof
CN115455966B (en) * 2022-11-14 2023-03-10 合肥高维数据技术有限公司 Safe word stock construction method and safe code extraction method thereof

Similar Documents

Publication Publication Date Title
US10755375B2 (en) Systems and methods for steganography based on text fonts
US10789667B2 (en) Method and apparatus for digital watermarking of three dimensional object
CN106570356B (en) Text watermark embedding and extracting method based on Unicode coding
Shirali-Shahreza et al. Arabic/Persian text steganography utilizing similar letters with different codes
CN109657769A (en) A kind of two-dimensional barcode information hidden method run-length coding based
CN110414194B (en) Text watermark embedding and extracting method
US20190130080A1 (en) Watermark embedding and extracting method for protecting documents
CN110475038B (en) Character and picture generating type hiding and recovering method combined with minimum closure coding
Bitar et al. Blind digital watermarking in PDF documents using Spread Transform Dither Modulation
Singh et al. A survey on text based steganography
CN112016061A (en) Excel document data protection method based on robust watermarking technology
CN110322386A (en) A kind of insertion of digital text watermarking and detection method and device
Thabit et al. CSNTSteg: Color spacing normalization text steganography model to improve capacity and invisibility of hidden data
CN115604401B (en) Traceable electronic seal encryption method
CN114817873A (en) Watermark generating and reading method and device based on deformation
Alkhafaji et al. Payload capacity scheme for quran text watermarking based on vowels with kashida
Chaudhary et al. Text steganography based on feature coding method
Baawi et al. Enhancement of text steganography technique using Lempel-Ziv-Welch Algorithm and two-letter word technique
Abbasi et al. Urdu text steganography: Utilizing isolated letters
CN115334317B (en) Information processing method, device and equipment
Shirali-Shahreza et al. Persian/arabic unicode text steganography
CN111489278B (en) Text watermark embedding and extracting method based on scrambling diffusion
CN115455955A (en) Chinese named entity recognition method based on local and global character representation enhancement
Wang et al. A high-capacity text watermarking method based on geometric micro-distortion
Vasić Annotation of cultural heritage 3-D models by robust data embedding in the object mesh

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