Watermark embedding method and device, watermark extraction method and device, equipment, storage medium and computer program product

By automating the determination of watermark fields and embedded data rows, and using watermarking algorithms to embed and extract watermark information, the problem of cumbersome watermark embedding and extraction processes for structured data is solved, improving watermark extraction efficiency and success rate.

CN121145183APending Publication Date: 2025-12-16CHINA MOBILE COMM LTD RES INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510307696.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-14
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

In existing technologies, the process of embedding and extracting watermarks from structured data is cumbersome and prone to errors, resulting in a low success rate of watermark extraction.

Method used

By identifying the watermark field and embedded data rows in a structured dataset, watermarking algorithms are used to automate the embedding and extraction of watermark information, simplifying the process and improving the success rate.

Benefits of technology

It automates the embedding and extraction of watermarks from structured data, improving watermark extraction efficiency and ensuring a high success rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121145183A_ABST
    Figure CN121145183A_ABST
Patent Text Reader

Abstract

The invention discloses a watermark embedding method, and the method comprises the steps: determining a first watermark field used for embedding watermark information based on a first data set; determining m groups of first embedded data rows based on the first data set; wherein m is an integer greater than or equal to 2; obtaining first attribute values corresponding to the first watermark fields in the m groups of first embedded data rows; based on each group of first attribute values, determining a second attribute value corresponding to the first watermark field in each group of first embedded data rows; wherein each group of second attribute values is used for indicating a used watermark algorithm; modifying each group of first attribute values into the corresponding second attribute values to obtain a second data set; and embedding the watermark information into the attribute value corresponding to the first watermark field in the second data set by adopting the watermark algorithm to obtain a third data set. The invention further discloses a watermark extraction method and device, equipment, a storage medium and a computer program product.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of security, in particular to a watermark embedding method, a watermark extraction method, a device, equipment, a storage medium and a computer program product. BACKGROUND

[0002] With the rapid development of computer technology, how to ensure data security has become a hot research topic. Data watermarking technology is one of the main data tracing technologies at present. By embedding tracing information or copyright information into the redundant space of data, the leaked data can be traced, the data leakage person in charge can be located, or the data copyright can be proved.

[0003] In the process of implementing structured data watermarking, the watermark data is usually embedded in the attribute value of a modifiable field. In the watermark extraction stage, the watermark is recovered by extracting the information in the attribute value. However, in most cases, the fields in different structured data sets are not the same, and there may be multiple fields in the same structured data set. Moreover, due to the difference in business use scenarios, the modifiable fields of different structured data sets may also be different, and the algorithms that can be used are also different. Therefore, in the watermark embedding stage, the data set characteristics and the used algorithms, watermark fields and other parameters need to be recorded to ensure that the watermark extraction matches the recorded data set characteristics, and then the watermark is extracted according to the algorithm and field parameters associated with the data set characteristics. In this way, the watermark embedding and watermark extraction processes are relatively cumbersome, and there is a possibility of recording errors in the embedding stage, which leads to a low success rate of watermark extraction.

[0004] SUMMARY

[0005] To solve the above technical problems, the present application provides a watermark embedding method, a watermark extraction method, a device, equipment, a storage medium and a computer program product, which solves the problem of cumbersome process flow of current structured data watermark embedding and watermark extraction, realizes automatic watermark embedding, improves watermark extraction efficiency, simplifies the implementation process of watermark embedding and watermark extraction, and ensures the success rate of watermark extraction.

[0006] The technical solution of the present application is as follows:

[0007] The present application provides a watermark embedding method, which comprises:

[0008] Based on the first data set, a first watermark field for embedding watermark information is determined;

[0009] Based on the first data set, m groups of first embedded data rows are determined; wherein m is an integer greater than or equal to 2;

[0010] The first attribute value corresponding to the first watermark field in the m groups of first embedded data rows is obtained.

[0011] determining, based on each group of the first attribute values, a second attribute value corresponding to the first watermark field in each group of the first embedding data rows; wherein each group of the second attribute values is used to indicate a watermark algorithm used;

[0012] modifying each group of the first attribute values to the corresponding second attribute values to obtain a second data set;

[0013] embedding the watermark information into the attribute values corresponding to the first watermark field in the second data set using the watermark algorithm to obtain a third data set.

[0014] Optionally, the determining, based on the first data set, a first watermark field for embedding watermark information comprises:

[0015] identifying whether the first data set includes a modifiable field to obtain a first identification result;

[0016] determining the first watermark field based on the first identification result.

[0017] Optionally, the identifying whether the first data set includes a modifiable field to obtain a first identification result comprises:

[0018] performing numerical conversion processing on all first fields included in the first data set to obtain n first field values; wherein n is the number of first fields included in the first data set, and n is an integer greater than or equal to 1;

[0019] sorting n first fields according to a preset sorting order based on n first field values to obtain a first field sorting sequence;

[0020] sequentially identifying whether each first field is a modifiable field based on the first field sorting sequence to obtain a first identification result.

[0021] Optionally, the determining the first watermark field based on the first identification result comprises:

[0022] if the first identification result indicates that there is a modifiable field, determining an i-th first field belonging to the modifiable field as the first watermark field; wherein i is an integer greater than or equal to 1;

[0023] if the first identification result indicates that there is no modifiable field, determining the first watermark field based on a watermark indication information embedding algorithm.

[0024] Optionally, the determining the first watermark field based on the watermark algorithm if the first identification result indicates that there is no modifiable field comprises:

[0025] if the first identification result indicates that there is no modifiable field, and the watermark indication information embedding algorithm is a pseudo-row algorithm, determining that a field in the first data set satisfying a preset requirement is the first watermark field;

[0026] if the first identification result indicates that there is no modifiable field, and the watermark indication information embedding algorithm is a pseudo-column algorithm, obtaining a new field, and determining that the first watermark field is the new field.

[0027] Optionally, the determining, based on the first data set, of m groups of first embedding data rows comprises:

[0028] calculating a remainder of a primary key of each row in the first data set and a preset value;

[0029] determining, as a group of first embedding data rows, behaviors in the first data set with the same remainder, to obtain the m groups of first embedding data rows.

[0030] Optionally, the determining, based on each group of the first attribute values, of a second attribute value corresponding to the first watermark field in each group of the first embedding data rows comprises:

[0031] determining a preset adjustment function and numerical identification information of the watermark algorithm;

[0032] performing distribution calculation on the numerical identification information of the watermark algorithm by the preset adjustment function to determine a first value corresponding to a least significant bit of the i-th group of first attribute values; wherein the value of i is 0, 1, …, m-1 in turn;

[0033] updating the value of the least significant bit of the i-th group of first attribute values to the first value to obtain the i-th group of second attribute values;

[0034] Alternatively, performing distribution calculation on the numerical identification information of the watermark algorithm by the preset adjustment function to obtain the i-th group of second attribute values.

[0035] Optionally, the modifying each group of the first attribute values to the corresponding second attribute value to obtain a second data set comprises:

[0036] if the first identification result indicates that there is no modifiable field, and the watermark algorithm is a pseudo-row algorithm, determining x groups of second embedding data rows from the m groups of first embedding data rows; wherein x is an integer greater than or equal to 1;

[0037] creating x groups of reference embedding data rows with the same format as the x groups of second embedding data rows;

[0038] Modify the first attribute value in the reference embedded data row of group x to the corresponding second attribute value to obtain the second dataset.

[0039] This application provides a watermark extraction method, the method comprising:

[0040] Based on the third dataset, a second watermark field is determined; wherein the third dataset is a dataset that has undergone watermark information embedding processing on the first dataset and indicates a dataset with a watermarking algorithm, and the attribute value corresponding to the second watermark field includes the watermark information;

[0041] Based on the third dataset, p groups of watermark indication information embedding lines are determined; wherein, the watermark indication information embedding lines are used to indicate the watermarking algorithm, and p is an integer greater than or equal to 2;

[0042] Obtain the third attribute value corresponding to the second watermark field in each group of embedded watermark indication information rows;

[0043] Based on the third attribute value of group p, the numerical identification information of the watermarking algorithm is determined;

[0044] The watermarking algorithm corresponding to the numerical identification information is used to process the fourth attribute value corresponding to the second watermark field and extract the corresponding watermark information.

[0045] Optionally, determining the second watermark field based on the third dataset includes:

[0046] The second identification result is obtained by identifying whether the third dataset includes a modifiable field.

[0047] Based on the second recognition result, the second watermark field is determined.

[0048] Optionally, the step of identifying whether the third dataset includes a modifiable field to obtain a second identification result includes:

[0049] Numerical transformation is performed on all the second fields included in the third dataset to obtain q second field values; where q is the number of second fields included in the third dataset, and q is an integer greater than or equal to 1;

[0050] Based on q values ​​of the second field, sort the q values ​​of the second field according to a preset sorting order to obtain a sorted sequence of the second field;

[0051] The sorting sequence of the second field is identified to obtain the second identification result;

[0052] Correspondingly, determining the second watermark field based on the second recognition result includes:

[0053] Based on the sorting sequence of the second field, the j-th second field belonging to the modifiable fields identified from the second recognition result is determined as the second watermark field; where j is an integer greater than or equal to 1.

[0054] Optionally, determining the p groups of watermark indication information embedding rows based on the third dataset includes:

[0055] Calculate the remainder between the primary key and a preset value for each row in the third dataset;

[0056] The rows with the same remainder in the third dataset are identified as a group of embedded data rows, resulting in the p groups of embedded watermark indication information rows.

[0057] Optionally, determining the numerical identifier information of the watermarking algorithm based on the third attribute values ​​of group p includes:

[0058] A preset adjustment function is used to calculate the least significant bit of each group of the third attribute values ​​or each group of the third attribute values ​​to obtain p second values;

[0059] Determine the proportion of the third value that is the most numerous and has the same value among p second values;

[0060] If the percentage is greater than a preset ratio and the third value is within the range of the watermark algorithm number, the numerical identification information is determined to be the third value.

[0061] Optionally, the method further includes:

[0062] If the percentage is less than or equal to a preset ratio, or if the third value exceeds the range of the watermark algorithm number, obtain the next third watermark field adjacent to the second watermark field;

[0063] Update the second watermark field to the third watermark field, and execute the step "obtain the third attribute value corresponding to the second watermark field in each group of watermark indication information embedding rows" until the numerical identification information is obtained.

[0064] This application provides a watermark embedding device, the device comprising: a first determining unit, a first acquiring unit, a second determining unit, a modifying unit, and an embedding unit; wherein:

[0065] The first determining unit is configured to determine a first watermark field for embedding watermark information based on the first dataset;

[0066] The first determining unit is configured to determine m groups of first embedded data rows based on the first dataset; wherein m is an integer greater than or equal to 2;

[0067] The first acquisition unit is used to acquire the first attribute value corresponding to the first watermark field in the m groups of the first embedded data rows;

[0068] The second determining unit is configured to determine, based on each group of the first attribute values, a second attribute value corresponding to the first watermark field in each group of the first embedded data rows; wherein each group of the second attribute values ​​is used to indicate the watermarking algorithm used.

[0069] The modification unit is used to modify each group of first attribute values ​​to the corresponding second attribute values ​​to obtain a second dataset.

[0070] The embedding unit is used to embed the watermark information into the second attribute value of the first watermark field corresponding to the second dataset using the watermark algorithm, so as to obtain the third dataset.

[0071] This application provides a watermark extraction device, the device comprising: a third determining unit, a second acquiring unit, a fourth determining unit, and a processing unit; wherein:

[0072] The third determining unit is used to determine the second watermark field based on the third dataset; wherein the third dataset is the dataset obtained by embedding watermark information into the first dataset and indicating the watermark algorithm, and the attribute value corresponding to the second watermark field includes the watermark information.

[0073] The third determining unit is further configured to determine p groups of watermark indication information embedding lines based on the third dataset; wherein the watermark indication information embedding lines are used to indicate the watermarking algorithm, and p is an integer greater than or equal to 2;

[0074] The second acquisition unit is used to acquire the third attribute value corresponding to the second watermark field in each group of watermark indication information embedding rows;

[0075] The fourth determining unit is used to determine the numerical identification information of the watermarking algorithm based on the third attribute values ​​of the p groups;

[0076] The processing unit is used to process the fourth attribute value corresponding to the second watermark field using the watermark algorithm corresponding to the numerical identification information, and extract the corresponding watermark information.

[0077] This application provides an electronic device, which includes at least: a communication interface, a memory, a processor, and a communication bus; wherein:

[0078] The memory is used to store executable instructions;

[0079] The communication bus is used to realize the communication connection between the communication interface, the processor and the memory;

[0080] The processor is configured to execute a watermark embedding program stored in the memory to implement the steps of the watermark embedding method as described in any of the preceding claims, or to execute a watermark extraction program stored in the memory to implement the steps of the watermark extraction method as described in any of the preceding claims.

[0081] This application provides a storage medium storing a watermark embedding program, which, when executed, implements the steps of the watermark embedding method as described in any of the preceding claims; or the storage medium storing a watermark extraction program, which, when executed, implements the steps of the watermark extraction method as described in any of the preceding claims.

[0082] This application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the watermark embedding method or the watermark extraction method as described in any of the preceding claims.

[0083] This application provides a watermark embedding method, watermark extraction method, apparatus, device, storage medium, and computer program product. Based on a first dataset, a first watermark field for embedding watermark information is determined. Based on the first dataset, m groups of first embedding data rows are determined. Then, the first attribute values ​​corresponding to the first watermark field in the m groups of first embedding data rows are obtained. Based on each group of first attribute values, a second attribute value corresponding to the first watermark field in each group of first embedding data rows is determined. Each group of first attribute values ​​is then modified to correspond to the second attribute value, resulting in a second dataset. Finally, a watermarking algorithm is used to embed watermark information into the attribute values ​​corresponding to the first watermark field in the second dataset, resulting in a third dataset. In this way, by analyzing the first dataset, m groups of first embedded data rows are determined, and the first attribute value corresponding to the first watermark field in the m groups of first embedded data rows is modified to the second attribute value used to indicate the watermarking algorithm. This realizes the embedding of the information indicating the watermarking algorithm into the dataset containing the embedded watermark information, which solves the problem of the cumbersome process of watermark embedding and watermark extraction for structured data. It realizes automated watermark embedding, improves watermark extraction efficiency, simplifies the implementation process of watermark embedding and watermark extraction, and ensures the success rate of watermark extraction. Attached Figure Description

[0084] Figure 1 A flowchart illustrating the watermark embedding method provided in this application embodiment;

[0085] Figure 2 A schematic flowchart illustrating the watermark extraction method provided in this application embodiment;

[0086] Figure 3This is a schematic diagram of the structure of a watermark embedding device provided in an embodiment of this application;

[0087] Figure 4 This is a schematic diagram of the structure of a watermark extraction device provided in an embodiment of this application;

[0088] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0089] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.

[0090] The embodiments of this application provide a watermark processing method, referring to... Figure 1 As shown, the method includes the following steps:

[0091] Step 101: Based on the first dataset, determine the first watermark field used to embed watermark information.

[0092] In this embodiment, the first dataset is a structured dataset into which watermark information needs to be inserted. The watermark information is the information that needs to be inserted into the first dataset for watermark recognition. The first watermark field can be a field that is inserted according to watermark embedding rules or a pre-defined field, that is, the watermark information is inserted into the attribute value corresponding to the first watermark field.

[0093] Step 102: Based on the first dataset, determine the first embedded data rows of m groups.

[0094] Where m is an integer greater than or equal to 2.

[0095] In this embodiment, the first dataset is analyzed, and at least two groups of first embedded data rows are selected. The number of groups, m, can be determined based on the actual situation. Each group of first embedded data rows satisfies the same conditions. The number of rows in each group is determined by the size of the first dataset.

[0096] Step 103: Obtain the first attribute value corresponding to the first watermark field in the first embedded data row of group m.

[0097] In this embodiment of the application, the attribute values ​​corresponding to the first watermark field in the first set of m groups of first embedded data rows are obtained from the first dataset and recorded as the first attribute value corresponding to the first watermark field in each embedded data row.

[0098] Step 104: Based on each group of first attribute values, determine the second attribute value corresponding to the first watermark field in each group of first embedded data rows.

[0099] Each set of second attribute values ​​indicates the watermarking algorithm used.

[0100] In this embodiment, each set of first attribute values ​​is processed to obtain a corresponding set of second attribute values. These second attribute values ​​can be used to indicate the specific watermarking algorithm used for watermark embedding in the data of the first dataset. In this embodiment, the watermarking algorithm can be pre-named using numerical naming rules, for example, by assigning different watermarking algorithms numbers. This allows for identification of different watermarking algorithms through numerical identifiers.

[0101] Step 105: Modify the first attribute value of each group to the corresponding second attribute value to obtain the second dataset.

[0102] In this embodiment of the application, the calculated second attribute value is used to replace the corresponding first attribute value in the first dataset to obtain the second dataset.

[0103] It should be noted that, in order to ensure the reliability and security of the data in the first dataset, when performing watermark insertion, the attribute values ​​of the dataset obtained by copying the first dataset can be updated to obtain the second dataset.

[0104] Step 106: Embed the watermark information into the attribute value corresponding to the first watermark field in the second dataset using a watermarking algorithm to obtain the third dataset.

[0105] In this embodiment, a defined watermarking algorithm is used to embed watermark information into the attribute value corresponding to the first watermark field in the second dataset, resulting in the final embedded watermark information, and a third dataset indicating the watermarking algorithm is provided. It should be noted that when embedding watermark information into the second dataset using the watermarking algorithm, the algorithm can select the corresponding watermark information embedding data row from the second dataset, and then embed the watermark information into the attribute value corresponding to the first watermark field in the watermark information embedding data row. The specific implementation process depends on the actual situation and is not specifically limited here.

[0106] It should be noted that when the watermarking algorithm embeds watermark information into the first watermark field in the second dataset, the corresponding watermark information embedding row is different from the first embedding data row of group m.

[0107] Based on the foregoing embodiments, in other embodiments of this application, step 101, which determines the first watermark field for embedding watermark information based on the first dataset, can be implemented by the following steps:

[0108] The first identification result is obtained by identifying whether the first dataset contains modifiable fields.

[0109] Based on the first recognition result, the first watermark field is determined.

[0110] In this embodiment of the application, an identification method is used to identify the fields included in the first dataset to determine whether the first dataset includes modifiable fields, thereby obtaining the first identification result.

[0111] The first identification result is whether a modifiable field exists or not. A modifiable field is a field whose attribute value can be modified. Whether a field in the first dataset is a modifiable field can be determined by pre-setting the field attribute features.

[0112] Based on the foregoing embodiments, in other embodiments of this application, the step of identifying whether the first dataset includes a modifiable field to obtain a first identification result can be implemented by the following steps:

[0113] Perform numerical transformation on all the first fields included in the first dataset to obtain n values ​​for the first field; where n is the number of first fields included in the first dataset, and n is an integer greater than or equal to 1;

[0114] Based on n values ​​in the first field, sort the n values ​​in the first field according to a preset sorting order to obtain the sorted sequence of the first field;

[0115] Based on the sorting sequence of the first field, each first field is sequentially identified as a modifiable field to obtain the first identification result.

[0116] In this embodiment of the application, the preset sorting order can be sorted from largest to smallest or from smallest to largest.

[0117] Obtain all fields included in the first dataset to get all n first fields. Then, convert all the first fields to numeric types to obtain the corresponding n first field values. Based on the size of the n first field values, sort the n first fields according to a preset sorting order to obtain the first field sorting sequence. Finally, identify the first fields one by one according to the first field sorting sequence to determine whether the first field is a modifiable field, and thus obtain the first identification result.

[0118] Based on the foregoing embodiments, in other embodiments of this application, the step of determining the first watermark field based on the first identification result can be implemented by the following steps:

[0119] If the first identification result indicates the existence of a modifiable field, the i-th first field that is identified as a modifiable field is determined as the first watermark field; where i is an integer greater than or equal to 1.

[0120] If the first identification result indicates that there is no modifiable field, the first watermark field is determined based on the watermark indication information embedding algorithm.

[0121] In this application embodiment, when the first identification result indicates the existence of a modifiable field, the i-th identified first field belonging to the modifiable field can be determined as the first watermark field. For example, when i is 1, it indicates that the first identified first field belonging to the modifiable field is the first watermark field.

[0122] When the first identification result indicates that there is no modifiable field, a pre-set watermark indication information embedding algorithm can be used to determine the first watermark field. In some special cases, the watermark indication information embedding algorithm can be a watermark algorithm.

[0123] Based on the foregoing embodiments, in other embodiments of this application, if the first identification result indicates that there is no modifiable field, determining the first watermark field based on the watermark algorithm can be achieved by the following steps:

[0124] If the first identification result indicates that there is no modifiable field and the watermark indication information embedding algorithm is a pseudo-line algorithm, the field in the first dataset that meets the preset requirements is determined as the first watermark field;

[0125] If the first identification result indicates that there is no modifiable field, and the watermark indication information embedding algorithm is a pseudo-column algorithm, the newly added field is obtained, and the first watermark field is determined to be the newly added field.

[0126] In this embodiment, the preset requirement can be based on the requirements of the sorted sequence of the first field. For example, the field with the smallest value in the sorted sequence of the first field can be the first watermark field, or the field with the largest value in the sorted sequence of the first field can be the first watermark field. The specific setting can be determined by the actual situation and is not specifically limited here. The added field can be a field input by the user or a field automatically generated according to certain rules, such as time, name, etc. The specific setting can be determined by the actual situation and is not specifically limited here.

[0127] When the first identification result indicates that there is no modifiable field and the watermark indicator information embedding algorithm is a pseudo-line algorithm, for example, the first field with the smallest value in the first field sorting sequence can be determined as the first watermark field.

[0128] If the first identification result indicates that there is no modifiable field and the watermark indication information embedding algorithm is a pseudo-column algorithm, the newly added field is obtained, such as the input field received from the user as the newly added field, and the input field is determined as the first watermark field.

[0129] Based on the foregoing embodiments, in other embodiments of this application, step 102, which determines m groups of first embedded data rows based on the first dataset, can be implemented by the following steps:

[0130] Calculate the remainder between the primary key and a preset value for each row in the first dataset;

[0131] The rows with the same remainder in the first dataset are identified as a group of first embedded data rows, resulting in m groups of first embedded data rows.

[0132] In the embodiments of this application, the preset value is an empirical value obtained from a large number of experiments, or it can be an empirical value determined based on the number of rows included in the first dataset, or it can be an empirical value set by the user according to the actual situation. The specific value can be determined by the actual situation and is not specifically limited here.

[0133] Obtain the primary key value of each row in the first dataset, and calculate the remainder of the primary key value of each row with a preset value. Then, count the rows in the first dataset with the same remainder as a group of first embedded data rows, so that m groups of first embedded data rows can be obtained.

[0134] Based on the foregoing embodiments, in other embodiments of this application, step 104, which determines the second attribute value corresponding to the first watermark field in each group of first embedded data rows based on each group of first attribute values, can be implemented by the following steps:

[0135] Determine the numerical identification information of the preset adjustment function and watermark algorithm;

[0136] The numerical identifier information of the watermarking algorithm is allocated and calculated by a preset adjustment function to determine the first value corresponding to the least bit of the first attribute value of the i-th group; where the value of i is 0, 1, ..., m-1 in sequence.

[0137] Update the least significant bit of the first attribute value in the i-th group to the first value to obtain the second attribute value in the i-th group;

[0138] Alternatively, the numerical identifier information of the watermarking algorithm can be allocated and calculated using a preset adjustment function to obtain the second attribute value of the i-th group.

[0139] In this embodiment, the preset adjustment function is a function used to calculate the corresponding second attribute value, which can be preset by the user. In this embodiment, different numerical identifier information is preset for different watermarking algorithms. For example, for the pseudo-row algorithm, the numerical identifier information can be set to 1, and for the pseudo-column algorithm, the numerical identifier information can be set to 2. One implementation process for determining the second attribute value corresponding to the first watermark field in each group of first embedded data rows is as follows: the preset adjustment function is used to allocate and calculate the numerical identifier information of the determined watermarking algorithm according to the number of rows included in the i-th group of first embedded data rows, and the lowest bit value of the first attribute value of the i-th group of first embedded data rows is obtained as the first value. The lowest bit value of the corresponding first attribute value is replaced and updated using the determined first value. In this way, the second attribute value corresponding to each group can be obtained.

[0140] Another approach to determining the second attribute value corresponding to the first watermark field in each group of first embedded data rows is to use a preset adjustment function to allocate and calculate the numerical identifier information of the watermark algorithm, thereby obtaining the second attribute value of the i-th group of first embedded data rows. For example, when the second attribute value is binary data, the number of bits in the second attribute value is the same as the number of bits in the first attribute value.

[0141] Based on the foregoing embodiments, in other embodiments of this application, step 104, which modifies each group of first attribute values ​​to the corresponding second attribute values ​​to obtain a second dataset, can be implemented by the following steps:

[0142] If the first identification result indicates that there is no modifiable field and the watermarking algorithm is a pseudo-row algorithm, determine x groups of second embedded data rows from m groups of first embedded data rows; where x is an integer greater than or equal to 1;

[0143] Create a reference embedded data row for group x with the same format as the second embedded data row of group x;

[0144] Modify the first attribute value in the reference embedded data row of group x to the corresponding second attribute value to obtain the second dataset.

[0145] In this embodiment, when the first identification result indicates that there are no modifiable fields and the watermarking algorithm is a pseudo-row algorithm, pseudo-row creation processing is performed on m groups of first embedded data rows. To reduce workload and storage resource consumption, the value of x can be less than m, but the value of x must be sufficient to quickly determine the numerical identification information of the watermarking algorithm during watermark reading. In the created x groups of reference embedded data rows, the number of rows in each group can differ from the number of rows in the corresponding group of second embedded data rows, but the number of rows in each group of reference embedded data rows must be sufficient to accurately indicate the numerical identification information of the watermarking algorithm. The data in the created x groups of second embedded data rows can differ from the data in the corresponding group of second embedded data rows.

[0146] In this way, the first attribute value in the reference embedded data row of group x can be modified to the corresponding second attribute value, thus obtaining the corresponding second dataset.

[0147] Based on the foregoing embodiments, this application provides an application embodiment of a watermark embedding method, wherein the watermarking algorithms used have been numbered, so that each watermarking algorithm has a recognizable number value. For example, the pseudo-row algorithm is numbered 0, the pseudo-column algorithm is numbered 1, and the attribute tagging algorithm is numbered 2. Correspondingly, the implementation process of watermark embedding processing on the dataset is as follows:

[0148] Step a11: Convert all field names in the dataset to numerical values ​​to obtain the field values.

[0149] Among them, the conversion of field names can be achieved by using a specific encoding method such as UTF-8 to directly convert the field into numeric data, or by using a key to encrypt the data or by hash value processing on the basis of encoding conversion.

[0150] Step a12: Sort each field according to its numerical value to obtain the sorting result, and determine the watermark field for embedding watermark information based on the sorting result.

[0151] When determining the fields to embed the watermark based on the sorting results, you can start from the field with the smallest value or the field with the largest value, and determine whether the corresponding fields are modifiable fields in order.

[0152] Specifically, in step a121, if it is determined that there is a modifiable field, the first modifiable field can be selected as the watermark field, that is, the watermark information is embedded into the attribute value of the watermark field.

[0153] Step a122: If it is determined that there is no modifiable field, add a pseudo row or pseudo column according to the watermarking algorithm to determine the watermark field.

[0154] For the pseudo-row algorithm, the watermark field can be determined based on the sorting result of the field names, such as selecting the field with the smallest value as the watermark field; if the pseudo-column algorithm is used, an additional field needs to be added as the watermark field.

[0155] Step a13: Select a portion of the data rows as watermark indication information embedding rows according to the rules.

[0156] Specifically, when selecting the watermark indicator information embedding row, the value M can be set to calculate the remainder between P and M using the primary key P of each row in the dataset, which can be denoted as the value of P mod M. For example, two sets of embedding rows can be selected, such as the data row with a P mod M value of 0 being the 0th embedding row and the data row with a value of 1 being the 1st embedding row. It should be noted that more sets of embedding rows can be selected during application, where M can be set according to the number of data rows and redundancy requirements.

[0157] Step a14: The watermark indication information is embedded by modifying the attribute value of the watermark field in the watermark indication information embedding row.

[0158] Specifically, the attribute values ​​corresponding to the watermark field in the watermark indication information embedding line are modified so that the attribute values ​​of the watermark indication information embedding line meet certain characteristics. Specifically, the modified attribute values ​​of the watermark indication information embedding line can indicate the algorithm number of the watermarking algorithm used.

[0159] For example, the modification rule could be as follows: When the attribute value type of the watermark field in the watermark indication information embedding row is numeric, the corresponding modification rule must satisfy: modify the attribute value of the watermark field in the watermark indication information embedding row so that the least significant bit of the attribute value of the watermark field in each group of watermark indication information embedding rows, after being substituted into the preset adjustment function, results in the watermark algorithm number being calculated by the preset adjustment function. For example, when the preset adjustment function is an averaging function, the corresponding calculation result can be 0 when the watermark algorithm is a pseudo-row algorithm, 1 when the watermark algorithm is a pseudo-column algorithm, and 2 when the watermark algorithm is an attribute marking algorithm. In some application scenarios, the corresponding calculation result can also be a multiple of the corresponding watermark algorithm number, etc.

[0160] The modification rule can also be as follows: When the attribute value type of the watermark field in the watermark indication information embedding row is numeric, the corresponding modification rule must satisfy the following: Modify the attribute value of the watermark field in the watermark indication information embedding row so that the attribute value of the watermark field in each group of watermark indication information embedding rows, after being substituted into the preset adjustment function, the result calculated by the preset adjustment function is the number of the watermarking algorithm used. For example, when the preset adjustment function is an averaging function, the corresponding calculation result can be 0 when the watermarking algorithm is a pseudo-row algorithm, 1 when the watermarking algorithm is a pseudo-column algorithm, and 2 when the watermarking algorithm is an attribute marking algorithm. In some application scenarios, the corresponding calculation result can also be a multiple of the number of the corresponding watermarking algorithm, etc.

[0161] The modification rules can also be as follows: When the attribute value type of the watermark field in the watermark indicator information embedding row is non-numeric, first convert the attribute value of the watermark field in the watermark indicator information embedding row into a numeric type. Then modify the converted numeric value of the watermark field in each group of watermark indicator information embedding rows. The corresponding modification rules must satisfy: Modify the attribute value of the watermark field in the watermark indicator information embedding row so that the attribute value of the watermark field in each group of watermark indicator information embedding rows, after being substituted into the preset adjustment function, the result calculated by the preset adjustment function is the number of the watermarking algorithm used. For example, when the preset adjustment function is an averaging function, the corresponding calculation result can be 0 when the watermarking algorithm is a pseudo-row algorithm, 1 when the watermarking algorithm is a pseudo-column algorithm, and 2 when the watermarking algorithm is an attribute marking algorithm. In some application scenarios, the corresponding calculation result can also be a multiple of the number of the corresponding watermarking algorithm, etc.

[0162] It should be noted that when the watermarking algorithm is a pseudo-row algorithm, after determining m sets of watermark indication information embedding rows based on the aforementioned method, n watermark indication information embedding rows are constructed for each set based on the determined m sets of watermark indication information embedding rows, so that the attribute values ​​of the watermark field of each set of constructed watermark indication information embedding rows conform to the above rules; for the pseudo-column algorithm, the watermark indication information embedding rows are determined according to the above rules, and the attribute values ​​of the watermark field of the watermark indication information embedding rows are set with reference to the above rules, so that the watermark field values ​​of each set of watermark embedding rows conform to the corresponding rules.

[0163] Step a15: Use a watermarking algorithm to embed watermark information into the attribute values ​​of the watermark field in other rows.

[0164] For example, the watermark information can be encoded and fragmented, and then embedded into the attribute values ​​of the watermark field in the data rows other than the rows where the watermark indication information is embedded.

[0165] Thus, by embedding watermark indication information into the dataset, automated watermark extraction can be achieved in scenarios employing multiple types of watermark fields and algorithms. By setting row groups for watermark indication information embedding and defining the relationship between the field value features of each group and the watermark algorithm and watermark field, the algorithm and watermark field can be obtained by identifying features, making it applicable to scenarios with multiple algorithms and multiple types of watermark fields. Furthermore, sorting the field names and selecting watermark fields sequentially can reduce the time spent determining watermark fields during watermark extraction, improving extraction efficiency.

[0166] The watermark embedding method provided in this application's embodiments determines a first watermark field for embedding watermark information based on a first dataset, and determines m groups of first embedding data rows based on the first dataset. Then, it obtains the first attribute value corresponding to the first watermark field in each of the m groups of first embedding data rows. Based on each group of first attribute values, it determines the second attribute value corresponding to the first watermark field in each group of first embedding data rows, and modifies each group of first attribute values ​​to the corresponding second attribute value, obtaining a second dataset. Finally, it embeds watermark information into the attribute value corresponding to the first watermark field in the second dataset using a watermarking algorithm, obtaining a third dataset. In this way, by analyzing the first dataset, determining m groups of first embedding data rows, and modifying the first attribute value corresponding to the first watermark field in the m groups of first embedding data rows to a second attribute value indicating the watermarking algorithm used, it achieves the embedding of information indicating the watermarking algorithm into the dataset containing the embedded watermark information. This solves the problem of cumbersome processes in current structured data watermark embedding and extraction processes, achieving automated watermark embedding, improving watermark extraction efficiency, simplifying the implementation process of watermark embedding and extraction, and ensuring a high success rate for watermark extraction.

[0167] Based on the foregoing embodiments, this application provides a watermark extraction method, referring to... Figure 2 As shown, the method includes the following steps:

[0168] Step 201: Based on the third dataset, determine the second watermark field.

[0169] The third dataset is the dataset obtained by embedding watermark information into the first dataset and indicating the dataset obtained after the watermarking algorithm is applied. The attribute value corresponding to the second watermark field includes watermark information.

[0170] In this embodiment, the third dataset is a dataset that embeds watermark information and indicates a watermarking algorithm; that is, the third dataset is a dataset obtained by processing using the aforementioned watermark embedding algorithm. The third dataset is analyzed to determine the second watermark field containing the embedded watermark information.

[0171] Step 202: Based on the third dataset, determine the embedding rows of the watermark indication information in group p.

[0172] The watermark indicator information embedding line is used to indicate the watermarking algorithm, where p is an integer greater than or equal to 2.

[0173] In this embodiment of the application, the third dataset is analyzed to determine p groups of watermark indication information embedding lines used to indicate specific watermarking algorithms.

[0174] Step 203: Obtain the third attribute value corresponding to the second watermark field in the embedded row of each group of watermark indication information.

[0175] Step 204: Determine the numerical identification information of the watermarking algorithm based on the third attribute value of group p.

[0176] In this embodiment of the application, the obtained third attribute values ​​of group p are calculated and analyzed to obtain the data identification information of the watermark algorithm that embeds watermark information in the third dataset.

[0177] Step 205: Using the watermarking algorithm corresponding to the numerical identification information, process the fourth attribute value corresponding to the second watermark field to extract the corresponding watermark information.

[0178] In this embodiment, a watermarking algorithm corresponding to the data identification information is used to extract the watermark from the fourth attribute value corresponding to the second watermark field in the third dataset, so as to obtain the corresponding watermark information for subsequent analysis and processing.

[0179] Based on the foregoing embodiments, in other embodiments of this application, step 201, which determines the second watermark field based on the third dataset, can be implemented through the following steps:

[0180] The second identification result is obtained by identifying whether the third dataset contains modifiable fields.

[0181] Based on the second recognition result, the second watermark field is determined.

[0182] Based on the foregoing embodiments, in other embodiments of this application, the step of identifying whether the third dataset includes a modifiable field to obtain a second identification result can be achieved through the following steps:

[0183] Numerical transformation is performed on all the second fields included in the third dataset to obtain q second field values; where q is the number of second fields included in the third dataset, and q is an integer greater than or equal to 1;

[0184] Based on q values ​​in the second field, sort the q values ​​in the second field according to a preset sorting order to obtain a sorted sequence of the second field.

[0185] The second field sorting sequence is identified to obtain the second identification result;

[0186] Correspondingly, based on the second recognition result, the second watermark field is determined, including:

[0187] Based on the second field sorting sequence, the j-th second field that belongs to the modifiable fields is identified from the second recognition result as the second watermark field; where j is an integer greater than or equal to 1.

[0188] In this embodiment, the process of determining the second watermark field is the same as the process of determining the first watermark field in the aforementioned watermark embedding method. Specifically, the process of determining the first watermark field in the aforementioned watermark embedding method can be referred to, and will not be described in detail here.

[0189] Based on the foregoing embodiments, in other embodiments of this application, step 202, which determines the embedding rows of p groups of watermark indication information based on the third dataset, can be achieved through the following steps:

[0190] Calculate the remainder between the primary key and a preset value for each row in the third dataset;

[0191] The rows with the same remainder in the third dataset are identified as a group of embedded data rows, resulting in p groups of embedded watermark indication information rows.

[0192] In this embodiment, the process of determining the p groups of watermark indication information embedding rows is the same as the process of determining the m groups of first embedded data rows in the aforementioned watermark embedding method. For details, please refer to the process of determining the m groups of first embedded data rows in the aforementioned watermark embedding method. It will not be described in detail here.

[0193] Based on the foregoing embodiments, in other embodiments of this application, step 204, which determines the numerical identifier information of the watermark algorithm based on the third attribute value of group p, can be implemented by the following steps:

[0194] The lowest digit of each group of third attribute values ​​or each group of third attribute values ​​is calculated using a preset adjustment function to obtain p second values;

[0195] Determine the proportion of the third value that is the most numerous and has the same value among p second values;

[0196] If the proportion is greater than the preset ratio, and the third value is within the range of the watermark algorithm number, the value identifier information is determined to be the third value.

[0197] In this embodiment, the preset ratio is an empirical value obtained from a large number of experiments, or an empirical value set based on the user's actual experience. The watermarking algorithm number range refers to the numerical identification information of the watermarking algorithms that can be used during watermark embedding. That is, for different datasets, the corresponding numerical identification information for the same watermarking algorithm can be different.

[0198] The calculation is performed based on the preset adjustment function indicated in the third dataset, and the indication information indicating whether the preset adjustment function calculates the least significant bit of the corresponding attribute value or the entire attribute value. For example, if the indication information indicates that the watermarking algorithm is indicated by calculating the least significant bit of the corresponding attribute value through the preset adjustment function, the least significant bit of each group of third attribute values ​​is obtained, and the least significant bit of each group of third attribute values ​​is inversely transformed using the preset adjustment function to obtain the numerical identifier information of the indicated watermarking algorithm as the second value. Since a total of p groups of watermark indication information embedding rows are determined, p second values ​​can be determined. The determined p second values ​​are analyzed to determine the watermarking algorithm finally adopted by the third dataset. The specific process of analyzing the p second values ​​can be as follows: count the proportion of the third value with the same value and the largest number among the p second values, that is, calculate the ratio of the number of third values ​​to p, obtain the proportion, and then compare the proportion with a preset ratio. When the proportion is greater than the preset ratio and the third value is within the range of the watermarking algorithm number indicated by the third dataset, the numerical identifier information of the watermarking algorithm adopted by the third dataset is determined as the third value.

[0199] Based on the foregoing embodiments, in other embodiments of this application, the method further includes the following steps:

[0200] If the percentage is less than or equal to the preset ratio, or if the third value exceeds the range of the watermark algorithm number, obtain the next third watermark field adjacent to the second watermark field;

[0201] Update the second watermark field to the third watermark field, and execute the step "obtain the third attribute value corresponding to the second watermark field in each group of watermark indication information embedding row" until the numerical identification information is obtained.

[0202] Based on the foregoing embodiments, this application provides a watermark extraction method, which corresponds to the inverse process of the watermark embedding method. The corresponding implementation process can be shown in the following steps:

[0203] Step b11: According to the sorting rules during embedding, after numerical processing of the field names included in the dataset, sort the fields according to the size of the converted field values ​​and select the most likely watermark field.

[0204] For example, the fields in the dataset are sorted in ascending order of their converted values, and then the field with the smallest value is selected as the watermark field.

[0205] Step b12: Determine the watermark indication information embedding row according to the watermark indication information embedding row decision rule.

[0206] For details, please refer to the specific implementation process in step a13 above, which will not be elaborated here.

[0207] Step b13: Extract the attribute value of the watermark field in each group of watermark indication information embedding row, substitute the corresponding value into the preset adjustment function used when embedding the watermark indication information according to the watermark indication information embedding rules, obtain the calculation result, and determine the watermark algorithm number value based on the calculation result.

[0208] For example, if there are two groups of embedded watermark information, and the calculation results of the two groups are the same, and the calculation results are within the range of watermark algorithm numbers, then the field is determined to be a watermark field, and the calculation result is the watermark algorithm number value; if there are multiple groups of embedded watermark information, and more than half of the embedded watermark information groups have the same calculation result, and the calculation result is within the range of watermark algorithm numbers, then the field is determined to be a watermark field, and the calculation result is the watermark algorithm number value.

[0209] If the above two sets of calculation results are different, or if more than half of the watermark indication information embedding group's calculation results are different, or if more than half of the same calculation results are not within the range of watermark algorithm number, then the next field is selected sequentially as the watermark field for calculation and analysis until the watermark algorithm number value is determined.

[0210] Step b14: Use the watermarking algorithm corresponding to the determined watermarking algorithm number value to perform watermark extraction processing on the attribute value of the corresponding watermark field to obtain the corresponding watermark information.

[0211] Thus, by embedding watermark indication information into the dataset, automated watermark extraction can be achieved in scenarios employing multiple watermark fields and algorithms. By setting row groups for watermark indication information embedding and defining the relationship between the field value features of each group and the watermark algorithm and watermark field, the algorithm and watermark field can be obtained by identifying features, making it applicable to scenarios with multiple algorithms and multiple types of watermark fields. Sort the field names and select the watermark field sequentially, which reduces the time spent determining the watermark field during watermark extraction and improves extraction efficiency.

[0212] The watermark extraction method provided in this application determines the second watermark field based on a third dataset, and determines p groups of watermark indication information embedding rows based on the third dataset. Then, it obtains the third attribute value corresponding to the second watermark field in each group of watermark indication information embedding rows, determines the numerical identification information of the watermark algorithm based on the p groups of third attribute values, and uses the watermark algorithm corresponding to the numerical identification information to process the fourth attribute value corresponding to the second watermark field to extract the corresponding watermark information. In this way, when extracting watermarks from a third dataset containing embedded watermark information and watermark embedding indication information, the second watermark field containing the embedded watermark information in the third dataset is first determined, and p groups of watermark indication information embedding rows are determined according to the watermark indication information embedding method. Then, the third attribute value corresponding to the second watermark field in each group of watermark indication information embedding rows can be analyzed and processed to obtain the numerical identification information of the watermark algorithm. In this way, the watermark algorithm used for watermark embedding can be determined, which solves the problem of cumbersome process for watermark embedding and watermark extraction of structured data, realizes automated watermark embedding, improves watermark extraction efficiency, simplifies the implementation process of watermark embedding and watermark extraction, and ensures the success rate of watermark extraction.

[0213] Based on the foregoing embodiments, embodiments of this application provide a watermark embedding device, which can be applied to... Figure 1 In the watermark embedding method provided in the corresponding embodiment, refer to Figure 3 As shown, the watermark embedding device 3 may include: a first determining unit 31, a first acquiring unit 32, a second determining unit 33, a modifying unit 34, and an embedding unit 35; wherein:

[0214] The first determining unit 31 is used to determine a first watermark field for embedding watermark information based on the first dataset;

[0215] The first determining unit 31 is used to determine m groups of first embedded data rows based on the first dataset; where m is an integer greater than or equal to 2.

[0216] The first acquisition unit 32 is used to acquire the first attribute value corresponding to the first watermark field in the first embedded data row of m groups;

[0217] The second determining unit 33 is used to determine the second attribute value corresponding to the first watermark field in each group of first embedded data rows based on each group of first attribute values; wherein each group of second attribute values ​​is used to indicate the watermarking algorithm used.

[0218] Modify unit 34 to modify the first attribute value of each group to the corresponding second attribute value to obtain the second dataset;

[0219] Embedding unit 35 is used to embed watermark information into the second attribute value of the first watermark field corresponding to the second dataset using a watermarking algorithm to obtain the third dataset.

[0220] In other embodiments of this application, when the first determining unit performs the step of determining the first watermark field for embedding watermark information based on the first dataset, it can be achieved through the following steps:

[0221] The first identification result is obtained by identifying whether the first dataset contains modifiable fields.

[0222] Based on the first recognition result, the first watermark field is determined.

[0223] In other embodiments of this application, when the first determining unit performs the step of identifying whether the first dataset includes a modifiable field and obtains the first identification result, it can be achieved through the following steps:

[0224] Perform numerical transformation on all the first fields included in the first dataset to obtain n values ​​for the first field; where n is the number of first fields included in the first dataset, and n is an integer greater than or equal to 1;

[0225] Based on n values ​​in the first field, sort the n values ​​in the first field according to a preset sorting order to obtain the sorted sequence of the first field;

[0226] Based on the sorting sequence of the first field, each first field is sequentially identified as a modifiable field to obtain the first identification result.

[0227] In other embodiments of this application, when the first determining unit performs the step of determining the first watermark field based on the first identification result, it can be achieved through the following steps:

[0228] If the first identification result indicates the existence of a modifiable field, the i-th first field that is identified as a modifiable field is determined as the first watermark field; where i is an integer greater than or equal to 1.

[0229] If the first identification result indicates that there is no modifiable field, the first watermark field is determined based on the watermark indication information embedding algorithm.

[0230] In other embodiments of this application, when the first determining unit performs the step of determining the first watermark field based on the watermark algorithm if the first identification result shows that there is no modifiable field, the following steps can be used:

[0231] If the first identification result indicates that there is no modifiable field and the watermark indication information embedding algorithm is a pseudo-line algorithm, the field in the first dataset that meets the preset requirements is determined as the first watermark field;

[0232] If the first identification result indicates that there is no modifiable field, and the watermark indication information embedding algorithm is a pseudo-column algorithm, the newly added field is obtained, and the first watermark field is determined to be the newly added field.

[0233] In other embodiments of this application, when the first determining unit performs the step of determining m groups of first embedded data rows based on the first dataset, it can be achieved through the following steps:

[0234] Calculate the remainder between the primary key and a preset value for each row in the first dataset;

[0235] The rows with the same remainder in the first dataset are identified as a group of first embedded data rows, resulting in m groups of first embedded data rows.

[0236] In other embodiments of this application, the second determining unit is specifically used to implement the following steps:

[0237] Determine the numerical identification information of the preset adjustment function and watermark algorithm;

[0238] The numerical identifier information of the watermarking algorithm is allocated and calculated by a preset adjustment function to determine the first value corresponding to the least bit of the first attribute value of the i-th group; where the value of i is 0, 1, ..., m-1 in sequence.

[0239] Update the least significant bit of the first attribute value of the i-th group to the first value to obtain the second attribute value of the i-th group;

[0240] Alternatively, the numerical identifier information of the watermarking algorithm can be allocated and calculated using a preset adjustment function to obtain the second attribute value of the i-th group.

[0241] In other embodiments of this application, the modification unit is specifically used to implement the following steps:

[0242] If the first identification result indicates that there is no modifiable field and the watermarking algorithm is a pseudo-row algorithm, determine x groups of second embedded data rows from m groups of first embedded data rows; where x is an integer greater than or equal to 1;

[0243] Create a reference embedded data row for group x with the same format as the second embedded data row of group x;

[0244] Modify the first attribute value in the reference embedded data row of group x to the corresponding second attribute value to obtain the second dataset.

[0245] It should be noted that the process of information interaction between units and modules in this embodiment can be referred to the description in other embodiments, and will not be repeated here.

[0246] The watermark embedding device provided in this application determines a first watermark field for embedding watermark information based on a first dataset, and determines m sets of first embedding data rows based on the first dataset. Then, it obtains the first attribute value corresponding to the first watermark field in each of the m sets of first embedding data rows. Based on each set of first attribute values, it determines the second attribute value corresponding to the first watermark field in each set of first embedding data rows, and modifies each set of first attribute values ​​to the corresponding second attribute value, thus obtaining a second dataset. Finally, it embeds watermark information into the attribute value corresponding to the first watermark field in the second dataset using a watermarking algorithm, resulting in a third dataset. In this way, by analyzing the first dataset, determining m sets of first embedding data rows, and modifying the first attribute value corresponding to the first watermark field in the m sets of first embedding data rows to a second attribute value indicating the watermarking algorithm used, it achieves the embedding of information indicating the watermarking algorithm into the dataset containing the embedded watermark information. This solves the problem of cumbersome processes in current structured data watermark embedding and extraction processes, achieving automated watermark embedding, improving watermark extraction efficiency, simplifying the implementation process of watermark embedding and extraction, and ensuring a high success rate for watermark extraction.

[0247] Based on the foregoing embodiments, embodiments of this application provide a watermark extraction device, which can be applied to... Figure 2 In the watermark extraction method provided in the corresponding embodiment, refer to Figure 4 As shown, the watermark extraction device 4 may include: a third determining unit 41, a second acquiring unit 42, a fourth determining unit 43, and a processing unit 44; wherein:

[0248] The third determining unit 41 is used to determine the second watermark field based on the third dataset; wherein the third dataset is the dataset obtained by embedding watermark information into the first dataset and indicating the watermark algorithm, and the attribute value corresponding to the second watermark field includes watermark information.

[0249] The third determining unit 41 is also used to determine p groups of watermark indication information embedding lines based on the third dataset; wherein, the watermark indication information embedding lines are used to indicate the watermarking algorithm, and p is an integer greater than or equal to 2;

[0250] The second acquisition unit 42 is used to acquire the third attribute value corresponding to the second watermark field in each group of watermark indication information embedding row;

[0251] The fourth determining unit 43 is used to determine the numerical identification information of the watermarking algorithm based on the third attribute value of group p;

[0252] The processing unit 44 is used to process the fourth attribute value corresponding to the second watermark field using the watermarking algorithm corresponding to the numerical identification information, and extract the corresponding watermark information.

[0253] In other embodiments of this application, when the third determining unit performs the step of determining the second watermark field based on a third dataset, it can be achieved through the following steps:

[0254] The second identification result is obtained by identifying whether the third dataset contains modifiable fields.

[0255] Based on the second recognition result, the second watermark field is determined.

[0256] In other embodiments of this application, when the third determining unit performs the step of identifying whether the third dataset includes a modifiable field and obtains the second identification result, it can be achieved through the following steps:

[0257] Numerical transformation is performed on all the second fields included in the third dataset to obtain q second field values; where q is the number of second fields included in the third dataset, and q is an integer greater than or equal to 1;

[0258] Based on q values ​​in the second field, sort the q values ​​in the second field according to a preset sorting order to obtain a sorted sequence of the second field.

[0259] The second field sorting sequence is identified to obtain the second identification result;

[0260] Correspondingly, based on the second recognition result, the second watermark field is determined, including:

[0261] Based on the second field sorting sequence, the j-th second field that belongs to the modifiable fields is identified from the second recognition result as the second watermark field; where j is an integer greater than or equal to 1.

[0262] In other embodiments of this application, when the third determining unit performs the step of determining the embedded rows of p groups of watermark indication information based on the third dataset, it can be achieved through the following steps:

[0263] Calculate the remainder between the primary key and a preset value for each row in the third dataset;

[0264] The rows with the same remainder in the third dataset are identified as a group of embedded data rows, resulting in p groups of embedded watermark indication information rows.

[0265] In other embodiments of this application, the fourth determining unit is specifically used to implement the following steps:

[0266] The lowest digit of each group of third attribute values ​​or each group of third attribute values ​​is calculated using a preset adjustment function to obtain p second values;

[0267] Determine the proportion of the third value that is the most numerous and has the same value among p second values;

[0268] If the proportion is greater than the preset ratio, and the third value is within the range of the watermark algorithm number, the value identifier information is determined to be the third value.

[0269] In other embodiments of this application, the fourth determining unit is further configured to perform the following steps:

[0270] If the percentage is less than or equal to the preset ratio, or if the third value exceeds the range of the watermark algorithm number, obtain the next third watermark field adjacent to the second watermark field;

[0271] Update the second watermark field to the third watermark field, and execute the step "obtain the third attribute value corresponding to the second watermark field in each group of watermark indication information embedding row" until the numerical identification information is obtained.

[0272] It should be noted that the process of information interaction between units and modules in this embodiment can be referred to the description in other embodiments, and will not be repeated here.

[0273] The watermark extraction device provided in this application determines the second watermark field based on a third dataset, and determines p groups of watermark indication information embedding rows based on the third dataset. Then, it obtains the third attribute value corresponding to the second watermark field in each group of watermark indication information embedding rows, determines the numerical identification information of the watermark algorithm based on the p groups of third attribute values, and uses the watermark algorithm corresponding to the numerical identification information to process the fourth attribute value corresponding to the second watermark field to extract the corresponding watermark information. In this way, when extracting watermarks from a third dataset containing embedded watermark information and watermark embedding indication information, the second watermark field containing the embedded watermark information in the third dataset is first determined, and p groups of watermark indication information embedding rows are determined according to the watermark indication information embedding method. Then, the third attribute value corresponding to the second watermark field in each group of watermark indication information embedding rows can be analyzed and processed to obtain the numerical identification information of the watermark algorithm. In this way, the watermark algorithm used for watermark embedding can be determined, which solves the problem of cumbersome process for watermark embedding and watermark extraction of structured data, realizes automated watermark embedding, improves watermark extraction efficiency, simplifies the implementation process of watermark embedding and watermark extraction, and ensures the success rate of watermark extraction.

[0274] Based on the foregoing embodiments, embodiments of this application provide an electronic device that can be applied to... Figure 1 The corresponding embodiment provides a watermark embedding method, orFigure 2 In the watermark extraction method provided in the corresponding embodiment, refer to Figure 5 As shown, the electronic device 5 may include: a communication interface 51, a memory 52, a processor 53, and a communication bus 54; wherein:

[0275] Memory 52 is used to store executable information;

[0276] The communication bus 54 is used to realize the communication connection between the communication interface 51, the processor 53 and the memory 52;

[0277] Processor 53 is used to execute the watermark embedding program stored in memory 52, to implement, for example... Figure 1 The implementation process of the watermark embedding method provided in the corresponding embodiment will not be described in detail here, or the watermark extraction program stored in memory 52 can be executed to achieve the following. Figure 2 The implementation process of the watermark extraction method provided in the corresponding embodiment will not be described in detail here.

[0278] Based on the foregoing embodiments, embodiments of this application provide a computer-readable storage medium, simply referred to as a storage medium, which stores one or more programs that can be executed by one or more processors to implement the reference. Figure 1 The corresponding embodiment provides a watermark embedding method, or Figure 2 The implementation process of the watermark extraction method provided in the corresponding embodiment will not be described in detail here.

[0279] Based on the foregoing embodiments, this application also provides a computer program product, including a computer program that can be executed by the processor 53 of the electronic device 5 to complete any of the foregoing method steps.

[0280] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0281] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0282] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0283] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0284] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application.

Claims

1. A watermark embedding method, characterized in that, The method includes: Based on the first dataset, determine the first watermark field used to embed watermark information; Based on the first dataset, determine m groups of first embedded data rows; where m is an integer greater than or equal to 2; Get the first attribute value corresponding to the first watermark field in the first embedded data row of group m; Based on each group of the first attribute values, a second attribute value corresponding to the first watermark field in each group of the first embedded data rows is determined; wherein, each group of the second attribute values ​​is used to indicate the watermarking algorithm used. Modify the first attribute value of each group to the corresponding second attribute value to obtain the second dataset; The watermark information is embedded into the attribute value corresponding to the first watermark field in the second dataset using the watermarking algorithm to obtain the third dataset.

2. The method according to claim 1, characterized in that, The step of determining the first watermark field for embedding watermark information based on the first dataset includes: Identify whether the first dataset includes a modifiable field to obtain the first identification result; Based on the first identification result, the first watermark field is determined.

3. The method according to claim 2, characterized in that, The step of identifying whether the first dataset includes a modifiable field to obtain a first identification result includes: Numerical transformation is performed on all the first fields included in the first dataset to obtain n first field values; where n is the number of first fields included in the first dataset and n is an integer greater than or equal to 1. Based on n values ​​of the first field, sort the n values ​​of the first field according to a preset sorting order to obtain a sorted sequence of the first field; Based on the sorting sequence of the first field, each of the first fields is sequentially identified as a modifiable field to obtain the first identification result.

4. The method according to claim 2 or 3, characterized in that, The step of determining the first watermark field based on the first identification result includes: If the first identification result indicates the existence of a modifiable field, the i-th first field that is identified as a modifiable field is determined to be the first watermark field; where i is an integer greater than or equal to 1. If the first identification result indicates that there is no modifiable field, the first watermark field is determined based on the watermark indication information embedding algorithm.

5. The method according to claim 4, characterized in that, If the first identification result indicates that there is no modifiable field, the first watermark field is determined based on the watermark algorithm, including: If the first identification result indicates that there is no modifiable field, and the watermark indication information embedding algorithm is a pseudo-line algorithm, the field in the first dataset that meets the preset requirements is determined to be the first watermark field. If the first identification result indicates that there is no modifiable field, and the watermark indication information embedding algorithm is a pseudo-column algorithm, the newly added field is obtained, and the first watermark field is determined to be the newly added field.

6. The method according to claim 1, characterized in that, The step of determining m groups of first embedded data rows based on the first dataset includes: Calculate the remainder between the primary key and a preset value for each row in the first dataset; The rows with the same remainder in the first dataset are identified as a first embedded data row, thus obtaining the m groups of first embedded data rows.

7. The method according to claim 1, characterized in that, The step of determining the second attribute value corresponding to the first watermark field in each group of the first embedded data rows based on each group of the first attribute values ​​includes: Determine the numerical identification information of the preset adjustment function and the watermark algorithm; The numerical identifier information of the watermarking algorithm is allocated and calculated by a preset adjustment function to determine the first value corresponding to the least bit of the first attribute value of the i-th group; where the value of i is 0, 1, ..., m-1 in sequence. Update the least significant bit of the first attribute value of the i-th group to the first value to obtain the second attribute value of the i-th group; Alternatively, the numerical identifier information of the watermarking algorithm can be allocated and calculated using the preset adjustment function to obtain the second attribute value of the i-th group.

8. The method according to claim 5, characterized in that, The step of modifying the first attribute value of each group to the corresponding second attribute value to obtain the second dataset includes: If the first identification result indicates that there is no modifiable field, and the watermarking algorithm is a pseudo-row algorithm, determine x groups of second embedded data rows from m groups of the first embedded data rows; where x is an integer greater than or equal to 1; Create a reference embedded data row for group x with the same format as the second embedded data row in group x; Modify the first attribute value in the reference embedded data row of group x to the corresponding second attribute value to obtain the second dataset.

9. A watermark extraction method, characterized in that, The method includes: Based on the third dataset, a second watermark field is determined; wherein the third dataset is a dataset that has undergone watermark information embedding processing on the first dataset and indicates a dataset with a watermarking algorithm, and the attribute value corresponding to the second watermark field includes the watermark information; Based on the third dataset, p groups of watermark indication information embedding lines are determined; wherein, the watermark indication information embedding lines are used to indicate the watermarking algorithm, and p is an integer greater than or equal to 2; Obtain the third attribute value corresponding to the second watermark field in each group of embedded watermark indication information rows; Based on the third attribute value of group p, the numerical identification information of the watermarking algorithm is determined; The watermarking algorithm corresponding to the numerical identification information is used to process the fourth attribute value corresponding to the second watermark field and extract the corresponding watermark information.

10. The method according to claim 9, characterized in that, The determination of the second watermark field based on the third dataset includes: The second identification result is obtained by identifying whether the third dataset includes a modifiable field. Based on the second recognition result, the second watermark field is determined.

11. The method according to claim 10, characterized in that, The step of identifying whether the third dataset includes a modifiable field to obtain a second identification result includes: Numerical transformation is performed on all the second fields included in the third dataset to obtain q second field values; where q is the number of second fields included in the third dataset, and q is an integer greater than or equal to 1; Based on q values ​​of the second field, sort the q values ​​of the second field according to a preset sorting order to obtain a sorted sequence of the second field; The sorting sequence of the second field is identified to obtain the second identification result; Correspondingly, determining the second watermark field based on the second recognition result includes: Based on the sorting sequence of the second field, the j-th second field belonging to the modifiable fields identified from the second recognition result is determined to be the second watermark field; where j is an integer greater than or equal to 1.

12. The method according to claim 9, characterized in that, The step of determining the embedding rows of p groups of watermark indication information based on the third dataset includes: Calculate the remainder between the primary key and a preset value for each row in the third dataset; The rows with the same remainder in the third dataset are identified as a group of embedded data rows, resulting in the p groups of embedded watermark indication information rows.

13. The method according to claim 9 or 12, characterized in that, The step of determining the numerical identifier information of the watermarking algorithm based on the third attribute value of group p includes: A preset adjustment function is used to calculate the least significant bit of each group of the third attribute values ​​or each group of the third attribute values ​​to obtain p second values; Determine the proportion of the third value that is the most numerous and has the same value among p second values; If the percentage is greater than a preset ratio and the third value is within the range of the watermark algorithm number, the numerical identification information is determined to be the third value.

14. The method according to claim 13, characterized in that, The method further includes: If the percentage is less than or equal to a preset ratio, or if the third value exceeds the range of the watermark algorithm number, obtain the next third watermark field adjacent to the second watermark field; Update the second watermark field to the third watermark field, and execute the step "obtain the third attribute value corresponding to the second watermark field in each group of watermark indication information embedding rows" until the numerical identification information is obtained.

15. A watermark embedding device, characterized in that, The device includes: a first determining unit, a first acquiring unit, a second determining unit, a modifying unit, and an embedding unit; wherein: The first determining unit is configured to determine a first watermark field for embedding watermark information based on the first dataset; The first determining unit is used to determine m groups of first embedded data rows based on the first dataset; where m is an integer greater than or equal to 2; The first acquisition unit is used to acquire the first attribute value corresponding to the first watermark field in the m groups of the first embedded data rows; The second determining unit is configured to determine, based on each group of the first attribute values, a second attribute value corresponding to the first watermark field in each group of the first embedded data rows; wherein each group of the second attribute values ​​is used to indicate the watermarking algorithm used. The modification unit is used to modify each group of first attribute values ​​to the corresponding second attribute values ​​to obtain a second dataset. The embedding unit is used to embed the watermark information into the second attribute value of the first watermark field corresponding to the second dataset using the watermark algorithm, so as to obtain the third dataset.

16. A watermark extraction device, characterized in that, The device includes: a third determining unit, a second acquiring unit, a fourth determining unit, and a processing unit; wherein: The third determining unit is used to determine the second watermark field based on the third dataset; wherein the third dataset is the dataset obtained by embedding watermark information into the first dataset and indicating the watermark algorithm, and the attribute value corresponding to the second watermark field includes the watermark information. The third determining unit is further configured to determine p groups of watermark indication information embedding lines based on the third dataset; wherein the watermark indication information embedding lines are used to indicate the watermarking algorithm, and p is an integer greater than or equal to 2; The second acquisition unit is used to acquire the third attribute value corresponding to the second watermark field in each group of watermark indication information embedding rows; The fourth determining unit is used to determine the numerical identification information of the watermarking algorithm based on the third attribute values ​​of the p groups; The processing unit is used to process the fourth attribute value corresponding to the second watermark field using the watermark algorithm corresponding to the numerical identification information, and extract the corresponding watermark information.

17. An electronic device, characterized in that, The electronic device includes at least: a communication interface, a memory, a processor, and a communication bus; wherein: The memory is used to store executable instructions; The communication bus is used to realize the communication connection between the communication interface, the processor and the memory; The processor is configured to execute a watermark embedding program stored in the memory to implement the steps of the watermark embedding method as described in any one of claims 1 to 8, or to execute a watermark extraction program stored in the memory to implement the steps of the watermark extraction method as described in any one of claims 9 to 14.

18. A storage medium, characterized in that, The storage medium stores a watermark embedding program, which, when executed, implements the steps of the watermark embedding method as described in any one of claims 1 to 8; or the storage medium stores a watermark extraction program, which, when executed, implements the steps of the watermark extraction method as described in any one of claims 9 to 14.

19. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the watermark embedding method as described in any one of claims 1 to 8, or the steps of the watermark extraction method as described in any one of claims 9 to 14.