Digital watermark processing method, device, equipment, medium and program product
By encoding, mapping, and replacing the verification code of the digital watermark, the problem of insufficient concealment of the digital watermark is solved, and the concealment and security of the watermark are improved, ensuring the uniform distribution and recognition of the watermark field in the file.
Patent Information
- Application Number
- CN202510761232.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-11-11
AI Technical Summary
Existing digital watermarking methods lack sufficient concealment, are easily removed, and cannot effectively improve data security and traceability.
The watermark fragment is obtained by encoding and converting the digital watermark. The mapping is then performed according to the mapping relationship. The field to be processed is embedded and the field is replaced according to the check code replacement rule. Finally, the watermark field is embedded at the embedding position in the file to be processed to ensure the dispersion and concealment of the watermark field.
It improves the concealment and security of digital watermarks, ensures that files containing digital watermarks can be filtered out from a large number of files, reduces the risk of concentrated embedding of watermark fields, and enhances the security and traceability of digital watermarked files.
Smart Images

Figure CN120930108A_ABST
Abstract
Description
Technical Field
[0001] This document relates to the field of data processing technology, and in particular to a digital watermarking processing method, apparatus, equipment, medium, and program product. Background Technology
[0002] With the continuous development of information technology, file transmission and sharing have become increasingly frequent. In order to ensure the security, integrity and traceability of data during file transmission, it is particularly important to adopt effective technical means to mark and track data.
[0003] Currently, data can be marked by adding digital watermarks to audio and video files, adding watermarks within documents, or adding watermarks by changing font styles. However, with the continuous expansion of application scenarios and the continuous development of emerging technologies, existing watermark processing methods may have limitations such as insufficient concealment and easy removal. Therefore, how to improve the concealment of digital watermarks without affecting the normal use of data, thereby improving data security and traceability, has become an urgent problem to be solved. Summary of the Invention
[0004] The purpose of one embodiment of this specification is to provide a digital watermarking processing method, apparatus, device, medium, and program product to solve the problem of insufficient concealment of digital watermarks during the digital watermarking process.
[0005] To solve the above-mentioned technical problems, one embodiment of this specification is implemented as follows: Firstly, one embodiment of this specification provides a digital watermarking processing method, including: Obtain a digital watermark, and encode and convert the digital watermark according to the field type of the field to be processed in the file to obtain a watermark fragment; The mapped watermark fragment is obtained by mapping each character contained in the watermark fragment according to the mapping relationship; The mapped watermark fragment is embedded into the field to be processed to obtain the first watermark field, and the first watermark field is replaced according to the check code replacement rule to obtain the second watermark field. The second watermark field is embedded at the embedding location of the file to be processed to obtain a digital watermark file.
[0006] Secondly, one embodiment of this specification provides a digital watermarking processing apparatus, comprising: The digital watermark encoding module is used to acquire digital watermarks and encode the digital watermarks according to the field type of the fields to be processed in the file to obtain watermark fragments. The mapping processing module is used to perform mapping processing on each character contained in the watermark fragment according to the mapping relationship to obtain the mapped watermark fragment; The watermark field processing module is used to embed the mapped watermark fragment into the field to be processed to obtain a first watermark field, and to perform field replacement on the first watermark field according to the check code replacement rule to obtain a second watermark field. The watermark field embedding module is used to embed the second watermark field at the embedding position of the file to be processed, thereby obtaining a digital watermark file.
[0007] Thirdly, another embodiment of this specification provides a digital watermarking processing apparatus, including: a memory, a processor, and computer-executable instructions stored in the memory and executable on the processor, wherein the computer-executable instructions, when executed by the processor, implement the steps of the digital watermarking processing method as described in the first aspect above.
[0008] Fourthly, in another embodiment of this specification, a computer-readable storage medium is provided for storing computer-executable instructions that, when executed by a processor, implement the steps of the digital watermarking processing method as described in the first aspect above.
[0009] Fifthly, in another embodiment of this specification, a computer program product is provided, the computer program product including a digital watermarking processing program, which, when executed by a processor, implements the steps of the digital watermarking processing method as described in the first aspect above.
[0010] This embodiment provides a digital watermarking processing method. During the digital watermark embedding process, the digital watermark is first acquired, and then encoded and converted according to the field type of the field to be processed in the file to obtain a watermark fragment. Converting the digital watermark encoding into a watermark fragment improves the concealment of the digital watermark. Then, according to the mapping relationship, each character contained in the watermark fragment is mapped to obtain a mapped watermark fragment. Increasing the complexity of the watermark fragment enhances the security of the digital watermark. Next, the mapped watermark fragment is embedded into the field to be processed to obtain a first watermark field. The first watermark field is then replaced according to the checksum replacement rule to obtain a second watermark field. Introducing a checksum ensures that files containing the digital watermark can be selected from a large number of files during subsequent digital watermark parsing. Finally, the second watermark field is embedded at the embedding position in the file to be processed to obtain a digital watermarked file. This ensures the even distribution of the watermark field in the file to be processed, reducing the risk of concentrated embedding of watermark fields. Therefore, by enhancing the dispersion and concealment of the watermark field, the security of the digital watermarked file is improved. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in one or more embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Figure 1 A flowchart of a digital watermarking processing method provided in one or more embodiments of this specification; Figure 2 A flowchart illustrating a digital watermarking processing method applied to a digital watermarking embedding scenario, provided for one or more embodiments of this specification; Figure 3 A schematic diagram of a digital watermarking processing device provided for one or more embodiments of this specification; Figure 4 This is a schematic diagram of the structure of a digital watermarking processing device provided for one or more embodiments of this specification. Detailed Implementation
[0012] To enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of this document.
[0013] This specification provides an example of a digital watermarking processing method: Reference Figure 1 The diagram illustrates a digital watermarking processing method provided in this embodiment. The digital watermarking processing method provided in this embodiment specifically includes the following steps S102 to S108.
[0014] Step S102: Obtain the digital watermark and encode the digital watermark according to the field type of the field to be processed in the file to obtain the watermark fragment.
[0015] The digital watermark mentioned in this embodiment refers to a watermark embedded in a file. Specifically, it refers to a watermark embedded in a file to protect the security and integrity of the file. For example, a digital watermark can be a text-type digital watermark, or a number-type digital watermark, or a letter-type digital watermark. In addition, a digital watermark can also be other forms of digital watermark, such as a preset symbol-type digital watermark. The field to be processed refers to the field in the file to be processed, specifically the field in the file to which the digital watermark is to be embedded.
[0016] In practice, the digital watermark is first obtained. Based on the obtained digital watermark, in order to ensure that the digital watermark is compatible with the field to be processed, the digital watermark can be encoded and converted. Specifically, in the process of encoding and converting the digital watermark, considering that different types of fields to be processed may require different types of digital watermarks, in order to improve the concealment and adaptability of the digital watermark, the digital watermark is encoded and converted according to the field type of the field to be processed in the file to be processed to obtain watermark fragments.
[0017] In specific execution, to improve the concealment of digital watermarks, the digital watermark can be encoded and converted into at least one watermark fragment. Simultaneously, during the encoding and conversion process, to enhance the adaptability of the digital watermark and enable it to be embedded in fields of different field types, the encoding and conversion can be performed according to the field type of the field to be processed. In one optional implementation of this embodiment, the digital watermark is encoded and converted according to the field type of the field to be processed in the file to obtain a watermark fragment, including: The target byte sequence is obtained by adjusting the byte sequence obtained from the digital watermark encoding. The coordinate information and byte information corresponding to each byte in the target byte sequence are combined to obtain the digital watermark fragment; The watermark fragment is obtained by type conversion of the digital watermark fragment according to the field type.
[0018] Specifically, in the process of encoding and converting the digital watermark according to the field type of the field to be processed in the file, the digital watermark is first converted into a byte sequence according to a preset encoding method. Then, the obtained byte sequence can be further adjusted to obtain a target byte sequence to meet the digital watermark embedding requirements. On this basis, the coordinate information and byte information of each byte in the target byte sequence can be combined to obtain at least one digital watermark fragment. The coordinate information can be determined within a preset coordinate range to indicate the position of the digital watermark fragment in the digital watermark. Finally, the digital watermark fragment is type-converted according to the field type to obtain the watermark fragment. Optionally, the watermark fragment includes coordinate information and byte information.
[0019] In the process of type conversion of digital watermark fragments based on field type, if the field type is character, the digital watermark fragment can be converted to obtain a character type watermark fragment; for example, if the field type is letter, the digital watermark fragment can be converted to obtain a letter type watermark fragment. If the field type is identifier, the digital watermark fragment can be converted to obtain a watermark fragment corresponding to the identifier type of the field to be processed. Optionally, the field type includes numeric, character, and / or identifier types.
[0020] For example, to embed a digital watermark "xxxx" into a lowercase letter type field, first, the digital watermark "xxxx" is encoded using GBK to obtain the byte sequence {-x1, -x2, -x3, -x4, -x5, -x6, -x7, -x8}. Considering that the byte values contain negative signs, which does not meet the format requirements of the field to be processed, each byte value is added with 'a' to adjust the byte sequence, thereby adjusting each byte value to a positive number, i.e., -x1+a=y1, -x2+a=y2, ..., -x9+a=y8. Based on this, the target byte sequence {y1, y2, y3, y4, y5, y6, y7} is obtained. Then, based on the preset coordinate range A0 to A99, the coordinate information corresponding to each byte is determined as A0, A1, A2, ..., A7. Based on this, the coordinate information and byte information corresponding to each byte can be combined to obtain the digital watermark fragments A0y1, A1y2, A2y3, ..., A7y8. When the field to be processed is a lowercase letter type, the letter can be regarded as a base-26 number, that is, a represents 0, ..., z represents 25. Based on this, the digital watermark fragments A0y1, A1y2, A2y3, ..., A7y8 can be converted to obtain the watermark fragments composed of lowercase letters.
[0021] For example, to embed a digital watermark "xxxx" into a numeric field to be processed, first, the digital watermark "xxxx" is encoded using GBK to obtain the byte sequence {-x1, -x2, -x3, -x4, -x5, -x6, -x7, -x8}. Then, each byte value is added with 'a' to adjust the byte sequence, thereby making each byte value a positive number, i.e., -x1 + a = y1, ..., -x9 + a = y8. Based on this, the target byte sequence {y1, y2, y3, y4, y...} is obtained. 5, y6, y7, y8}; Then, based on the preset coordinate range A0 to A99, determine the coordinate information corresponding to each byte as A0, A1, A2, ..., A7. Based on this, the coordinate information and byte information corresponding to each byte can be combined to obtain digital watermark fragments A0y1, A1y2, A2y3, ..., A7y8. Since the field to be processed is of numeric type, and the obtained digital watermark fragments are also composed of numbers, the obtained digital watermark fragments are also watermark fragments.
[0022] It should be noted that in the process of encoding and converting the digital watermark according to the field type of the field to be processed in the file to obtain the watermark fragment, since the digital watermark fragment obtained by combining the coordinate information and byte information is essentially composed of numbers, the process of converting the digital watermark fragment according to the field type to obtain the watermark fragment can be omitted when the field type of the field to be processed is a number. That is, when the field type of the field to be processed is a number, the optional implementation method of adjusting the byte sequence obtained by encoding the digital watermark to obtain the target byte sequence, combining the coordinate information and byte information corresponding to each byte in the target byte sequence to obtain the digital watermark fragment, and converting the digital watermark fragment according to the field type to obtain the watermark fragment can also be replaced by: adjusting the byte sequence obtained by encoding the digital watermark to obtain the target byte sequence, and combining the coordinate information and byte information corresponding to each byte in the target byte sequence to obtain the watermark fragment.
[0023] Step S104: Map the characters contained in the watermark segment according to the mapping relationship to obtain the mapped watermark segment.
[0024] In this embodiment, based on the obtained watermark fragment, in order to avoid the same watermark fragment appearing repeatedly in the field to be processed, which would make the watermark fragment easily identifiable, the watermark fragment can be encrypted to increase the difficulty of watermark fragment identification. For example, the watermark fragment can be mapped to make the watermark fragment difficult to identify.
[0025] In practice, to increase the difficulty of recognizing watermark fragments and thus improve their security, the watermark fragments can be mapped based on the established mapping relationship. Specifically, the characters contained in the watermark fragments are mapped according to the mapping relationship to obtain a mapped watermark fragment composed of the mapped characters.
[0026] In the specific execution process, during the mapping processing of each character contained in the watermark fragment according to the mapping relationship, the mapping relationship can be determined first, and then each character can be mapped according to the mapping relationship to increase the concealment and complexity of the watermark fragment; in an optional implementation method provided in this embodiment, the mapping relationship is determined in the following way: The predetermined value of the field to be processed is input into the mapping algorithm to calculate the mapping relationship number and obtain the mapping relationship number; The mapping relationship is determined in the preset mapping table based on the mapping relationship number.
[0027] The predetermined value of the field to be processed refers to the value of a predetermined part of the field to be processed, specifically the value that remains unchanged in the field to be processed during the mapping process; the preset mapping table can be obtained by rearranging a preset set of numbers, for example, by rearranging the preset set of numbers 0 to 9 to obtain the preset mapping table.
[0028] Specifically, in determining the mapping relationship, firstly, a predetermined value can be determined or selected in the field to be processed according to preset rules and / or preset algorithms. The predetermined value is then input into the mapping algorithm to calculate the mapping relationship number, thereby obtaining the mapping relationship number. Then, the corresponding mapping relationship is queried in the preset mapping table based on the mapping relationship number, and the mapping relationship can be determined accordingly.
[0029] Continuing with the previous example, we embed one of the generated watermark fragments, A0y1, into the mobile phone number 1234xxxxxyy. The predetermined value is the first four digits, 1234. Then, we input the predetermined value 1234 into the mapping algorithm to calculate the mapping relationship sequence number. The specific calculation process is as follows: The first mapping sequence number is 1234 / 1000 = 1 mod 234, so the first mapping sequence number is 1. The second mapping relation number is (1234 / 100)%10=2, so the second mapping relation number is 2; The third mapping relation number is (1234 / 10)%10=3, so the third mapping relation number is 3; The fourth mapping relation number is 4: 1234%10=4. The fifth mapping relation number is (1+2+3+4)%10=0, so the fifth mapping relation number is 0. Based on the mapping relationship numbers 1, 2, 3, 4, 0 obtained above, the mapping relationship is queried in the preset mapping table obtained by rearranging the preset number set 0 to 9 as shown in Table 1, so as to determine five mapping relationships. Based on the determined five mapping relationships, the five characters contained in the watermark fragment A0y1 are mapped to obtain the watermark fragment A0y1'.
[0030] Table 1
[0031] Step S106: Embed the mapped watermark fragment into the field to be processed to obtain a first watermark field, and perform field replacement on the first watermark field according to the check code replacement rule to obtain a second watermark field.
[0032] In practice, after obtaining the mapped watermark fragment, the first watermark field can be obtained by embedding the mapped watermark fragment into the field to be processed, thereby achieving the covert embedding of the digital watermark. After obtaining the first watermark field, in order to ensure that the field containing the digital watermark can be identified in the subsequent digital watermark parsing process, the first watermark field is further replaced according to the preset check code rules, thereby obtaining the second watermark field containing the mapped watermark fragment and the check code.
[0033] The first watermark field refers to the watermark field obtained after embedding the mapped watermark fragment into the field to be processed, that is, the first watermark field refers to the watermark field containing the mapped watermark fragment; the second watermark field refers to the watermark field obtained after further replacing the preset field in the field to be processed with a check code after embedding the mapped watermark fragment into the field to be processed, that is, the second watermark field refers to the watermark field containing the mapped watermark fragment and the check code.
[0034] In the specific execution process, during the field replacement of the first watermark field according to the check code replacement rule, the check code can first be determined according to the check code algorithm and / or check code rule. Then, the replacement field that needs to be replaced in the first watermark field can be further determined according to the check code replacement rule. Based on this, the replacement field in the first watermark field can be replaced with the check code. In an optional implementation of this embodiment, the second watermark field is obtained by replacing the first watermark field according to the check code replacement rule, including: The check code is calculated based on the check code algorithm and the first watermark field to obtain the check code; The replacement field in the first watermark field is determined according to the verification code replacement rules, and the replacement field is replaced to obtain the second watermark field.
[0035] Specifically, in the process of replacing the first watermark field according to the check code replacement rule, the characters contained in the first watermark field can first be input into the check code algorithm to calculate the check code and obtain the check code; then, the replacement field in the first watermark field is determined according to the check code replacement rule. Based on the determination of the check code and the replacement field, the replacement field is replaced with the check code, thereby obtaining the second watermark field containing the mapped watermark fragment and the check code.
[0036] For example, the checksum replacement rule is "defining the last two digits of the field to be processed as the replacement field". The mapped watermark fragment 56789 is embedded into the field to be processed 1234xxxxxyy to obtain the first watermark field 123456789yy. The checksum algorithm is as follows: x=(∑(ni*i)(i=1, 2, 3,..., 9))%100 Where i represents the number of digits, and ni represents the i-th digit in the first watermark field; The check code is calculated based on the check code algorithm and the first watermark field. The obtained check code is: x = (1 + 4 + 9 + 16 + 25 + 36 + 49 + 64 + 81) % 100 = 85, that is, the check code is 85. According to the check code replacement rule, the replacement field in the first watermark field is determined to be yy. After replacing the replacement field yy, the obtained second watermark field is: 12345678985.
[0037] Step S108: Embed the second watermark field at the embedding position of the file to be processed to obtain a digital watermark file.
[0038] In specific implementation, based on the second watermark field obtained above, the second watermark field is embedded at the embedding position of the file to be processed to obtain a digital watermark file; specifically, in the process of embedding the second watermark field at the embedding position of the file to be processed, in order to increase the concealment of the second watermark field embedding and improve the protection effect of the digital watermark on the file, the embedding position can be selected and determined. For example, the embedding position can be determined by the embedding position determination strategy, embedding position determination rules and / or embedding position determination algorithm, so as to embed the second watermark field at the determined embedding position.
[0039] In the specific execution process, in order to ensure the uniform distribution of watermark fields in the file to be processed and reduce the probability that watermark fields are easily identifiable due to concentrated embedding, thereby enhancing the security of digital watermarked files by improving the dispersion and concealment of watermark fields, in an optional implementation method provided in this embodiment, the embedding position is determined in the following way: The number of fields to be processed, the number of second watermark fields, and the number of times the second watermark field is embedded are input into the data partitioning algorithm to calculate the partition data volume and obtain the partition data volume. The embedding location is determined based on the amount of data in the partition and a random number algorithm.
[0040] Specifically, in determining the embedding position, the number of fields to be processed, the number of second watermark fields, and the number of times the second watermark field is embedded can be obtained first. The number of fields to be processed, the number of second watermark fields, and the number of times the second watermark field is embedded are then input into the data partitioning algorithm to calculate the partition data volume and obtain the partition data volume. Then, the embedding position is determined based on the partition data volume and the random number algorithm. In determining the embedding position based on the partition data volume and random number algorithm, the choice of partition data volume and random number algorithm can be adjusted according to actual processing needs. For example, when processing files with high security requirements, a smaller partition data volume can be selected to increase the density of embedding positions, thereby improving the security of digital watermark files.
[0041] For example, the data partitioning algorithm for determining the embedding location is as follows: y=t / x*n Where t represents the number of fields to be processed, x represents the number of times the second watermark field is embedded, and n represents the number of second watermark fields; Based on the above data partitioning algorithm, 10 watermark fields are added to the 60,000 fields to be processed, and the number of second watermark fields is 6, namely {watermark field 1, watermark field 2, watermark field 3, watermark field 4, watermark field 5, watermark field 6}, that is, t=60000, x=10, n=6, then y=t / x*n=1000, that is, the data volume of each partition is 1000. Therefore, the embedding position determined by the partition data volume of 1000 and the random number algorithm RAND(y) (taking random numbers from 0 to y) is: 1+RAND(1000) corresponds to The embedding position is determined by embedding watermark field 1, the embedding position corresponding to 1001+RAND(1000) is determined by embedding watermark field 2, ..., the embedding position corresponding to 5001+RAND(1000) is determined by embedding watermark field 6, the embedding position corresponding to 6001+RAND(1000) is determined by embedding watermark field 1, the embedding position corresponding to 7001+RAND(1000) is determined by embedding watermark field 2, ..., and so on. The second watermark field is embedded at the calculated and determined embedding position, and the remaining positions are filled with the original field in the field to be processed.
[0042] In practical applications, embedding a digital watermark into the file to be processed enhances the security of the obtained digital watermark file. Correspondingly, given a digital watermark file with an embedded watermark, the watermark can be restored to verify the authenticity and integrity of the digital watermark file. Based on this, an optional implementation of this embodiment further includes: The digital watermark file containing the check code is determined based on the check code recognition algorithm; The mapped watermark fragment is determined from the second watermark field based on the watermark fragment determination rules; The watermark fragment is obtained by performing reverse mapping on the mapped characters contained in the mapped watermark fragment according to the mapping relationship; The watermark fragment is parsed to obtain coordinate and byte information, and the digital watermark is restored based on the coordinate and byte information to obtain the digital watermark.
[0043] In the specific execution process, firstly, the digital watermark file containing the check code can be determined by identifying the check code in the file using the check code recognition algorithm. Based on the determined digital watermark file, the mapped watermark fragment is determined from the second watermark field embedded in the digital watermark file according to the watermark fragment determination rule. Then, the mapping relationship sequence number is determined according to the mapping algorithm to further determine the mapping relationship. Based on the determined mapping relationship, the mapped characters contained in the mapped watermark fragment are reverse-mapped to obtain the watermark fragment. Finally, the watermark fragment is parsed to obtain coordinate information and byte information, and the byte information is reassembled according to the coordinate order pointed to by the coordinate information, thereby realizing the restoration of the digital watermark and obtaining the digital watermark.
[0044] Continuing with the previous example, in a file containing an 11-digit mobile phone number 1234xxxxxyy, if we define the 11 digits of the mobile phone number as n1, n2, ..., n11, then the checksum recognition algorithm is as follows: n10*10+n11=(∑(ni*i)(i=1,2,3,...,9))%100 If the phone number in the file satisfies the above verification code recognition algorithm, then the file is determined to contain a watermark field (second watermark field) with a verification code, thus confirming the file as a digital watermark file. Further, based on the watermark fragment determination rule defining "the 5th to 9th positions of the watermark field are mapped watermark fragments," the 5th to 9th positions of the 11-digit watermark field are determined to be mapped watermark fragments. Then, the mapping relationship can be determined. The method for determining the mapping relationship is consistent with the method used in the digital watermark embedding process described above, i.e., in the phone number 1234x... In xxxxyy, the predetermined value is determined to be the first four digits 1234. The predetermined value 1234 is then input into the mapping algorithm to calculate the mapping relationship sequence number, obtaining mapping relationship sequence numbers 1, 2, 3, 4, 0. Based on the obtained mapping relationship sequence numbers, the mapping relationship is queried in the preset mapping table shown in Table 1 above. Based on the mapping relationship determined by the query, the mapping characters contained in the mapped watermark fragment are reverse mapped to obtain the watermark fragment. Finally, the watermark fragment is parsed to obtain coordinate information and byte information. The byte information is then reassembled according to the coordinate order pointed to by the coordinate information to obtain the digital watermark.
[0045] It should be noted that the above-described process for restoring the digital watermark in a digital watermark file can be executed immediately after embedding the digital watermark into the file to be processed to obtain the digital watermark file. Alternatively, it can be performed after obtaining the file to be identified and confirming that it is a digital watermark file, without immediately embedding the digital watermark into the file to be processed. In this case, the optional implementation method for restoring the digital watermark in a digital watermark file can be replaced by: determining the number containing the checksum in the file to be identified according to a checksum recognition algorithm. The process involves: determining watermark segments from the watermark fields contained in the digital watermark file based on watermark segment determination rules; performing reverse mapping on each character contained in the watermark segment according to the mapping relationship to obtain a mapped watermark segment; parsing the mapped watermark segment to obtain coordinate information and byte information, and restoring the digital watermark based on the coordinate information and byte information to obtain the digital watermark; where a watermark segment refers to a field in the watermark field composed of coordinate information and byte information, that is, the field remaining after removing the predetermined value and check code from the watermark field; a mapped watermark segment refers to the watermark segment obtained by performing reverse mapping on the watermark segment; this embodiment will not be elaborated further here.
[0046] In summary, the one or more digital watermarking processing methods provided in this embodiment first acquire the digital watermark during the digital watermark embedding process. Then, the digital watermark is encoded and converted according to the field type of the field to be processed in the file to obtain a watermark fragment. This watermark fragment contains coordinate information and byte information. Converting the digital watermark into a watermark fragment improves the concealment of the digital watermark. Next, the characters contained in the watermark fragment are mapped according to a mapping relationship to obtain a mapped watermark fragment. Increasing the complexity of the watermark fragment enhances the security of the digital watermark. Then, the mapped watermark fragment is embedded into the field to be processed to obtain a first watermark field. The first watermark field is then replaced according to a checksum replacement rule to obtain a second watermark field. Introducing a checksum ensures that files containing the digital watermark can be selected from a large number of files during subsequent digital watermark parsing. Finally, the second watermark field is embedded at the embedding position in the file to be processed to obtain a digital watermarked file. This ensures the uniform distribution of the watermark field in the file to be processed, reducing the risk of concentrated embedding of watermark fields. Therefore, by enhancing the dispersion and concealment of the watermark field, the security of the digital watermarked file is improved.
[0047] The following combination Figure 2 Taking the application of the digital watermarking processing method provided in this embodiment in a digital watermark embedding scenario as an example, the digital watermarking processing method provided in this embodiment will be further explained. (Refer to...) Figure 2 The digital watermarking processing method applied to digital watermarking embedding scenarios specifically includes steps S202 to S224.
[0048] Step S202: Obtain the digital watermark and encode the digital watermark to obtain a byte sequence.
[0049] Step S204: Adjust the byte sequence to obtain the target byte sequence.
[0050] Step S206: Combine the coordinate information and byte information corresponding to each byte in the target byte sequence to obtain a digital watermark fragment.
[0051] Step S208: Perform type conversion on the digital watermark fragment according to the field type to obtain the watermark fragment.
[0052] Step S210: Input the predetermined value of the field to be processed into the mapping algorithm to calculate the mapping relationship number and obtain the mapping relationship number.
[0053] Step S212: Determine the mapping relationship in the preset mapping table according to the mapping relationship number, and perform mapping processing on each character contained in the watermark fragment according to the mapping relationship to obtain the mapped watermark fragment.
[0054] Step S214: Embed the mapped watermark fragment into the field to be processed to obtain the first watermark field.
[0055] Step S216: Calculate the check code based on the check code algorithm and the first watermark field to obtain the check code.
[0056] Step S218: Determine the replacement field in the first watermark field according to the verification code replacement rule, and perform field replacement on the replacement field to obtain the second watermark field.
[0057] Step S220: Input the number of fields to be processed, the number of second watermark fields, and the number of times the second watermark field is embedded into the data partitioning algorithm to calculate the partition data volume and obtain the partition data volume.
[0058] Step S222: Determine the embedding position based on the partition data volume and the random number algorithm.
[0059] Step S224: Embed the second watermark field at the embedding position of the file to be processed to obtain a digital watermark file.
[0060] After step S224 is executed, the digital watermark file can be restored. The specific execution process of digital watermark restoration is as follows: the digital watermark file containing the check code is determined according to the check code recognition algorithm; the mapped watermark segment is determined from the second watermark field based on the watermark segment determination rule; the mapped characters contained in the mapped watermark segment are reverse mapped according to the mapping relationship to obtain the watermark segment; the watermark segment is parsed to obtain coordinate information and byte information, and the digital watermark is restored according to the coordinate information and byte information to obtain the digital watermark.
[0061] It should be noted that any one or more steps from S202 to S224 can be combined to form a new implementation method according to the needs of implementation and deployment. Furthermore, any one or more technical features in the technical solution composed of steps S202 to S224 can also be combined to form a new implementation method according to the actual deployment needs, or the technical features of one or more optional implementations provided by steps S102 to S108 can be combined to form a new implementation method. These will not be elaborated on here.
[0062] Figure 3 This is a schematic diagram of a digital watermarking processing device provided in an embodiment of the present invention, as shown below. Figure 3 As shown, the device includes: The digital watermark encoding module 302 is used to acquire a digital watermark and encode the digital watermark according to the field type of the field to be processed in the file to obtain a watermark fragment. The mapping processing module 304 is used to perform mapping processing on each character contained in the watermark segment according to the mapping relationship to obtain the mapped watermark segment; The watermark field processing module 306 is used to embed the mapped watermark fragment into the field to be processed to obtain a first watermark field, and to perform field replacement on the first watermark field according to the check code replacement rule to obtain a second watermark field. The watermark field embedding module 308 is used to embed the second watermark field at the embedding position of the file to be processed to obtain a digital watermark file.
[0063] Optionally, the digital watermark encoding module 302 includes: The sequence adjustment submodule is used to adjust the byte sequence obtained by the digital watermark encoding to obtain the target byte sequence; The information combination submodule is used to combine the coordinate information and byte information corresponding to each byte in the target byte sequence to obtain a digital watermark fragment; The type conversion submodule is used to perform type conversion on the digital watermark fragment according to the field type to obtain the watermark fragment; wherein, the field type includes numeric type, character type and / or identifier type.
[0064] Optionally, the digital watermarking processing device further includes: a mapping relationship determination module; the mapping relationship determination module includes: The sequence number calculation submodule is used to input the predetermined value of the field to be processed into the mapping algorithm to calculate the mapping relationship sequence number and obtain the mapping relationship sequence number; The mapping relationship determination submodule is used to determine the mapping relationship in a preset mapping table based on the mapping relationship number; the preset mapping table is obtained by rearranging a preset set of numbers.
[0065] Optionally, the watermark field processing module 306 includes: The check code calculation submodule is used to calculate the check code based on the check code algorithm and the first watermark field to obtain the check code. The field replacement submodule is used to determine the replacement field in the first watermark field according to the verification code replacement rule, and to perform field replacement on the replacement field to obtain the second watermark field.
[0066] Optionally, the digital watermarking processing device further includes: an embedding position determination module; the embedding position determination module includes: The data volume calculation submodule is used to input the number of fields to be processed, the number of the second watermark fields, and the number of times the second watermark fields are embedded into the data partitioning algorithm to calculate the partition data volume and obtain the partition data volume. The embedding location determination submodule is used to determine the embedding location based on the partition data volume and a random number algorithm.
[0067] Optionally, the digital watermarking processing device further includes: The file determination module is used to determine the digital watermark file containing the verification code according to the verification code recognition algorithm. A watermark fragment determination module is used to determine the mapped watermark fragment from the second watermark field based on watermark fragment determination rules; A reverse mapping processing module is used to perform reverse mapping processing on the mapping characters contained in the mapped watermark fragment according to the mapping relationship to obtain the watermark fragment; The watermark fragment parsing module is used to parse the watermark fragment to obtain the coordinate information and the byte information, and to restore the digital watermark based on the coordinate information and the byte information to obtain the digital watermark.
[0068] This embodiment provides a digital watermarking processing device. During the digital watermark embedding process, firstly, a digital watermark encoding module 302 is run to acquire the digital watermark. Then, the digital watermark is encoded and converted according to the field type of the field to be processed in the file to obtain a watermark fragment. Converting the digital watermark encoding into a watermark fragment improves the concealment of the digital watermark. Next, a mapping processing module 304 is run to map each character contained in the watermark fragment according to a mapping relationship to obtain a mapped watermark fragment. Increasing the complexity of the watermark fragment enhances the security of the digital watermark. Finally, a watermark field processing module 306 is run to map the characters... The first watermark field is obtained by embedding a watermark fragment into the field to be processed. The first watermark field is then replaced according to the check code replacement rule to obtain the second watermark field. By introducing a check code, it is ensured that files containing digital watermarks can be filtered out from a large number of files during the subsequent digital watermark parsing process. Finally, the watermark field embedding module 308 is run to embed the second watermark field at the embedding position in the file to be processed to obtain the digital watermark file. This ensures that the watermark field is evenly distributed in the file to be processed, reduces the risk of concentrated embedding of watermark fields, and thus improves the security of the digital watermark file by enhancing the dispersion and concealment of the watermark field.
[0069] This specification provides a digital watermarking processing device in one embodiment that can implement the various processes in the aforementioned method embodiments and achieve the same functions and effects, which will not be repeated here.
[0070] Furthermore, one embodiment of this specification also provides a digital watermarking processing device. Figure 4 This is a schematic diagram of the structure of a digital watermarking processing device provided in one embodiment of this specification, as shown below. Figure 4As shown, the device includes: a memory 401, a processor 402, a bus 403, and a communication interface 404. The memory 401, the processor 402, and the communication interface 404 communicate via the bus 403. The communication interface 404 may include input / output interfaces, including but not limited to a keyboard, mouse, monitor, microphone, and loudspeaker.
[0071] Figure 4 In the processor 402, the memory 401 stores computer-executable instructions that can run on the processor 402. When the processor 402 executes the computer-executable instructions, the following process is implemented: Obtain a digital watermark, and encode and convert the digital watermark according to the field type of the field to be processed in the file to obtain a watermark fragment; The mapped watermark fragment is obtained by mapping each character contained in the watermark fragment according to the mapping relationship; The mapped watermark fragment is embedded into the field to be processed to obtain the first watermark field, and the first watermark field is replaced according to the check code replacement rule to obtain the second watermark field. The second watermark field is embedded at the embedding location of the file to be processed to obtain a digital watermark file.
[0072] This embodiment provides a digital watermarking processing device. Through the cooperation of a memory 401, a processor 402, a bus 403, and a communication interface 404, the digital watermarking process first acquires the digital watermark and encodes it according to the field type of the field to be processed in the file to obtain a watermark fragment. Converting the digital watermark encoding into a watermark fragment improves the concealment of the digital watermark. Then, according to the mapping relationship, the characters contained in the watermark fragment are mapped to obtain a mapped watermark fragment. Increasing the complexity of the watermark fragment improves the security of the digital watermark. Next, the mapped watermark fragment is embedded into the field to be processed to obtain a first watermark field. The first watermark field is then replaced according to the check code replacement rule to obtain a second watermark field. Introducing a check code ensures that files containing digital watermarks can be filtered out from a large number of files during the subsequent digital watermark parsing process. Finally, the second watermark field is embedded at the embedding position in the file to be processed to obtain a digital watermarked file. This ensures the uniform distribution of the watermark field in the file to be processed, reduces the risk of concentrated embedding of watermark fields, and thus improves the security of the digital watermarked file by enhancing the dispersion and concealment of the watermark field.
[0073] This specification provides an embodiment of a digital watermarking processing device that can implement the various processes in the aforementioned method embodiments and achieve the same functions and effects, which will not be repeated here.
[0074] Furthermore, another embodiment of this specification provides a computer-readable storage medium for storing computer-executable instructions that, when executed by a processor, implement the following process: Obtain a digital watermark, and encode and convert the digital watermark according to the field type of the field to be processed in the file to obtain a watermark fragment; The mapped watermark fragment is obtained by mapping each character contained in the watermark fragment according to the mapping relationship; The mapped watermark fragment is embedded into the field to be processed to obtain the first watermark field, and the first watermark field is replaced according to the check code replacement rule to obtain the second watermark field. The second watermark field is embedded at the embedding location of the file to be processed to obtain a digital watermark file.
[0075] This embodiment provides a computer-readable storage medium. In the digital watermarking process, firstly, a digital watermark is acquired, and then the digital watermark is encoded and converted according to the field type of the field to be processed in the file to obtain a watermark fragment. Converting the digital watermark encoding into a watermark fragment improves the concealment of the digital watermark. Then, according to the mapping relationship, each character contained in the watermark fragment is mapped to obtain a mapped watermark fragment. Increasing the complexity of the watermark fragment improves the security of the digital watermark. Next, the mapped watermark fragment is embedded into the field to be processed to obtain a first watermark field, and the first watermark field is replaced according to the check code replacement rule to obtain a second watermark field. Introducing a check code ensures that files containing digital watermarks can be filtered out from a large number of files during the subsequent digital watermark parsing process. Finally, the second watermark field is embedded at the embedding position in the file to be processed to obtain a digital watermarked file. This ensures that the watermark field is evenly distributed in the file to be processed, reducing the risk of concentrated embedding of watermark fields. Thus, by enhancing the dispersion and concealment of the watermark field, the security of the digital watermarked file is improved.
[0076] The computer-readable storage medium includes read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, etc.
[0077] The computer-readable storage medium provided in one embodiment of this specification can implement the various processes in the foregoing method embodiments and achieve the same functions and effects, which will not be repeated here.
[0078] Furthermore, another embodiment of this specification provides a computer program product that, when executed by a processor, implements the following process: Obtain a digital watermark, and encode and convert the digital watermark according to the field type of the field to be processed in the file to obtain a watermark fragment; The mapped watermark fragment is obtained by mapping each character contained in the watermark fragment according to the mapping relationship; The mapped watermark fragment is embedded into the field to be processed to obtain the first watermark field, and the first watermark field is replaced according to the check code replacement rule to obtain the second watermark field. The second watermark field is embedded at the embedding location of the file to be processed to obtain a digital watermark file.
[0079] The computer product program provided in this embodiment, in the digital watermarking process, first acquires the digital watermark and encodes it according to the field type of the field to be processed in the file to obtain a watermark fragment. Converting the digital watermark encoding into a watermark fragment improves the concealment of the digital watermark. Then, according to the mapping relationship, the characters contained in the watermark fragment are mapped to obtain a mapped watermark fragment. Increasing the complexity of the watermark fragment improves the security of the digital watermark. Next, the mapped watermark fragment is embedded into the field to be processed to obtain a first watermark field. The first watermark field is then replaced according to the check code replacement rule to obtain a second watermark field. Introducing a check code ensures that files containing digital watermarks can be filtered out from a large number of files during the subsequent digital watermark parsing process. Finally, the second watermark field is embedded at the embedding position in the file to be processed to obtain a digital watermarked file. This ensures the uniform distribution of the watermark field in the file to be processed, reduces the risk of concentrated embedding of watermark fields, and thus improves the security of the digital watermarked file by enhancing the dispersion and concealment of the watermark field.
[0080] The computer program product provided in one embodiment of this specification can implement the various processes in the foregoing method embodiments and achieve the same functions and effects, which will not be repeated here.
[0081] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0082] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0083] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0084] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0085] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0086] Memory may include non-persistent storage in computer-readable storage media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable storage media.
[0087] Computer-readable storage media include both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer-readable storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable storage media does not include transient media, such as modulated data signals and carrier waves.
[0088] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0089] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0090] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A digital watermarking processing method, characterized in that, The method includes: Obtain a digital watermark, and encode and convert the digital watermark according to the field type of the field to be processed in the file to obtain a watermark fragment; The mapped watermark fragment is obtained by mapping each character contained in the watermark fragment according to the mapping relationship; The mapped watermark fragment is embedded into the field to be processed to obtain the first watermark field, and the first watermark field is replaced according to the check code replacement rule to obtain the second watermark field. The second watermark field is embedded at the embedding location of the file to be processed to obtain a digital watermark file.
2. The digital watermarking processing method according to claim 1, characterized in that, The step of encoding and converting the digital watermark according to the field type of the field to be processed in the file to obtain the watermark fragment includes: The target byte sequence is obtained by adjusting the byte sequence obtained by the digital watermark encoding; The coordinate information and byte information corresponding to each byte in the target byte sequence are combined to obtain a digital watermark fragment; The digital watermark fragment is obtained by type conversion based on the field type; The field types include numeric, character, and / or identifier types.
3. The digital watermarking processing method according to claim 1, characterized in that, The mapping relationship is determined in the following way: The predetermined value of the field to be processed is input into the mapping algorithm to calculate the mapping relationship number and obtain the mapping relationship number; The mapping relationship is determined in a preset mapping table based on the mapping relationship number; the preset mapping table is obtained by rearranging a preset set of numbers.
4. The digital watermarking processing method according to claim 1, characterized in that, The step of replacing the first watermark field according to the check code replacement rule to obtain the second watermark field includes: The verification code is obtained by calculating the verification code based on the verification code algorithm and the first watermark field; The replacement field in the first watermark field is determined according to the verification code replacement rule, and the replacement field is replaced to obtain the second watermark field.
5. The digital watermarking processing method according to claim 1, characterized in that, The embedding position is determined in the following manner: The number of fields to be processed, the number of the second watermark fields, and the number of times the second watermark fields are embedded are input into the data partitioning algorithm to calculate the partition data volume and obtain the partition data volume. The embedding location is determined based on the partition data volume and a random number algorithm.
6. The digital watermarking processing method according to claim 1, characterized in that, Also includes: The digital watermark file containing the verification code is determined according to the verification code recognition algorithm; The mapped watermark fragment is determined from the second watermark field based on the watermark fragment determination rule; The watermark fragment is obtained by performing reverse mapping processing on the mapped characters contained in the mapped watermark fragment according to the mapping relationship; The watermark fragment is parsed to obtain coordinate information and byte information, and the digital watermark is restored based on the coordinate information and byte information to obtain the digital watermark.
7. A digital watermarking processing device, characterized in that, The device includes: The digital watermark encoding module is used to acquire digital watermarks and encode the digital watermarks according to the field type of the fields to be processed in the file to obtain watermark fragments. The mapping processing module is used to perform mapping processing on each character contained in the watermark fragment according to the mapping relationship to obtain the mapped watermark fragment; The watermark field processing module is used to embed the mapped watermark fragment into the field to be processed to obtain a first watermark field, and to perform field replacement on the first watermark field according to the check code replacement rule to obtain a second watermark field. The watermark field embedding module is used to embed the second watermark field at the embedding position of the file to be processed, thereby obtaining a digital watermark file.
8. A digital watermarking processing device, characterized in that, The device includes a memory and a processor. The memory stores computer-executable instructions, which, when executed on the processor, are capable of implementing the steps of the digital watermarking processing method according to any one of claims 1-6.
9. A computer-readable storage medium storing computer-executable instructions, characterized in that, When the computer-executable instructions are executed by the processor, they can implement the steps of the digital watermarking processing method according to any one of claims 1-6.
10. A computer program product, characterized in that, The computer program product includes a digital watermarking processing program, which, when executed by a processor, can implement the steps of the digital watermarking processing method according to any one of claims 1-6.