Digital watermark embedding, extracting and verifying method and device

CN122714201APending Publication Date: 2026-09-08CHINA RAILWAY FIRST SURVEY & DESIGN INST GRP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610784497.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-02
Publication Date
2026-09-08

AI Technical Summary

Technical Problem

[0003]而当前数字水印技术在应用于海量媒体数据管理时,主要存在以下问题:一、水印查询需对每份文件进行全局扫描,效率低下,虽可引入外部数据库记录嵌入位置,但增加了系统复杂性且存在单点风险;二、固定位置嵌入方式难以抵抗裁剪、旋转等几何攻击,水印易丢失;三、单一层级结构缺乏灵活验证机制,水印受损后无法修复或定位篡改区域;四、水印信息与后台存证相互割裂,存证记录易被篡改,难以形成完整的可信证据链;

Benefits of technology

[0051] 1. This invention achieves hierarchical verification by setting up a three-level structure: an explicit warning watermark layer, an implicit index watermark layer, and an anti-counterfeiting code watermark layer. During verification, the explicit layer is detected first, and the subsequent parsing process is triggered only when the explicit layer is damaged or missing. This avoids a global scan of every file. At the same time, the dynamic index parameters stored in the implicit index watermark layer allow the anti-counterfeiting code watermark layer to be located without relying on an external database, which improves query efficiency and avoids the single point of failure risk caused by attacks or loss of external databases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122714201A_ABST
    Figure CN122714201A_ABST
Patent Text Reader

Abstract

The application discloses a digital watermark embedding, extracting and verifying method and device, and through setting a three-level structure of an explicit warning watermark layer, an invisible index watermark layer and a forgery-proof code watermark layer, hierarchical verification is realized, the explicit layer is detected preferentially during verification, and only when the explicit layer is damaged or lost, the subsequent analysis process is triggered, so that global scanning on each file is avoided, meanwhile, dynamic index parameters stored in the invisible index watermark layer enable the forgery-proof code watermark layer to be positioned without relying on an external database, query efficiency is improved, and single-point risk caused by attack or loss of the external database is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of digital watermarking technology, specifically to a method and apparatus for embedding, extracting and verifying digital watermarks. Background Technology

[0002] Digital watermarking technology embeds copyright information, user identity, timestamps, and other identifying information into digital media such as images, audio, and video for copyright protection, leak tracing, and content integrity authentication. Existing digital watermarks are mainly divided into two categories: robust watermarks focus on resisting signal processing such as compression and filtering to ensure the survival of the watermark, while fragile watermarks are used to detect whether the content has been tampered with.

[0003] Currently, digital watermarking technology faces several problems when applied to the management of massive media data: 1. Watermark lookup requires a global scan of each file, which is inefficient. Although external databases can be used to record the embedding location, this increases system complexity and introduces single-point risks. 2. Fixed-position embedding methods are vulnerable to geometric attacks such as cropping and rotation, making watermarks easy to lose. 3. The single-level structure lacks a flexible verification mechanism, making it impossible to repair or locate tampered areas after watermark damage. 4. Watermark information and backend evidence storage are disconnected, making evidence records susceptible to tampering and hindering the formation of a complete and credible chain of evidence.

[0004] Therefore, there is an urgent need for a digital watermark embedding and extraction system to solve the aforementioned technical problems. Summary of the Invention

[0005] This invention provides a method and apparatus for embedding, extracting and verifying digital watermarks to solve the above-mentioned technical problems.

[0006] According to a first aspect, one embodiment provides a method for embedding, extracting, and verifying digital watermarks, the method comprising:

[0007] Construct a three-level watermark layer consisting of an explicit warning watermark layer, an invisible index watermark layer, and an anti-counterfeiting code watermark layer;

[0008] Generate a visible warning watermark layer based on publicly available identification information;

[0009] By extracting local feature points from the watermark carrier data and generating dynamic index parameters, the encrypted dynamic index parameters are encoded into a hidden index watermark layer.

[0010] By extracting the hash value or content feature fingerprint of the watermark carrier data as a unique feature value, and combining it with random numbers and timestamps to generate a dynamic anti-counterfeiting code that uniquely corresponds to the current watermark carrier data, the anti-counterfeiting code watermark layer is obtained.

[0011] Following the order of explicit warning watermark layer, hidden index watermark layer, and anti-counterfeiting code watermark layer, the three watermark layers are embedded into the corresponding areas of the watermark carrier data in sequence.

[0012] Furthermore, by extracting local feature points from the watermark carrier data and generating dynamic index parameters, the encrypted dynamic index parameters are encoded into a hidden index watermark layer, specifically including:

[0013] Local feature points of the watermark carrier data are extracted by using scale-invariant feature transformation, accelerated robust feature or deep learning feature point detection algorithms.

[0014] Based on the spatial distribution of the local feature points, the embedding position offset and embedding strength of the anti-counterfeiting code watermark layer are calculated, and dynamic index parameters including the embedding position offset and embedding strength are generated.

[0015] The obtained dynamic index parameters are encrypted using an encryption algorithm.

[0016] Furthermore, based on the spatial distribution of the local feature points, the embedding position offset and embedding strength of the anti-counterfeiting code watermark layer are calculated, specifically including:

[0017] Let the set of extracted local feature points be P={(x1,y1),(x2,y2),…,(x... n ,y n The size of the watermark carrier data is L×L;

[0018] The formula for calculating the embedding position offset δ is:

[0019]

[0020] Where mod is the modulo operation, (x i ,y i ) represents the coordinates of a local feature point, and n represents the number of local feature points.

[0021] Furthermore, based on the spatial distribution of the local feature points, the embedding position offset and embedding strength of the anti-counterfeiting code watermark layer are calculated, specifically including:

[0022] The embedding strength α is dynamically adjusted based on the local texture characteristics of the watermark carrier data, and the calculation formula is as follows:

[0023]

[0024] Where, α base Let T be the basic embedding strength, and T be the local texture complexity of the current embedding region. and These are the preset mean and standard deviation of texture complexity, respectively, and β is the adjustment coefficient.

[0025] Furthermore, by extracting the hash value or content feature fingerprint of the watermark carrier data as a unique feature value, and combining it with a random number and a timestamp to generate a dynamic anti-counterfeiting code uniquely corresponding to the current watermark carrier data, an anti-counterfeiting code watermark layer is obtained, which specifically includes:

[0026] Let H be the hash value or content fingerprint of the carrier data, R be the generated random number, and T be the current timestamp. stamp If the system's preset key is K, then the formula for generating the dynamic anti-counterfeiting code C is:

[0027]

[0028] Here, ‖ represents the string concatenation operation, and HMAC-SHA256 is a key hash message authentication code algorithm based on SHA256.

[0029] Furthermore, following the order of explicit warning watermark layer, implicit index watermark layer, and anti-counterfeiting code watermark layer, the three-level watermark layers are embedded sequentially into the corresponding areas of the watermark carrier data, specifically including:

[0030] The explicit warning watermark layer is embedded into the low-frequency domain or perceptible significant region of the watermark carrier data using spread spectrum modulation or redundant coding algorithms.

[0031] Employing quantization index modulation or phase modulation algorithms, a hidden index watermark layer containing dynamic index parameters is embedded into the mid-frequency domain or semi-fragile region of the watermark carrier data.

[0032] The anti-counterfeiting code watermark layer is embedded into the precise coordinate position indicated by the dynamic index parameter in the watermark carrier data by employing least significant bit replacement or discrete wavelet transform coefficient modulation algorithm.

[0033] Furthermore, the method also includes:

[0034] The identifier and generation time of the three-level watermark layer are sent to the database to form a record of evidence storage.

[0035] When the database is a blockchain distributed ledger, the dynamic anti-counterfeiting code and its corresponding file identifier and generation time are stored on the blockchain in the form of transactions, forming an immutable evidence record.

[0036] According to a second aspect, one embodiment provides a digital watermark extraction and verification method, the method comprising:

[0037] Read and detect the existence and integrity of the explicit warning watermark layer. If the explicit warning watermark layer exists and is intact, output the explicit warning watermark information as the verification result.

[0038] If the explicit warning watermark layer is damaged or missing, the hidden index watermark layer is parsed to obtain the dynamic index parameters. Then, the dynamic anti-counterfeiting code watermark layer is extracted from the specified position in the watermark carrier data according to the dynamic index parameters, and the dynamic anti-counterfeiting code is decoded.

[0039] The obtained dynamic anti-counterfeiting code is compared with the evidence records pre-stored in the database. If they match, the verification result is output; otherwise, the verification result is output.

[0040] According to a third aspect, one embodiment provides a digital watermark embedding device, the device comprising:

[0041] The watermark layer construction module is used to construct a three-level watermark layer, which includes an explicit warning watermark layer, an invisible index watermark layer, and an anti-counterfeiting code watermark layer.

[0042] The watermark layer generation module is used to generate a visible warning watermark layer based on publicly available identification information;

[0043] By extracting local feature points from the watermark carrier data and generating dynamic index parameters, the encrypted dynamic index parameters are encoded into a hidden index watermark layer.

[0044] By extracting the hash value or content feature fingerprint of the watermark carrier data as a unique feature value, and combining it with random numbers and timestamps to generate a dynamic anti-counterfeiting code that uniquely corresponds to the current watermark carrier data, the anti-counterfeiting code watermark layer is obtained.

[0045] The watermark embedding module is used to embed the three-level watermark layer into the corresponding area of ​​the watermark carrier data in the order of explicit warning watermark layer, invisible index watermark layer, and anti-counterfeiting code watermark layer.

[0046] According to the fourth aspect, one embodiment provides a digital watermark extraction and verification device, the device comprising:

[0047] The explicit watermark extraction and verification module is used to read and detect the existence and integrity of the explicit warning watermark layer. If the explicit warning watermark layer exists and is intact, the explicit warning watermark information is output as the verification result.

[0048] The anti-counterfeiting code extraction and verification module is used to parse the hidden index watermark layer to obtain dynamic index parameters if the explicit warning watermark layer is damaged or missing. Then, according to the dynamic index parameters, the dynamic anti-counterfeiting code watermark layer is extracted from the specified position in the watermark carrier data and decoded to obtain the dynamic anti-counterfeiting code.

[0049] The obtained dynamic anti-counterfeiting code is compared with the evidence records pre-stored in the database. If they match, the verification result is output; otherwise, the verification result is output.

[0050] This invention provides a method and apparatus for embedding, extracting, and verifying digital watermarks, which has the following beneficial effects:

[0051] 1. This invention achieves hierarchical verification by setting up a three-level structure: an explicit warning watermark layer, an implicit index watermark layer, and an anti-counterfeiting code watermark layer. During verification, the explicit layer is detected first, and the subsequent parsing process is triggered only when the explicit layer is damaged or missing. This avoids a global scan of every file. At the same time, the dynamic index parameters stored in the implicit index watermark layer allow the anti-counterfeiting code watermark layer to be located without relying on an external database, which improves query efficiency and avoids the single point of failure risk caused by attacks or loss of external databases.

[0052] 2. This invention extracts local stable feature points from the carrier data, calculates the embedding position offset based on the spatial distribution of the feature points, and binds the anti-counterfeiting code watermark layer to the carrier content features. When the carrier data undergoes geometric transformations such as cropping, rotation, and scaling, the offset can still be accurately calculated by re-extracting and matching the feature points, thus realizing the repositioning of the watermark and effectively solving the problem of watermark loss in traditional fixed-position embedding methods. Attached Figure Description

[0053] Figure 1 A flowchart illustrating a digital watermark embedding method according to an embodiment of the present invention;

[0054] Figure 2 A flowchart illustrating a digital watermark extraction and verification method according to an embodiment of the present invention;

[0055] Figure 3 This is an overall architecture diagram of a digital watermark embedding, extraction, and verification method provided in one embodiment of the present invention. Detailed Implementation

[0056] The present invention will now be described in further detail with reference to specific embodiments and accompanying drawings. Similar elements in different embodiments are referred to by associated similar element reference numerals. In the following embodiments, many details are described to facilitate a better understanding of the invention. However, those skilled in the art will readily recognize that some features may be omitted in different situations, or may be replaced by other elements, materials, or methods. In some cases, certain operations related to the present invention are not shown or described in the specification. This is to avoid obscuring the core parts of the invention with excessive description. For those skilled in the art, detailed description of these related operations is not necessary; they can fully understand the related operations based on the description in the specification and general technical knowledge in the art.

[0057] Furthermore, the features, operations, or characteristics described in the specification can be combined in any suitable manner to form various embodiments. At the same time, the steps or actions in the method description can be rearranged or adjusted in a manner obvious to those skilled in the art. Therefore, the various orders in the specification and drawings are only for the clear description of a particular embodiment and do not imply a necessary order, unless otherwise stated that a particular order must be followed.

[0058] The first embodiment of the present invention provides a digital watermark embedding method, which is described below in conjunction with... Figure 1 and Figure 3 Please provide a detailed explanation.

[0059] like Figure 1 As shown, in step S110, a three-level watermark layer is constructed, which includes a visible warning watermark layer, a hidden index watermark layer, and an anti-counterfeiting code watermark layer.

[0060] In this embodiment, the original watermark information to be embedded is divided into three levels of watermark layers: explicit warning watermark layer, implicit index watermark layer, and anti-counterfeiting code watermark layer.

[0061] like Figure 1 As shown, in step S120, a visible warning watermark layer is generated based on publicly available identification information.

[0062] In this embodiment, publicly available identification information includes, but is not limited to, copyright ownership markings, company names, brand logos, and document security classification markings. Text information can be converted into a binary image sequence, or a spreading code sequence can be directly used as the watermark content, resulting in high embedding strength. This makes it perceptible under routine observation or basic detection, serving as a warning and preliminary verification function.

[0063] like Figure 1 As shown, in step S130, local feature points of the watermark carrier data are extracted and dynamic index parameters are generated. The encrypted dynamic index parameters are then encoded into a hidden index watermark layer.

[0064] The above steps specifically include:

[0065] S131 uses scale-invariant feature transformation, accelerated robust feature or deep learning feature point detection algorithms to extract local feature points of watermark carrier data.

[0066] Among them, scale-invariant feature transformation and accelerated robust feature transformation are traditional feature point detection algorithms based on manual design, which have rotation and scale invariance; deep learning feature point detection algorithms automatically learn feature points through convolutional neural networks, and have stronger robustness in complex lighting and texture scenes.

[0067] S132, based on the spatial distribution of the local feature points, calculate the embedding position offset and embedding strength of the anti-counterfeiting code watermark layer, and generate dynamic index parameters including information such as embedding position offset and embedding strength.

[0068] In this embodiment, the dynamic index parameters refer to a set of dynamically generated parameters used to indicate the embedding position and extraction method of the anti-counterfeiting code watermark layer, mainly including the embedding position offset δ and the embedding strength α.

[0069] The embedding position offset δ is calculated based on the local stable feature points of the carrier data. After the encryption system extracts the local feature points of the carrier data, it uses one or more of these feature points as a reference to calculate the spatial offset of the anti-counterfeiting code watermark layer embedding area relative to the reference point. When the carrier data undergoes geometric transformations such as cropping or rotation, the offset can still be accurately calculated by re-extracting and matching the feature points, thus achieving the repositioning of the watermark.

[0070] Embedding strength α refers to the quantization step size or energy coefficient when embedding the anti-counterfeiting code watermark layer. It is dynamically adjusted according to the local characteristics of the carrier data to balance the visual concealment and robustness of the watermark.

[0071] Let the extracted set of locally stable feature points be P={(x1,y1),(x2,y2),…,(x n ,y n The size of the carrier data is L×L, and the formula for calculating the embedding position offset δ is:

[0072]

[0073] The mod operation is used to calculate the offset δ, which integrates the distribution information of all feature points. This allows the offset to be accurately restored and the anti-counterfeiting code watermark layer to be repositioned even after the carrier data has undergone geometric transformations such as cropping and rotation.

[0074] Meanwhile, the embedding strength α is dynamically adjusted based on the local texture characteristics of the carrier data, and its calculation formula is as follows:

[0075]

[0076] Where α base Let T be the basic embedding strength, and T be the local texture complexity of the current embedding region. and These are the preset mean and standard deviation of texture complexity, respectively, and β is the adjustment coefficient;

[0077] This formula adaptively increases the embedding strength in areas with complex textures to enhance robustness, while decreasing the embedding strength in smooth areas to maintain visual concealment.

[0078] S133 uses encryption algorithms (such as AES, SM4, or asymmetric encryption algorithms such as SM2) to encrypt the obtained dynamic index parameters. The encrypted data is converted into a watermark signal suitable for embedding in the frequency domain or semi-fragile region of the carrier data through algorithms such as quantization index modulation or phase modulation.

[0079] In this embodiment, a quantization index modulation algorithm is used to embed dynamic index parameters. The intermediate frequency domain coefficients of the carrier data are defined as f, the bit information to be embedded is b∈{0,1}, and the quantization step size is ω. Then, the coefficients f′ after embedding the watermark follow the following function:

[0080]

[0081] in, To round down to the nearest integer, the formula quantizes bit 0 to the nearest 0.5 times quantization step size and bit 1 to the nearest 1.5 times quantization step size. During extraction, the corresponding bit can be demodulated by detecting the distance between the coefficient and the standard quantization point. This algorithm remains stable for conventional signal processing and makes the watermark sensitive to malicious tampering, providing good visual concealment.

[0082] like Figure 1 As shown, in step S140, the hash value or content feature fingerprint (such as perceptual hash, local feature aggregation descriptor) of the watermark carrier data is extracted as a unique feature value, and a dynamic anti-counterfeiting code that uniquely corresponds to the current watermark carrier data is generated by combining random number and timestamp, thus obtaining the anti-counterfeiting code watermark layer.

[0083] The above steps specifically include:

[0084] The anti-counterfeiting code watermark generation unit uses hash operations to generate dynamic anti-counterfeiting codes. Let H be the hash value or content feature fingerprint of the carrier data, R be the generated random number, T be the current timestamp, and K be the system-preset key. Then, the formula for generating the dynamic anti-counterfeiting code C is:

[0085]

[0086] Where, ‖ represents the string concatenation operation, and HMAC-SHA256 is a key hash message authentication code algorithm based on SHA256;

[0087] This formula uses the unique feature value H of the carrier data to achieve content binding, and combines random number R and timestamp Tstamp to ensure the timeliness and unpredictability of the anti-counterfeiting code. This allows the same carrier data to generate different anti-counterfeiting codes when embedded at different times, effectively preventing replay attacks and forgery.

[0088] This anti-counterfeiting code is unique, time-sensitive, and unpredictable. Different anti-counterfeiting codes are generated when the same data is embedded at different times, effectively preventing replay attacks and forgery.

[0089] like Figure 1 As shown, in step S150, the three-level watermark layers are embedded into the corresponding areas of the watermark carrier data in the order of explicit warning watermark layer, invisible index watermark layer, and anti-counterfeiting code watermark layer.

[0090] The above steps specifically include:

[0091] Explicit layer embedding: Using spread spectrum modulation or redundant coding algorithms, the explicit warning watermark layer is embedded in the low-frequency domain or the perceptible significant region of the carrier data, giving it strong robustness against compression and filtering.

[0092] Stealth layer embedding: Using quantization index modulation or phase modulation algorithms, a stealth index watermark layer containing dynamic index parameters is embedded into the mid-frequency domain or semi-vulnerable region of the carrier data, making it sensitive to malicious tampering.

[0093] Anti-counterfeiting layer embedding: Using least significant bit replacement or discrete wavelet transform coefficient modulation algorithm, the anti-counterfeiting code watermark layer is embedded at the precise coordinate position indicated by dynamic index parameters to achieve complete visual concealment.

[0094] In this embodiment, the spread spectrum modulation or redundancy coding algorithm are existing technologies in the field of digital watermarking.

[0095] Quantization index modulation or phase modulation algorithms are existing technologies in the field of digital watermarking. Stealth layer embedding embeds a stealth index watermark layer containing dynamic index parameters into the mid-frequency domain or semi-fragile region of the carrier data. Quantization index modulation embeds the watermark by adjusting the quantization value of the carrier coefficients, maintaining stability for conventional signal processing. Phase modulation achieves embedding by changing the phase information of the signal. Both algorithms can make the watermark sensitive to malicious tampering while maintaining good visual concealment.

[0096] Least significant bit replacement or discrete wavelet transform coefficient modulation algorithm is an existing technology in the field of digital watermarking. The anti-counterfeiting layer embedding subunit embeds the anti-counterfeiting code watermark layer into the precise coordinate position indicated by the dynamic index parameter. Least significant bit replacement is achieved by modifying the lowest few bits of the pixel value, which is simple and efficient.

[0097] Discrete wavelet transform coefficient modulation adjusts mid-to-high frequency coefficients in the wavelet domain, providing better resistance to attacks. Both algorithms can achieve complete visual concealment without affecting the normal use of the carrier data.

[0098] Furthermore, the method also includes sending the identifier and generation time of the three-level watermark layer to the database to form a record of evidence.

[0099] The database includes local storage units and cloud backup units. The local storage units store recently generated evidence records to support fast queries, while the cloud backup units perform off-site backups of all evidence records. When the database is a blockchain distributed ledger, dynamic anti-counterfeiting codes and their corresponding file identifiers and generation times are stored on the blockchain in the form of transactions, forming immutable evidence records.

[0100] In this embodiment, the local storage unit uses a MySQL or Redis database to store recently generated evidence records and supports millisecond-level fast queries; the cloud backup unit uses Alibaba Cloud OSS or AWS S3 object storage service to periodically synchronize local evidence records to the cloud to achieve off-site backup. When local data is lost or damaged, it can be recovered from the cloud.

[0101] The second embodiment of the present invention provides a digital watermark extraction and verification method, which is described below in conjunction with... Figure 2 and Figure 3 Please provide a detailed explanation.

[0102] like Figure 2 As shown, in step S210, the existence status and integrity of the explicit warning watermark layer are read and detected. If the explicit warning watermark layer exists and is intact, the explicit warning watermark information is output as the verification result.

[0103] In this embodiment, the existence and integrity of the explicit warning watermark layer are confirmed through template matching, correlation detection, or deep learning recognition.

[0104] The explicit watermark detection employs a normalized cross-correlation algorithm to confirm the existence and integrity of the explicit warning watermark layer. Let the original explicit warning watermark template sequence be W = {W1, W2, ..., W...}. n The watermark sequence to be detected extracted from the carrier data is W′={W′1, W′2, ..., W′}. n}, then the formula for calculating the normalized cross-correlation coefficient P is:

[0105]

[0106] in, and The values ​​of P are the mean of the original watermark sequence and the watermark sequence to be detected, respectively. The calculated value of P ranges from [-1, 1]. When P is greater than the preset threshold Q (which is set manually, preferably 0.6-0.8), the explicit warning watermark layer is determined to be complete and readable. Otherwise, it is determined to be damaged or missing, triggering the subsequent hidden index parsing process.

[0107] like Figure 2As shown, in step S220, if the explicit warning watermark layer is damaged or missing, the hidden index watermark layer is parsed to obtain dynamic index parameters, and then the dynamic anti-counterfeiting code watermark layer is extracted from the specified position in the watermark carrier data according to the dynamic index parameters, and the dynamic anti-counterfeiting code is decoded.

[0108] In this embodiment, encrypted data is extracted from the semi-vulnerable area of ​​the carrier data and decrypted using the corresponding decryption key to obtain dynamic index parameters. Based on the dynamic index parameters, the encoded data of the anti-counterfeiting code watermark layer is extracted from the carrier data and error correction decoding is performed to restore the dynamic anti-counterfeiting code.

[0109] like Figure 2 As shown, in step S230, the obtained dynamic anti-counterfeiting code is compared with the evidence records pre-stored in the database. If they match, the verification result is output; otherwise, the verification result is output.

[0110] In this embodiment, the restored dynamic anti-counterfeiting code is precisely compared with the dynamic anti-counterfeiting code under the corresponding file identifier stored in the database. If the comparison matches, a verification pass result and corresponding evidence storage information are output; if they do not match or there is no corresponding record in the database, a verification failure signal is output. A verification report is generated and output based on the comparison result. The verification report includes the verification conclusion, extraction timestamp, carrier data identifier, and corresponding evidence storage information.

[0111] Corresponding to the digital watermark embedding method disclosed above, this invention also discloses a digital watermark embedding device, which specifically includes:

[0112] The watermark layer construction module is used to construct a three-level watermark layer, which includes an explicit warning watermark layer, an invisible index watermark layer, and an anti-counterfeiting code watermark layer.

[0113] The watermark layer generation module is used to generate a visible warning watermark layer based on publicly available identification information;

[0114] By extracting local feature points from the watermark carrier data and generating dynamic index parameters, the encrypted dynamic index parameters are encoded into a hidden index watermark layer.

[0115] By extracting the hash value or content feature fingerprint of the watermark carrier data as a unique feature value, and combining it with random numbers and timestamps to generate a dynamic anti-counterfeiting code that uniquely corresponds to the current watermark carrier data, the anti-counterfeiting code watermark layer is obtained.

[0116] The watermark embedding module is used to embed the three-level watermark layer into the corresponding area of ​​the watermark carrier data in the order of explicit warning watermark layer, invisible index watermark layer, and anti-counterfeiting code watermark layer.

[0117] It should be noted that for a detailed description of the digital watermark embedding device provided in the embodiments of the present invention, please refer to the relevant description of the digital watermark embedding method provided in the embodiments of the present invention, which will not be repeated here.

[0118] Corresponding to the digital watermark extraction and verification method disclosed above, this invention also discloses a digital watermark extraction and verification device, which specifically includes:

[0119] The explicit watermark extraction and verification module is used to read and detect the existence and integrity of the explicit warning watermark layer. If the explicit warning watermark layer exists and is intact, the explicit warning watermark information is output as the verification result.

[0120] The anti-counterfeiting code extraction and verification module is used to parse the hidden index watermark layer to obtain dynamic index parameters if the explicit warning watermark layer is damaged or missing. Then, according to the dynamic index parameters, the dynamic anti-counterfeiting code watermark layer is extracted from the specified position in the watermark carrier data and decoded to obtain the dynamic anti-counterfeiting code.

[0121] The obtained dynamic anti-counterfeiting code is compared with the evidence records pre-stored in the database. If they match, the verification result is output; otherwise, the verification result is output.

[0122] It should be noted that for a detailed description of the digital watermark extraction and verification system provided in the embodiments of the present invention, please refer to the relevant description of the digital watermark extraction and verification method provided in the embodiments of the present invention, which will not be repeated here.

[0123] The above examples illustrate the present invention only to aid in understanding it and are not intended to limit the scope of the invention. Those skilled in the art can make various simple deductions, modifications, or substitutions based on the principles of this invention.

Claims

1. A digital watermark embedding method, characterized in that, The method includes: Construct a three-level watermark layer consisting of an explicit warning watermark layer, an invisible index watermark layer, and an anti-counterfeiting code watermark layer; Generate a visible warning watermark layer based on publicly available identification information; By extracting local feature points from the watermark carrier data and generating dynamic index parameters, the encrypted dynamic index parameters are encoded into a hidden index watermark layer. By extracting the hash value or content feature fingerprint of the watermark carrier data as a unique feature value, and combining it with random numbers and timestamps to generate a dynamic anti-counterfeiting code that uniquely corresponds to the current watermark carrier data, the anti-counterfeiting code watermark layer is obtained. Following the order of explicit warning watermark layer, hidden index watermark layer, and anti-counterfeiting code watermark layer, the three watermark layers are embedded into the corresponding areas of the watermark carrier data in sequence.

2. The digital watermark embedding method as described in claim 1, characterized in that, By extracting local feature points from the watermark carrier data and generating dynamic index parameters, the encrypted dynamic index parameters are encoded into a hidden index watermark layer, specifically including: Local feature points of the watermark carrier data are extracted by using scale-invariant feature transformation, accelerated robust feature or deep learning feature point detection algorithms. Based on the spatial distribution of the local feature points, the embedding position offset and embedding strength of the anti-counterfeiting code watermark layer are calculated, and dynamic index parameters including the embedding position offset and embedding strength are generated. The obtained dynamic index parameters are encrypted using an encryption algorithm.

3. The digital watermark embedding method as described in claim 2, characterized in that, Based on the spatial distribution of the local feature points, the embedding position offset and embedding strength of the anti-counterfeiting code watermark layer are calculated, specifically including: Let the set of extracted local feature points be P={(x1,y1),(x2,y2),…,(x n ,y n The size of the watermark carrier data is L×L; The formula for calculating the embedding position offset δ is: ; Where mod is the modulo operation, (x i ,y i ) represents the coordinates of a local feature point, and n represents the number of local feature points.

4. The digital watermark embedding method as described in claim 3, characterized in that, Based on the spatial distribution of the local feature points, the embedding position offset and embedding strength of the anti-counterfeiting code watermark layer are calculated, specifically including: The embedding strength α is dynamically adjusted based on the local texture characteristics of the watermark carrier data, and the calculation formula is as follows: ; Where, α base Let T be the basic embedding strength, and T be the local texture complexity of the current embedding region. and These are the preset mean and standard deviation of texture complexity, respectively, and β is the adjustment coefficient.

5. The digital watermark embedding method as described in claim 1, characterized in that, By extracting the hash value or content feature fingerprint of the watermark carrier data as a unique feature value, and combining it with a random number and timestamp to generate a dynamic anti-counterfeiting code that uniquely corresponds to the current watermark carrier data, an anti-counterfeiting code watermark layer is obtained, which specifically includes: Let H be the hash value or content fingerprint of the carrier data, R be the generated random number, and T be the current timestamp. stamp If the system's preset key is K, then the formula for generating the dynamic anti-counterfeiting code C is: ; Here, ‖ represents the string concatenation operation, and HMAC-SHA256 is a key hash message authentication code algorithm based on SHA256.

6. The digital watermark embedding method as described in claim 1, characterized in that, Following the order of explicit warning watermark layer, implicit index watermark layer, and anti-counterfeiting code watermark layer, the three-level watermark layers are embedded sequentially into the corresponding areas of the watermark carrier data, specifically including: The explicit warning watermark layer is embedded into the low-frequency domain or perceptible significant region of the watermark carrier data using spread spectrum modulation or redundant coding algorithms. Employing quantization index modulation or phase modulation algorithms, a hidden index watermark layer containing dynamic index parameters is embedded into the mid-frequency domain or semi-fragile region of the watermark carrier data. The anti-counterfeiting code watermark layer is embedded into the precise coordinate position indicated by the dynamic index parameter in the watermark carrier data by employing least significant bit replacement or discrete wavelet transform coefficient modulation algorithm.

7. The digital watermark embedding method as described in claim 1, characterized in that, The method further includes: The identifier and generation time of the third-level watermark layer are sent to the database to form a record of evidence storage. When the database is a blockchain distributed ledger, the dynamic anti-counterfeiting code and its corresponding file identifier and generation time are stored on the blockchain in the form of transactions, forming an immutable evidence record.

8. A method for extracting and verifying digital watermarks, characterized in that, The method includes: Read and detect the existence and integrity of the explicit warning watermark layer. If the explicit warning watermark layer exists and is intact, output the explicit warning watermark information as the verification result. If the explicit warning watermark layer is damaged or missing, the hidden index watermark layer is parsed to obtain the dynamic index parameters. Then, the dynamic anti-counterfeiting code watermark layer is extracted from the specified position in the watermark carrier data according to the dynamic index parameters, and the dynamic anti-counterfeiting code is decoded. The obtained dynamic anti-counterfeiting code is compared with the evidence records pre-stored in the database. If they match, the verification result is output; otherwise, the verification result is output.

9. A digital watermark embedding device, characterized in that, The device includes: The watermark layer construction module is used to construct a three-level watermark layer, which includes an explicit warning watermark layer, an invisible index watermark layer, and an anti-counterfeiting code watermark layer. The watermark layer generation module is used to generate a visible warning watermark layer based on publicly available identification information; By extracting local feature points from the watermark carrier data and generating dynamic index parameters, the encrypted dynamic index parameters are encoded into a hidden index watermark layer. By extracting the hash value or content feature fingerprint of the watermark carrier data as a unique feature value, and combining it with random numbers and timestamps to generate a dynamic anti-counterfeiting code that uniquely corresponds to the current watermark carrier data, the anti-counterfeiting code watermark layer is obtained. The watermark embedding module is used to embed the three-level watermark layer into the corresponding area of ​​the watermark carrier data in the order of explicit warning watermark layer, invisible index watermark layer, and anti-counterfeiting code watermark layer.

10. A digital watermark extraction and verification device, characterized in that, The device includes: The explicit watermark extraction and verification module is used to read and detect the existence and integrity of the explicit warning watermark layer. If the explicit warning watermark layer exists and is intact, the explicit warning watermark information is output as the verification result. The anti-counterfeiting code extraction and verification module is used to parse the hidden index watermark layer to obtain dynamic index parameters if the explicit warning watermark layer is damaged or missing. Then, according to the dynamic index parameters, the dynamic anti-counterfeiting code watermark layer is extracted from the specified position in the watermark carrier data and decoded to obtain the dynamic anti-counterfeiting code. The obtained dynamic anti-counterfeiting code is compared with the evidence records pre-stored in the database. If they match, the verification result is output; otherwise, the verification result is output.