Watermark extraction method and 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 watermark extraction methods under unknown embedding algorithms in the existing technology is solved, and efficient watermark information extraction is achieved under different data types.
Patent Information
- Application Number
- CN202511311893.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-15
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2045-09-15
AI Technical Summary
Existing watermark extraction methods struggle to extract watermark information when the embedding algorithm is unknown, resulting in poor versatility.
By extracting features from the data to be processed, we obtain features such as carrier type, frequency domain energy distribution, spatial domain information entropy, anti-attack performance, and attack traces. We then use decision tree models and attention modules to match the target watermark extraction algorithm and determine the optimal extraction parameters for watermark extraction through search algorithms such as Bayesian optimization.
Even when the embedding algorithm is unknown, it can accurately extract watermark information, improving the universality and success rate of watermark extraction and enhancing the versatility of embedded watermark data.
Smart Images

Figure CN120893024A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of digital watermarking, and particularly relates to a watermark extraction method and device, a storage medium and a computer readable storage medium. BACKGROUND
[0002] As a core supporting means of digital copyright protection, digital watermarking technology has formed an application system covering all fields of multimedia. The current mainstream technology architecture is based on discrete cosine transform, wavelet transform and other methods, and realizes content tracing through the embedding and extraction of invisible marks.
[0003] Traditional watermark extraction methods usually need to know the extraction algorithm in advance. For example, if it is known that the discrete cosine transform is used in the embedding stage, then the corresponding discrete cosine transform domain algorithm needs to be used for extraction. Or the algorithm type, parameters or key metadata are stored in the header information of the embedded data. Therefore, by reading these metadata first, the corresponding extraction algorithm can be determined. Therefore, the existing watermark extraction method is difficult to successfully extract the watermark information in the case of unknown embedding algorithm, that is, there is a problem of poor extraction universality for embedded watermark data.
[0004] The above content is only used to assist in understanding the technical solutions of the present application and does not represent the acknowledgement of the above content as prior art. SUMMARY
[0005] The main purpose of the present application is to provide a watermark extraction method, device, storage medium and computer readable storage medium, which aims to solve the technical problem of poor extraction universality of existing watermark extraction methods for embedded watermark data.
[0006] To achieve the above purpose, the present application provides a watermark extraction method, which comprises: Obtaining to-be-processed data, and extracting features of 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; 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.
[0007] In an embodiment, the step of extracting features of the to-be-processed data to obtain data features comprises: Identifying the data type of the to-be-processed data to obtain a carrier type feature; Performing attack resistance evaluation on the to-be-processed data to obtain an attack resistance performance feature; Performing frequency spectrum analysis on the to-be-processed data to obtain a frequency domain energy distribution feature; quantizing a spatial domain of the to-be-processed data to obtain a spatial domain information entropy feature; detecting attack traces of the to-be-processed data to obtain an attack trace feature; taking the carrier type feature, the frequency domain energy distribution feature, the spatial domain information entropy feature, the attack resistance performance feature, and the attack trace feature as data features.
[0008] In an embodiment, the step of detecting attack traces of the to-be-processed data to obtain an attack trace feature comprises: inputting the to-be-processed data into a predetermined classification model to obtain an attack type; taking the attack type as an attack trace feature.
[0009] In an embodiment, before the step of inputting the to-be-processed data into a predetermined classification model to obtain an attack type, the method comprises: obtaining sample data, and embedding a watermark in the sample data to obtain a watermark data sample; performing attack simulation operations on the watermark data sample to obtain attack data samples, wherein the attack simulation operations comprise at least one of compression attack operations, noise attack operations, and geometric transformation operations; training an initialized classification model based on the attack data samples to obtain a predetermined classification model.
[0010] In an embodiment, the step of matching a target watermark extraction algorithm corresponding to the to-be-processed data based on the data features comprises: inputting the data features into a predetermined decision tree model to obtain a target watermark extraction algorithm matched with the to-be-processed data, wherein the predetermined decision tree model comprises a decision tree network and an attention module, and the attention module is configured to adjust feature weights of the decision tree network based on the data features.
[0011] In an embodiment, the step of extracting a watermark from the to-be-processed data based on the target watermark extraction algorithm to obtain watermark information embedded in the to-be-processed data comprises: searching for optimal extraction parameters based on the data features; extracting a watermark from the to-be-processed data based on the target watermark extraction algorithm and the optimal extraction parameters to obtain watermark information embedded in the to-be-processed data.
[0012] In an embodiment, the step of searching for optimal extraction parameters based on the data features comprises: obtaining a predetermined parameter space, wherein the predetermined parameter space is composed of each extraction parameter and a value range thereof; sampling the predetermined parameter space to obtain an extraction parameter group; calculating a target function value of the extraction parameter group based on the data feature, wherein the target function value is a value of a target function, and the target function comprises an extraction success rate item, a complexity constraint item and a robustness item; judging whether the target function converges based on the target function value; after the target function converges, taking the extraction parameter group as an optimal extraction parameter; after the target function does not converge, performing the step of sampling the predetermined parameter space to obtain an extraction parameter group.
[0013] In addition, to achieve the above object, the present application further provides a watermark extraction device, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the watermark extraction method as described above.
[0014] In addition, to achieve the above object, the present application further provides a storage medium, which is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the watermark extraction method as described above.
[0015] In addition, to achieve the above object, the present application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps of the watermark extraction method as described above.
[0016] The one or more technical solutions provided by the present application have at least the following technical effects: The application can obtain to-be-processed data, perform feature extraction on the to-be-processed data, and obtain data features. Since different embedding algorithms have differences in changes to carrier content in the to-be-processed data, the application determines relevant features of the to-be-processed data based on the data features, so that the target watermark extraction algorithm corresponding to the to-be-processed data can be matched by means of the differences in data features caused by embedding algorithms. Then, the application can perform watermark extraction on the to-be-processed data based on the matched target watermark extraction algorithm, and obtain the watermark information embedded in the to-be-processed data. Since different embedding algorithms have differences in changes to carrier content in the to-be-processed data, the application analyzes the data features of the to-be-processed data when extracting the watermark, determines the watermark embedding mode adopted by the to-be-processed data, and thus the corresponding target watermark extraction algorithm can be matched to extract the watermark information embedded in the to-be-processed data. Compared with the existing watermark extraction method, the application can still accurately extract the watermark information in the case where the embedding algorithm is unknown by means of the feature extraction and matching strategy, has good universality, and effectively improves the extraction universality of embedded watermark data. BRIEF DESCRIPTION OF DRAWINGS
[0017] The accompanying drawings, which are incorporated into and form a part of the specification, illustrate an embodiment consistent with the application and, together with the description, serve to explain the principles of the application.
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, for those skilled in the art, other drawings can also be obtained based on these drawings without creative labor.
[0019] Figure 1 A flowchart provided for the watermark extraction method embodiment one of the application; Figure 2 A flowchart provided for the watermark extraction method embodiment two of the application; Figure 3 A training scene diagram of the predetermined classification model related to the embodiment of the application; Figure 4 A flowchart provided for the watermark extraction method embodiment three of the application; Figure 5 A search scene diagram of the optimal extraction parameter related to the embodiment of the application; Figure 6 A structure diagram of the watermark extraction device in the embodiment of the application.
[0020] The object implementation, functional characteristics and advantages of the application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0021] It should be understood that the specific embodiments described herein are merely exemplary of the application and do not limit the application.
[0022] In order to better understand the technical solutions of the present application, the following will be described in detail in conjunction with the drawings and specific embodiments.
[0023] The main solution of the embodiment of the present application is: obtaining 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; 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.
[0024] Since the traditional watermark extraction method usually needs to know the extraction algorithm in advance, for example, it is known that the discrete cosine transform is used in the embedding stage, then it can be determined that the corresponding discrete cosine transform domain algorithm needs to be used when extracting. Or the algorithm type, parameters or key metadata are stored in the header information of the embedded data. Therefore, when extracting, these metadata are read first, and then the corresponding extraction algorithm can be determined. Therefore, the existing watermark extraction method is difficult to successfully extract the watermark information in the case of unknown embedding algorithm, that is, there is a problem of poor extraction universality for embedded watermark data.
[0025] The present application provides a solution. Since different embedding algorithms have differences in changing the carrier content in the to-be-processed data, the present application analyzes the data features of the to-be-processed data when extracting the watermark, determines the watermark embedding method used by the to-be-processed data, and thus matches the corresponding target watermark extraction algorithm to extract the watermark information embedded in the to-be-processed data. Compared with the existing watermark extraction method, the present application can still accurately extract the watermark information in the case of unknown embedding algorithm through the strategy of feature extraction and matching, has good universality, and effectively improves the extraction universality for embedded watermark data.
[0026] Based on this, the embodiment of the present application provides a watermark extraction method, which refers to Figure 1 , Figure 1 is a flowchart of the first embodiment of the watermark extraction method of the present application.
[0027] In this embodiment, the watermark extraction method includes steps S10-S30: Step S10, obtaining to-be-processed data, and performing feature extraction on the to-be-processed data to obtain data features; It should be noted that the to-be-processed data is data expected to be subjected to watermark extraction processing, and the to-be-processed data is embedded with watermark information.
[0028] In addition, it should be noted that the data feature at least includes a carrier type feature, and can further include at least one of a frequency energy distribution feature, a spatial information entropy feature, an attack resistance performance feature, and an attack trace feature. The carrier type feature is used to describe the type of the carrier content of the to-be-processed data, such as a document, an image, an audio, a video, a webpage, a database, and the like. The frequency energy distribution feature is used to describe the distribution of energy of the to-be-processed data on different frequency bands, such as energy mean value, standard deviation, energy concentrated frequency band, and the like. The spatial information entropy feature is used to describe the information entropy of the to-be-processed data in space, which represents the complexity of information in the spatial domain. The attack resistance performance feature is used to describe the performance of the to-be-processed data in resisting attacks (such as compression, noise, geometric transformation, and the like). The attack trace feature is used to describe the type of attack on the to-be-processed data.
[0029] After obtaining the to-be-processed data expected to be subjected to watermark extraction processing, the embodiment can perform feature extraction on the to-be-processed data to obtain a data feature. The extraction operation corresponding to the feature extraction processing can be determined according to the type of the data feature. For example, taking the data feature as a carrier type feature, the embodiment can obtain the type of the carrier content in the to-be-processed data through file header information (such as file header signature 89 50 4E 47=PNG), or the embodiment can parse the carrier content in the to-be-processed data through a semantic analysis tool (such as OpenCV, FFmpeg) to obtain the type of the carrier content in the to-be-processed data, thereby taking the type of the carrier content in the to-be-processed data as the carrier type feature. For example, taking the data feature as a frequency energy distribution feature, the embodiment can perform Fourier transform, wavelet transform, and the like on the to-be-processed data to transform the to-be-processed data into a frequency domain, and statistically analyze the energy distribution of each frequency component in the frequency domain to obtain the frequency energy distribution feature. For example, the embodiment can divide the frequency domain into low frequency, medium frequency, and high frequency, respectively calculate the energy proportion of each region, and obtain the frequency band energy distribution feature.
[0030] In step S20, a target watermark extraction algorithm corresponding to the to-be-processed data is matched based on the data feature. It should be noted that the optional watermark algorithm for different carrier types is shown in the following table (“√” represents applicable to the carrier type, and “x” represents not applicable to the carrier type):
[0031] Therefore, in the scenario of selecting a corresponding watermark algorithm according to different carrier types, the data features can only include carrier type features. The embodiment can construct a mapping relationship table between carrier types and watermark algorithms in advance, so that the embodiment can query the mapping relationship table according to the carrier type features to obtain a watermark extraction algorithm matched with the carrier type features as a target watermark extraction algorithm.
[0032] In terms of frequency domain energy distribution, frequency domain watermark algorithms (such as discrete cosine transform and discrete wavelet transform watermark algorithms) can embed watermarks in specific frequency bands and change the energy of those frequency bands, while spatial domain watermark algorithms (such as least significant bit watermark algorithms and Patchwork watermark algorithms) have less impact on frequency domain energy. In terms of spatial domain information entropy, spatial domain information entropy reflects the complexity of information in the spatial domain (such as the randomness of pixel values), and spatial domain watermark algorithms (such as least significant bit watermark algorithms) can affect spatial domain information entropy. The least significant bit watermark algorithm modifies the least significant bits in the spatial domain, which slightly increases the information entropy. Frequency domain watermark algorithms may have less impact on the overall distribution of spatial domain pixels, so the information entropy changes little. In terms of attack resistance, frequency domain methods are usually more robust, such as resisting compression and filtering, while spatial domain methods such as least significant bit watermark algorithms are easily affected by these attacks. In terms of attack traces, different embedding methods leave different traces after being attacked, such as filtering, which can erase high-frequency watermarks, causing abnormal frequency domain energy, while least significant bit watermark algorithms may have statistical abnormalities in the spatial domain after being attacked. Therefore, the data features in the embodiment can also include frequency domain energy distribution features, spatial domain information entropy features, attack resistance performance features, and attack trace features, and the classification model such as the convolutional neural network and the decision tree model can be used to predict the data features to match the target watermark extraction algorithm corresponding to the to-be-processed data, so that the embodiment matches the watermark extraction algorithm from multiple dimensions, effectively improving the matching accuracy of the watermark extraction algorithm.
[0033] In a feasible embodiment, step S20 includes step S21: Step S31, inputting the data features into a predetermined decision tree model to obtain a target watermark extraction algorithm matched with the to-be-processed data, wherein the predetermined decision tree model includes a decision tree network and an attention module, and the attention module is used to adjust the feature weight of the decision tree network based on the data features.
[0034] 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 weight 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 weight of the decision tree network, and the attention weight describes the weight value of the correlation between the features in the data features. Therefore, after the data features are input into the predetermined decision tree model, the decision tree network calculates the feature importance of each feature in the data features to generate an initial feature weight, and then the attention module generates a corresponding attention weight based on the data features, and then the feature weight is transmitted to the decision tree network. Therefore, the decision tree network can adjust the initial feature weight based on the attention weight output by the attention module to obtain the final feature weight (such as the product of the attention weight and the initial feature weight), and then make a decision based on the feature weight. The data features are predicted to obtain the target watermark extraction algorithm matched with the to-be-processed data. In this embodiment, the attention module adjusts the feature weight of the decision tree network based on the data features, realizes the dynamic allocation of the feature weight, and effectively improves the matching accuracy of the watermark extraction algorithm.
[0035] Step S30, based on the target watermark extraction algorithm, the watermark information embedded in the to-be-processed data is obtained.
[0036] After obtaining the target watermark extraction algorithm matched with the to-be-processed data, this embodiment can call the target watermark extraction algorithm to extract the watermark information embedded in the to-be-processed data according to the predetermined extraction parameters corresponding to the target watermark extraction algorithm. Further, in order to improve the extraction success rate of the watermark information, this embodiment can also search for the optimal extraction parameter based on the data features by means of a predetermined search algorithm. The predetermined search algorithm can use algorithms that can search for the optimal extraction parameter based on the data features, such as Bayesian optimization, Monte Carlo tree search, genetic algorithm, particle swarm optimization, multi-objective evolutionary algorithm, etc. The search algorithm of the optimal extraction parameter can be selected according to specific requirements, for example, the calculation efficiency, global search ability, multi-objective support and implementation complexity can be balanced. For example, this embodiment can use a hybrid strategy, such as Bayesian optimization + Monte Carlo tree search, Bayesian optimization + genetic algorithm. Then, this embodiment extracts the watermark information embedded in the to-be-processed data according to the optimal extraction parameter based on the target watermark extraction algorithm. After obtaining the watermark information, this embodiment can display the watermark information, such as displaying the watermark adding time, adding object, watermark content and other information in the watermark information.
[0037] The first embodiment of the present application provides a watermark extraction method. The watermark extraction method includes the following steps: obtaining to-be-processed data, and performing feature extraction on the to-be-processed data to obtain data features. Since different embedding algorithms have differences in changing the carrier content in the to-be-processed data, the embodiment determines the relevant features of the to-be-processed data based on the data features, so that the target watermark extraction algorithm corresponding to the to-be-processed data can be matched by means of the differences in data features caused by embedding algorithms. Then, the embodiment can perform watermark extraction on the to-be-processed data based on the matched target watermark extraction algorithm to obtain the watermark information embedded in the to-be-processed data. Since different embedding algorithms have differences in changing the carrier content in the to-be-processed data, the embodiment analyzes the data features of the to-be-processed data when extracting the watermark to determine the watermark embedding method used by the to-be-processed data, so that the corresponding target watermark extraction algorithm can be matched to extract the watermark information embedded in the to-be-processed data. Compared with the existing watermark extraction method, the embodiment can still accurately extract the watermark information in the case where the embedding algorithm is unknown by means of the feature extraction and matching strategy, has good universality, and effectively improves the extraction universality of the embedded watermark data.
[0038] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as the above embodiment one can refer to the above introduction, and the subsequent will not be described in detail. On this basis, please refer to Figure 2 , step S10 includes steps S11-S16: Step S11, identifying the data type of the to-be-processed data to obtain a carrier type feature; Step S12, performing attack resistance evaluation on the to-be-processed data to obtain an attack resistance performance feature; Step S13, performing frequency spectrum analysis on the to-be-processed data to obtain a frequency domain energy distribution feature; Step S14, quantizing the spatial domain of the to-be-processed data to obtain a spatial domain information entropy feature; Step S15, performing attack trace detection on the to-be-processed data to obtain an attack trace feature; Step S16, taking the carrier type feature, the frequency domain energy distribution feature, the spatial domain information entropy feature, the attack resistance performance feature, and the attack trace feature as data features.
[0039] For the carrier type feature, the embodiment can obtain the type of the carrier content in the to-be-processed data through file header information (such as a file header signature of 89 50 4E 47=PNG), or the embodiment can also parse the carrier content in the to-be-processed data through a semantic analysis tool (such as OpenCV or FFmpeg), to obtain the type of the carrier content in the to-be-processed data, and thus the type of the carrier content in the to-be-processed data is taken as the carrier type feature. For the attack resistance performance feature, the embodiment can calculate the signal-to-noise ratio of the data before and after compression by compressing the to-be-processed data using a standard compression algorithm, as the compression resistance performance. The embodiment can also calculate the structural similarity after injecting a specific type and intensity of noise (such as Gaussian noise or salt and pepper noise) into the to-be-processed data, as the noise resistance performance. The embodiment can also calculate the number and proportion of matched key points after performing geometric transformation operations such as rotation (such as ±15° or ±30°), scaling (such as 80% or 110%), or cropping (such as removing 20% of the edge or removing 10% of the edge on one side) on the to-be-processed data, using algorithms such as SIFT (Scale-Invariant Feature Transform) or SURF (Speeded-Up Robust Features), as the geometric transformation resistance performance. At least one of the compression resistance performance, the noise resistance performance, and the geometric transformation resistance performance is taken as the attack resistance performance feature. For the frequency energy distribution feature, the embodiment can perform transformation on the to-be-processed data in a manner such as Fourier transform or wavelet transform, to transform the to-be-processed data into a frequency domain, and to statistically analyze the energy distribution of each frequency component in the frequency domain, to obtain the frequency energy distribution feature. For example, the embodiment can divide the frequency domain into low, medium, and high frequency bands, and calculate the energy proportion of each band, to obtain the frequency band energy distribution feature. For the spatial information entropy feature, the embodiment can perform data blocking on the to-be-processed data (such as dividing an image into 8x8 blocks or dividing a video into blocks according to key frames), to calculate the Shannon entropy (a high entropy value indicates complex texture) of each block, and then generate a corresponding entropy distribution histogram (such as [0.2, 0.5, 0.3] representing the proportion of low, medium, and high entropy regions) as the spatial information entropy feature. For the attack trace feature, the embodiment can pre-train a classification model for classifying attack traces, such as a convolutional neural network, a decision tree model, a ResNet (Residual Network) model, or the like. Based on the pre-trained classification model, attack trace detection (such as compression attack or noise attack) is performed, and a label of the attack type is output as the attack trace feature.Further, the carrier type feature, the frequency energy distribution feature, the spatial information entropy feature, the attack resistance performance feature, and the attack trace feature can be taken as data features. For example, the carrier type feature, the frequency energy distribution feature, the spatial information entropy feature, the attack resistance performance feature, and the attack trace feature can be converted into feature vectors respectively, and then the feature vectors are fused into a data feature matrix as the data features.
[0040] In some embodiments, the step S15 comprises steps A10-A20. Step A10, inputting the to-be-processed data into a predetermined classification model to obtain an attack type. Step A20, taking the attack type as an attack trace feature.
[0041] It should be noted that the predetermined classification model is a model for classifying the type of attack on the to-be-processed data, such as a convolutional neural network, a decision tree model, a residual network, etc. The predetermined classification model is trained by an attack classification sample set, and the attack classification sample set comprises an attacked sample and a corresponding attack type label. The attacked sample is a watermark data after being attacked (such as compression attack, noise attack, geometric transformation attack, etc.).
[0042] The embodiment can convert the to-be-processed data into a feature matrix, and then input the feature matrix into a predetermined classification model. Thus, the predetermined classification model can identify the attack type corresponding to the to-be-processed data (i.e. the type of attack on the to-be-processed data) based on the feature matrix, and then take the attack type as an attack trace feature.
[0043] In some embodiments, before step A10, steps B10-B30 are included. Step B10, obtaining sample data, and performing watermark embedding on the sample data to obtain watermark data samples. Step B20, performing attack simulation operations on the watermark data samples to obtain attack data samples, wherein the attack simulation operations comprise at least one of compression attack operations, noise attack operations, and geometric transformation operations. Step B30, training an initialized classification model based on the attack data samples to obtain a predetermined classification model.
[0044] For example, the carrier type feature, the frequency energy distribution feature, the spatial information entropy feature, the attack resistance performance feature, and the attack trace feature can be converted into feature vectors respectively, and then the feature vectors are fused into a data feature matrix as the data features. Figure 3As shown, after obtaining clean sample data (i.e. watermark data not attacked), the embodiment can use a predetermined watermark embedding algorithm to embed watermark in the sample data to obtain watermark data samples. Further, the embodiment can perform at least one of attack simulation operations of compression attack operation, noise attack operation and geometric transformation operation on the watermark data samples to obtain watermark data samples after attack simulation operation and their attack type labels as attack data samples. The embodiment can train an initial classification model based on the attack data samples to obtain a predetermined classification model. The initial classification model is a classification model in an initial state. For example, the attack data samples and the sample data can be mixed in a predetermined proportion as a training sample set, and the initial classification model is trained based on the training sample set to obtain a loss-converged initial classification model. The loss-converged initial classification model is verified and evaluated. If the evaluation is passed, the loss-converged initial classification model can be used as the predetermined classification model, and the predetermined classification model can be deployed for attack type detection. If the evaluation is not passed, the initial classification model can be retrained based on the training sample set until the loss-converged initial classification model is evaluated to pass. Compared with collecting watermark data before and after attack for training, the embodiment can quickly generate a batch of watermark data after attack to realize data enhancement and improve model training efficiency.
[0045] In the second embodiment of the present application, the data type of the to-be-processed data is identified to obtain a carrier type feature, the to-be-processed data is evaluated for attack resistance to obtain an attack resistance performance feature, the to-be-processed data is spectrum analyzed to obtain a frequency domain energy distribution feature, the spatial domain of the to-be-processed data is quantized to obtain a spatial domain information entropy feature, the to-be-processed data is detected for attack traces to obtain an attack trace feature, and the carrier type feature, the frequency domain energy distribution feature, the spatial domain information entropy feature, the attack resistance performance feature and the attack trace feature are used as data features. The embodiment describes the features of the to-be-processed data from multiple dimensions such as data type, frequency domain energy distribution, spatial domain information entropy, attack resistance performance and attack trace, thereby improving the richness of the data features and further improving the matching accuracy of the target watermark extraction algorithm.
[0046] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as the above embodiment one can refer to the above introduction, and will not be described in detail. On this basis, please refer to Figure 4 , step S30 includes steps S31-S32: Step S31, searching for optimal extraction parameters based on the data features; Step S32, extracting the watermark from the to-be-processed data according to the optimal extraction parameter based on the target watermark extraction algorithm to obtain the watermark information embedded in the to-be-processed data.
[0047] The embodiment can also search for the optimal extraction parameter based on the data feature by means of a predetermined search algorithm. The predetermined search algorithm can adopt algorithms such as Bayesian optimization, Monte Carlo tree search, genetic algorithm, particle swarm optimization, and multi-objective evolutionary algorithm, which can realize searching for the optimal extraction parameter based on the data feature. The search algorithm for the optimal extraction parameter can be selected according to specific requirements, for example, the calculation efficiency, global search ability, multi-objective support, and implementation complexity can be balanced. For example, the embodiment can adopt a hybrid strategy such as Bayesian optimization + Monte Carlo tree search, Bayesian optimization + genetic algorithm, and the like. Further, the embodiment extracts the watermark from the to-be-processed data according to the optimal extraction parameter based on the target watermark extraction algorithm to obtain the watermark information embedded in the to-be-processed data.
[0048] In some embodiments, step S31 includes steps C10-C60: Step C10, obtaining a predetermined parameter space, wherein the predetermined parameter space is composed of each extraction parameter and a value range thereof; Step C20, sampling the predetermined parameter space to obtain an extraction parameter group; Step C30, calculating a target function value of the extraction parameter group based on the data feature, wherein the target function value is a value of a target function, and the target function includes an extraction success rate item, a complexity constraint item, and a robustness item; Step C40, judging whether the target function converges based on the target function value; Step C50, after the target function converges, taking the extraction parameter group as the optimal extraction parameter; Step C60, after the target function does not converge, performing the step of sampling the predetermined parameter space to obtain an extraction parameter group.
[0049] It should be noted that the predetermined parameter space is composed of each extraction parameter and a value range thereof, that is, one dimension of the predetermined parameter space is one extraction parameter, and the range of this dimension is the value range of the extraction parameter.
[0050] It should be further noted that the objective function includes an extraction success rate term, a complexity constraint term and a robustness term, the extraction success rate term is a function term describing the success rate of watermark extraction based on the extraction parameter set for the to-be-processed data with the data characteristics, the complexity constraint term is a constraint function term describing the computational complexity (such as time, resource consumption) of watermark extraction based on the extraction parameter set, the complexity constraint term can include a first weight coefficient λ to control the tolerance of complexity. The robustness term is a function term describing the robustness of watermark extraction based on the extraction parameter set, and the robustness term can include a second weight coefficient μ to reflect the importance of robustness. An example of the objective function is max[P(Success| θ, D) - λQ(θ) + μRobustness(θ)]. Wherein, θ: the extraction parameter set including watermark strength, frequency band selection and other parameters, D: data characteristics of to-be-processed data, P(Success| θ, D) is the extraction success rate term, P(Success| θ, D) can be a probability prediction model (such as random forest, neural network) for predicting the extraction success rate based on the extraction parameter set and the data characteristics. Q(θ): complexity constraint term, Robustness(θ): robustness term. The objective function including the extraction success rate term, the complexity constraint term and the robustness term balances the extraction success rate, the complexity and the robustness.
[0051] As Figure 5As shown, the embodiment can first acquire a predetermined parameter space, the predetermined parameter space being composed of each extraction parameter and a value range thereof, and then sample the predetermined parameter space to filter a set of extraction parameter values, i.e., an extraction parameter group, from the value range of each extraction parameter in the predetermined parameter space. Since the objective function includes the extraction success rate item, the complexity constraint item and the robustness item, the embodiment can calculate a fused representation value (i.e., an objective function value) of the extraction success rate, the complexity and the robustness under the extraction parameter group based on the data feature. The embodiment can use a Pareto optimal solution search strategy to realize fast convergence of the objective function in combination with Monte Carlo tree search. Based on the objective function value, it is determined whether the objective function converges or not. If the stability of the Pareto frontier evaluated based on the objective function value is represented as stable, it is determined that the objective function converges, and if the stability of the Pareto frontier is represented as unstable, it is determined that the objective function does not converge. The stability of the Pareto frontier can be represented by characteristic values such as a frontier member change rate, a hyper-volume stability, a solution set distribution density, etc. After the objective function converges, the extraction parameter group is taken as the optimal extraction parameter. After the objective function does not converge, the embodiment can perform the steps of sampling the predetermined parameter space to obtain an extraction parameter group and resampling to obtain a new extraction parameter group. The adjustment mode of the extraction parameter group in the resampling process can be a combination of Monte Carlo tree search and Bayesian optimization. In the embodiment, the objective function provides the extraction success rate item, the complexity constraint item and the robustness item, thereby effectively balancing the success rate, the complexity and the robustness of the optimal extraction parameter finally selected.
[0052] In the third embodiment of the present application, the optimal extraction parameter is searched based on the data feature, and then the watermark extraction is performed on the to-be-processed data according to the optimal extraction parameter based on the target watermark extraction algorithm to obtain the watermark information embedded in the to-be-processed data. Compared with using fixed extraction parameters, the embodiment can dynamically adaptively optimize the optimal extraction parameter according to different to-be-processed data based on the data feature, realize accurate extraction parameter matching, effectively improve the stable extraction rate of the watermark information, realize the maximum extraction of the watermark information under different conditions (such as whether attacked or not, attack mode, embedding strength, embedding position, etc.), and realize the generalization ability of watermark extraction under complex scenes.
[0053] The present application provides a watermark extraction device, which comprises at least one processor and a memory in communication connection with the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the watermark extraction method in the above-mentioned embodiment one.
[0054] Reference will be made toFigure 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.
[0055] 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.
[0056] In particular, according to embodiments of the present application, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program comprising program code for performing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a read-only memory 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the methods of the embodiments of the present application are performed.
[0057] The watermark extraction device provided by the present application adopts the watermark extraction method in the above embodiments, and can solve the technical problem that the existing watermark extraction method has poor universality for extracting embedded watermark data. Compared with the prior art, the watermark extraction device provided by the present application has the same beneficial effects as the watermark extraction method provided by the above embodiments, and other technical features in the watermark extraction device are the same as the features disclosed in the previous embodiment method, which will not be repeated here.
[0058] It should be understood that parts of the present application can be realized by 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 one or more embodiments or examples in a suitable manner.
[0059] The above is merely specific implementation of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0060] The present application provides a computer readable storage medium having stored thereon computer readable program instructions (i.e. computer program) for performing the watermark extraction method in the above embodiments.
[0061] The computer readable storage medium provided in the application may, for example, be a U disk, but is not limited to an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system or device, or any combination of the above. More specific examples of the computer readable storage medium may include, but are not limited to, an electric connection with one or more conductive wires, a portable computer disk, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM or flash memory), an optical fiber, a portable compact disk read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the embodiment, the computer readable storage medium may be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system or device. The program code contained on the computer readable storage medium can be transmitted by any suitable medium, including but not limited to an electric wire, an optical cable, an RF (Radio Frequency), and the like, or any suitable combination of the above.
[0062] The computer readable storage medium described above may be contained in the watermark extraction device, or may exist separately without being assembled into the watermark extraction device.
[0063] The computer readable storage medium described above carries one or more programs, when the one or more programs are executed by the watermark extraction device, the watermark extraction device is caused to: acquire to-be-processed data, and performs 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.
[0064] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0065] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flow diagrams or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may
[0066] The modules involved in the embodiments of the present application can be implemented in the form of software or in the form of hardware. In some cases, the name of the module does not constitute a limitation on the module itself.
[0067] The readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e. computer program) for executing the watermark extraction method described above, and can solve the technical problem that the existing watermark extraction method has poor generality for extracting embedded watermark data. Compared with the prior art, the computer readable storage medium provided by the present application has the same beneficial effects as the watermark extraction method provided by the above embodiments, and will not be described here.
[0068] The application further provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the watermark extraction method as described above.
[0069] The computer program product provided by the application can solve the technical problem of poor universality of existing watermark extraction methods for extracting embedded watermark data. Compared with the prior art, the beneficial effects of the computer program product provided by the application are the same as those of the watermark extraction method provided by the above-mentioned embodiments, and are not described here.
[0070] The above only describes some embodiments of the application, and does not limit the patent scope of the application. Any equivalent structural transformation made by using the content of the specification and drawings, or direct / indirect application in other related technical fields under the technical concept of the application is included in the patent protection scope of the 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; 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.
2. The watermark extraction method as described in claim 1, characterized in that, 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.
3. The watermark extraction method as described in claim 2, 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.
4. The watermark extraction method as described in claim 3, 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.
5. 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.
6. The watermark extraction method according to any one of claims 1 to 5, 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.
7. The watermark extraction method as described in claim 6, 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.
8. 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 7.
9. 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 7.
10. 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 7.
Citation Information
Patent Citations
Method and system for automatically obtaining watermark parameters based on data characteristics
CN109101791A
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
Video watermark embedding processing method, video watermark extraction processing method, video watermark embedding processing device, video watermark extraction processing device and video watermark equipment
CN120075545A
Method for watermarking depth image based on mixed frequency-domain channel attention
US20240054594A1