Watermark extraction method, device, storage medium and computer readable storage medium

By performing feature extraction and target watermark extraction algorithms on the data to be processed, the problem of poor universality of existing watermark extraction methods under unknown embedding algorithms is solved, and watermark information can be accurately extracted under different conditions.

CN120893024BActive Publication Date: 2026-04-28VIPSHOP (GUANGZHOU) SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
VIPSHOP (GUANGZHOU) SOFTWARE CO LTD
Filing Date
2025-09-15
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing watermark extraction methods struggle to extract watermark information when the embedding algorithm is unknown, resulting in poor versatility.

Method used

By extracting features from the data to be processed, features such as carrier type, frequency domain energy distribution, anti-attack performance and attack traces are obtained. The target watermark extraction algorithm is matched using a decision tree model and attention module, and the watermark is extracted using the optimal extraction parameters.

Benefits of technology

Even with an unknown embedding algorithm, it can accurately extract watermark information, improving the versatility and accuracy of watermark extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120893024B_ABST
    Figure CN120893024B_ABST
Patent Text Reader

Abstract

The application discloses a watermark extraction method and device, a storage medium and a computer readable storage medium, and relates to the technical field of digital watermarking. The watermark extraction method comprises the following steps: acquiring to-be-processed data, and performing feature extraction on the to-be-processed data to obtain data features; based on the data features, a target watermark extraction algorithm corresponding to the to-be-processed data is matched; and based on the target watermark extraction algorithm, watermark extraction is performed on the to-be-processed data to obtain watermark information embedded in the to-be-processed data. The application solves the technical problem that the existing watermark extraction method has poor universality in extracting embedded watermark data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of digital watermarking, and in particular to a watermark extraction method, device, storage medium, and computer-readable storage medium. Background Technology

[0002] Digital watermarking technology, as a core supporting means of digital copyright protection, has formed an application system covering the entire multimedia field. The current mainstream technical architecture is based on discrete cosine transform, wavelet transform, and other methods to achieve content traceability through the embedding and extraction of invisible markers.

[0003] Traditional watermark extraction methods typically require prior knowledge of the extraction algorithm. For example, knowing that a discrete cosine transform (DCT) is used during the embedding stage allows the determination of the appropriate DCT algorithm for extraction. Alternatively, the header information of the embedded data may store metadata such as algorithm type, parameters, or keys. Reading this metadata during extraction allows the identification of the corresponding extraction algorithm. Therefore, existing watermark extraction methods struggle to successfully extract watermark information without knowing the embedding algorithm, exhibiting poor general applicability for extracting embedded watermark data.

[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0005] The main objective of this application is to provide a watermark extraction method, device, storage medium, and computer-readable storage medium, aiming to solve the technical problem that existing watermark extraction methods have poor versatility in extracting embedded watermark data.

[0006] To achieve the above objectives, this application proposes a watermark extraction method, which includes:

[0007] Acquire the data to be processed, and extract features from the data to obtain data features;

[0008] Based on the data features, a target watermark extraction algorithm corresponding to the data to be processed is obtained;

[0009] The target watermark extraction algorithm is used to extract the watermark from the data to be processed, thereby obtaining the watermark information embedded in the data to be processed.

[0010] In one embodiment, the step of extracting features from the data to be processed to obtain data features includes:

[0011] The data type of the data to be processed is identified to obtain the carrier type characteristics;

[0012] The anti-attack performance characteristics of the data to be processed are obtained by performing an anti-attack assessment.

[0013] Spectral analysis is performed on the data to be processed to obtain the frequency domain energy distribution characteristics;

[0014] The spatial domain of the data to be processed is quantized to obtain the spatial domain information entropy feature;

[0015] Attack trace detection is performed on the data to be processed to obtain attack trace features;

[0016] The carrier type feature, the frequency domain energy distribution feature, the spatial domain information entropy feature, the anti-attack performance feature, and the attack trace feature are used as data features.

[0017] In one embodiment, the step of detecting attack traces in the data to be processed to obtain attack trace features includes:

[0018] The data to be processed is input into a predetermined classification model to obtain the attack type;

[0019] The attack type is used as an attack trace feature.

[0020] In one embodiment, prior to the step of inputting the data to be processed into a predetermined classification model to obtain the attack type, the method includes:

[0021] Obtain sample data and embed a watermark into the sample data to obtain a watermark data sample;

[0022] An attack simulation operation is performed on the watermarked data sample to obtain an attack data sample, wherein the attack simulation operation includes at least one of compression attack operation, noise attack operation and geometric transformation operation;

[0023] Based on the attack data samples, the initial classification model is trained to obtain the predetermined classification model.

[0024] In one embodiment, the step of matching the target watermark extraction algorithm corresponding to the data to be processed based on the data features includes:

[0025] The data features are input into a predetermined decision tree model to obtain a target watermark extraction algorithm that matches the data to be processed. The predetermined decision tree model includes a decision tree network and an attention module. The attention module is used to adjust the feature weights of the decision tree network based on the data features.

[0026] In one embodiment, the step of extracting watermark information from the data to be processed based on the target watermark extraction algorithm to obtain the watermark information embedded in the data to be processed includes:

[0027] Based on the data characteristics, the optimal extraction parameters are obtained through searching.

[0028] Based on the target watermark extraction algorithm, the watermark is extracted from the data to be processed according to the optimal extraction parameters to obtain the watermark information embedded in the data to be processed.

[0029] In one embodiment, the step of searching for the optimal extraction parameters based on the data features includes:

[0030] Obtain a predetermined parameter space, wherein the predetermined parameter space consists of each extracted parameter and its value range;

[0031] The predetermined parameter space is sampled to obtain the extracted parameter set;

[0032] Based on the data characteristics, the objective function value of the extraction parameter set is calculated, wherein the objective function value is the value of the objective function, and the objective function includes an extraction success rate term, a complexity constraint term, and a robustness term;

[0033] Based on the objective function value, determine whether the objective function has converged;

[0034] After the objective function converges, the extracted parameter set is taken as the optimal extracted parameters;

[0035] If the objective function fails to converge, the following step is performed: sampling the predetermined parameter space to obtain the extracted parameter set.

[0036] In addition, to achieve the above objectives, this application also proposes a watermark extraction device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the watermark extraction method as described above.

[0037] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the watermark extraction method described above.

[0038] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the watermark extraction method described above.

[0039] One or more technical solutions proposed in this application have at least the following technical effects:

[0040] This application obtains data features by acquiring data to be processed and extracting features from the data. Since different embedding algorithms alter the content of the carrier in the data differently, this application determines relevant features of the data based on these features. By leveraging the differences in data features caused by the embedding algorithms, a target watermark extraction algorithm corresponding to the data can be matched. Then, this application can extract the watermark from the data based on the matched target watermark extraction algorithm to obtain the watermark information embedded in the data. Because different embedding algorithms alter the content of the carrier in the data differently, this application analyzes the data features of the data to be processed during watermark extraction to determine the watermark embedding method used in the data. This allows for the matching of a corresponding target watermark extraction algorithm to extract the watermark information embedded in the data. Compared to existing watermark extraction methods, this application, through feature extraction and matching strategies, can accurately extract watermark information even when the embedding algorithm is unknown, exhibiting good universality and effectively improving the versatility of extracting embedded watermark data. Attached Figure Description

[0041] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0042] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1 This is a flowchart illustrating an embodiment of the watermark extraction method of this application.

[0044] Figure 2 This is a flowchart illustrating Embodiment 2 of the watermark extraction method of this application;

[0045] Figure 3 This is a schematic diagram of a training scenario for a predetermined classification model involved in an embodiment of this application;

[0046] Figure 4 This is a flowchart illustrating Embodiment 3 of the watermark extraction method of this application;

[0047] Figure 5 This is a schematic diagram illustrating the search scenario for the optimal extraction parameters involved in an embodiment of this application;

[0048] Figure 6 This is a schematic diagram of the watermark extraction device in the embodiments of this application.

[0049] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0050] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0051] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0052] The main solution of this application embodiment is: to acquire data to be processed and to extract features from the data to be processed to obtain data features; based on the data features, to match and obtain a target watermark extraction algorithm corresponding to the data to be processed; to extract watermarks from the data to be processed based on the target watermark extraction algorithm to obtain watermark information embedded in the data to be processed.

[0053] Traditional watermark extraction methods typically require prior knowledge of the extraction algorithm. For example, knowing that a discrete cosine transform (DCT) is used during the embedding stage allows the determination of the appropriate DCT algorithm for extraction. Alternatively, the header information of the embedded data may store metadata such as algorithm type, parameters, or keys. Reading this metadata during extraction allows the identification of the corresponding extraction algorithm. Therefore, existing watermark extraction methods struggle to successfully extract watermark information when the embedding algorithm is unknown, exhibiting poor general applicability for extracting embedded watermark data.

[0054] This application provides a solution whereby different embedding algorithms alter the content of the data being processed differently. Therefore, this application analyzes the data characteristics of the data being processed during watermark extraction to determine the watermark embedding method used. This allows for the matching of a corresponding target watermark extraction algorithm to extract the embedded watermark information from the data. Compared to existing watermark extraction methods, this application, through feature extraction and matching strategies, can accurately extract watermark information even when the embedding algorithm is unknown. It exhibits good universality and effectively improves the versatility of extracting embedded watermark data.

[0055] Based on this, the embodiments of this application provide a watermark extraction method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the watermark extraction method of this application.

[0056] In this embodiment, the watermark extraction method includes steps S10 to S30:

[0057] Step S10: Obtain the data to be processed and extract features from the data to be processed to obtain data features;

[0058] It should be noted that the data to be processed is the data for which watermark extraction is expected, and the data to be processed contains embedded watermark information.

[0059] Additionally, it should be noted that the data features include at least carrier type features, and may also include at least one of the following: frequency domain energy distribution features, spatial domain information entropy features, anti-attack performance features, and attack trace features. The carrier type feature describes the type of content of the data to be processed, such as documents, images, audio, video, web pages, databases, etc. The frequency domain energy distribution feature describes the energy distribution of the data to be processed in different frequency bands, such as energy mean, standard deviation, and energy concentration bands. The spatial domain information entropy feature describes the spatial information entropy of the data to be processed, characterizing the complexity of information in the spatial domain. The anti-attack performance feature describes the resistance of the data to attacks (such as compression, noise, geometric transformations, etc.). The attack trace feature describes the type of attack suffered by the data to be processed.

[0060] In this embodiment, after obtaining the data to be processed for watermark extraction, feature extraction can be performed on the data to obtain data features. The extraction operation corresponding to the feature extraction process can be determined according to the type of the data features. For example, taking the data feature as a carrier type feature, this embodiment can obtain the type of carrier content in the data to be processed through file header information (such as a file header signature of 89 50 4E 47=PNG), or this embodiment can also use semantic analysis tools (such as OpenCV, FFmpeg) to parse the carrier content in the data to be processed to obtain the type of carrier content in the data to be processed, thereby using the type of carrier content in the data to be processed as the carrier type feature. Taking the data feature as a frequency domain energy distribution feature, this embodiment can perform Fourier transform, wavelet transform, or other transformations on the data to be processed to transform the data to be processed into the frequency domain, and statistically analyze the energy distribution of each frequency component in the frequency domain to obtain the frequency domain energy distribution feature. For example, this embodiment can divide the frequency domain into low frequency, mid frequency, and high frequency, calculate the energy proportion of each region, and obtain the frequency band energy distribution feature.

[0061] Step S20: Based on the data features, a target watermark extraction algorithm corresponding to the data to be processed is obtained;

[0062] It should be noted that the watermarking algorithms available for different carrier types are shown in the table below ("√" indicates that the carrier type is applicable, and "×" indicates that the carrier type is not applicable):

[0063]

[0064] Therefore, in scenarios where a corresponding watermarking algorithm is selected for different carrier types, the data features can include only the carrier type features. This embodiment can pre-construct a mapping table between carrier types and watermarking algorithms. Thus, this embodiment can query the mapping table based on the carrier type features to obtain the watermark extraction algorithm matching the carrier type features as the target watermark extraction algorithm.

[0065] Regarding frequency domain energy distribution, frequency domain watermarking algorithms (such as Discrete Cosine Transform and Discrete Wavelet Transform watermarking algorithms) embed watermarks in specific frequency bands, altering the energy of those bands. Spatial domain watermarking algorithms (such as Least Significant Bit watermarking and Patchwork watermarking algorithms) have a smaller impact on frequency domain energy. Regarding spatial domain information entropy, which reflects the complexity of information in the spatial domain (such as the randomness of pixel values), spatial domain watermarking algorithms (such as Least Significant Bit watermarking algorithms) affect spatial information entropy. Least Significant Bit watermarking algorithms modify the least significant bit in the spatial domain, slightly increasing information entropy. Frequency domain watermarking algorithms, however, may have a smaller impact on the overall distribution of pixels in the spatial domain, resulting in minimal change in information entropy. In terms of attack resistance, frequency domain methods are generally more robust, resisting compression and filtering, while spatial domain methods, such as Least Significant Bit watermarking algorithms, are more susceptible to these attacks. Regarding attack traces, different embedding methods leave different traces after being attacked. For example, filtering may erase high-frequency watermarks, leading to frequency domain energy anomalies, while the least significant bit watermarking algorithm may show statistical anomalies in the spatial domain after being attacked. Therefore, the data features described in this embodiment can also include features such as frequency domain energy distribution features, spatial domain information entropy features, anti-attack performance features, and attack trace features. Furthermore, classification models such as convolutional neural networks and decision tree models can be used to predict the data features and match them to obtain the target watermark extraction algorithm corresponding to the data to be processed. Thus, this embodiment fuses multiple dimensions to match watermark extraction algorithms, effectively improving the matching accuracy of watermark extraction algorithms.

[0066] In one feasible embodiment, step S20 includes step S21:

[0067] Step S31: Input the data features into a predetermined decision tree model to obtain a target watermark extraction algorithm that matches the data to be processed. The predetermined decision tree model includes a decision tree network and an attention module. The attention module is used to adjust the feature weights of the decision tree network based on the data features.

[0068] In this embodiment, the predetermined decision tree model includes a decision tree network and an attention module. The attention module is used to adjust the feature weights of the decision tree network based on the data features. For example, the decision tree network can be a gradient boosting tree, and the attention module can be a Transformer network. The input of the Transformer network is the data features, and the output is the attention weights of the decision tree network. The attention weights describe the weight values ​​associated with each feature in the data features. After the data features are input into the predetermined decision tree model, the decision tree network calculates the importance of each feature in the data features, generating initial feature weights. Then, the attention module generates corresponding attention weights based on the data features and passes these feature weights to the decision tree network. The decision tree network can then adjust the initial feature weights based on the attention weights output by the attention module to obtain final feature weights (such as the product of the attention weights and the initial feature weights). Based on these feature weights, it makes decisions about the data features and predicts a target watermark extraction algorithm that matches the data to be processed. This embodiment achieves dynamic allocation of feature weights by adjusting the feature weights of the decision tree network based on the data features through the attention module, effectively improving the matching accuracy of the watermark extraction algorithm.

[0069] Step S30: Extract watermarks from the data to be processed based on the target watermark extraction algorithm to obtain the watermark information embedded in the data to be processed.

[0070] After obtaining a target watermark extraction algorithm that matches the data to be processed, this embodiment can call the target watermark extraction algorithm and extract the watermark from the data to be processed according to the predetermined extraction parameters corresponding to the target watermark extraction algorithm to obtain the watermark information embedded in the data to be processed. Further, to improve the success rate of watermark information extraction, this embodiment can also use a predetermined search algorithm to search for the optimal extraction parameters based on the data features. This predetermined search algorithm can employ algorithms such as Bayesian optimization, Monte Carlo tree search, genetic algorithm, particle swarm optimization, and multi-objective evolutionary algorithm, which can achieve the search for the optimal extraction parameters based on the data features. The search algorithm for the optimal extraction parameters can be selected according to specific needs, such as balancing computational efficiency, global search capability, multi-objective support, and implementation complexity. For example, this embodiment can use a hybrid strategy, such as Bayesian optimization + Monte Carlo tree search, or Bayesian optimization + genetic algorithm. Then, this embodiment extracts the watermark from the data to be processed according to the target watermark extraction algorithm and the optimal extraction parameters to obtain the watermark information embedded in the data to be processed. After obtaining the watermark information, this embodiment can display the watermark information, such as the watermark addition time, the object to which it was added, and the watermark content.

[0071] The first embodiment of this application provides a watermark extraction method. By acquiring data to be processed and extracting features from the data, data features are obtained. Since different embedding algorithms alter the carrier content in the data to be processed differently, this embodiment determines relevant features of the data to be processed based on these data features. Therefore, by leveraging the differences in data features caused by the embedding algorithms, a target watermark extraction algorithm corresponding to the data to be processed can be matched. Furthermore, this embodiment can extract the watermark from the data to be processed based on the matched target watermark extraction algorithm to obtain the watermark information embedded in the data. Because different embedding algorithms alter the carrier content in the data to be processed differently, this embodiment analyzes the data features of the data to be processed during watermark extraction to determine the watermark embedding method used in the data. This allows for the matching of a corresponding target watermark extraction algorithm to extract the watermark information embedded in the data. Compared to existing watermark extraction methods, this embodiment can accurately extract watermark information even when the embedding algorithm is unknown, through feature extraction and matching strategies. It has good universality and effectively improves the versatility of extracting embedded watermark data.

[0072] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 Step S10 includes steps S11 to S16:

[0073] Step S11: Identify the data type of the data to be processed to obtain the carrier type characteristics;

[0074] Step S12: Perform an anti-attack assessment on the data to be processed to obtain anti-attack performance characteristics;

[0075] Step S13: Perform spectral analysis on the data to be processed to obtain the frequency domain energy distribution characteristics;

[0076] Step S14: Quantize the spatial domain of the data to be processed to obtain the spatial domain information entropy feature;

[0077] Step S15: Perform attack trace detection on the data to be processed to obtain attack trace features;

[0078] Step S16: The carrier type feature, the frequency domain energy distribution feature, the spatial domain information entropy feature, the anti-attack performance feature, and the attack trace feature are used as data features.

[0079] Regarding carrier type characteristics, this embodiment can obtain the type of carrier content in the data to be processed through file header information (such as a file header signature of 89 50 4E 47=PNG). Alternatively, this embodiment can also use semantic analysis tools (such as OpenCV or FFmpeg) to parse the carrier content in the data to be processed to obtain the type of carrier content, thereby using the type of carrier content in the data to be processed as the carrier type characteristic. Regarding anti-attack performance characteristics, this embodiment can calculate the signal-to-noise ratio of the data before and after compression by compressing the data to be processed using a standard compression algorithm, as the anti-compression performance. This embodiment can also inject specific types and intensities of noise (such as Gaussian noise or salt-and-pepper noise) into the data to be processed and calculate the structural similarity as the noise resistance performance. This embodiment can also perform geometric transformations on the data to be processed, such as rotation (e.g., ±15°, ±30°), scaling (e.g., 80%, 110%), or cropping (e.g., removing 20% ​​of the edges, removing 10% of the edges on one side), and then use algorithms such as SIFT (Scale-Invariant Feature Transform) and SURF (Speeded-Up Robust Features) to extract key points of the data before and after the geometric transformation, calculate the number and proportion of matching key points, and use this as the geometric transformation resistance performance. At least one of the compression resistance, noise resistance, and geometric transformation resistance performance is used as the attack resistance performance feature. For frequency domain energy distribution features, this embodiment can perform Fourier transform, wavelet transform, or other transformations on the data to be processed to transform it into the frequency domain, and statistically analyze the energy distribution of each frequency component in the frequency domain to obtain the frequency domain energy distribution features. For example, this embodiment can divide the frequency domain into low frequency, mid frequency, and high frequency, calculate the energy proportion of each region, and obtain the frequency band energy distribution features. For spatial entropy features, this embodiment can divide the data to be processed into blocks (e.g., dividing an image into 8×8 blocks, or a video into blocks based on keyframes), calculate the Shannon entropy of each block (high entropy values ​​indicate complex textures), and then generate the corresponding entropy distribution histogram (e.g., [0.2, 0.5, 0.3] represents the proportion of low / medium / high entropy regions) as spatial entropy features. For attack trace features, this embodiment can pre-train a classification model to classify attack traces, such as convolutional neural networks, decision tree models, ResNet (Residual Network) models, etc. Attack trace detection (e.g., compression attacks, noise attacks, etc.) is performed based on the pre-trained classification model, and the attack type label is output as the attack trace feature.Therefore, in this embodiment, the carrier type feature, the frequency domain energy distribution feature, the spatial domain information entropy feature, the anti-attack performance feature, and the attack trace feature can be used as data features. For example, in this embodiment, the carrier type feature, the frequency domain energy distribution feature, the spatial domain information entropy feature, the anti-attack performance feature, and the attack trace feature can be converted into feature vectors respectively, and then the feature vectors can be fused into a data feature matrix as data features.

[0080] In some embodiments, step S15 includes steps A10 to A20:

[0081] Step A10: Input the data to be processed into a predetermined classification model to obtain the attack type;

[0082] Step A20: The attack type is used as an attack trace feature.

[0083] It should be noted that the predetermined classification model is a model used to classify the types of attacks on the data to be processed, such as convolutional neural networks, decision tree models, residual networks, etc. The predetermined classification model is trained from an attack classification sample set, which includes attacked samples and their corresponding attack type labels. The attack samples are watermarked data after being attacked (such as compression attacks, noise attacks, geometric transformation attacks, etc.).

[0084] In this embodiment, the data to be processed can be converted into a feature matrix and then input into a predetermined classification model. The predetermined classification model can then identify the attack type corresponding to the data to be processed (i.e., the type of attack the data to be processed is subjected to) based on the feature matrix, and then use the attack type as an attack trace feature.

[0085] In some embodiments, steps B10 to B30 are included before step A10:

[0086] Step B10: Obtain sample data and embed a watermark into the sample data to obtain a watermark data sample;

[0087] Step B20: Perform an attack simulation operation on the watermark data sample to obtain an attack data sample, wherein the attack simulation operation includes at least one of a compression attack operation, a noise attack operation, and a geometric transformation operation.

[0088] Step B30: Based on the attack data sample, train the initial classification model to obtain the predetermined classification model.

[0089] like Figure 3As shown, in this embodiment, after obtaining clean sample data (i.e., watermark data that has not been attacked), a predetermined watermark embedding algorithm can be used to embed the watermark into the sample data to obtain a watermark data sample. Furthermore, this embodiment can perform at least one of the following attack simulation operations on the watermark data sample: compression attack, noise attack, and geometric transformation, to obtain a watermark data sample after the attack simulation operation and its attack type label as an attack data sample. Based on the attack data sample, this embodiment can train an initialization classification model to obtain a predetermined classification model. The initialization classification model is a classification model in its initial state. For example, the attack data sample and the sample data can be mixed in a predetermined ratio to form a training sample set. After training the initialization classification model based on the training sample set, a loss-converged initialization classification model is obtained. The loss-converged initialization classification model is validated and evaluated. If the evaluation passes, the loss-converged initialization classification model can be used as the predetermined classification model and deployed for attack type detection. If the evaluation fails, the initialization classification model can be retrained based on the training sample set until the loss-converged initialization classification model passes the evaluation. Compared to training with watermarked data that has not been attacked and watermarked data that has been attacked, this embodiment can quickly generate a batch of watermarked data after an attack to achieve data augmentation and improve model training efficiency.

[0090] In the second embodiment of this application, the carrier type feature is obtained by identifying the data type of the data to be processed; the anti-attack performance feature is obtained by evaluating the anti-attack performance of the data to be processed; the frequency domain energy distribution feature is obtained by performing spectral analysis on the data to be processed; the spatial domain information entropy feature is obtained by quantizing the data to be processed; and the attack trace feature is obtained by detecting attack traces on the data to be processed. The carrier type feature, the frequency domain energy distribution feature, the spatial domain information entropy feature, the anti-attack performance feature, and the attack trace feature are used as data features. This embodiment describes the features of the data to be processed from multiple dimensions such as data type, frequency domain energy distribution, spatial domain information entropy, anti-attack performance, and attack traces, thereby improving the richness of data features and further improving the matching accuracy of the target watermark extraction algorithm.

[0091] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 4 Step S30 includes steps S31 to S32:

[0092] Step S31: Based on the data features, search for the optimal extraction parameters;

[0093] Step S32: Based on the target watermark extraction algorithm, watermark extraction is performed on the data to be processed according to the optimal extraction parameters to obtain the watermark information embedded in the data to be processed.

[0094] This embodiment can also use a predetermined search algorithm to search for optimal extraction parameters based on the data features. This predetermined search algorithm can employ algorithms such as Bayesian optimization, Monte Carlo tree search, genetic algorithms, particle swarm optimization, and multi-objective evolutionary algorithms, all capable of searching for optimal extraction parameters based on the data features. The search algorithm for the optimal extraction parameters can be selected according to specific needs, such as balancing computational efficiency, global search capability, multi-objective support, and implementation complexity. For example, this embodiment can employ a hybrid strategy, such as Bayesian optimization + Monte Carlo tree search, or Bayesian optimization + genetic algorithm. Furthermore, this embodiment uses the target watermark extraction algorithm and the optimal extraction parameters to extract the watermark from the data to be processed, obtaining the watermark information embedded in the data.

[0095] In some embodiments, step S31 includes steps C10 to C60:

[0096] Step C10: Obtain a predetermined parameter space, wherein the predetermined parameter space consists of each extracted parameter and its value range;

[0097] Step C20: Sample the predetermined parameter space to obtain the extracted parameter set;

[0098] Step C30: Based on the data features, calculate the objective function value of the extraction parameter set, wherein the objective function value is the value of the objective function, and the objective function includes an extraction success rate term, a complexity constraint term, and a robustness term;

[0099] Step C40: Based on the objective function value, determine whether the objective function has converged;

[0100] Step C50: After the objective function converges, the extracted parameter set is taken as the optimal extracted parameters;

[0101] Step C60: After the objective function fails to converge, the following step is performed: sampling the predetermined parameter space to obtain the extracted parameter set.

[0102] It should be noted that the predetermined parameter space consists of each extracted parameter and its value range. That is, one dimension of the predetermined parameter space is an extracted parameter, and the range of that dimension is the value range of that extracted parameter.

[0103] It should also be noted that the objective function includes an extraction success rate term, a complexity constraint term, and a robustness term. The extraction success rate term describes the success rate of watermark extraction based on the extraction parameter set for the data to be processed with the specified data characteristics. The complexity constraint term describes the computational complexity (such as time and resource consumption) of watermark extraction based on the extraction parameter set, and may include a first weight coefficient λ to control the tolerance for complexity. The robustness term describes the robustness of watermark extraction based on the extraction parameter set, and may include a second weight coefficient μ to reflect the degree of importance attached to robustness. For example, the objective function = max[P(Success|θ,D) - λQ(θ) + μRobustness(θ)]. Where θ represents the extraction parameter set, including parameters such as watermark strength and frequency band selection; D represents the data features of the data to be processed; P(Success|θ, D) is the extraction success rate term, which can be a probabilistic prediction model (such as random forest or neural network) used to predict the extraction success rate based on the extraction parameter set and data features; Q(θ) is the complexity constraint term; and Robustness(θ) is the robustness term. Therefore, the objective function, including the extraction success rate term, complexity constraint term, and robustness term, balances extraction success rate, complexity, and robustness.

[0104] like Figure 5As shown, this embodiment first obtains a predetermined parameter space, which consists of each extraction parameter and its value range. Then, the predetermined parameter space is sampled, and a set of extraction parameter values ​​is selected from the value ranges of each extraction parameter in the predetermined parameter space, i.e., the extraction parameter set. Since the objective function includes an extraction success rate term, a complexity constraint term, and a robustness term, this embodiment can calculate the fusion representation value (i.e., the objective function value) of the extraction success rate, complexity, and robustness under the extraction parameter set based on the data characteristics. This embodiment can use a Pareto optimal solution search strategy combined with Monte Carlo tree search to achieve fast convergence of the objective function. Based on the objective function value, it is determined whether the objective function has converged. If the stability of the Pareto front obtained based on the objective function value is stable, the objective function is determined to have converged; if it is unstable, the objective function is determined not to have converged. The stability of the Pareto front can be characterized by features such as the rate of change of front members, hypervolume stability, and solution set distribution density. After the objective function converges, the extraction parameter set is taken as the optimal extraction parameters. If the objective function fails to converge, this embodiment can proceed with the following steps: sampling the predetermined parameter space to obtain an extraction parameter set, and resampling to obtain a new extraction parameter set. The adjustment of the extraction parameter set during resampling can be a combination of Monte Carlo tree search and Bayesian optimization. In this embodiment, the objective function provides an extraction success rate term, a complexity constraint term, and a robustness term, thereby effectively balancing the success rate, complexity, and robustness of the finally selected optimal extraction parameters.

[0105] In the third embodiment of this application, the optimal extraction parameters are obtained by searching based on the data features. Then, based on the target watermark extraction algorithm, the watermark is extracted from the data to be processed according to the optimal extraction parameters to obtain the watermark information embedded in the data to be processed. Compared with using fixed extraction parameters, this embodiment can dynamically and adaptively optimize the optimal extraction parameters based on the data features of the data to be processed, achieving accurate extraction parameter matching. This not only effectively improves the stable extraction rate of watermark information, but also achieves maximum watermark information extraction under different conditions (such as whether or not it is attacked, the method of attack, the embedding strength, the embedding position, etc.), realizing the generalization ability of watermark extraction in complex scenarios.

[0106] This application provides a watermark extraction device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the watermark extraction method in Embodiment 1 above.

[0107] The following is for reference. Figure 6 The diagram illustrates a structural schematic of a watermark extraction device suitable for implementing embodiments of this application. The watermark extraction device in the embodiments of this application may include, but is not limited to, terminals such as mobile phones, laptops, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), and desktop computers. Figure 6 The watermark extraction device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0108] like Figure 6 As shown, the watermark extraction device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1002 or a program loaded from storage device 1003 into random access memory (RAM) 1004. The random access memory 1004 also stores various programs and data required for the operation of the watermark extraction device. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An I / O (input / output) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the watermark extraction device to communicate wirelessly or wiredly with other devices to exchange data. Although watermark extraction devices with various systems are shown in the figures, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems can be implemented alternatively.

[0109] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0110] The watermark extraction device provided in this application, employing the watermark extraction method described in the above embodiments, can solve the technical problem of poor universality in extracting embedded watermark data using existing watermark extraction methods. Compared with the prior art, the beneficial effects of the watermark extraction device provided in this application are the same as those of the watermark extraction method provided in the above embodiments, and other technical features of this watermark extraction device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0111] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0112] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0113] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the watermark extraction method described in the above embodiments.

[0114] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0115] The aforementioned computer-readable storage medium may be included in the watermark extraction device; or it may exist independently and not assembled into the watermark extraction device.

[0116] The aforementioned computer-readable storage medium carries one or more programs. When the one or more programs are executed by the watermark extraction device, the watermark extraction device: acquires data to be processed and extracts features from the data to be processed to obtain data features; based on the data features, matches and obtains a target watermark extraction algorithm corresponding to the data to be processed; and performs watermark extraction on the data to be processed based on the target watermark extraction algorithm to obtain watermark information embedded in the data to be processed.

[0117] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0118] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0119] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0120] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described watermark extraction method, which can solve the technical problem that existing watermark extraction methods have poor universality in extracting embedded watermark data. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the watermark extraction method provided in the above embodiments, and will not be repeated here.

[0121] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the watermark extraction method described above.

[0122] The computer program product provided in this application can solve the technical problem that existing watermark extraction methods have poor versatility in extracting embedded watermark data. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the watermark extraction methods provided in the above embodiments, and will not be repeated here.

[0123] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A watermark extraction method, characterized in that, The watermark extraction method includes: Acquire the data to be processed, and extract features from the data to obtain data features; Based on the data features, a target watermark extraction algorithm corresponding to the data to be processed is obtained; Based on the target watermark extraction algorithm, watermark extraction is performed on the data to be processed to obtain the watermark information embedded in the data to be processed. The step of extracting features from the data to be processed to obtain data features includes: The data type of the data to be processed is identified to obtain the carrier type characteristics; The anti-attack performance characteristics of the data to be processed are obtained by performing an anti-attack assessment. Spectral analysis is performed on the data to be processed to obtain the frequency domain energy distribution characteristics; The spatial domain of the data to be processed is quantized to obtain the spatial domain information entropy feature; Attack trace detection is performed on the data to be processed to obtain attack trace features; The carrier type feature, the frequency domain energy distribution feature, the spatial domain information entropy feature, the anti-attack performance feature, and the attack trace feature are used as data features.

2. The watermark extraction method as described in claim 1, characterized in that, The step of detecting attack traces in the data to be processed to obtain attack trace features includes: The data to be processed is input into a predetermined classification model to obtain the attack type; The attack type is used as an attack trace feature.

3. The watermark extraction method as described in claim 2, characterized in that, Before the step of inputting the data to be processed into a predetermined classification model to obtain the attack type, the following steps are included: Obtain sample data and embed a watermark into the sample data to obtain a watermark data sample; An attack simulation operation is performed on the watermarked data sample to obtain an attack data sample, wherein the attack simulation operation includes at least one of compression attack operation, noise attack operation and geometric transformation operation; Based on the attack data samples, the initial classification model is trained to obtain the predetermined classification model.

4. The watermark extraction method as described in claim 1, characterized in that, The step of matching the target watermark extraction algorithm corresponding to the data to be processed based on the data features includes: The data features are input into a predetermined decision tree model to obtain a target watermark extraction algorithm that matches the data to be processed. The predetermined decision tree model includes a decision tree network and an attention module. The attention module is used to adjust the feature weights of the decision tree network based on the data features.

5. The watermark extraction method according to any one of claims 1 to 4, characterized in that, The step of extracting watermarks from the data to be processed based on the target watermark extraction algorithm to obtain the watermark information embedded in the data to be processed includes: Based on the data characteristics, the optimal extraction parameters are obtained through searching. Based on the target watermark extraction algorithm, the watermark is extracted from the data to be processed according to the optimal extraction parameters to obtain the watermark information embedded in the data to be processed.

6. The watermark extraction method as described in claim 5, characterized in that, The step of searching for the optimal extraction parameters based on the data features includes: Obtain a predetermined parameter space, wherein the predetermined parameter space consists of each extracted parameter and its value range; The predetermined parameter space is sampled to obtain the extracted parameter set; Based on the data characteristics, the objective function value of the extraction parameter set is calculated, wherein the objective function value is the value of the objective function, and the objective function includes an extraction success rate term, a complexity constraint term, and a robustness term; Based on the objective function value, determine whether the objective function has converged; After the objective function converges, the extracted parameter set is taken as the optimal extracted parameters; If the objective function fails to converge, the following step is performed: sampling the predetermined parameter space to obtain the extracted parameter set.

7. A watermark extraction device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the watermark extraction method as described in any one of claims 1 to 6.

8. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the watermark extraction method as described in any one of claims 1 to 6.

9. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the watermark extraction method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Database digital watermark adaptive selection method, system and device and storage medium

    CN114611077A

  • Image application method and device for generating watermarks in underground coal mine

    CN117893392A