Digital watermark adding, extracting method, device, electronic device and readable medium

By encoding the watermark content and determining the insertion start position in the text, and adding a watermark in combination with the preset replaceable word list, the problem of easy removal and no resistance to copying of watermarks is solved, and the watermarks are not easy to remove, and the watermarks are kept intact when copying and flowing is maintained, ensuring that traceability is feasible.

CN114692099BActive Publication Date: 2025-08-19BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210325287.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-30
Publication Date
2025-08-19
Estimated Expiration
2042-03-30

AI Technical Summary

Technical Problem

In the prior art, digital watermarks are easily removed and have no resistance to content copying, resulting in difficulty in traceability, especially in the multiple flows of text data, the watermarks are blurred and cannot be traced.

Method used

By encoding the watermark content, determining the insertion start bit, and adding a watermark to the pending text using a preset replaceable word list, an error correction code is generated to improve robustness, ensuring that the watermark is not easily removed in the text and is copied together during copying.

Benefits of technology

It realizes that the watermark is not easy to be removed, it has the resistance to content copying, and maintains the integrity of the watermark during text circulation to ensure that the traceability is feasible.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114692099B_ABST
    Figure CN114692099B_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure disclose a method, device, electronic device and readable medium for adding and extracting digital watermarks. A specific implementation of the method includes: encoding the watermark content to obtain the watermark code; for the text to be processed in the set of texts to be processed, performing the following watermark adding steps: determining the watermark code insertion start position based on the watermark code and the text to be processed; determining the replaceable words and the positions of the replaceable words in the text to be processed based on a preset replaceable word list; adding a watermark to the text to be processed based on the watermark code insertion start position, the watermark code, the replaceable words and the positions of the replaceable words in the text to be processed, and obtaining the text after adding the watermark. This implementation is related to information security, making the watermark difficult to remove, and making the watermark resistant to content copying, and being able to trace the source based on the watermark.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of information security technology, and in particular to a digital watermark adding and extracting method, device, electronic device, and readable medium. Background Art

[0002] Once text data is leaked during its circulation and use, its security cannot be guaranteed. Watermarking technology is often used to add watermarks to text data during its circulation and use. After a leak, the watermark carried in the text data can be used to trace the source. For example, for text data displayed on front-end pages, webpage watermarks are commonly added to the front-end page to mark the watermark.

[0003] However, when operating text data in the above manner, the following technical problems often occur:

[0004] Watermarks can be easily removed and are not resistant to content copying. When the content of text data is copied and then circulated, traceability will be impossible. In addition, screenshots of watermarks will undergo multiple image compressions during the multiple circulations of text data, causing the watermarks in the screenshots to be blurred, making traceability impossible. Summary of the Invention

[0005] The content of this disclosure is used to briefly introduce concepts that will be described in detail in the detailed description section below. The content of this disclosure is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0006] Some embodiments of the present disclosure provide a digital watermark adding method, a digital watermark extracting method, an apparatus, an electronic device, and a computer-readable medium to solve one or more of the technical problems mentioned in the above background technology section.

[0007] In a first aspect, some embodiments of the present disclosure provide a method for adding a digital watermark, the method comprising: encoding the watermark content to obtain a watermark code; for a text to be processed in a text set to be processed, performing the following watermark adding steps: determining a watermark code insertion start position based on the watermark code and the text to be processed; determining replaceable words and positions of replaceable words in the text to be processed based on a preset replaceable word list; adding a watermark to the text to be processed based on the watermark code insertion start position, the watermark code, the replaceable words and positions of replaceable words in the text to be processed to obtain a watermarked text.

[0008] Optionally, the above encoding of the watermark content to obtain the watermark code includes: mapping the above watermark content into a binary watermark code; generating an error correction code based on the above binary watermark code; splicing the above binary watermark code and the above error correction code to obtain a spliced watermark code; and encrypting the above spliced watermark code to obtain the watermark code.

[0009] Optionally, determining the watermark code insertion start position based on the watermark code and the text to be processed includes: determining the absolute value of the Unicode difference between two adjacent characters included in the text to be processed; and obtaining the watermark code insertion start position by taking the modulo of the absolute value and the length of the watermark code.

[0010] Optionally, the above-mentioned text to be processed is address information, and the above-mentioned address information includes at least one level of address sub-information; and before determining the starting position of watermark code insertion based on the above-mentioned watermark code and the above-mentioned text to be processed, the above-mentioned method also includes: deleting the address sub-information of the target level in the above-mentioned address information to obtain target address information, and using the above-mentioned target address information as the above-mentioned text to be processed.

[0011] In a second aspect, some embodiments of the present disclosure provide a digital watermark extraction method, which includes: for each text in a text set after adding a watermark, performing the following watermark extraction steps: determining the watermark code starting position based on the above text and the watermark code length; determining the replaceable words and the positions of the replaceable words in the above text based on a preset replaceable word list; extracting the watermark code from the above text based on the above watermark code starting position, the above preset replaceable word list, the replaceable words in the above text and the positions of the replaceable words in the above text to obtain watermark code data; generating a user watermark code based on the obtained watermark code data; generating user watermark content based on the above user watermark code.

[0012] Optionally, the above-mentioned generation of user watermark code based on the obtained watermark code data includes: performing bit-by-bit voting on the obtained watermark code data to obtain a voting watermark code; in response to detecting that the above-mentioned voting watermark code does not include preset characters, using the error correction code included in the above-mentioned voting watermark code to verify the above-mentioned voting watermark code to obtain a verification result; in response to the above-mentioned verification result indicating that the above-mentioned voting watermark code is correct, determining the above-mentioned voting watermark code as the user watermark code.

[0013] Optionally, the above method also includes: in response to detecting that the above voting watermark code includes preset characters, performing a combination traversal on the preset characters included in the above voting watermark code to obtain a candidate code set; using the error correction code included in the above voting watermark code to verify each candidate code included in the above candidate code set to obtain a combined verification result set; deleting the candidate code corresponding to the combined verification result representing an error in the above combined verification result set from the above candidate code set to obtain a correct candidate code set; for each correct candidate code in the above correct candidate code set, mapping the above correct candidate code to a candidate watermark content.

[0014] In a third aspect, some embodiments of the present disclosure provide a digital watermark adding device, the device comprising: an encoding unit, configured to encode the watermark content to obtain a watermark code; a watermark adding unit, configured to perform the following watermark adding steps for the text to be processed in the text set to be processed: determining the watermark code insertion start position based on the above-mentioned watermark code and the above-mentioned text to be processed; determining the replaceable words and the positions of the replaceable words in the above-mentioned text to be processed based on a preset replaceable word list; adding a watermark to the above-mentioned text to be processed based on the above-mentioned watermark code insertion start position, the above-mentioned watermark code, the replaceable words and the positions of the replaceable words in the above-mentioned text to be processed, to obtain the text after adding the watermark.

[0015] Optionally, the encoding unit is further configured to: map the above-mentioned watermark content into a binary watermark code; generate an error correction code based on the above-mentioned binary watermark code; splice the above-mentioned binary watermark code and the above-mentioned error correction code to obtain a spliced watermark code; encrypt the above-mentioned spliced watermark code to obtain a watermark code.

[0016] Optionally, the watermark adding unit is further configured to: for the to-be-processed text in the to-be-processed text set, perform the following watermark adding steps: determine the absolute value of the Unicode difference between two adjacent characters included in the above-mentioned to-be-processed text; take the modulus of the above-mentioned absolute value and the length of the above-mentioned watermark code to obtain the watermark code insertion start position; determine the replaceable words and the positions of the replaceable words in the above-mentioned to-be-processed text according to a preset replaceable word list; add a watermark to the above-mentioned to-be-processed text according to the above-mentioned watermark code insertion start position, the above-mentioned watermark code, the replaceable words and the positions of the replaceable words in the above-mentioned to-be-processed text, and obtain the text after adding the watermark.

[0017] Optionally, the watermark adding unit is further configured to: for the text to be processed in the text set to be processed, perform the following watermark adding steps: delete the address sub-information of the target level in the above-mentioned address information to obtain the target address information, and use the above-mentioned target address information as the above-mentioned text to be processed; determine the starting position for inserting the watermark code according to the above-mentioned watermark code and the above-mentioned text to be processed; determine the replaceable words and the positions of the replaceable words in the above-mentioned text to be processed according to a preset replaceable word list; add a watermark to the above-mentioned text to be processed according to the starting position for inserting the watermark code, the above-mentioned watermark code, the replaceable words and the positions of the replaceable words in the above-mentioned text to be processed, and obtain the text with the watermark added.

[0018] In a fourth aspect, some embodiments of the present disclosure provide a digital watermark extraction device, the device comprising: a watermark extraction unit, configured to perform the following watermark extraction steps for each text in a text set after watermarking: determining the watermark code starting position based on the above text and the watermark code length; determining the replaceable words and the positions of the replaceable words in the above text based on a preset replaceable word list; extracting the watermark code from the above text based on the above watermark code starting position, the above preset replaceable word list, the replaceable words in the above text and the positions of the replaceable words in the above text to obtain watermark code data; a first generation unit, configured to generate a user watermark code based on the obtained watermark code data; a second generation unit, configured to generate a user watermark content based on the above user watermark code.

[0019] Optionally, the first generation unit is further configured to: perform bit-by-bit voting on each watermark encoding data obtained to obtain a voting watermark code; in response to detecting that the above-mentioned voting watermark code does not include preset characters, use the error correction code included in the above-mentioned voting watermark code to verify the above-mentioned voting watermark code to obtain a verification result; in response to the above-mentioned verification result indicating that the above-mentioned voting watermark code is correct, map the above-mentioned voting watermark code to user watermark content.

[0020] Optionally, the above-mentioned device also includes: a traversal unit, configured to, in response to detecting that the above-mentioned voting watermark code includes preset characters, perform a combined traversal of the preset characters included in the above-mentioned voting watermark code to obtain a candidate code set; a verification unit, configured to use the error correction code included in the above-mentioned voting watermark code to verify each candidate code included in the above-mentioned candidate code set to obtain a combined verification result set; a deletion unit, configured to delete the candidate code corresponding to the combined verification result representing an error in the above-mentioned combined verification result set from the above-mentioned candidate code set to obtain a correct candidate code set; a mapping unit, configured to map each correct candidate code in the above-mentioned correct candidate code set to a candidate watermark content.

[0021] In a fifth aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation of the first or second aspect above.

[0022] In a sixth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation of the first or second aspect above is implemented.

[0023] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: through the digital watermark adding method of some embodiments of the present disclosure, the watermark is not easy to be removed, and the watermark is resistant to content copying, and can be traced based on the watermark. Specifically, the reason why the watermark is easy to remove, the watermark has no resistance to content copying, and the watermark cannot be traced is that: the watermark can be easily removed, and the watermark has no resistance to content copying. When the content of the text data is copied and then circulated, it will not be possible to trace the source. In addition, the screenshot of the watermark will undergo multiple image compressions during the multiple circulations of the text data, causing the watermark in the screenshot to be blurred, resulting in the inability to trace the source. Based on this, the digital watermark adding method of some embodiments of the present disclosure, first, encodes the watermark content to obtain the watermark code. Thereby, the watermark code for adding the watermark can be obtained. Then, for the text to be processed in the text set to be processed, the following watermark adding steps are performed: First, according to the watermark code and the text to be processed, the watermark code insertion start position is determined. Thus, the watermark code insertion start position for inserting a digital watermark can be obtained, thereby allowing watermark insertion to begin at the watermark code insertion start position. Second, the replaceable words and their positions in the text to be processed are determined based on a preset replaceable word list. Thus, using the preset replaceable word list, which is set according to the actual application scenario, the replaceable words and their positions in the text to be processed that indicate the possibility of digital watermark insertion can be obtained. Third, a watermark is added to the text to be processed based on the watermark code insertion start position, the watermark code, the replaceable words in the text to be processed, and their positions, to obtain the watermarked text. This achieves the addition of a digital watermark to the text to be processed. Because the watermark is added directly to the text to be processed, it avoids the easy removal of the watermark by simply increasing the brightness of a screenshot, which makes the watermark difficult to remove. Furthermore, because the watermarked text is generated, the watermark in the text is copied along with the content when it is copied, making the watermark resistant to content copying. Furthermore, because the text includes the watermark, the watermark is not lost during text circulation, allowing for traceability based on the watermarked text. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.

[0025] Figure 1 is a schematic diagram of an application scenario of a digital watermark adding method according to some embodiments of the present disclosure;

[0026] Figure 2 is a flow chart of some embodiments of the digital watermark adding method according to the present disclosure;

[0027] Figure 3 is a schematic diagram of an application scenario of the digital watermark extraction method according to some embodiments of the present disclosure;

[0028] Figure 4 is a flow chart of some embodiments of the digital watermark extraction method according to the present disclosure;

[0029] Figure 5 is a schematic structural diagram of some embodiments of the digital watermark adding device according to the present disclosure;

[0030] Figure 6 is a schematic structural diagram of some embodiments of the digital watermark extraction device according to the present disclosure;

[0031] Figure 7 It is a structural diagram of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION

[0032] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0033] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other.

[0034] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0035] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0036] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0037] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0038] Figure 1 This is a schematic diagram of an application scenario of the digital watermark adding method of some embodiments of the present disclosure.

[0039] exist Figure 1 In the application scenario, first, the computing device 101 can encode the watermark content 102 to obtain the watermark code 103; for the to-be-processed text 104 in the to-be-processed text set, the following watermark adding steps are performed: according to the above watermark code 103 and the above to-be-processed text 104, the watermark code insertion starting position 105 is determined; according to the preset replaceable word list 106, the replaceable words 107 and the position 108 of the replaceable words in the above to-be-processed text 104 are determined; according to the above watermark code insertion starting position 105, the above watermark code 103, the replaceable words 107 and the position 108 of the replaceable words in the above to-be-processed text 104, a watermark is added to the above to-be-processed text 104 to obtain a watermarked text 109.

[0040] As an example, the watermark code 103 is 110101010101. The text to be processed 104 is "Residential Community Phase II Building No. 1 Unit 2 301". The watermark code insertion start position 105 is 3. The preset replaceable word list 106 is: Chinese numerals (1) - Arabic numerals (0), "Building No." (1) - "Building" (0), "Unit" (1) - "Unit" (0), "Room No." (1) - "Room No. + Room" (0). The replaceable words 107 are 2, 1, Building No., 2, Unit, 301. The position 108 of the replaceable words is community. two Expect one Building 2, Unit 301 (The position of the replaceable word is where the underline is).

[0041] When adding a watermark, because the watermark code insertion start bit 105 is 3, watermark insertion can be started from the fourth bit of the watermark code 103. The fourth bit of the watermark code 103 is 1, and the first replaceable word corresponding to it is 2, which is a Chinese character numeral. The Chinese character numeral corresponds to 1 in the preset replaceable word list 106, which is the same as the fourth bit of the watermark code 103, so no replacement is made.

[0042] The fifth digit of the above watermark code 103 is 0, and the corresponding second replaceable word is "one", which belongs to Chinese numerals. Chinese numerals correspond to 1 in the above preset list of replaceable words 106, which is different from the fifth digit of the above watermark code 103. Therefore, the Chinese numeral "one" is replaced with the Arabic numeral "1" to add the watermark.

[0043] The sixth digit of the above watermark code 103 is 1, and the corresponding third replaceable word is "building number", which conforms to "building number" in the preset list of replaceable words 106. "Building number" corresponds to 1 in the above preset list of replaceable words 106, which is the same as the sixth digit of the above watermark code 103. Therefore, no replacement is made.

[0044] The seventh digit of the above watermark code 103 is 0, and the corresponding fourth replaceable word is "two", which belongs to Chinese numerals. Chinese numerals correspond to 1 in the above preset list of replaceable words 106, which is the same as the seventh digit of the above watermark code 103. Therefore, the Chinese numeral "two" is replaced with the Arabic numeral "2" to add the watermark.

[0045] The eighth digit of the above watermark code 103 is 1, and the corresponding fifth replaceable word is "unit", which conforms to "unit" in the preset list of replaceable words 106. "Unit" corresponds to 1 in the above preset list of replaceable words 106, which is the same as the eighth digit of the above watermark code 103. Therefore, no replacement is made.

[0046] The ninth digit of the above watermark code 103 is 0, and the corresponding sixth replaceable word is "301", which conforms to "room number" in the preset list of replaceable words 106. "Room number" corresponds to 1 in the above preset list of replaceable words 106, which is different from the ninth digit of the above watermark code 103. Therefore, the room number "301" is replaced with "301 room" in the form of room number + room to add the watermark. Thus, the text 109 after adding the watermark is Room 301, Unit 2, Building 1, Phase II of the community.

[0047] It should be noted that the above computing device 101 can be hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster composed of multiple servers or terminal devices, or as a single server or a single terminal device. When the computing device is embodied as software, it can be installed in the above-listed hardware devices. It can be implemented as, for example, multiple software or software modules for providing distributed services, or as a single software or software module. No specific limitation is made here.

[0048] It should be understood that Figure 1 the number of computing devices in

[0049] is merely illustrative. According to the implementation requirements, there can be any number of computing devices. Figure 2, shows a process 200 of some embodiments of a digital watermark addition method according to the present disclosure. The digital watermark addition method includes the following steps:

[0050] Step 201, encode the watermark content to obtain a watermark code.

[0051] In some embodiments, an execution subject of the digital watermark addition method (such as Figure 1 the computing device 101 shown) can encode the watermark content to obtain a watermark code. Among them, the above watermark content can be the content used for encoding. As an example, the above watermark content can be a user ID. The above user ID can include numbers, English, and Chinese characters. For example, the above user ID can be 123abc一二三. In practice, the above execution subject can map the above watermark content to a watermark code. Thus, a watermark code for adding a watermark can be obtained.

[0052] In some optional implementation manners of some embodiments, first, the above execution subject can map the above watermark content to a binary watermark code. In practice, the above watermark content can be mapped to a binary watermark code according to a preset mapping rule. Among them, the above preset mapping rule can be pre-set by relevant staff. Then, an error correction code can be generated according to the above binary watermark code. In practice, an error correction code can be generated using the CRC error correction code algorithm according to the above binary watermark code. For example, an 8-bit error correction code can be generated using the CRC error correction code algorithm. Another example is that an error correction code can be generated using the parity check method according to the above binary watermark code. Another example is that an error correction code can be generated using the Hamming code according to the above binary watermark code. Secondly, the above binary watermark code and the above error correction code can be spliced to obtain a spliced watermark code. Finally, the above spliced watermark code can be encrypted to obtain a watermark code. In practice, a random sequence can be generated using a key, and the above spliced watermark code can be scrambled and encrypted to obtain a watermark code. Thus, the robustness of the added watermark is improved, and thus the accuracy of identifying the extracted watermark is improved.

[0053] Step 202, for the text to be processed in the text set to be processed, perform the following watermark addition steps:

[0054] Step 2021, determine the starting position for inserting the watermark code according to the watermark code and the text to be processed.

[0055] In some embodiments, the execution entity may determine the watermark code insertion start position based on the watermark code and the text to be processed. The text to be processed may be a text to which a watermark is to be added. As an example, first, the execution entity may determine the pinyin initials of the text at a specified position in the text to be processed. Secondly, determine the order of the pinyin initials in the alphabet to obtain a sequence number. Afterwards, take the modulus of the sequence number and the length of the watermark code to obtain the watermark code insertion start position. As an example, the text at a specified position in the text to be processed may be one. The pinyin initials may be y. Y is located at the 25th position in the alphabet, resulting in the sequence number 25. The length of the watermark code may be 11. Then the watermark code insertion start position may be 3. Thus, the watermark code insertion start position for inserting a digital watermark may be obtained, so that the watermark is inserted starting from the watermark code insertion start position.

[0056] In some optional implementations of some embodiments, the execution entity may first determine the absolute value of the Unicode difference between two adjacent characters included in the text to be processed. Then, the modulus of the absolute value corresponding to the text to be processed and the length of the watermark code may be taken to obtain the watermark code insertion start position. This allows for generating a different watermark code insertion start position for each text to be processed, allowing the watermark to be inserted from different locations within each text to be processed, thereby achieving uniform digital watermark insertion. The inserted watermark is not easily filtered, thus resisting common data operations such as data structuring, data screening, sorting, and removal of non-critical information.

[0057] Optionally, the text to be processed may be address information. The address information may include at least one level of address sub-information. Before determining the watermark code insertion start position, the execution entity may delete the address sub-information of a target level from the address information to obtain the target address information, and use the target address information as the text to be processed. The levels may be administrative division levels. For example, if the address information is for District B, City A, it includes address sub-information for both City A and District B. The target levels may be pre-set by relevant personnel. In practice, the execution entity may first perform word segmentation on the address information using a dictionary segmentation algorithm to obtain address sub-information at each level. The word segmentation algorithm dictionary may include an administrative address dictionary to improve segmentation accuracy. Then, the address sub-information of the target level may be deleted from the address information to obtain the target address information, and use the target address information as the text to be processed. For example, the target levels may be the first three levels. The address information may be Unit 101, Building X, Residential District, X Community, X Province, City X. The target address information may be Unit 101, Building X, Residential District, X Community, X Community. Therefore, subsequent operations will only target the text to be processed with the target level of address sub-information deleted, thereby avoiding the impact of data operations such as address sorting and area screening on the integrity of the watermark.

[0058] Step 2022: Determine the replaceable words and positions of the replaceable words in the text to be processed according to a preset replaceable word list.

[0059] In some embodiments, the execution subject can determine the replaceable words and the positions of the replaceable words in the text to be processed based on a preset replaceable word list. The preset replaceable word list can be a preset list including a preset number of replaceable word groups. For example, the preset replaceable word list can include: [uppercase and lowercase replacement (uppercase English letters (1) - lowercase English letters (0))]; [synonym replacement ("Building No." (1) - "Building / Building" (0))]; [Traditional and Simplified Chinese replacement ("Unit" (1) - "Unit" (0))], [Half-width and full-width character replacement ("," (1) - "," (0))]. In practice, the execution subject can determine the replaceable words and the positions of the replaceable words in the text to be processed based on the various replaceable word groups included in the preset replaceable word list.

[0060] As an example, the text to be processed may be "301, Unit 2, Building 1, Phase 2, Community". The preset replaceable word list may be: "[single digit replacement (Chinese digit (1) - Arabic numeral (0))]; [synonym replacement ('Building' (1) - 'Building' (0))]; [Traditional and Simplified Chinese replacement ('Unit' (1) - 'Unit' (0))]; [End replacement ('Room' (1) - 'Room+Room' (0))]". The single digit replacement means that the digit replacement is only for a single digit. For example, "Building 1" can be replaced with "Building 1", but "902" cannot be replaced with "902". The replaceable words may be: 2, 1, Building, 2, Unit, 301, and the position of the replaceable words may be community. two Expect Room 301, Unit 2, Building 1 (The position of the replaceable word is the underlined position.) Thus, by setting a preset replaceable word list according to the actual application scenario, the replaceable words and the positions of the replaceable words in the text to be processed that represent the possibility of inserting a digital watermark can be obtained.

[0061] Step 2023: Add a watermark to the text to be processed based on the watermark code insertion start position, the watermark code, the replaceable words in the text to be processed, and the position of the replaceable words to obtain the text with the watermark added.

[0062] In some embodiments, the execution subject may add a watermark to the text to be processed based on the watermark code insertion start position, the watermark code, the replaceable words in the text to be processed and the position of the replaceable words to obtain the text with the watermark added. In practice, the execution subject may replace the replaceable words in the text to be processed in sequence based on the watermark code, the watermark code insertion start position and the position of the replaceable words. As an example, the text to be processed may be: Unit 2, Building 1, Phase 2, Residential Community. The watermark code may be: 110101010101. The watermark code insertion start position may be 3. The position of the replaceable words may be 301. two Expect Room 301, Unit 2, Building 1 (The position of the replaceable word is the underlined position.) Then the text after adding the watermark can be: Residential District Phase II, Building 1, Unit 2, Room 301. Thus, adding a digital watermark to the text to be processed is achieved.

[0063] Through the digital watermarking method of some embodiments of the present disclosure, the watermark is not easy to be removed, and the watermark is resistant to content copying, and can be traced based on the watermark. Specifically, the reason why the watermark is easy to remove, has no resistance to content copying, and cannot be traced based on the watermark is that the watermark can be easily removed and has no resistance to content copying. When the content of the text data is copied and then circulated, it will be impossible to trace the source. In addition, the screenshot of the watermark will undergo multiple image compressions during the multiple circulations of the text data, causing the watermark in the screenshot to be blurred, resulting in the inability to trace the source. Based on this, the digital watermarking method of some embodiments of the present disclosure first encodes the watermark content to obtain a watermark code. Thus, a watermark code for adding a watermark can be obtained. Then, for the text to be processed in the text set to be processed, the following watermark adding steps are performed: First, based on the watermark code and the text to be processed, the watermark code insertion start position is determined. Thus, the watermark code insertion start position for inserting the digital watermark can be obtained, so that the watermark is inserted starting from the watermark code insertion start position. Second, based on a preset list of replaceable words, the replaceable words and their positions in the text to be processed are determined. Thus, by using a preset list of replaceable words set according to the actual application scenario, the replaceable words and their positions in the text to be processed that indicate the possibility of digital watermark insertion can be obtained. Third, based on the watermark code insertion start position, the watermark code, the replaceable words and their positions in the text to be processed, a watermark is added to the text to obtain the watermarked text. This achieves the addition of a digital watermark to the text to be processed. Because the watermark is added directly to the text to be processed, it avoids the easy removal of the watermark by simply increasing the brightness of a screenshot, making it difficult to remove. Furthermore, because the watermarked text is generated, the watermark in the text is copied along with the content when it is copied, making the watermark resistant to content copying. Furthermore, because the text includes the watermark, the watermark is not lost during text circulation, allowing for tracing back to the source of the watermarked text.

[0064] Figure 3 It is a schematic diagram of an application scenario of the digital watermark extraction method of some embodiments of the present disclosure.

[0065] exist Figure 3In the application scenario, first, the computing device 301 can perform the following watermark extraction steps for each text 302 in the text set after adding the watermark: determine the watermark code starting position 304 based on the above text 302 and the watermark code length 303; determine the replaceable words 306 and the position 307 of the replaceable words in the above text based on the preset replaceable word list 305; extract the watermark code from the above text 302 based on the above watermark code starting position 304, the above preset replaceable word list 305, the replaceable words 306 in the above text, and the position 307 of the replaceable words in the above text to obtain watermark code data 308. Then. The computing device 301 can generate a user watermark code 309 based on the obtained watermark code data (including the watermark code data 308). Finally, the computing device 301 can generate a user watermark content 310 based on the above user watermark code 309.

[0066] As an example, the above text 302 can be Room 301, Unit 2, Building 1, Phase II of the community. The above watermark code length 303 can be 12. The above watermark code starting position 304 can be 3. The above preset replaceable word list 305 can be Chinese numerals (1)-Arabic numerals (0), "Building" (1)-"Building" (0), "Unit" (1)-"Unit" (0), "Room" (1)-"Room+Room" (0). The above replaceable words 306 can be 2, 1, Building, 2, Unit, Room 301. The position 307 of the replaceable words in the above text can be Community two Expect Room 301, Unit 2, Building 1 (The underlined positions are the positions of replaceable words in the above text).

[0067] When extracting the watermark code, the first replaceable word 306 is 2, which is a Chinese character numeral, and the Chinese character numeral corresponds to 1 in the preset replaceable word list 305. Because the watermark code start bit 304 is 3, the fourth bit of the extracted watermark code data 308 is 1.

[0068] The second replaceable word 306 is 1, which is an Arabic numeral. The Arabic numeral corresponds to 0 in the preset replaceable word list 305. Therefore, the fifth bit of the extracted watermark coded data 308 is 0.

[0069] The third replaceable word 306 is "Building No.", which matches "Building No." in the preset replaceable word list. "Building No." corresponds to 1 in the preset replaceable word list 305. Therefore, the sixth bit of the extracted watermark coded data 308 is 1.

[0070] The fourth replaceable word 306 is 2, which is an Arabic numeral. The Arabic numeral corresponds to 0 in the preset replaceable word list 305. Therefore, the seventh bit of the extracted watermark coded data 308 is 0.

[0071] The fifth replaceable word 306 is "unit", which matches "unit" in the preset replaceable word list. "Unit" corresponds to 1 in the preset replaceable word list 305. Therefore, the eighth bit of the extracted watermark coded data 308 is 1.

[0072] The sixth replaceable word 306 is Room 301, which matches "Room Number + Room" in the preset replaceable word list. "Room Number + Room" corresponds to 0 in the preset replaceable word list 305. Therefore, the ninth bit of the extracted watermark coded data 308 is 0. Therefore, the watermark coded data 308 can be "???101010???".

[0073] It should be noted that the computing device 301 described above can be either hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or as a single server or a single terminal device. When the computing device is software, it can be installed in the hardware devices listed above. It can be implemented as multiple software or software modules for providing distributed services, or as a single software or software module. No specific limitations are given here.

[0074] It should be understood that Figure 3 The number of computing devices in the embodiment is merely illustrative. Any number of computing devices may be provided according to implementation requirements.

[0075] Further references Figure 4 , shows a process 400 of some embodiments of the digital watermark extraction method according to the present disclosure. The digital watermark extraction method includes the following steps:

[0076] Step 401: For each text in the watermarked text set, perform the following watermark extraction steps:

[0077] Step 4011: Determine the watermark encoding start bit based on the text and the watermark encoding length.

[0078] In some embodiments, the execution subject of the digital watermark extraction method (eg Figure 3 The computing device 301 shown can determine the watermark encoding start position based on the text and the watermark encoding length. The watermark encoding length can be the length of the watermark encoding. The watermark encoding length is a preset length. In practice, the execution entity can first determine the absolute value of the Unicode difference between two adjacent characters included in the text. Then, the modulus of the absolute value corresponding to the text and the watermark encoding length can be taken to obtain the watermark encoding start position. This can determine the starting position for watermark insertion.

[0079] Step 4012: Determine the replaceable words and positions of the replaceable words in the text according to a preset replaceable word list.

[0080] In some embodiments, the execution entity can determine the replaceable words and their positions in the text based on a preset replaceable word list. The preset replaceable word list can be a list pre-set by a staff member and includes a preset number of replaceable word groups. In practice, the execution entity can determine the replaceable words and their positions in the text to be processed based on the replaceable word groups included in the preset replaceable word list. This can determine the replaceable words and their positions in the text that represent the insertion of a digital watermark.

[0081] Step 4013: extract the watermark code from the text according to the watermark code start position, the preset replaceable word list, the replaceable words in the text, and the position of the replaceable words in the text to obtain watermark code data.

[0082] In some embodiments, the execution subject can extract the watermark code from the text according to the watermark code starting position, the preset replaceable word list, the replaceable words in the text and the position of the replaceable words in the text to obtain watermark code data. In practice, according to the preset replaceable word list, the replaceable words in the text and the position of the replaceable words in the text, each bit code starting from the watermark code starting position can be extracted from the text in sequence to obtain watermark code data. As an example, the text can be Room 301, Unit 2, Building 1, Phase II of the Community. The preset replaceable word list can be Chinese numerals (1)-Arabic numerals (0), "Building" (1)-"Building" (0), "Unit" (1)-"Unit" (0), "Room Number" (1)-"Room Number + Room" (0). The replaceable words in the text can be 2, 1, Building, 2, Unit, Room 301. The position of the replaceable words in the text can be Community. two Expect Room 301, Unit 2, Building 1 (The underlined position is the position of the replaceable word in the above text.) The starting bit of the watermark encoding may be 3.

[0083] When extracting the watermark, the first replaceable word is 2, which is a Chinese character number. The Chinese character number in the preset replaceable word list corresponds to 1. Because the starting bit of the watermark code is 3, the fourth bit of the extracted watermark code data is 1.

[0084] The second replaceable word is 1, which is an Arabic numeral. The Arabic numeral corresponds to 0 in the above preset replaceable word list. Therefore, the fifth bit of the extracted watermark encoded data is 0.

[0085] The third replaceable word is Building No., which matches the "Building No." in the preset replaceable word list. "Building No." corresponds to 1 in the preset replaceable word list. Therefore, the sixth bit of the extracted watermark coded data is 1.

[0086] The fourth replaceable word is 2, which is an Arabic numeral. In the above preset replaceable word list, the Arabic numeral corresponds to 0. Therefore, the seventh bit of the extracted watermark encoded data is 0.

[0087] The fifth replaceable word is "unit", which matches the "unit" in the preset replaceable word list. "Unit" in the preset replaceable word list corresponds to 1. Therefore, the eighth bit of the extracted watermark coded data is 1.

[0088] The sixth replaceable word is Room 301, which matches the "room number + room" in the preset replaceable word list. "Room number + room" corresponds to 0 in this preset replaceable word list. Therefore, the ninth bit of the extracted watermark encoded data is 0. Therefore, the watermark encoded data can be "???101010???." This allows the watermark to be extracted from a single text.

[0089] Step 402: Generate a user watermark code according to each obtained watermark code data.

[0090] In some embodiments, the execution entity can generate a user watermark code based on the obtained watermark coded data. In practice, the execution entity can perform bit-by-bit voting on the obtained watermark coded data to obtain the user watermark code. The bit-by-bit voting can be performed by determining, for each bit in the watermark coded data, the digit that appears most frequently in the bit corresponding to each watermark coded data as the data corresponding to this bit. For example, if there are 10 watermark coded data, and for the first bit in the watermark coded data, the first digit of 7 watermark coded data is 1, and the first digit of 3 watermark coded data is 0, then 1 is determined as the first digit of the user watermark code. In this way, a complete user watermark code can be obtained.

[0091] In some optional implementations of some embodiments, first, the execution entity may perform bit-by-bit voting on each of the watermark coded data obtained to obtain a voting watermark code. In practice, when performing bit-by-bit voting, if the number that appears most frequently in the bit corresponding to each watermark coded data does not exist (for example, if the numbers 1 and 0 appear five times each, then the number that appears most frequently does not exist), then the preset character is determined as the data of the corresponding bit. For example, the preset character may be "?". The voting watermark code may be "???101010???". Secondly, in response to detecting that the voting watermark code does not include the preset character, the voting watermark code may be verified using the error correction code included in the voting watermark code to obtain a verification result. Finally, in response to the verification result indicating that the voting watermark code is correct, the voting watermark code may be determined as the user watermark code. In this way, it is possible to check whether the watermark code is correct.

[0092] Step 403: Generate user watermark content according to the user watermark code.

[0093] In some embodiments, the execution entity may generate user watermark content based on the user watermark code. In practice, the user watermark code may be mapped to the user watermark content. Thus, the complete user watermark content may be obtained, and the source may be traced based on the user watermark content.

[0094] Optionally, first, in response to detecting that the above-mentioned voting watermark code includes preset characters, the above-mentioned execution entity can perform a combination traversal of the preset characters included in the above-mentioned voting watermark code to obtain a candidate code set. In practice, the numbers 0-9 can be sequentially substituted into each preset character included in the above-mentioned voting watermark code to obtain a candidate code set. Secondly, the error correction code included in the above-mentioned voting watermark code can be used to verify each candidate code included in the above-mentioned candidate code set to obtain a combined verification result set. Then, the candidate code corresponding to the combined verification result representing the error in the above-mentioned combined verification result set can be deleted from the above-mentioned candidate code set to obtain a correct candidate code set. Finally, for each correct candidate code in the above-mentioned correct candidate code set, the above-mentioned correct candidate code can be mapped to a candidate watermark content. In this way, multiple candidate watermark contents representing possible correctness can be obtained, so that the source can be traced based on the above-mentioned multiple candidate watermark contents.

[0095] Through the digital watermark extraction method of some embodiments of the present disclosure, it is possible to extract digital watermarks from texts, obtain user watermark content, and then trace the source based on the user watermark content.

[0096] Further references Figure 5As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a digital watermark adding device. These device embodiments are similar to Figure 2 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.

[0097] like Figure 5 As shown, some embodiments of the digital watermarking apparatus 500 include: an encoding unit 501 and a watermarking unit 502. The encoding unit 501 is configured to encode the watermark content to obtain a watermark code; the watermarking unit 502 is configured to perform the following watermarking steps on the text to be processed in the text set to be processed: determining the watermark code insertion start position based on the watermark code and the text to be processed; determining the replaceable words and the positions of the replaceable words in the text to be processed based on a preset replaceable word list; and adding a watermark to the text to be processed based on the watermark code insertion start position, the watermark code, the replaceable words and the positions of the replaceable words in the text to be processed to obtain the watermarked text.

[0098] In an optional implementation of some embodiments, the encoding unit 501 can be further configured to: map the above-mentioned watermark content into a binary watermark code; generate an error correction code based on the above-mentioned binary watermark code; splice the above-mentioned binary watermark code and the above-mentioned error correction code to obtain a spliced watermark code; and encrypt the above-mentioned spliced watermark code to obtain a watermark code.

[0099] In an optional implementation of some embodiments, the watermark adding unit 502 can be further configured to: for the to-be-processed text in the to-be-processed text set, perform the following watermark adding steps: determine the absolute value of the Unicode difference between two adjacent characters included in the above-mentioned to-be-processed text; take the modulus of the above-mentioned absolute value and the length of the above-mentioned watermark code to obtain the watermark code insertion start position; determine the replaceable words and the positions of the replaceable words in the above-mentioned to-be-processed text according to a preset replaceable word list; add a watermark to the above-mentioned to-be-processed text according to the above-mentioned watermark code insertion start position, the above-mentioned watermark code, the replaceable words and the positions of the replaceable words in the above-mentioned to-be-processed text, and obtain the text with the watermark added.

[0100] In an optional implementation of some embodiments, the watermark adding unit 502 can be further configured to: for the text to be processed in the text set to be processed, perform the following watermark adding steps: delete the address sub-information of the target level in the above-mentioned address information to obtain the target address information, and use the above-mentioned target address information as the above-mentioned text to be processed; determine the starting position for inserting the watermark code according to the above-mentioned watermark code and the above-mentioned text to be processed; determine the replaceable words and the positions of the replaceable words in the above-mentioned text to be processed according to a preset list of replaceable words; add a watermark to the above-mentioned text to be processed according to the starting position for inserting the watermark code, the above-mentioned watermark code, the replaceable words and the positions of the replaceable words in the above-mentioned text to be processed, and obtain the text with the watermark added.

[0101] It is understood that the units described in the device 500 are similar to those in the reference Figure 2 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 500 and the units included therein, and will not be repeated here.

[0102] Reference below Figure 6 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a digital watermark extraction device. These device embodiments are similar to Figure 4 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.

[0103] like Figure 6 As shown, some embodiments of the digital watermark extraction device 600 include: a watermark extraction unit 601, a first generation unit 602, and a second generation unit 603. The watermark extraction unit 601 is configured to perform the following watermark extraction steps for each text in the text set after adding watermarks: determining the watermark code start position based on the text and the watermark code length; determining the replaceable words and the positions of the replaceable words in the text based on a preset replaceable word list; extracting the watermark code from the text based on the watermark code start position, the preset replaceable word list, the replaceable words in the text, and the positions of the replaceable words in the text to obtain watermark code data; the first generation unit 602 is configured to generate a user watermark code based on each obtained watermark code data; and the second generation unit 603 is configured to generate user watermark content based on the user watermark code.

[0104] In an optional implementation of some embodiments, the first generation unit 602 can be further configured to: perform bit-by-bit voting on each watermark encoding data obtained to obtain a voting watermark code; in response to detecting that the above-mentioned voting watermark code does not include preset characters, use the error correction code included in the above-mentioned voting watermark code to verify the above-mentioned voting watermark code to obtain a verification result; in response to the above-mentioned verification result indicating that the above-mentioned voting watermark code is correct, determine the above-mentioned voting watermark code as a user watermark code.

[0105] Optionally, the above-mentioned device 600 may also include: a traversal unit (not shown in the figure), configured to, in response to detecting that the above-mentioned voting watermark code includes preset characters, perform a combined traversal of the preset characters included in the above-mentioned voting watermark code to obtain a candidate code set; a verification unit (not shown in the figure), configured to use the error correction code included in the above-mentioned voting watermark code to verify each candidate code included in the above-mentioned candidate code set to obtain a combined verification result set; a deletion unit (not shown in the figure), configured to delete the candidate code corresponding to the combined verification result representing an error in the above-mentioned combined verification result set from the above-mentioned candidate code set to obtain a correct candidate code set; a mapping unit (not shown in the figure), configured to map the above-mentioned correct candidate code to a candidate watermark content for each correct candidate code in the above-mentioned correct candidate code set.

[0106] It is understood that the units described in the device 600 are similar to those in the reference Figure 4 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 600 and the units included therein, and will not be repeated here.

[0107] Reference below Figure 7 , which shows an electronic device suitable for implementing some embodiments of the present disclosure (such as Figure 1 The computing device 101 shown or Figure 3 The structural diagram of the computing device 301)700 is shown. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0108] like Figure 7As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. Various programs and data required for the operation of the electronic device 700 are also stored in the RAM 703. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0109] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead. Figure 7 Each block shown in the figure may represent one device, or may represent multiple devices as needed.

[0110] In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from a network via the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of some embodiments of the present disclosure are performed.

[0111] It should be noted that the computer-readable medium described in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or device. In some embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0112] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0113] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: encodes the watermark content to obtain the watermark code; performs the following watermark adding steps for the text to be processed in the text set to be processed: determines the watermark code insertion start position based on the watermark code and the text to be processed; determines the replaceable words and the positions of the replaceable words in the text to be processed based on a preset replaceable word list; adds a watermark to the text to be processed based on the watermark code insertion start position, the watermark code, the replaceable words and the positions of the replaceable words in the text to be processed. , and obtain the text after adding the watermark; or for each text in the text set after adding the watermark, perform the following watermark extraction steps: determine the watermark code starting position according to the above text and the watermark code length; determine the replaceable words in the above text and the position of the replaceable words according to the preset replaceable word list; extract the watermark code from the above text according to the above watermark code starting position, the above preset replaceable word list, the replaceable words in the above text and the position of the replaceable words in the above text to obtain watermark code data; generate a user watermark code according to each watermark code data obtained; generate a user watermark content according to the above user watermark code.

[0114] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0115] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0116] The units described in some embodiments of the present disclosure may be implemented in software or hardware. The units described may also be provided in a processor. For example, they may be described as comprising an encoding unit and a watermark adding unit. The names of these units do not, in some cases, limit the units themselves. For example, the encoding unit may also be described as a "unit that encodes watermark content to obtain a watermark code."

[0117] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0118] The above description is only an illustration of some preferred embodiments of the present disclosure and the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure.

Claims

1. A digital watermarking method, comprising: Encode the watermark content to obtain a watermark code; For the text to be processed in the text set to be processed, perform the following steps to add a watermark: Determining a watermark code insertion start position based on the watermark code and the to-be-processed text, including: determining an absolute value of a Unicode difference between two adjacent characters in the to-be-processed text; and obtaining a watermark code insertion start position by taking the modulo of the absolute value and the length of the watermark code; Determining replaceable words and positions of replaceable words in the text to be processed according to a preset replaceable word list; According to the watermark code, the watermark code insertion start position and the position of the replaceable word, the replaceable words in the to-be-processed text are replaced in sequence to obtain the text with the watermark added.

2. The method according to claim 1, wherein The step of encoding the watermark content to obtain the watermark code includes: Mapping the watermark content into a binary watermark code; generating an error correction code according to the binary watermark code; performing splicing processing on the binary watermark code and the error correction code to obtain a spliced watermark code; The concatenated watermark code is encrypted to obtain a watermark code.

3. The method according to claim 1, wherein The text to be processed is address information, and the address information includes at least one level of address sub-information; as well as Before determining the watermark code insertion start position according to the watermark code and the text to be processed, the method further includes: The target-level address sub-information in the address information is deleted to obtain target address information, and the target address information is used as the text to be processed.

4. A digital watermark extraction method, comprising: For each text in the watermarked text set, perform the following watermark extraction steps: Determining a watermark encoding start bit according to the text and the watermark encoding length; Determining replaceable words and positions of replaceable words in the text according to a preset replaceable word list; Extracting watermark code from the text according to the watermark code start bit, the preset replaceable word list, the replaceable words in the text, and the positions of the replaceable words in the text to obtain watermark code data; Perform bit-by-bit voting on each of the obtained watermark code data to obtain the voting watermark code; In response to detecting that the voting watermark code does not include a preset character, verifying the voting watermark code using an error correction code included in the voting watermark code to obtain a verification result; In response to the verification result indicating that the voting watermark code is correct, determining the voting watermark code as a user watermark code; Generate user watermark content according to the user watermark code.

5. The method according to claim 4, wherein The method further comprises: In response to detecting that the voting watermark code includes a preset character, performing a combination traversal on the preset characters included in the voting watermark code to obtain a candidate code set; Verifying each candidate code included in the candidate code set using the error correction code included in the voting watermark code to obtain a combined verification result set; Deleting candidate codes corresponding to the combined verification results representing errors in the combined verification result set from the candidate code set to obtain a correct candidate code set; For each correct candidate encoding in the correct candidate encoding set, the correct candidate encoding is mapped to a candidate watermark content.

6. A digital watermark adding device, comprising: an encoding unit configured to encode the watermark content to obtain a watermark code; The watermark adding unit is configured to perform the following watermark adding steps for the text to be processed in the text set to be processed: determining the watermark code insertion start position according to the watermark code and the text to be processed, including: determining the absolute value of the Unicode difference between two adjacent characters included in the text to be processed; taking the modulus of the absolute value and the length of the watermark code to obtain the watermark code insertion start position; determining the replaceable words and the positions of the replaceable words in the text to be processed according to a preset replaceable word list; replacing the replaceable words in the text to be processed in sequence according to the watermark code, the watermark code insertion start position and the position of the replaceable words to obtain the text after adding the watermark.

7. A watermark extraction device comprising: The watermark extraction unit is configured to perform the following watermark extraction steps for each text in the watermarked text set: determining a watermark code start position based on the text and the watermark code length; determining replaceable words and the positions of the replaceable words in the text based on a preset replaceable word list; extracting the watermark code from the text based on the watermark code start position, the preset replaceable word list, the replaceable words in the text, and the positions of the replaceable words in the text to obtain watermark code data; The first generating unit is configured to perform bit-wise voting on each of the obtained watermark coded data to obtain a voting watermark code; In response to detecting that the voting watermark code does not include a preset character, verifying the voting watermark code using an error correction code included in the voting watermark code to obtain a verification result; In response to the verification result indicating that the voting watermark code is correct, determining the voting watermark code as a user watermark code; The second generating unit is configured to generate user watermark content according to the user watermark code.

8. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1-3 or 4-5.

9. A computer-readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 3 or 4 to 5 is implemented.

Citation Information

Patent Citations

  • Watermark information embedding method and device, and watermark information decoding method

    CN105095699A

  • Digital watermark adding method and device, electronic equipment and storage medium

    CN112948776A