Watermark embedding method and device
By optimizing the watermark embedding strength and encryption level, and combining the data feature extraction model and verification mechanism, the problems of concealment and traceability in the watermark embedding process are solved, achieving efficient and accurate watermark embedding and traceability in complex scenarios.
Patent Information
- Application Number
- CN202511083188.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-04
- Publication Date
- 2025-11-18
AI Technical Summary
Existing watermarking technologies suffer from insufficient concealment and poor traceability during the embedding process, affecting data availability and parsing efficiency, and making it difficult to effectively embed and extract watermarks in complex scenarios.
By acquiring the source information of the data to be processed, the embedding strength and encryption level are optimized according to the data type and usage scenario, a target embedding path is generated, and watermark information is re-embedded at the target location. The embedding position and content are optimized by using a data feature extraction model and verification mechanism.
It improves the concealment of watermark embedding and the efficiency of source tracing, ensuring that the source of leakage can be quickly and accurately located when data is leaked, thus enhancing data security and source tracing capabilities.
Smart Images

Figure CN120974464A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data security, in particular to a watermark embedding method and device. BACKGROUND
[0002] In the field of data security, watermark technology is an important data protection means. By embedding watermark in data, the data can be traced in the case of data leakage. Therefore, the core problem of watermark technology is how to effectively embed watermark and extract watermark to achieve accurate tracing of leaked data. However, the data leakage scenario is complex, and the watermark technology needs to balance the watermark concealment and the traceability of watermark information.
[0003] Traditional watermark technology has limitations, such as embedding method affecting data usability or increasing parsing difficulty, sensitive data identification may not be complete or misidentified, dynamic watermark updating requires high system flexibility and adaptability, and embedding and extraction process lacks concealment or has low parsing efficiency, which limits the tracing effect.
[0004] Therefore, how to improve the concealment and tracing effect of watermark embedding has become a problem to be solved. SUMMARY
[0005] Therefore, it is necessary to provide a watermark embedding method and device to improve the concealment and tracing effect of watermark embedding.
[0006] In a first aspect, the present application provides a watermark embedding method, comprising:
[0007] obtaining to-be-processed data, and determining the tracing information of the to-be-processed data;
[0008] embedding the tracing information as watermark information into the to-be-processed data according to the embedding rule corresponding to the data type of the to-be-processed data, to obtain a preliminary embedding result;
[0009] determining the offset of the preliminary embedding position of the watermark information in the preliminary embedding result from the preset embedding position, and optimizing the watermark embedding strength and watermark encryption level corresponding to the use scenario of the to-be-processed data according to the offset, to obtain an optimized embedding strength and an optimized encryption level;
[0010] generating a target embedding path according to the optimized embedding strength and the optimized encryption level;
[0011] generating a target embedding position according to the initial embedding path, the optimized embedding strength and the optimized encryption level, and re-embedding the tracing information as watermark information at the target embedding position in the to-be-processed data.
[0012] In one of the embodiments, before the step of embedding the provenance information as watermark information into the to-be-processed data according to the embedding rule corresponding to the data type of the to-be-processed data to obtain a preliminary embedding result, the method further comprises:
[0013] inputting the to-be-processed data into a data feature extraction model to obtain the embedding rule corresponding to the data type of the to-be-processed data.
[0014] In one of the embodiments, before the step of determining the offset of the preliminary embedding position of the watermark information in the preliminary embedding result, the method further comprises:
[0015] performing position verification on the preliminary embedding position in the preliminary embedding result, and performing content verification on the watermark information in the preliminary embedding result.
[0016] In the case that the verification results of the position verification and the content verification are both verification success, determining the offset of the preliminary embedding position of the watermark information in the preliminary embedding result.
[0017] In the case that the verification result of the position verification and / or the content verification is verification unsuccessful, updating the embedding position and / or the provenance information, and returning to the step of embedding the provenance information as watermark information into the to-be-processed data according to the embedding rule corresponding to the data type of the to-be-processed data.
[0018] In one of the embodiments, the step of optimizing the watermark embedding strength and the watermark encryption level corresponding to the use scenario of the to-be-processed data according to the offset to obtain an optimized embedding strength and an optimized encryption level comprises:
[0019] In the case that the offset meets a preset offset threshold, optimizing the watermark embedding strength and the watermark encryption level corresponding to the use scenario of the to-be-processed data according to the offset to obtain an optimized embedding strength and an optimized encryption level.
[0020] In one of the embodiments, the step of optimizing the watermark embedding strength and the watermark encryption level corresponding to the use scenario of the to-be-processed data according to the offset to obtain an optimized embedding strength and an optimized encryption level comprises:
[0021] compensating the watermark embedding strength and the watermark encryption level corresponding to the use scenario of the to-be-processed data according to the offset to obtain an initial embedding strength and an initial encryption level;
[0022] In a case that the initial embedding strength satisfies the embedding strength threshold corresponding to the use scenario and the initial encryption level satisfies the encryption level threshold corresponding to the use scenario, the initial embedding strength and the initial encryption level are determined as an optimized embedding strength and an optimized encryption level, respectively;
[0023] Otherwise, the watermark embedding strength and the watermark encryption level corresponding to the use scenario are updated, and the step of compensating the watermark embedding strength and the watermark encryption level corresponding to the use scenario to which the to-be-processed data belongs according to the offset is returned.
[0024] In one of the embodiments, the generating a target embedding path according to the optimized embedding strength and the optimized encryption level comprises:
[0025] generating an initial embedding path according to the optimized embedding strength and the optimized encryption level;
[0026] optimizing the initial embedding path in terms of smoothness and concealment to obtain a target embedding path.
[0027] In one of the embodiments, the generating a target embedding position according to the initial embedding path, the optimized embedding strength and the optimized encryption level comprises:
[0028] generating an initial control instruction according to the initial embedding path, the optimized embedding strength and the optimized encryption level;
[0029] correcting the initial control instruction to obtain an embedding correction instruction and an encryption correction instruction, and fusing the embedding correction instruction and the encryption correction instruction to obtain a comprehensive control instruction;
[0030] adjusting the initial embedding position according to the comprehensive control instruction to obtain a target embedding position.
[0031] In one of the embodiments, the correcting the initial control instruction to obtain an embedding correction instruction and an encryption correction instruction comprises:
[0032] correcting the initial control instruction to obtain real-time embedding depth data and real-time encryption distribution data;
[0033] controlling deviation of the real-time embedding depth data to obtain an embedding correction instruction, and controlling error of the real-time encryption distribution data to obtain an encryption correction instruction.
[0034] In one of the embodiments, the re-embedding the traceability information as watermark information at the target embedding position in the to-be-processed data comprises:
[0035] In a case where a deviation of the target embedding position from the preset embedding position meets a preset deviation threshold, the provenance information is re-embedded as watermark information at the target embedding position in the to-be-processed data.
[0036] In a second aspect, the present application further provides a watermark embedding device, comprising:
[0037] a data acquisition module, configured to acquire to-be-processed data and determine provenance information of the to-be-processed data;
[0038] a preliminary embedding module, configured to embed the provenance information as watermark information in the to-be-processed data according to an embedding rule corresponding to a data type of the to-be-processed data, to obtain a preliminary embedding result;
[0039] a parameter optimization module, configured to determine an offset of a preliminary embedding position of the watermark information from a preset embedding position in the preliminary embedding result, and optimize a watermark embedding strength and a watermark encryption level corresponding to a use scenario to which the to-be-processed data belongs according to the offset, to obtain an optimized embedding strength and an optimized encryption level;
[0040] a path generation module, configured to generate a target embedding path according to the optimized embedding strength and the optimized encryption level;
[0041] a watermark embedding module, configured to generate a target embedding position according to the initial embedding path, the optimized embedding strength and the optimized encryption level, and re-embed the provenance information as watermark information at the target embedding position in the to-be-processed data.
[0042] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes steps in each method embodiment provided in the first aspect.
[0043] In a fourth aspect, the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement steps in each method embodiment provided in the first aspect.
[0044] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, and the computer program is executed by a processor to implement steps in each method embodiment provided in the first aspect.
[0045] The watermark embedding method, device, computer equipment, computer readable storage medium and computer program product provided by some embodiments of the present application, by obtaining the to-be-processed data and the traceability information of the to-be-processed data, first embeds the traceability information as watermark information into the to-be-processed data according to the embedding rule corresponding to the data type of the to-be-processed data, to obtain a preliminary embedding result; then determines the offset of the preliminary embedding result and the preset embedding position, and optimizes the watermark embedding strength and the watermark encryption level corresponding to the use scenario to which the to-be-processed data belongs according to the offset, to obtain an optimized embedding strength and an optimized encryption level. Then, according to the optimized embedding path and the optimized encryption level, a target embedding path is generated, and according to the target path, the optimized embedding strength and the optimized encryption level, a target embedding position is generated, so that the above-mentioned traceability information can be re-embedded at the target embedding position in the to-be-processed data, and the watermark embedding of the to-be-processed data is completed. In this way, on the one hand, by using the embedding rule corresponding to the data type of the to-be-processed data, the adaptation accuracy of the embedding rule can be improved, and the concealment of the watermark information can be enhanced. On the other hand, by optimizing the embedding strength and the embedding level, the target embedding path is designed, which can improve the concealment and continuity of the watermark embedding process. Based on this, the concealment of the watermark embedding can be improved, and the efficiency and accuracy of the watermark tracing can be improved when the data is leaked. BRIEF DESCRIPTION OF DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the description of the embodiments of the present application or the related art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other related drawings can be obtained by those skilled in the art without creating any inventive labor.
[0047] Figure 1 The flowchart of the watermark embedding method provided by some embodiments of the present application is shown.
[0048] Figure 2 The flowchart of the watermark embedding method provided by some embodiments of the present application is shown.
[0049] Figure 3 The flowchart of the watermark embedding method provided by some embodiments of the present application is shown.
[0050] Figure 4 The flowchart of the watermark embedding method provided by some embodiments of the present application is shown.
[0051] Figure 5 The flowchart of the watermark embedding method provided by some embodiments of the present application is shown.
[0052] Figure 6 The structure block diagram of the watermark embedding device provided by some embodiments of the present application is shown.
[0053] Figure 7 Fig. 1 is a schematic diagram of an internal structure of a computer device in an embodiment. DETAILED DESCRIPTION
[0054] For the purposes of the present application, the technical solutions and advantages thereof are more clearly apparent, the following will be further described in detail in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0055] In the field of data security technology, watermark technology is an important data protection means. By embedding watermark in data, the data can be traced in the case of data leakage. Therefore, the core problem of watermark technology is how to effectively embed watermark and extract watermark to realize accurate tracing of leaked data. However, the data leakage scenario is complex, and the watermark technology needs to consider the watermark concealment and the traceability of watermark information. Based on this, how to improve the concealment and tracing effect of watermark embedding has become a problem to be solved.
[0056] To solve the above technical problems, in an exemplary embodiment, a watermark embedding method is provided, which can be applied to a computer device, which can be a server or a terminal. The server can be a standalone physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The following will be described by taking the application of the method to the server as an example. As shown in Figure 1 The method can include the following steps:
[0057] S101, obtaining to-be-processed data, and determining the tracing information of the to-be-processed data.
[0058] The to-be-processed data is data that needs to be embedded with watermark. There can be multiple sources of data, such as data collected by external devices, data stored locally by the server, etc. Moreover, the to-be-processed data can include multiple data types, which are not specifically limited.
[0059] Optionally, the to-be-processed data can be structured data or unstructured data. The structured data refers to data with a clear data model, format specification, and can be stored and read through a predefined way, such as table data, etc. The unstructured data refers to data without a predefined data model or format specification, with irregular structure and strong field variability, which cannot be directly stored and processed by two-dimensional table logic, such as document files, pictures, videos, etc.
[0060] Optionally, the received to-be-processed data can be preliminarily processed by a protocol analysis tool, and the to-be-processed data can be classified and labeled by using semantic word segmentation technology and content recognition technology to form an operable data set, so that an adaptive processing strategy can be taken for different types of sensitive data, such as selecting an adaptive watermark embedding rule.
[0061] Further, after obtaining the to-be-processed data, the traceability information of the to-be-processed data can be further obtained. The traceability information is a kind of accountability identification information, and its core function is to record the sensitive features of the distribution object, the use subject, the propagation path and the like of the data that can be associated to the specific responsible party, so that when a data leakage event occurs, the leakage source can be quickly located and the person in charge can be determined through the watermark information. For example, it can include the use information of the data user or propagator, such as employee ID, device identification, institution code, department identification, contract number, precise timestamp, etc.
[0062] Based on this, the purpose of embedding the watermark in the to-be-processed data is to protect the data to ensure data security, and to quickly and accurately locate the data leakage source and determine the person in charge in the case of data leakage, so the traceability information of the to-be-processed data can be used as the watermark information embedded in the to-be-processed data when embedding the watermark in the to-be-processed data.
[0063] S102, according to the embedding rule corresponding to the data type of the to-be-processed data, the traceability information is embedded as watermark information in the to-be-processed data to obtain a preliminary embedding result.
[0064] The embedding rule refers to the rule for coding, embedding position, embedding method and parameter setting of the watermark information to ensure the concealment, robustness, security and detectability of the watermark, so that different embedding rules can be set for different types of data to improve the adaptation accuracy of the embedding rule and enhance the concealment of the watermark information. For example, for a transaction file recording transaction data (such as transaction amount), the embedding rule can use invisible character replacement, and for a transaction contract scan, the embedding rule can use a pixel fine-tuning-based method.
[0065] Therefore, the embedding rule corresponding to the data type of the to-be-processed data can be selected, and the traceability information of the to-be-processed data can be embedded as watermark information in the to-be-processed data according to the selected embedding rule to obtain a preliminary embedding result. The watermark embedding this time can be referred to as preliminary watermark embedding.
[0066] The embedding rule corresponding to the data type of the to-be-processed data can be determined in various ways.
[0067] Optionally, a mapping table of data type and embedding rule can be established in advance, which records the embedding rule corresponding to each data type, so that after the data type of the to-be-processed data is determined, the embedding rule corresponding to the data type of the to-be-processed data is searched in the mapping table.
[0068] In an optional embodiment, before S102, the watermark embedding method further includes inputting the to-be-processed data into a data feature extraction model to obtain the embedding rule corresponding to the data type of the to-be-processed data.
[0069] In this embodiment, the data feature extraction model can be trained based on a large amount of historical data, wherein in the model training process, the key features of different types of data in the large amount of historical data are input, and the embedding rules corresponding to the different types of data are labels, and the model is trained. Thus, the trained data feature extraction model can identify the key features of different types of data and generate the corresponding embedding rules based on the key features. Therefore, by inputting the to-be-processed data into the data feature extraction model, the data feature extraction model can identify the key features of the to-be-processed data and output the embedding rule corresponding to the data type of the to-be-processed data according to the extracted key features.
[0070] S103, determining the offset between the preliminary embedding position of the watermark information in the preliminary embedding result and the preset embedding position, and optimizing the watermark embedding strength and the watermark encryption level corresponding to the use scenario to which the to-be-processed data belongs according to the offset to obtain an optimized embedding strength and an optimized encryption level.
[0071] The so-called embedding strength (Embedding Strength) refers to the "intensity" or "prominence" when the watermark information is embedded into the carrier data (such as images, audio, video, etc.). The embedding strength is a key parameter affecting the watermark concealment and robustness, and needs to be balanced between the two. Too high embedding strength may cause distortion of the carrier data (such as image noise, audio quality degradation), affecting normal use, while too low embedding strength makes the watermark vulnerable to attacks such as noise, compression, filtering, etc., resulting in incorrect extraction.
[0072] The so-called watermark encryption level generally refers to the degree of security protection of watermark information and its embedding process, and is used to measure the ability of the watermark to resist illegal attacks, tampering or reverse engineering. The higher the encryption level, the stronger the security, robustness and unbreakability of the watermark. For example, a low-level encryption level can use basic encryption algorithms such as adding check codes, hash operations, etc.; a middle-level encryption level can use symmetric encryption algorithms such as AES (Advanced Encryption Standard), DES (Data Encryption Standard), etc.; a high-level encryption level can use asymmetric encryption and hybrid encryption algorithms such as ECC (Elliptic Curve Cryptography), combination of symmetric and asymmetric encryption algorithms, etc. Among them, the above examples are only illustrative of the watermark encryption level, not limiting.
[0073] Based on this, when performing watermark embedding, different watermark embedding strengths and watermark encryption levels can be selected according to the different use scenarios to which the data to be embedded with a watermark belongs. Among them, the above-mentioned use scenarios can include the data type, data importance, data application scenario and data leakage cost of the data to be embedded with a watermark. Therefore, the watermark embedding strength and watermark encryption level corresponding to the use scenario to which the above-mentioned to-be-processed data belongs can be determined first, so that in the above-mentioned preliminary watermark embedding process, the traceability information is embedded in the to-be-processed data as watermark information according to the embedding rule corresponding to the data type of the to-be-processed data and the watermark embedding strength and watermark encryption level corresponding to the use scenario to which the to-be-processed data belongs, to obtain a preliminary embedding result. Therefore, after obtaining the above-mentioned preliminary embedding result, the embedding position of the traceability information as watermark information in the to-be-processed data can be determined as a preliminary embedding position, and then the offset of the above-mentioned preliminary embedding position and the preset embedding position can be determined.
[0074] Among them, the so-called preset embedding position refers to the ideal embedding position of the watermark embedding effect in the actual scene which is set in advance in the to-be-processed data according to the data type and data content of the to-be-processed data and the embedding rule corresponding to the data type of the to-be-processed data. For example, for a transaction file recording transaction data (such as transaction amount), the embedding rule can use the invisible character replacement method, then when performing watermark embedding, the embedded watermark information is used to replace the transaction data in the transaction file, then the position of the transaction data to be replaced in the transaction file can be taken as the ideal embedding position, i.e. the preset embedding position.
[0075] Based on this, in the above preliminary watermark embedding, the embedding position of the traceability information may deviate from the preset embedding position, so that the offset of the preliminary embedding position of the watermark information (i.e., the embedded traceability information) from the preset embedding position in the above preliminary embedding result can be determined first.
[0076] The greater the above offset is, the greater the gap between the embedding effect of the preliminary watermark embedding and the preset ideal embedding effect is, so that in the preliminary watermark embedding process, the greater the gap between the watermark embedding strength and the watermark encryption level corresponding to the use scenario of the to-be-processed data used and the watermark embedding strength and the watermark encryption level required to achieve the preset ideal embedding effect is, and correspondingly, the smaller the above offset is, the smaller the gap between the embedding effect of the preliminary watermark embedding and the preset ideal embedding effect is, so that in the preliminary watermark embedding process, the smaller the gap between the watermark embedding strength and the watermark encryption level corresponding to the use scenario of the to-be-processed data used and the watermark embedding strength and the watermark encryption level required to achieve the preset ideal embedding effect is.
[0077] Based on this, in order to obtain the preset ideal embedding effect, the watermark embedding strength and the watermark encryption level corresponding to the use scenario of the to-be-processed data can be optimized according to the above offset to obtain an optimized embedding strength and an optimized encryption level, so as to improve the matching degree of the optimized embedding strength and the optimized encryption level and the use scenario of the to-be-processed data, and to achieve the preset ideal embedding effect as much as possible.
[0078] In an optional embodiment, the S103 comprises, in a case where the offset meets a preset offset threshold, optimizing the watermark embedding strength and the watermark encryption level corresponding to the use scenario of the to-be-processed data according to the offset to obtain an optimized embedding strength and an optimized encryption level.
[0079] In the present embodiment, in a case where the preset offset threshold is a numerical range, the offset meeting the preset offset threshold can mean that the offset belongs to the numerical range; in a case where the preset offset threshold is a numerical value, the offset meeting the preset offset threshold can mean that the offset is less than the numerical value or the offset is not greater than the numerical value, which are all reasonable.
[0080] After obtaining the offset between the preliminary embedding position and the preset embedding position, it can be first judged whether the offset meets a preset offset threshold, so that in the case of meeting, the offset can be defined as a compensation value for optimizing related parameters of watermark embedding, such as embedding strength and encryption level. Further, according to the offset, the watermark embedding strength and the watermark encryption level corresponding to the use scenario to which the to-be-processed data belongs are optimized to obtain an optimized embedding strength and an optimized encryption level. In this way, the related parameters of watermark embedding can be adjusted according to the offset to avoid the problem of poor concealment caused by large embedding position deviation, and the concealment of watermark embedding is improved.
[0081] Optionally, in the case that the offset does not meet the preset offset threshold, the preliminary embedding position in the preliminary embedding result can be adjusted, so that the source information is re-embedded as watermark information in the to-be-processed data according to the adjusted preliminary embedding position and the embedding rule corresponding to the data type of the to-be-processed data, to obtain a new preliminary embedding result. Thus, the preliminary embedding position in the preliminary embedding result can be adjusted in a loop until the offset between the preliminary embedding position and the preset embedding position meets the preset offset threshold.
[0082] S104, generating a target embedding path according to the optimized embedding strength and the optimized encryption level.
[0083] The so-called embedding path (Embedding Path) refers to a specific data channel or processing flow for hiding watermark information (such as copyright identification, authentication data, user ID, etc.) into carrier data (such as images, audio, video, documents, etc.). Selecting a suitable embedding path is the core of the watermark algorithm, which directly affects the imperceptibility (concealment), robustness (attack resistance) and capacity (embeddable data amount) of the watermark.
[0084] For example, a spatial domain embedding path, which directly embeds the watermark in the original data space of the carrier data, is simple to operate but has poor robustness; a transform domain embedding path, which converts the carrier data from the spatial domain to the frequency domain or transform domain (such as Fourier transform, discrete cosine transform, wavelet transform, etc.), embeds the watermark in the transformed coefficients, and has stronger robustness; a feature domain embedding path, which selects an embedding position using the perceptual features or semantic features of the carrier data, binds the watermark with important features of the carrier, and improves the robustness and imperceptibility. Among them, the above examples are examples of embedding paths, not limitations.
[0085] As mentioned earlier, the watermark embedding strength and the watermark encryption level both affect the concealment and robustness of watermark embedding, and further affect the watermark embedding effect, and the embedding path also affects the watermark embedding effect, so the target embedding path can be generated in coordination with the optimized embedding strength and the optimized encryption level to balance the watermark concealment, robustness and security.
[0086] Optionally, a correspondence between different combinations of embedding strength and encryption level and embedding path is preset, and an embedding path corresponding to an optimal combination of embedding strength and encryption level is selected as the target embedding path in the correspondence.
[0087] S105, according to the target embedding path, the optimal embedding strength and the optimal encryption level, generates a target embedding position, and re-embeds the traceability information as watermark information at the target embedding position in the to-be-processed data.
[0088] As described above, the target embedding path can represent the distribution space of the traceability information as watermark data in the to-be-processed data, the optimal embedding strength can control the watermark modification amplitude to balance robustness and concealment, and the optimal encryption level can generate random embedding positions through a key to enhance watermark security. Therefore, the target embedding position can be selected in the to-be-processed data by combining the influences of the target embedding path, the optimal embedding strength and the optimal encryption level on the watermark embedding effect. Therefore, the target embedding position can be generated according to the target embedding path, the optimal embedding strength and the optimal encryption level.
[0089] For example, candidate regions are divided based on the target embedding path (such as high-frequency coefficients in the DCT (Discrete Cosine Transform) domain), suitable positions are selected through the optimal embedding strength (such as dynamic adjustment of texture complexity), and the target embedding position is determined by combining the optimal encryption level (such as an AES-256 key) to generate a pseudo-random sequence.
[0090] After obtaining the target embedding position, the traceability information as watermark information is re-embedded at the target embedding position in the to-be-processed data. That is, in the re-embedding process, the optimal embedding strength and the optimal encryption level are used to embed the traceability information as watermark information at the target embedding position in the to-be-processed data along the target embedding path according to the embedding rule corresponding to the data type of the to-be-processed data.
[0091] In an optional embodiment, the way of re-embedding the traceability information in S105 can be that, when the deviation between the target embedding position and the preset embedding position satisfies a preset deviation threshold, the traceability information as watermark information is re-embedded at the target embedding position in the to-be-processed data.
[0092] As described above, the so-called preset embedding position refers to an ideal embedding position of the watermark embedding effect in accordance with the actual scene, which is pre-set in the to-be-processed data according to the data type and data content of the to-be-processed data and the embedding rule corresponding to the data type of the to-be-processed data. Therefore, in order to improve the concealment of the final watermark embedding, and improve the efficiency and accuracy of watermark tracing when data is leaked, and thus improve the embedding effect of the final watermark embedding, it is often desirable that the target embedding position is as close as possible to the preset embedding position, so as to reduce the embedding position deviation, and thus shorten the gap between the actual embedding effect and the ideal embedding effect. Therefore, the deviation of the target embedding position from the preset embedding position can be determined, and the tracing information as watermark information is re-embedded at the target embedding position in the to-be-processed data when the determined deviation meets the preset deviation threshold.
[0093] In the present embodiment, when the preset deviation threshold is a numerical range, the so-called deviation meeting the preset deviation threshold can refer to the deviation belonging to the numerical range; when the preset deviation threshold is a numerical value, the so-called deviation meeting the preset deviation threshold can refer to the deviation being less than the numerical value, or the deviation not being greater than the numerical value, which are all reasonable.
[0094] Correspondingly, when the deviation of the target embedding position from the preset embedding position does not meet the preset deviation threshold, the above S103 can be re-executed to re-optimize the watermark embedding strength and watermark encryption level corresponding to the use scene to which the to-be-processed data belongs, to obtain a new optimized embedding strength and optimized encryption level. In turn, the cycle is repeated until the deviation of the target embedding position from the preset embedding position meets the preset deviation threshold, and the tracing information as watermark information is re-embedded at the target embedding position in the to-be-processed data.
[0095] In the watermark embedding method, by acquiring the to-be-processed data and the traceability information of the to-be-processed data, the traceability information is embedded into the to-be-processed data as watermark information according to the embedding rule corresponding to the data type of the to-be-processed data, to obtain a preliminary embedding result. Then, the offset of the preliminary embedding result from the preset embedding position is determined, and the watermark embedding strength and the watermark encryption level corresponding to the use scenario of the to-be-processed data are optimized according to the offset, to obtain an optimized embedding strength and an optimized encryption level. Then, a target embedding path is generated according to the optimized embedding path and the optimized encryption level, and a target embedding position is generated according to the target path, the optimized embedding strength and the optimized encryption level. Thus, the traceability information can be re-embedded at the target embedding position in the to-be-processed data, and the watermark embedding of the to-be-processed data is completed. In this way, on the one hand, the embedding rule corresponding to the data type of the to-be-processed data is used, which can improve the adaptation accuracy of the embedding rule and enhance the concealment of the watermark information. On the other hand, by optimizing the embedding strength and the embedding level, the target embedding path is designed, which can improve the concealment and continuity of the watermark embedding process. Therefore, the concealment of the watermark embedding can be improved, and the efficiency and accuracy of the watermark tracing can be improved when data is leaked.
[0096] Based on the above embodiment, in an exemplary embodiment, as shown in Figure 2 The watermark embedding method can include the following steps:
[0097] S201, acquiring to-be-processed data and determining traceability information of the to-be-processed data.
[0098] S202, embedding the traceability information into the to-be-processed data as watermark information according to the embedding rule corresponding to the data type of the to-be-processed data, to obtain a preliminary embedding result.
[0099] The specific implementation of S201-S202 is the same as that of S101-S102, which will not be repeated here.
[0100] S203, performing position verification on the preliminary embedding position in the preliminary embedding result and content verification on the watermark information in the preliminary embedding result. If the verification results of the position verification and the content verification are both successful, S204 is executed; if the verification result of the position verification and / or the content verification is unsuccessful, S205 is executed.
[0101] In some cases, there may be errors in the determined provenance information of the to-be-processed data, for example, the determined department identifier is incorrect, and / or the preliminary embedding position of the provenance information in the preliminary embedding result is obviously unreasonable, for example, the provenance information should be embedded in a non-blank position in the to-be-processed data, but the preliminary embedding position is actually located in a blank position of the to-be-processed data. After obtaining the above preliminary embedding result, the preliminary embedding position in the preliminary embedding result can be first position-verified, and the watermark information in the preliminary embedding result can be content-verified, to ensure that the provenance information is correct and the preliminary embedding position is located at a reasonable position.
[0102] Wherein, in the case that the verification results of the position verification and the content verification are both successful, it can be considered that the preliminary embedding position is located at a reasonable position, and the provenance information as the watermark information is correct. Thus, the subsequent S204 can be continued to be executed.
[0103] Correspondingly, in the case that the verification result of the position verification is unsuccessful, it can be considered that the preliminary embedding position is not located at a reasonable position, and needs to be adjusted in position, and in the case that the verification result of the content verification is unsuccessful, it can be considered that there is an error in the provenance information as the watermark information, and needs to be corrected in information. Therefore, in the case that the verification result of the position verification and / or the content verification is unsuccessful, the subsequent S205 can be continued to be executed.
[0104] S204, determining an offset of the preliminary embedding position of the watermark information in the preliminary embedding result from the preset embedding position, and optimizing the watermark embedding strength and the watermark encryption level corresponding to the use scenario to which the to-be-processed data belongs according to the offset, to obtain an optimized embedding strength and an optimized encryption level.
[0105] Wherein, the specific implementation manner of the above S204 is the same as that of the above S103, and will not be repeated here.
[0106] S205, updating the preliminary embedding position and / or the provenance information, and returning to S202.
[0107] As mentioned above, in the case that the verification result of the position verification is unsuccessful, the preliminary embedding position can be updated, and in the case that the verification result of the content verification is unsuccessful, the provenance information can be updated. Therefore, in the case that the verification result of the position verification and / or the content verification is unsuccessful, the preliminary embedding position and / or the provenance information can be updated. Further, after the updating is completed, the updated provenance information can be re-embedded in the to-be-processed data as the watermark information according to the embedding rule corresponding to the data type of the to-be-processed data and the updated preliminary embedding position and / or the provenance information, to obtain a new preliminary embedding result, so that the preliminary embedding position and / or the provenance information can be cyclically updated until the position verification and the content verification are both successful.
[0108] S206, generating a target embedding path according to the optimized embedding strength and the optimized encryption level.
[0109] S207, generating a target embedding position according to the target embedding path, the optimized embedding strength and the optimized encryption level, and re-embedding the traceability information as the watermark information at the target embedding position in the to-be-processed data.
[0110] The specific implementation of S206-S207 is the same as that of S104-S105, which will not be repeated here.
[0111] In this embodiment, the content verification can be performed by verifying the preliminary embedding position and the watermark information in the preliminary embedding result, thereby improving the accuracy of the final preliminary verification result, and improving the concealment of the final watermark embedding, and the efficiency and accuracy of the watermark traceability.
[0112] On the basis of the above embodiments, the optimization of the watermark embedding strength and the watermark encryption level in S103 can be further refined, which can include the following steps:
[0113] 1. According to the offset, the watermark embedding strength and the watermark encryption level corresponding to the use scene of the to-be-processed data are compensated to obtain an initial embedding strength and an initial encryption level.
[0114] As mentioned earlier, the offset is the offset of the preliminary embedding position in the preliminary embedding result and the preset embedding position, which reflects the difference between the watermark embedding strength and the watermark encryption level used in the preliminary watermark embedding process and the watermark embedding strength and the watermark encryption level required to achieve the preset ideal embedding effect, so that the initial embedding strength and the initial encryption level can be obtained by first compensating the watermark embedding strength and the watermark encryption level corresponding to the use scene of the to-be-processed data according to the offset.
[0115] 2. In the case where the initial embedding strength meets the embedding strength threshold corresponding to the use scene, and the initial encryption level meets the encryption level threshold corresponding to the use scene, the initial embedding strength and the initial encryption level are determined as the optimized embedding strength and the optimized encryption level, respectively.
[0116] The embedding strength threshold can reflect the maximum modification range of the embedded watermark information to the original data of the to-be-processed data. When the modification range of the embedded watermark information to the original data of the to-be-processed data is large, it will cause distortion of the to-be-processed data, thereby affecting the use of the to-be-processed data. Therefore, in order to ensure the normal use of the to-be-processed data after completing the final watermark embedding, it is necessary to determine whether the initial embedding strength meets the embedding strength threshold corresponding to the use scene.
[0117] The encryption level threshold is a classification critical value set for encryption strength in the field of data security to distinguish different data security protection needs. A high encryption level increases the resource occupation of the device, such as memory, CPU (Central Processing Unit), and the like, and increases the transmission and analysis difficulty of the to-be-processed data after the watermark embedding is completed. A low encryption level has the problems of low watermark security, robustness, and unbreakability. Therefore, in order to avoid waste of device resources caused by too high encryption level and reduce the use risk of to-be-processed data caused by too high encryption level, and to avoid low watermark security, robustness, and unbreakability caused by too low encryption level, it is necessary to determine whether the initial encryption level meets the encryption level threshold corresponding to the use scenario.
[0118] Further, in the case that the initial embedding strength meets the embedding strength threshold corresponding to the use scenario, and the initial encryption level meets the encryption level threshold corresponding to the use scenario, the initial embedding strength and the initial encryption level can be determined as the optimized embedding strength and the optimized encryption level, respectively, for generating the subsequent target embedding path.
[0119] 3. In the case that the initial embedding strength does not meet the embedding strength threshold corresponding to the use scenario, and / or the initial encryption level does not meet the encryption level threshold corresponding to the use scenario, the watermark embedding strength and the watermark encryption level corresponding to the use scenario are updated, and the step of compensating the watermark embedding strength and the watermark encryption level corresponding to the use scenario of the to-be-processed data according to the offset is returned.
[0120] Correspondingly, in the case that the initial embedding strength does not meet the embedding strength threshold corresponding to the use scenario, and / or the initial encryption level meets the encryption level threshold corresponding to the use scenario, it can be considered that the current initial embedding strength and / or initial encryption level cannot be directly used for generating the subsequent target embedding path, and therefore, the watermark embedding strength and the watermark encryption level corresponding to the use scenario of the to-be-processed data need to be re-compensated. Since the offset is determined, in order to obtain a new initial embedding strength and / or initial encryption level, the watermark embedding strength and / or watermark encryption level corresponding to the use scenario of the to-be-processed data can be adjusted, and the adjusted watermark embedding strength and watermark encryption level corresponding to the use scenario of the to-be-processed data are re-compensated according to the adjustment amount to obtain a new initial embedding strength and initial encryption level. Thus, the cycle is repeated until the initial embedding strength meeting the embedding strength threshold corresponding to the use scenario and the initial encryption level meeting the encryption level threshold corresponding to the use scenario are obtained, which are used as the optimized embedding strength and the optimized encryption level, respectively, for generating the subsequent target embedding path.
[0121] Optionally, in a case that the initial embedding strength does not satisfy the embedding strength threshold corresponding to the use scenario and the initial encryption level satisfies the encryption level threshold corresponding to the use scenario, the watermark embedding strength corresponding to the use scenario is updated, and the new watermark embedding strength is compensated according to the offset, to obtain a new initial embedding strength.
[0122] Optionally, in a case that the initial embedding strength satisfies the embedding strength threshold corresponding to the use scenario and the initial encryption level does not satisfy the encryption level threshold corresponding to the use scenario, the watermark encryption level corresponding to the use scenario is updated, and the new watermark encryption level is compensated according to the offset, to obtain a new initial encryption level.
[0123] Optionally, in a case that the initial embedding strength does not satisfy the embedding strength threshold corresponding to the use scenario and the initial encryption level does not satisfy the encryption level threshold corresponding to the use scenario, the watermark embedding strength and the watermark encryption level corresponding to the use scenario are updated, and the new watermark embedding strength and the new watermark encryption level are compensated according to the offset, to obtain a new initial embedding strength and a new initial encryption level.
[0124] In the embodiment, the normal use of the to-be-processed data after the final watermark embedding is completed can be ensured, the waste of device resources caused by the excessively high encryption level can be avoided, the use risk of the to-be-processed data caused by the excessively high encryption level can be reduced, and the low watermark security, robustness and unbreakability caused by the excessively low encryption level can be avoided.
[0125] On the basis of the above embodiments, the generation of the target embedding path in S104 is further refined. Optionally, as shown in FIG. 10, the generation of the target embedding path in S104 can include the following steps. Figure 3
[0126] S301, generating an initial embedding path according to the optimized embedding strength and the optimized encryption level.
[0127] After the optimized embedding strength and the optimized encryption level are obtained, the initial embedding path can be generated according to the optimized embedding strength and the optimized encryption level.
[0128] For example, a correspondence between different embedding strength and encryption level combinations and embedding paths is set in advance. In the above correspondence, the embedding path corresponding to the combination of the optimized embedding strength and the optimized encryption level is selected as the initial embedding path.
[0129] S302, performing smoothness and concealment optimization on the initial embedding path to obtain a target embedding path.
[0130] In the watermark embedding, the smoothness of the watermark refers to the continuity of the disturbance of the carrier data in the watermark embedding process, so as to avoid local drastic changes of the carrier data; and the concealment of the watermark refers to the imperceptibility of the embedded watermark in the watermark embedding process.
[0131] Based on this, in order to make the smoothness and concealment of the watermark in the process of embedding the watermark into the to-be-processed data along the finally determined target embedding path, the smoothness and concealment of the initial embedding path can be optimized to obtain the target embedding path, so that the watermark information can maintain high concealment and avoid embedding failure caused by sudden changes in the path in the process of embedding the watermark into the to-be-processed data along the target embedding path.
[0132] On the basis of the above embodiments, in an exemplary embodiment, the generation of the target embedding position in S105 is further refined, which can optionally include the following steps as shown in Figure 4
[0133] S401, generating initial control instructions according to the target embedding path, the optimized embedding strength and the optimized encryption level.
[0134] The target embedding path, the optimized embedding strength and the optimized encryption level are generally regarded as a watermark embedding strategy, and in order to realize watermark embedding, the watermark embedding strategy can be converted into executable control instructions, so that after obtaining the target embedding path, the optimized embedding strength and the optimized encryption level, the target embedding path, the optimized embedding strength and the optimized encryption level are taken as control parameters of the control instructions, so that the target embedding path, the optimized embedding strength and the optimized encryption level can be converted in combination with the pre-stored embedding parameters (such as the type of to-be-processed data) to generate initial control instructions.
[0135] S402, correcting the initial control instructions to obtain embedding correction instructions and encryption correction instructions, and fusing the embedding correction instructions and the encryption correction instructions to obtain comprehensive control instructions.
[0136] After obtaining the above initial control instructions, in order to avoid instruction errors caused by errors occurring in the conversion process of the target embedding path, the optimized embedding strength and the optimized encryption level, and to avoid final watermark embedding failure, the initial control instructions can be further corrected, and the initial control instructions can be decomposed into embedding correction instructions and encryption correction instructions. The embedding correction instructions are used to indicate the embedding strength adopted in the watermark embedding, and the encryption instructions are used to indicate the encryption level adopted in the watermark embedding. Furthermore, the embedding correction instructions and the encryption correction instructions can be fused to obtain comprehensive control instructions.
[0137] In an optional embodiment, the S402 can include correcting the initial control instruction to obtain real-time embedding depth data and real-time encryption distribution data; performing bias control on the real-time embedding depth data to obtain embedding correction instruction, and performing error control on the real-time encryption distribution data to obtain encryption correction instruction.
[0138] In the embodiment, the initial control instruction can be corrected to be decomposed into real-time embedding depth data and real-time encryption distribution data. The real-time embedding depth data refers to the level and dimension of the traceability information embedded in the to-be-processed data when the traceability information is embedded as watermark information in the to-be-processed data. The real-time encryption distribution data refers to the distribution of the encrypted watermark information in the to-be-processed data when the traceability information is embedded as watermark information in the to-be-processed data. Then, the embedding adjustment algorithm can be used to perform bias control on the real-time embedding depth data to obtain embedding correction instruction, and the encryption adjustment algorithm can be used to perform error control on the real-time encryption distribution data to obtain encryption correction instruction.
[0139] S403, adjusting the initial embedding position according to the comprehensive control instruction to obtain a target embedding position.
[0140] Since the comprehensive control instruction is used to instruct the execution of the watermark encryption operation, the comprehensive control instruction can indicate the final watermark embedding position, and thus the initial embedding position can be adjusted according to the comprehensive control instruction to obtain a target embedding position.
[0141] In the embodiment, the watermark embedding strategies such as the target embedding path, the optimized embedding strength, and the optimized encryption level can be converted into executable control instructions, and the accuracy of the final comprehensive control instruction and the target embedding position can be improved through control instruction correction, and thus the concealment of the final watermark embedding and the efficiency and accuracy of the watermark traceability can be improved.
[0142] On the basis of the above embodiments, in an exemplary embodiment, as shown in Figure 5 The watermark embedding method can include the following steps:
[0143] S501, obtaining to-be-processed data and determining traceability information of the to-be-processed data.
[0144] S502, inputting the to-be-processed data into a data feature extraction model to obtain embedding rules corresponding to the data type of the to-be-processed data.
[0145] S503, embedding the traceability information as watermark information in the to-be-processed data according to the embedding rules corresponding to the data type of the to-be-processed data to obtain a preliminary embedding result.
[0146] S504, position verification is performed on the preliminary embedding position in the preliminary embedding result, and content verification is performed on the watermark information in the preliminary embedding result.
[0147] S505, in a case where the verification results of the position verification and the content verification are both successful verification, an offset of the preliminary embedding position of the watermark information in the preliminary embedding result from the preset embedding position is determined.
[0148] S506, in a case where the offset meets a preset offset threshold, the watermark embedding strength and the watermark encryption level corresponding to the use scenario to which the to-be-processed data belongs are compensated according to the offset, to obtain an initial embedding strength and an initial encryption level.
[0149] S507, in a case where the initial embedding strength meets an embedding strength threshold corresponding to the use scenario, and the initial encryption level meets an encryption level threshold corresponding to the use scenario, the initial embedding strength and the initial encryption level are determined as an optimized embedding strength and an optimized encryption level, respectively.
[0150] S508, an initial embedding path is generated according to the optimized embedding strength and the optimized encryption level, and smoothness and concealment optimization is performed on the initial embedding path to obtain a target embedding path.
[0151] S509, an initial control instruction is generated according to the target embedding path, the optimized embedding strength and the optimized encryption level.
[0152] S510, the initial control instruction is corrected to obtain real-time embedding depth data and real-time encryption distribution data.
[0153] S511, deviation control is performed on the real-time embedding depth data to obtain embedding correction instructions, and error control is performed on the real-time encryption distribution data to obtain encryption correction instructions.
[0154] S512, instruction fusion is performed on the embedding correction instructions and the encryption correction instructions to obtain comprehensive control instructions, and the initial embedding position is adjusted according to the comprehensive control instructions to obtain a target embedding position.
[0155] S513, in a case where the deviation of the target embedding position from the preset embedding position meets a preset deviation threshold, traceability information serving as watermark information is re-embedded at the target embedding position in the to-be-processed data.
[0156] It should be understood that although the steps in the flowcharts involved in the embodiments described above are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the embodiments described above can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately executed with at least part of other steps or stages.
[0157] Based on the same inventive concept, the embodiments of the present application also provide a watermark embedding device for implementing the above-mentioned watermark embedding method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more watermark embedding device embodiments provided below can refer to the limitations of the watermark embedding method described above, which will not be repeated here.
[0158] In an exemplary embodiment, as shown in Figure 6 A watermark embedding device is provided, comprising a data acquisition module 610, a preliminary embedding module 620, a parameter optimization module 630, a path generation module 640, and a watermark embedding module 650, wherein:
[0159] The data acquisition module 610 is configured to acquire the to-be-processed data and determine the traceability information of the to-be-processed data.
[0160] The preliminary embedding module 620 is configured to embed the traceability information as watermark information into the to-be-processed data according to the embedding rule corresponding to the data type of the to-be-processed data, to obtain a preliminary embedding result.
[0161] The parameter optimization module 630 is configured to determine an offset between the preliminary embedding position of the watermark information in the preliminary embedding result and a preset embedding position, and optimize the watermark embedding strength and the watermark encryption level corresponding to the use scenario to which the to-be-processed data belongs according to the offset, to obtain an optimized embedding strength and an optimized encryption level.
[0162] The path generation module 640 is configured to generate a target embedding path according to the optimized embedding strength and the optimized encryption level.
[0163] The watermark embedding module 650 is configured to generate a target embedding position according to the target embedding path, the optimized embedding strength, and the optimized encryption level, and re-embed the traceability information as watermark information at the target embedding position in the to-be-processed data.
[0164] In an example embodiment, the watermark embedding device further comprises:
[0165] A rule determination module configured to input the to-be-processed data into a data feature extraction model to obtain an embedding rule corresponding to a data type of the to-be-processed data.
[0166] In an example embodiment, the watermark embedding device further comprises:
[0167] A verification module configured to, in the preliminary embedding result, perform position verification on the preliminary embedding position in the preliminary embedding result and content verification on the watermark information in the preliminary embedding result before the offset of the preliminary embedding position and the preset embedding position, trigger the parameter optimization module 630 in a case where the verification results of the position verification and the content verification are both verification success, and update the preliminary embedding position and / or the traceability information and trigger the preliminary embedding module 620 in a case where the verification result of the position verification and / or the content verification is verification failure.
[0168] In an example embodiment, the parameter optimization module 630 is specifically configured to:
[0169] In a case where the offset satisfies a preset offset threshold, optimize the watermark embedding strength and the watermark encryption level corresponding to the use scenario to which the to-be-processed data belongs according to the offset to obtain an optimized embedding strength and an optimized encryption level.
[0170] In an example embodiment, the parameter optimization module 630 is specifically configured to:
[0171] Compensate the watermark embedding strength and the watermark encryption level corresponding to the use scenario to which the to-be-processed data belongs according to the offset to obtain an initial embedding strength and an initial encryption level;
[0172] In a case where the initial embedding strength satisfies an embedding strength threshold corresponding to the use scenario and the initial encryption level satisfies an encryption level threshold corresponding to the use scenario, determine the initial embedding strength and the initial encryption level as the optimized embedding strength and the optimized encryption level, respectively;
[0173] Otherwise, update the watermark embedding strength and / or the watermark encryption level corresponding to the use scenario, and return to the step of compensating the watermark embedding strength and the watermark encryption level corresponding to the use scenario to which the to-be-processed data belongs according to the offset.
[0174] In an example embodiment, the path generation module 640 is specifically configured to:
[0175] Generate an initial embedding path according to the optimized embedding strength and the optimized encryption level;
[0176] Optimize the initial embedding path in terms of smoothness and concealment to obtain a target embedding path.
[0177] In an example embodiment, the watermark embedding module 650 comprises:
[0178] An instruction generation module, configured to generate initial control instructions according to the target embedding path, the optimized embedding strength, and the optimized encryption level;
[0179] An instruction fusion module, configured to correct the initial control instructions to obtain embedding correction instructions and encryption correction instructions, and to fuse the embedding correction instructions and the encryption correction instructions to obtain comprehensive control instructions;
[0180] A position adjustment module, configured to adjust the initial embedding position according to the comprehensive control instructions to obtain the target embedding position.
[0181] In an example embodiment, the instruction fusion module is specifically configured to:
[0182] correct the initial control instructions to obtain real-time embedding depth data and real-time encryption distribution data;
[0183] control deviation of the real-time embedding depth data to obtain the embedding correction instructions, and control error of the real-time encryption distribution data to obtain the encryption correction instructions.
[0184] In an example embodiment, the watermark embedding module 650 is specifically configured to:
[0185] re-embed the traceability information as watermark information at the target embedding position in the to-be-processed data in a case where deviation of the target embedding position from the preset embedding position satisfies a preset deviation threshold.
[0186] Each module in the above watermark embedding device can be realized by software, hardware, and combinations thereof, in whole or in part. The above modules can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a memory in a computer device in software form, so as to be called and executed by a processor to perform operations corresponding to each module.
[0187] In an example embodiment, a computer device is provided, which can be a server, and an internal structure diagram of the computer device can be as shown in Figure 7As shown in the figure. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through the system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capability. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as to-be-processed data and traceability data of to-be-processed data. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through network connection. The computer program is executed by the processor to implement a watermark embedding method.
[0188] Those skilled in the art can understand that, Figure 7 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0189] In one exemplary embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps in each method embodiment of the above watermark embedding method.
[0190] In one embodiment, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by the processor to implement the steps in each method embodiment of the above watermark embedding method.
[0191] In one embodiment, a computer program product is provided, including a computer program, and the computer program is executed by the processor to implement the steps in each method embodiment of the above watermark embedding method.
[0192] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.
[0193] The technical features of the above embodiments can be combined in any manner. To make the description concise, not all possible combinations of the technical features in the above embodiments are described, but as long as the combinations of the technical features do not exist contradictions, they should be considered as the scope of the present application.
[0194] The above-described embodiments are merely illustrative of several embodiments of the present application, and the description is relatively specific and detailed, but should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.
Claims
1. A watermark embedding method characterized by, The method comprises: acquiring to-be-processed data and determining traceability information of the to-be-processed data; embedding the traceability information as watermark information into the to-be-processed data according to an embedding rule corresponding to a data type of the to-be-processed data, to obtain a preliminary embedding result; determining an offset of a preliminary embedding position of the watermark information in the preliminary embedding result from a preset embedding position, and optimizing watermark embedding strength and watermark encryption level corresponding to a use scenario to which the to-be-processed data belongs according to the offset, to obtain optimized embedding strength and optimized encryption level; generating a target embedding path according to the optimized embedding strength and the optimized encryption level; generating a target embedding position according to the target embedding path, the optimized embedding strength and the optimized encryption level, and re-embedding the traceability information as watermark information at the target embedding position in the to-be-processed data.
2. The method of claim 1, wherein, Before the step of embedding the traceability information as watermark information into the to-be-processed data according to an embedding rule corresponding to a data type of the to-be-processed data, to obtain a preliminary embedding result, the method further comprises: inputting the to-be-processed data into a data feature extraction model to obtain an embedding rule corresponding to the data type of the to-be-processed data.
3. The method of claim 1, wherein, Before the step of determining an offset of a preliminary embedding position of the watermark information in the preliminary embedding result from a preset embedding position, the method further comprises: performing position verification on the preliminary embedding position in the preliminary embedding result, and performing content verification on the watermark information in the preliminary embedding result; in a case where verification results of the position verification and the content verification are both verification success, determining the offset of the preliminary embedding position of the watermark information in the preliminary embedding result from the preset embedding position; in a case where the verification result of the position verification and / or the content verification is verification failure, updating the preliminary embedding position and / or the traceability information, and returning to the step of embedding the traceability information as watermark information into the to-be-processed data according to an embedding rule corresponding to a data type of the to-be-processed data.
4. The method of claim 1, wherein, The step of optimizing watermark embedding strength and watermark encryption level corresponding to a use scenario to which the to-be-processed data belongs according to the offset, to obtain optimized embedding strength and optimized encryption level, comprises: in a case where the offset meets a preset offset threshold, optimizing watermark embedding strength and watermark encryption level corresponding to the use scenario to which the to-be-processed data belongs according to the offset, to obtain optimized embedding strength and optimized encryption level.
5. The method of claim 4, wherein, The step of optimizing watermark embedding strength and watermark encryption level corresponding to a use scenario to which the to-be-processed data belongs according to the offset, to obtain optimized embedding strength and optimized encryption level, comprises: compensating watermark embedding strength and watermark encryption level corresponding to the use scenario to which the to-be-processed data belongs according to the offset, to obtain initial embedding strength and initial encryption level; determining the initial embedding strength and the initial encryption level as an optimized embedding strength and an optimized encryption level respectively in a case that the initial embedding strength meets an embedding strength threshold corresponding to the use scenario and the initial encryption level meets an encryption level threshold corresponding to the use scenario; otherwise, updating the watermark embedding strength and / or the watermark encryption level corresponding to the use scenario, and returning to the step of compensating the watermark embedding strength and the watermark encryption level corresponding to the use scenario of the to-be-processed data according to the offset.
6. The method of claim 1, wherein, generating an initial embedding path according to the optimized embedding strength and the optimized encryption level; generating an initial embedding path according to the optimized embedding strength and the optimized encryption level; generating an initial embedding path according to the optimized embedding strength and the optimized encryption level; 7. The method of claim 1, wherein, generating an initial embedding path according to the optimized embedding strength and the optimized encryption level; generating an initial embedding path according to the optimized embedding strength and the optimized encryption level; generating an initial embedding path according to the optimized embedding strength and the optimized encryption level; adjusting an initial embedding position according to the comprehensive control instruction to obtain a target embedding position.
8. The method of claim 7, wherein, correcting the initial control instruction to obtain an embedding correction instruction and an encryption correction instruction, and fusing the embedding correction instruction and the encryption correction instruction to obtain a comprehensive control instruction. correcting the initial control instruction to obtain an embedding correction instruction and an encryption correction instruction, and fusing the embedding correction instruction and the encryption correction instruction to obtain a comprehensive control instruction. correcting the initial control instruction to obtain an embedding correction instruction and an encryption correction instruction, and fusing the embedding correction instruction and the encryption correction instruction to obtain a comprehensive control instruction.
9. The method of claim 1, wherein, re-embedding the traceability information as watermark information at the target embedding position in the to-be-processed data in a case that a deviation between the target embedding position and the preset embedding position meets a preset deviation threshold. The device comprises:
10. A watermark embedding apparatus characterized by comprising: a data acquisition module configured to acquire to-be-processed data and determine traceability information of the to-be-processed data; a preliminary embedding module configured to embed the traceability information as watermark information in the to-be-processed data according to an embedding rule corresponding to a data type of the to-be-processed data to obtain a preliminary embedding result; a parameter optimization module configured to determine an offset between a preliminary embedding position of the watermark information in the preliminary embedding result and a preset embedding position, and optimize a watermark embedding strength and a watermark encryption level corresponding to a use scenario of the to-be-processed data according to the offset to obtain an optimized embedding strength and an optimized encryption level; a path generation module configured to generate a target embedding path according to the optimized embedding strength and the optimized encryption level; and a path generation module configured to generate a target embedding path according to the optimized embedding strength and the optimized encryption level. a watermark embedding module configured to generate a target embedding position according to the initial embedding path, the optimized embedding strength, and the optimized encryption level, and re-embed the traceability information as watermark information at the target embedding position in the to-be-processed data.
Citation Information
Cited By
Watermark embedding method, watermark tracing method and system in cross-medium transmission process
CN122046396A