Deformation-based watermark generation and reading method and device

By converting watermark information into a coded sequence and applying symbol deformation rules, the problem of low watermark generation efficiency and poor feasibility in the existing technology is solved, efficient watermark generation and reading in complex symbol scenes is achieved, and watermark capacity is improved.

CN114817873BActive Publication Date: 2024-09-20TSINGHUA SHENZHEN INTERNATIONAL GRADUATE SCHOOL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210437636.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-19
Publication Date
2024-09-20
Estimated Expiration
2042-04-19

AI Technical Summary

Technical Problem

The existing watermark technology based on glyph transformation has low efficiency and poor feasibility in Chinese character scenes, and the watermark has poor visibility, making it difficult to meet the demand for adding large-capacity watermarks.

Method used

By converting the watermark information into a watermark encoding sequence, the target carrier symbol is deformed using the preset encoding values ​​and symbol deformation rules, and a replacement symbol encoding table is generated to realize the loading and reading of the watermark information, avoiding the need to manually draw the watermark font. solve the inefficiency problem and improve the efficiency and feasibility of watermark font generation.

Benefits of technology

It achieves efficient generation and reading of watermarks in complex symbol scenes, increases watermark capacity, and is suitable for application scenarios that require large-capacity watermark addition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114817873B
    Figure CN114817873B
Patent Text Reader

Abstract

The present invention provides a deformation-based watermark generation and reading method and device, the method comprising: obtaining watermark information to be loaded, converting the watermark information into a watermark coding sequence; and in accordance with the order of the watermark coding sequence, sequentially deforming the target carrier symbol according to the correspondence between different preset coding values ​​and symbol deformation rules. The method uses the correspondence between the coding values ​​and the symbol deformation rules to deform the target carrier symbol accordingly, thereby achieving the loading of the watermark information without adding additional information to the carrier symbol, thus avoiding the problem of low efficiency of simply manually drawing the watermark font outline in the Chinese character scene, where the number of characters is large and the radical structure is complex, thereby improving the generation efficiency and feasibility of the watermark font library, and can be applied to various complex symbol scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of digital watermarking, and in particular to a deformation-based watermark generation and reading method and device. Background Art

[0002] Text watermarking technology is to hide specific watermark information in a document, and finally detect and extract the watermark information embedded in the carrier document through a machine. The biggest technical limitation of text watermarking is that compared with carrier forms such as images, text redundancy is low, there is less embedding space, and the watermark capacity is easily limited. Therefore, among the text watermark construction methods, the method based on character perturbation deformation has attracted much attention due to its large watermark capacity.

[0003] Existing methods for embedding watermarks based on glyph transformation can be divided into two categories: 1. Constructing watermark fonts by manually modifying glyphs. Given the large number of Chinese characters and the complex radical structure, simply manually drawing the outline of the watermark font is inefficient, time-consuming, and has low feasibility. And because of manual drawing, the differences between the replaced glyphs are difficult to quantify and are highly random. 2. Generate watermark fonts through deep learning, glyph flow pipes, and other methods. This method automatically generates complete character types through corresponding algorithms, and is mainly used for Latin character generation, with poor uniformity. For example, due to the complex shape structure of Chinese characters, it is difficult to generate beautiful Chinese glyphs through similar algorithms, and the watermark is less visible. Summary of the invention

[0004] In view of the problems existing in the prior art, the present invention provides a deformation-based watermark generation and reading method and device.

[0005] The present invention provides a deformation-based watermark generation method, comprising: obtaining watermark information to be loaded, converting the watermark information into a watermark coding sequence; and deforming the target carrier symbol in sequence according to the order of the watermark coding sequence and the corresponding relationship between different preset coding values ​​and symbol deformation rules.

[0006] According to a deformation-based watermark generation method provided by the present invention, the converting of the watermark information into a watermark coding sequence includes: converting the watermark information into a binary bit stream, encrypting the binary bit stream based on a preset encryption algorithm to obtain an encrypted bit stream; adding redundant check bits to the encrypted bit stream to obtain the watermark coding sequence.

[0007] According to a deformation-based watermark generation method provided by the present invention, the target carrier symbol is deformed accordingly in sequence according to the order of the watermark coding sequence and the correspondence between different preset coding values ​​and symbol deformation rules, including: dividing the watermark coding sequence into multiple groups according to the preset number of bits; determining the replacement symbol corresponding to each group of codes from a preset replacement symbol coding table according to each group of code values, and replacing the target carrier symbol with the replacement symbol; wherein the replacement symbol coding table is the correspondence between the replacement symbol and the coding value, and the replacement symbol is a deformed symbol obtained by the standard symbol under different deformation rules.

[0008] According to a deformation-based watermark generation method provided by the present invention, the method for generating the replacement symbol coding table includes: according to each standard symbol, based on a number of symbol deformation rules and different deformation degrees of the deformation rules, obtaining multiple replacement symbols corresponding to each standard symbol; according to the multiple replacement symbols, determining the replacement symbol corresponding to each code value within the preset bit number coding range to generate the replacement symbol coding table; wherein the number of 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 bit number.

[0009] According to a deformation-based watermark generation method provided by the present invention, the symbol deformation rule includes changing any one or more of the symbol weight, symbol stroke offset and symbol overall rotation; the different deformation degrees include the number of steps for changing the symbol weight, symbol stroke offset and symbol overall rotation.

[0010] According to a deformation-based watermark generation method provided by the present invention, based on each standard symbol, based on a number of symbol deformation rules and different deformation degrees of the deformation rules, multiple replacement symbols corresponding to each standard symbol are obtained, including: establishing a corresponding coordinate axis for each deformation rule, and determining the deformation range of each coordinate axis; based on the OpenType variable font, interpolating and generating multiple replacement symbols according to the interpolation step and deformation range of each deformation method.

[0011] According to a deformation-based watermark generation method provided by the present invention, after converting the watermark information into a watermark coding sequence, it also includes: selecting a number of bits according to a preset rule based on the watermark coding sequence to form a control sequence, and the control sequence is used to determine the combination of different deformation rules, or to determine the target carrier symbol position for embedding the watermark.

[0012] The present invention also provides a deformation-based watermark reading method, comprising: comparing each symbol in the target text with the standard symbol to determine all deformed symbols; based on the correspondence between preset symbol deformation rules and different coding values, decoding each deformed symbol in turn to obtain the coding value of each deformed symbol; obtaining a watermark coding sequence based on the coding values ​​of all deformed symbols; and converting the watermark coding sequence into watermark information.

[0013] According to a deformation-based watermark reading method provided by the present invention, based on the correspondence between preset symbol deformation rules and different coding values, each deformed symbol is decoded in turn to obtain the coding value of each deformed symbol, including: for all deformed symbols, from a preset replacement symbol coding table, determining the coding value corresponding to each deformed symbol; wherein the replacement symbol coding table is the correspondence between replacement symbols and coding values, and the replacement symbol is a deformed symbol obtained by a standard symbol under different deformation rules.

[0014] According to a deformation-based watermark reading method provided by the present invention, the watermark coding sequence is converted into watermark information, including: reading a redundant check code from the watermark coding sequence, and the remaining part of the watermark coding sequence is used as a valid sequence; based on the redundant check code, the valid sequence is checked and corrected to obtain an error-corrected encrypted bit stream; according to a preset encryption algorithm, the encrypted bit stream is decrypted to obtain a decrypted binary bit stream; and the decrypted binary bit stream is converted into watermark information.

[0015] The present invention also provides a deformation-based watermark generation device, comprising: a coding processing module, used to obtain the watermark information to be loaded and convert the watermark information into a watermark coding sequence; a glyph processing module, used to deform the target carrier symbol in sequence according to the order of the watermark coding sequence and the correspondence between different preset coding values ​​and symbol deformation rules.

[0016] The present invention also provides a deformation-based watermark reading device, comprising: a deformation determination module, used to compare each symbol in the target text with the standard symbol to determine all deformed symbols; a deformation decoding module, used to decode each deformed symbol in turn based on the correspondence between preset symbol deformation rules and different coding values ​​to obtain the coding value of each deformed symbol; a decoding summary module, used to obtain a watermark coding sequence according to the coding values ​​of all deformed symbols; and a watermark decoding module, used to convert the watermark coding sequence into watermark information.

[0017] 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 when the processor executes the program, any of the deformation-based watermark generation or reading methods described above is implemented.

[0018] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method for generating or reading a watermark based on deformation as described above is implemented.

[0019] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned deformation-based watermark generation or reading methods.

[0020] The deformation-based watermark generation and reading method and device provided by the present invention, after the watermark information is converted into a watermark coding sequence, the target carrier symbol is deformed accordingly through the correspondence between the preset different coding values ​​and the symbol deformation rules, so as to realize the loading of the watermark information, without adding additional information to the carrier symbol, avoiding the problem of low efficiency of simply manually drawing the watermark font outline in the Chinese character scene, where the number of characters is large and the radical structure is complex, thereby improving the generation efficiency and feasibility of the watermark font library, and can be applied to various complex symbol scenes. At the same time, all carrier symbols in the method can be deformed and encoded, thereby increasing the capacity of the watermark, and then the method can be widely used in application scenarios with large-capacity watermark addition requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 It is a flow chart of the deformation-based watermark generation method provided by the present invention;

[0023] Figure 2 It is the intended representation of the replacement symbol coding provided by the present invention;

[0024] Figure 3 This is a schematic diagram of changing the weight of a symbol provided by the present invention;

[0025] Figure 4 It is a schematic diagram of changing the weight of a symbol and the offset of a symbol stroke provided by the present invention;

[0026] Figure 5It is a schematic diagram of changing the weight of a symbol, the offset of a symbol stroke, and the overall rotation of a symbol provided by the present invention;

[0027] Figure 6 It is a flow chart of the deformation-based watermark reading method provided by the present invention;

[0028] Figure 7 It is a structural schematic diagram of a deformation-based watermark generation device provided by the present invention;

[0029] Figure 8 It is a structural schematic diagram of a deformation-based watermark reading device provided by the present invention;

[0030] Fig. 9 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0032] Combine the following Figure 1-Figure 9 The deformation-based watermark generation method and device of the present invention are described. Figure 1 is a flow chart of the deformation-based watermark generation method provided by the present invention, such as Figure 1 As shown, the present invention provides a deformation-based watermark generation method, comprising:

[0033] 101. Obtain watermark information to be loaded, and convert the watermark information into a watermark coding sequence.

[0034] The symbols in the present invention include text symbols, but are not limited to text symbols. Among them, the text symbols include Chinese characters, but are not limited to Chinese characters. For example, the method can be migrated and applied to characters and other graphic symbols in all language families such as Sino-Tibetan language family, Indo-European language family, and Afro-Asian language family. The following embodiments are described by taking the symbols as Chinese characters as an example.

[0035] The watermark information is the information that needs to be loaded, such as a string of text including the owner's name. The watermark information is encoded before loading. For example, the watermark information composed of Chinese characters can be converted into a binary bit stream according to Unicode encoding, and then the watermark encoding sequence W is obtained. hThe carrier symbol is a text symbol used by the present invention to hide watermark information, such as a regular article. The target carrier symbol is the carrier symbol into which the watermark information needs to be loaded, that is, the embedding site of the watermark information in the carrier text, such as a number of words in the article, which can be any position or any spaced words.

[0036] 102. According to the order of the watermark coding sequence and the correspondence between different preset coding values ​​and symbol deformation rules, the target carrier symbols are deformed accordingly in sequence;

[0037] Based on the method of the present invention, the deformed target carrier symbol can be decoded to obtain the watermark coding sequence according to the corresponding relationship between the same symbol deformation rule and different coding values.

[0038] For example, different code values ​​such as 000, 001, 010, 011, 100, 101, 110 and 111 correspond to different symbol deformation modes. When the watermark code sequence is determined, the corresponding symbol deformation modes are determined in turn according to the watermark code sequence. In the target carrier symbol, these symbol deformation modes are applied, that is, the deformation modes corresponding to the code values ​​are used to deform the target carrier symbol, so that the watermark information is written into the carrier symbol.

[0039] The deformation-based watermark generation method of the present invention, after the watermark information is converted into a watermark coding sequence, performs corresponding deformation on the target carrier symbol through the correspondence between the preset different coding values ​​and the symbol deformation rules, thereby realizing the loading of the watermark information, without adding additional information to the carrier symbol, avoiding the problem of low efficiency of simply manually drawing the watermark font outline in the Chinese character scene, where the number of characters is large and the radical structure is complex, thereby improving the generation efficiency and feasibility of the watermark font library, and can be applied to various complex symbol scenes. At the same time, all carrier symbols in the method can be deformed and encoded, thereby increasing the capacity of the watermark, and then the method can be widely used in application scenarios with large-capacity watermark addition requirements.

[0040] In one embodiment, converting the watermark information into a watermark coding sequence includes: converting the watermark information into a binary bit stream, 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.

[0041] For example, the Salsa20 algorithm is used to encrypt the binary bit stream generated above, and W is obtained. e , and then use Hamming code to add redundant check bits to the encryption result, and finally get the binary sequence W of the above watermark coding sequence h , and the other steps are the same. In this way, the watermark information can be encrypted to avoid tampering.

[0042] In one embodiment, in the order of the watermark coding sequence, according to the corresponding relationship between preset different coding values and symbol deformation rules, the target carrier symbols are deformed accordingly in sequence, including: dividing the watermark coding sequence into multiple groups according to a preset number of digits; successively determining, according to the coding value of each group, the replacement symbol corresponding to each group from a preset replacement symbol coding table, and replacing the target carrier symbol with the replacement symbol; wherein, the replacement symbol coding table is the corresponding relationship between the replacement symbol and the coding value, and the replacement symbol is a deformed symbol obtained by a standard symbol under different deformation rules.

[0043] The standard symbol is a symbol that has not undergone deformation, such as all standard fonts in a font library. In the present invention, different rules of deformation are pre-performed on the standard symbol to obtain multiple replacement characters, and the deformation rules of each replacement character are different. The replacement characters are in one-to-one correspondence with all the coding values. Based on the replacement characters and the coding values, the above-mentioned replacement symbol coding table is obtained, as Figure 2 shown. The preset number of digits is the number of digits of the coding. For example, 000 and 001 mentioned in the above embodiment, the preset number of digits is three digits. After determining the watermark coding sequence, character replacement can be performed according to the preset number of digits.

[0044] Specifically, group W h with every three bits (bit) as a group. Each group corresponds to a glyph replacement at an embedding site.

[0045] For each embedding site, confirm the corresponding watermark information group Search in the replacement symbol coding table for the replacement glyph corresponding to the Chinese character in the carrier text at this embedding point with the coding For example, when the carrier text is "书" (book), the corresponding embedded watermark information is 010. Then search in the replacement glyph table for the replacement glyph corresponding to "书" with the coding 010, and replace the standard glyph "书" in the original carrier symbol with the replacement character of the character variant.

[0046] Through the method of the present invention, only by searching for the replacement character corresponding to the coding value in the replacement symbol coding table, the rapid generation and automatic loading of the watermark can be realized.

[0047] In one embodiment, the method for generating the replacement symbol coding table includes: according to each standard symbol, based on a number of symbol deformation rules and different deformation degrees of the deformation rules, obtaining multiple replacement symbols corresponding to each standard symbol; according to the multiple replacement symbols, determining the replacement symbol corresponding to each code value within the preset bit number coding range to generate the replacement symbol coding table; wherein the number of 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 bit number.

[0048] In one embodiment, the symbol deformation rule includes changing any one or more of the symbol font weight, symbol stroke offset and symbol overall rotation; the different deformation degrees include the number of steps for changing the symbol font weight, symbol stroke offset and symbol overall rotation.

[0049] Taking Chinese characters as an example, according to the structural characteristics of Chinese characters and taking into account the visual concealment of watermark fonts, the embodiments of the present invention provide three types of geometric micro-deformations as examples: ① Changing the font weight, which refers to continuously changing the thickness of the strokes. ② Character stroke offset, which refers to translating the selected strokes left or right or up and down. ③ Rotating the entire character shape, which refers to rotating the character shape clockwise or counterclockwise around the center of the character to make a reading.

[0050] In the actual process of constructing watermark fonts, a single geometric micro-deformation transformation can be applied, or multiple geometric micro-deformation transformations can be used in combination.

[0051] The deformation-based watermark generation method of the present invention quantifies the degree of transformation of different transformation modes of the replaced character shape, thereby improving the generation efficiency and feasibility of character deformation.

[0052] In one embodiment, the method obtains multiple replacement symbols corresponding to each standard symbol based on a number of symbol deformation rules and different deformation degrees of the deformation rules, including: establishing a corresponding coordinate axis for each deformation rule, and determining the deformation range of each coordinate axis; based on the OpenType variable font, interpolating and generating multiple replacement symbols according to the interpolation step and deformation range of each deformation method.

[0053] Establish the corresponding coordinate axis for each selected geometric micro-deformation transformation. If only ② transformation is used, the character variant space is 1-dimensional, see Figure 3 If both transformations ① and ② are used, the weight transformation axis and the offset transformation axis are established, and the character variant design space established is two-dimensional, see Figure 4 If the three transformations are used in combination, the character variant design space is three-dimensional, see Figure 5 .

[0054] The replacement glyph contour generated by the present invention is determined by the coordinate position of the character in the variant design space. Define the original glyph as x, and the transformed glyph as x′, and take the simultaneous use of three geometric micro-deformation transformations as an example. Define the character weight transformation as ChgWeight(), the stroke offset as PanStroke(), and the character rotation transformation as Slant(), then the replaced glyph contour can be described by formula (1):

[0055] x′=λ1·ChgWeight(x)+λ2·PanStroke(x)+λ3·Slant(x);

[0056] Among them, λ1, λ2, and λ3 represent weight coefficients corresponding to deformation modes, which can be set according to the design requirements of the watermark algorithm.

[0057] For each axis in the character variant design space, a transformation range is established. The range of each axis is the transformation glyph at the design endpoint of each transformation axis. For example, for the character weight transformation axis, the range is [-N, N], then the design is located at the left endpoint of the axis, with a value of -N, corresponding to the glyph outline when the weight is the lightest, and the micro-variant value is N, located at the right endpoint, corresponding to the glyph outline when the weight is the heaviest.

[0058] After determining the interpolation step size for each transformation axis, the OpenType variable font feature can be used to automatically interpolate and generate a series of replacement glyphs with smoothly changing features. The replacement glyphs can be interpolated based on the incremental coordinates of the end point, and the change of the interpolated glyph outline compared to the end point glyph outline is determined by the difference between the two coordinates.

[0059] If multiple geometric micro-deformation transformation methods are used simultaneously, the automatically generated replacement glyphs represent the effects of the three transformations simultaneously, and different values ​​can be set according to actual needs.

[0060] In theory, an infinite number of smoothly changing glyphs can be generated, but considering that the replacement glyphs should be invisible to the human eye but recognizable to the machine through detection methods, a threshold value of the difference between the replacement glyph and the standard glyph can be determined. This threshold value satisfies the requirement that it is invisible to the human eye but recognizable to the machine. The setting of the threshold value can be established through detection experiments, the invisibility of the glyphs can be determined through subjective evaluation methods, and the detectability of the machine can be measured using watermark extraction technology.

[0061] The deformation-based watermark generation method of the present invention is based on the character variant design space, and a series of smoothly changing characteristic character shapes can be automatically interpolated and generated, thereby improving the generation efficiency and feasibility of the watermark font library. For a certain character variant design space, different interpolation step sizes can be selected to obtain replacement character shapes with different quantities and contour shapes. It has extremely strong flexibility, is based on OpenType variable font design, and has a wide range of application scenarios.

[0062] In one embodiment, after converting the watermark information into a watermark coding sequence, the method further includes: selecting a number of bits according to a preset rule based on the watermark coding sequence to form a control sequence, wherein the control sequence is used to determine a combination of different deformation rules, or to determine a target carrier symbol position for embedding a watermark.

[0063] For example, the watermark encoding sequence W h The first and last two bits constitute the joint coding control sequence W c The function of the control sequence can be found in the following joint encoding control table, and the multi-character joint embedding method is confirmed based on this table.

[0064]

[0065]

[0066] Figure 6 The deformation-based watermark reading method provided by the present invention is as follows: Figure 6 As shown, the deformation-based watermark reading method includes:

[0067] 601. Compare each symbol in the target text with the standard symbol to determine all deformed symbols;

[0068] 602. Based on the correspondence between the preset symbol transformation rule and different code values, decode each transformed symbol in turn to obtain the code value of each transformed symbol;

[0069] 603. Obtain a watermark code sequence according to the code values ​​of all the deformed symbols;

[0070] 604. Convert the watermark coding sequence into watermark information.

[0071] The target text is a set of symbols that have been loaded with watermark information, from which the hidden watermark information needs to be read. Optionally, the deformed symbols are determined by the deformation amount being greater than a preset threshold. The deformation amount is a quantification of the degree of deformation of the standard character.

[0072] The specific process of the method can be found in the above-mentioned embodiment of the deformation-based watermark generation method, which will not be described in detail here.

[0073] In one embodiment, based on the correspondence between preset symbol transformation rules and different coding values, each transformed symbol is decoded in turn to obtain the coding value of each transformed symbol, including: for all transformed symbols, determining the coding value corresponding to each transformed symbol from a preset replacement symbol coding table; wherein the replacement symbol coding table is the correspondence between replacement symbols and coding values, and the replacement symbol is a transformed symbol obtained from a standard symbol under different transformation rules.

[0074] In the embodiment of the present invention, the standard symbol is deformed in advance according to different rules to obtain multiple replacement characters, each replacement character has a different deformation rule, and the replacement character corresponds to all the values ​​of the code one by one. The replacement symbol encoding table is obtained based on the replacement character and the code value. Among them, the replacement symbol encoding table in the embodiment of the present invention is the same as the replacement symbol encoding table in the deformation-based watermark generation method.

[0075] In the decoding stage, the scanned character image segmented from the watermark text is compared and matched with the replacement glyphs in all character replacement tables. Read the encoding value corresponding to the corresponding glyph

[0076] For example, 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, then it is determined that the encoding value corresponding to the deformed symbol "book" is 010.

[0077] In one embodiment, converting the watermark coding sequence into watermark information includes: reading a redundant check code from the watermark coding sequence, and using the remaining part of the watermark coding sequence as a valid sequence; based on the redundant check code, checking and correcting the valid sequence to obtain an error-corrected encrypted bit stream; 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.

[0078] The watermark coding sequence W′ h Separate into valid sequences containing watermark information and redundant check sequence Redundancy check sequence Perform parity check calculation to obtain the encrypted watermark sequence W′ after error correction e .

[0079] Since any error in one bit will cause the parity bit to mismatch, if the calculated check bit is different from the received check sequence If they match, it means that the watermark sequence has not been tampered with, and the encrypted watermark sequence W′ is obtained. eIf the check bit fails to pass the detection, the error position is confirmed and corrected according to the alignment of the check code to obtain the encrypted watermark sequence W′ after error correction. e . Use the encryption stage, such as Salsa encryption, to encrypt the watermark sequence W′ e Decrypt and obtain the decrypted watermark information binary bit stream W′ b .

[0080] For example, the binary bit stream W′ b Convert to hexadecimal sequence W′ b-hex , and convert the hexadecimal sequence W′ into b-hex Convert to Chinese watermark information.

[0081] The deformation-based watermark generation and reading device provided by the present invention is described below. The deformation-based watermark generation and reading device described below and the deformation-based watermark generation and reading method described above can be referred to each other respectively.

[0082] Figure 7 Schematic diagram of the structure of the deformation-based watermark generation device provided by the present invention. Figure 7 As shown, the deformation-based watermark generation device includes: a coding processing module 701 and a glyph processing module 702. The coding processing module 701 is used to obtain the watermark information to be loaded and convert the watermark information into a watermark coding sequence; the glyph processing module 702 is used to perform corresponding deformation on the target carrier symbol in sequence according to the order of the watermark coding sequence and the correspondence between different preset coding values ​​and symbol deformation rules.

[0083] Figure 8 Schematic diagram of the structure of the deformation-based watermark reading device provided by the present invention. Figure 8 As shown, the deformation-based watermark reading device includes: a deformation determination module 801, a deformation decoding module 802, a decoding summary module 803 and a watermark decoding module 804. Among them, the deformation determination module 801 is used to compare each symbol in the target text with the standard symbol to determine all deformed symbols; the deformation decoding module 802 is used to decode each deformed symbol in turn based on the correspondence between the preset symbol deformation rule and different encoding values ​​to obtain the encoding value of each deformed symbol; the decoding summary module 803 is used to obtain a watermark encoding sequence according to the encoding values ​​of all deformed symbols; the watermark decoding module 804 is used to convert the watermark encoding sequence into watermark information.

[0084] The device embodiments provided in the embodiments of the present invention are for implementing the above-mentioned method embodiments. For specific processes and detailed contents, please refer to the above-mentioned method embodiments, which will not be repeated here.

[0085] The deformation-based watermark generation and reading device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned deformation-based watermark generation and reading method embodiment. For the sake of brief description, for matters not mentioned in the deformation-based watermark generation and reading device embodiment, reference may be made to the corresponding contents in the aforementioned deformation-based watermark generation and reading method embodiment.

[0086] Fig. 9 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Fig. 9 As shown, the electronic device may include: a processor 901, a communication interface 902, a memory 903 and a communication bus 904, wherein the processor 901, the communication interface 902 and the memory 903 communicate with each other through the communication bus 904. The processor 901 may call the logic instructions in the memory 903 to execute the deformation-based watermark generation method, which includes: obtaining the watermark information to be loaded, converting the watermark information into a watermark coding sequence; and in accordance with the order of the watermark coding sequence, and according to the correspondence between different preset coding values ​​and symbol deformation rules, sequentially deforming the target carrier symbol accordingly.

[0087] In addition, the logic instructions in the above-mentioned memory 903 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0088] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the deformation-based watermark generation method provided by the above-mentioned methods, and the method includes: obtaining watermark information to be loaded, and converting the watermark information into a watermark coding sequence; in accordance with the order of the watermark coding sequence, according to the correspondence between different preset coding values ​​and symbol deformation rules, the target carrier symbol is deformed accordingly.

[0089] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the deformation-based watermark generation method provided by the above-mentioned methods, the method comprising: obtaining watermark information to be loaded, converting the watermark information into a watermark coding sequence; in accordance with the order of the watermark coding sequence, according to the correspondence between different preset coding values ​​and symbol deformation rules, sequentially deforming the target carrier symbol accordingly.

[0090] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0091] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0092] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A deformation-based watermark generation method, characterized in that: include: Acquire watermark information to be loaded, and convert the watermark information into a watermark coding sequence; According to the order of the watermark coding sequence, according to the correspondence between the preset different coding values ​​and the symbol deformation rules, the target carrier symbols are deformed accordingly in sequence; The step of converting the watermark information into a watermark coding 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; Adding redundant check bits to the encrypted bit stream to obtain the watermark coding sequence; The step of performing corresponding deformation on the target carrier symbol in sequence according to the order of the watermark coding sequence and the correspondence between different preset coding values ​​and symbol deformation rules includes: Dividing the watermark code sequence into multiple groups according to the number of preset bits; According to each set of code values, determine the replacement symbol corresponding to each set of codes from a preset replacement symbol code table, and replace the target carrier symbol with the replacement symbol; The replacement symbol coding table is a correspondence between replacement symbols and coding values, and the replacement symbols are deformed symbols obtained by deforming standard symbols under different deformation rules.

2. The deformation-based watermark generation method according to claim 1, characterized in that: The method for generating the replacement symbol encoding table comprises: According to each standard symbol, based on a number of symbol deformation rules and different deformation degrees of the deformation rules, a plurality of replacement symbols corresponding to each standard symbol are obtained; Determine, according to the multiple replacement symbols, the replacement symbol corresponding to each code value within the preset bit encoding range, so as to generate the replacement symbol encoding table; The number of 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 number of bits.

3. The deformation-based watermark generation method according to claim 2, characterized in that: The symbol deformation rule includes any one or more of changing the symbol font weight, symbol stroke offset and symbol overall rotation; the different deformation degrees include the number of steps for changing the symbol font weight, symbol stroke offset and symbol overall rotation.

4. The deformation-based watermark generation method according to claim 3, characterized in that: The method of obtaining multiple replacement symbols corresponding to each standard symbol based on a plurality of symbol transformation rules and different transformation degrees of the transformation rules according to each standard symbol includes: Establish a corresponding coordinate axis for each deformation rule, and determine the deformation range of each coordinate axis; Based on the OpenType variable font, multiple replacement symbols are interpolated and generated according to the interpolation step size and deformation range of each deformation mode.

5. The deformation-based watermark generation method according to any one of claims 1 to 4, characterized in that: After converting the watermark information into a watermark coding sequence, the method further includes: According to the watermark coding sequence, a number of bits are selected according to a preset rule to form a control sequence, and the control sequence is used to determine the combination mode of different deformation rules, or to determine the target carrier symbol position embedded with the watermark.

6. A deformation-based watermark reading method, characterized in that: include: Compare each symbol in the target text with the standard symbol and identify all deformed symbols; Based on the correspondence between the preset symbol deformation rule and different coding values, each deformed symbol is decoded in turn to obtain the coding value of each deformed symbol; According to the encoding values ​​of all the deformed symbols, a watermark encoding sequence is obtained; Converting the watermark code sequence into watermark information; The decoding of each deformed symbol in turn based on the correspondence between the preset symbol deformation rule and different coded values ​​to obtain the coded value of each deformed symbol includes: For all the deformed symbols, determine the code value corresponding to each deformed symbol from the preset replacement symbol code table; The replacement symbol coding table is a correspondence between replacement symbols and coding values, and the replacement symbols are deformed symbols obtained by deforming standard symbols under different deformation rules.

7. The deformation-based watermark reading method according to claim 6, characterized in that: The converting the watermark coding sequence into watermark information comprises: Reading a redundant check code from the watermark coding sequence, and using the remaining part of the watermark coding sequence as a valid sequence; Based on the redundant check code, the valid sequence is checked and corrected 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; The decrypted binary bit stream is converted into watermark information.

8. A deformation-based watermark generation device, characterized in that: include: The coding processing module is used to obtain the watermark information to be loaded and convert the watermark information into a watermark coding sequence; The glyph processing module is used to perform corresponding deformation on the target carrier symbol in turn according to the order of the watermark coding sequence and the correspondence between different preset coding values ​​and symbol deformation rules; The encoding processing module is specifically used to convert the watermark information into a binary bit stream, encrypt the binary bit stream based on a preset encryption algorithm to obtain an encrypted bit stream; add redundant check bits to the encrypted bit stream to obtain the watermark coding sequence; Among them, the glyph processing module is specifically used to divide the watermark code sequence into multiple groups according to the preset number of bits; determine the replacement symbol corresponding to each group of codes from the preset replacement symbol code table according to the code value of each group, and replace the target carrier symbol with the replacement symbol; wherein the replacement symbol code table is the correspondence between the replacement symbol and the code value, and the replacement symbol is the deformed symbol obtained by the standard symbol under different deformation rules.

9. A deformation-based watermark reading device, characterized in that: include: A deformation determination module is used to compare each symbol in the target text with the standard symbol to determine all deformed symbols with deformation; A deformation decoding module, used to decode each deformed symbol in turn based on the correspondence between the preset symbol deformation rule and different coded values ​​to obtain the coded value of each deformed symbol; A decoding and summarizing module is used to obtain a watermark coding sequence according to the coding values ​​of all deformed symbols; A watermark decoding module, used for converting the watermark coding sequence into watermark information; Among them, the deformation decoding module is specifically used to determine the coding value corresponding to each deformed symbol from a preset replacement symbol coding table for all deformed symbols; wherein the replacement symbol coding table is the correspondence between the replacement symbol and the coding value, and the replacement symbol is a deformed symbol obtained by the standard symbol under different deformation rules.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the deformation-based watermark generation method according to any one of claims 1 to 5 or the deformation-based watermark reading method according to any one of claims 6 to 7 is implemented.

11. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the deformation-based watermark generation method according to any one of claims 1 to 5 or the deformation-based watermark reading method according to any one of claims 6 to 7 is implemented.