An Adaptive Watermark Embedding Method Based on Dataset Features
By adopting an adaptive watermark embedding method based on dataset features, the optimal embedding method is automatically selected, which solves the problem of user dependence on operating habits and historical data in existing technologies. This achieves efficient and accurate data watermark embedding, improving the concealment and adaptability of the dataset.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SICHUAN JIUYUAN YINHAI SOFTWARE
- Filing Date
- 2026-05-29
- Publication Date
- 2026-07-31
AI Technical Summary
Existing dataset watermark embedding technologies rely on user habits and historical data, making it difficult to adapt to new datasets. This results in high technical barriers, low adaptability, and susceptibility to human error and watermark failure.
By extracting multidimensional features from the dataset, including field attributes, data distribution, and statistical features, a multi-attribute weighted scoring algorithm is used to automatically select the optimal watermark embedding method, generate an adaptive watermark set, and embed it.
It achieves accurate matching between data watermarks and datasets, improves concealment and anti-attack capabilities, lowers the user operation threshold, and improves batch processing efficiency.
Smart Images

Figure CN122333432B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of watermark embedding technology, and more specifically to an adaptive watermark embedding method based on dataset features. Background Technology
[0002] Data watermarking technology, as a key means of protecting data assets, enables functions such as copyright ownership verification and data flow tracking by implicitly embedding identification information in datasets, and has begun to be applied to secure circulation scenarios of structured datasets.
[0003] Currently, the main forms of dataset watermark embedding include: pseudo-rows, pseudo-columns, invisible characters, and numerical perturbations. Existing dataset watermark embedding schemes mainly include: manually configured watermark embedding schemes and intelligent recommendation schemes based on historical data.
[0004] Manually selected watermark embedding solutions offer various embedding methods (such as pseudo-rows, pseudo-columns, and numerical perturbations) for users to choose from. Users need to judge the characteristics of the dataset (such as field types and data precision) based on their own experience, manually specify parameters such as embedding method, watermark length, and embedding position, and then the system performs the embedding operation. Some advanced solutions provide simple dataset feature displays (such as field type statistics and data mean), but users still need to manually configure the embedding parameters. Users must have professional watermarking technology knowledge and dataset analysis capabilities, and the operation process is cumbersome. For scenarios involving batch processing of multiple types of structured datasets, users need to configure parameters for each dataset one by one, which is inefficient and prone to watermark failure or data corruption due to human error. At the same time, because the core decision-making process is completed by the user, an automated feature analysis and decision-making mechanism is not built, ignoring the diversity of structured dataset types, resulting in high technical barriers and low adaptability.
[0005] The intelligent recommendation solution based on historical data collects users' historical watermarking operation data (such as past embedding methods and configured parameters) and features of similar historical datasets. It then uses a neural network model to train a watermarking recommendation model. When a new watermark embedding request is received, it recommends suitable watermark parameters and embedding methods based on the user's historical preferences. Its core logic is based on user behavior habits rather than adaptively adjusting to the features of the dataset itself. This solution relies on high-quality historical data and has poor adaptability to watermark embedding on entirely new datasets. Summary of the Invention
[0006] To address the aforementioned shortcomings of existing technologies, this invention provides a watermark adaptive embedding method based on dataset features. By embedding watermarks based on the features of the dataset itself, it achieves deep matching between the watermark scheme and the dataset characteristics, eliminating reliance on user operating habits and historical data. This method can still adapt well to watermark strategies even with entirely new datasets and no historical operation records, thus significantly improving the watermark's concealment, anti-attack capability, and data usability. Furthermore, basing the watermark embedding method decision on the dataset's inherent characteristics effectively lowers the user's learning curve, reduces errors caused by manual judgment, and improves the compatibility between the watermark and the dataset.
[0007] To achieve the above-mentioned objectives, the technical solution adopted by this invention is as follows:
[0008] An adaptive watermark embedding method based on dataset features includes the following steps:
[0009] Obtain the target dataset and extract its multidimensional feature set;
[0010] Multiple watermark embedding methods are quantitatively defined to form quantitative attribute values for each watermark embedding method;
[0011] Based on the multi-dimensional feature set and the quantized attribute values, a multi-attribute weighted comprehensive score is calculated to determine the optimal watermark embedding method.
[0012] Based on the multidimensional feature set, a watermark set with the optimal embedding method is generated;
[0013] The target dataset is watermarked using the watermark set with the optimal embedding method.
[0014] Furthermore, the multidimensional feature set includes a field attribute feature set, a data distribution feature set, and a data statistical feature set.
[0015] Furthermore, the field attribute feature set includes field name, data type, length, precision, order, and primary key or unique key constraint features;
[0016] The data distribution feature set includes field value ranges, sample density distribution matrix, and correlation coefficient matrix between fields;
[0017] The data statistical feature set includes the mean, standard deviation, coefficient of variation, and information entropy of each field.
[0018] Furthermore, the various watermark embedding methods include pseudo-row embedding, pseudo-column embedding, invisible character embedding, and number perturbation embedding;
[0019] The quantitative definition is standardized from four dimensions: field type matching degree, concealment coefficient, data integrity, and resistance to attack.
[0020] Further, based on the multi-dimensional feature set and the quantized attribute values, a multi-attribute weighted comprehensive score is calculated to determine the optimal watermark embedding method, including:
[0021] The weight coefficients are dynamically calculated based on the multidimensional feature set, and the basic adaptation score for each watermark embedding method is calculated in combination with the quantized attribute values.
[0022] Based on the multidimensional feature set, the feature correction value of each embedding method is calculated, and the basic adaptation score is corrected to obtain the correction score of multiple watermark embedding methods.
[0023] The optimal watermark embedding method is determined based on the modified scores of various watermark embedding methods.
[0024] Furthermore, the weighting coefficients include field attribute feature weights. Distribution characteristic weights Statistical feature weights Anti-attack requirement weight And satisfy ;
[0025] Among them, field attribute feature weights Distribution feature weights are calculated based on the proportion of numeric and character fields. Statistical feature weights are calculated based on the sample density distribution matrix. The attack resistance requirement weight is calculated based on the coefficient of variation of each field. Calculation based on the information entropy of each field.
[0026] Furthermore, calculating the feature correction value for each embedding method based on the multidimensional feature set includes:
[0027] The feature correction value for pseudo-row embedding is calculated based on the ratio of the number of sample rows to the number of fields in the target dataset.
[0028] The feature correction value of the pseudo-column embedding method is calculated based on the average correlation between fields in the multidimensional feature set;
[0029] Calculate the feature correction value for invisible character embedding methods based on the proportion of character fields in the target dataset;
[0030] The feature correction value of the numerical perturbation embedding method is calculated based on the proportion of numerical fields in the target dataset and the average coefficient of variation of the field data.
[0031] Furthermore, the basic adaptation score is modified as follows:
[0032]
[0033] in, The corrected score for the k-th watermark embedding method is given. The basic adaptation score for the k-th watermark embedding method. This is the feature correction value for the k-th watermark embedding method.
[0034] Further, based on the multidimensional feature set, a watermark set for the optimal embedding method is generated, including:
[0035] Depending on whether the optimal embedding method is pseudo-row embedding, pseudo-column embedding, invisible character embedding, or number perturbation embedding, different adaptive logic is used to determine the watermark length, encoding rules, and / or redundancy of the watermark set.
[0036] Furthermore, embedding a data watermark into the target dataset using the watermark set of the optimal embedding method includes:
[0037] Depending on whether the optimal embedding method is pseudo-row embedding, pseudo-column embedding, invisible character embedding, or numeric perturbation embedding, the watermark embedding position is adaptively determined based on data sparsity, field correlation, or string structure, respectively.
[0038] The present invention has the following beneficial effects:
[0039] (1) This invention extracts the basic features, data distribution features, and statistical features of the fields in a structured dataset, and uses a decision algorithm based on dynamic weight calculation and multi-attribute weighted scoring to automatically select the optimal watermark embedding method, thus eliminating the limitations of manual selection or fixed rules. For example, for financial statistical analysis datasets that are dominated by numerical data and have stable data, it will adaptively match the embedding of small numerical perturbations and dynamically determine the perturbation threshold based on the data standard deviation and coefficient of variation to ensure that the deviation of the statistical features of the data after embedding is controlled within a preset range; for government datasets with a high proportion of character fields, it will accurately match the embedding of invisible characters, and the embedding position and strength will be adaptively adjusted according to the field information entropy to achieve the optimal balance between watermark concealment and data availability. The watermark and the dataset will have higher adaptive matching accuracy and better concealment.
[0040] (2) This invention constructs an end-to-end closed-loop process of “feature extraction - method decision - watermark generation - embedding execution”, in which the main steps are completed autonomously without the need for manual parameter configuration or professional technical knowledge. For scenarios of batch processing of multiple types of structured datasets, it can automatically adapt to the field types, distribution patterns and statistical characteristics of different datasets, generate exclusive watermark schemes and efficiently execute embedding, without the need for manual intervention on each dataset, which greatly reduces the operation threshold and significantly improves the batch processing efficiency compared with existing technologies. Attached Figure Description
[0041] Figure 1 This is a schematic diagram of a watermark adaptive embedding method based on dataset features in this invention. Detailed Implementation
[0042] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.
[0043] like Figure 1 As shown, an embodiment of the present invention provides a watermark adaptive embedding method based on dataset features, comprising the following steps S1 to S5:
[0044] S1. Obtain the target dataset and extract the multidimensional feature set of the target dataset;
[0045] In an optional embodiment of the present invention, after receiving the dataset watermark embedding request, step S1 extracts the first feature set of the target dataset: field attribute feature set (T), which includes field name features, field data type features, field length features, field precision features, field order features, primary key and unique key features; extracts the second feature set of the target dataset: data distribution feature set (D), which contains the spatial distribution pattern of the target dataset, including value range intervals, density distribution matrix and correlation coefficient matrix between fields; extracts the third feature set of the target dataset: data statistical feature set (S), which includes the numerical statistical pattern of the target dataset, including the mean of each field (arithmetic mean for numerical fields, encoded mean for character fields), standard deviation, coefficient of variation and information entropy of each field.
[0046] For example, this embodiment extracts the first feature set of the target dataset:
[0047] Field attribute feature set
[0048] ;
[0049] in, For field name characteristics, Let i be the field name of the i-th field; For field data type characteristics, Encode the data type of the i-th field. Identify as a numeric field (integer / floating-point, such as amount, quantity, number, statistical value, etc., supporting numeric perturbation embedding). Identified as a character field (fixed-length / variable-length string, such as name, address, remarks, encoding, etc., supporting the embedding of invisible characters). 3. Identified as a time-type field (date, time, etc.). 4. Identified as a mixed constraint field (enumeration type, status code, etc.); For field length features, Let be the field length of the i-th field; For field length features, This represents the precision of the i-th field; non-numeric fields are set to 0 by default.
[0050] The field's order feature in the dataset. Sort the i-th field by its field number; This refers to the primary key or unique key characteristics of a field. Does the i-th field have a unique constraint? It is marked as having a unique key constraint. This indicates that there is no unique key constraint.
[0051] This embodiment extracts the second feature set of the target dataset:
[0052] Data distribution feature set ;
[0053] in, For the field value range feature, Let i be the range of numeric / character values for the i-th field. For numeric fields... Character fields are character encoding ranges. ; Here is the sample density distribution matrix, with dimension 1. This characterizes the sparsity of the distribution of samples under each field. The smaller the value, the sparser the data distribution at that location, making it more suitable for embedding watermarks (higher concealment). The Pearson correlation coefficient matrix between fields. The closer the value is to 0, the weaker the correlation between the i-th and j-th fields, and the more suitable it is to insert a pseudo-column watermark between the two fields;
[0054] This embodiment extracts the third feature set of the target dataset:
[0055] Data Statistical Feature Set ;in, This represents the mean of each field; for numeric fields, it represents the arithmetic mean, and for character fields, it represents the encoded mean.
[0056] The standard deviation of a field represents the degree of dispersion of the data within that field.
[0057] Here are the coefficients of variation for each field. , The smaller the value, the more stable the data in that field and the stronger its resistance to disturbances. For the information entropy of each field, k represents the number of unique values in the field. The larger the value, the richer the information in the field and the greater the amount of watermark information it can carry.
[0058] S2. Quantify and define multiple watermark embedding methods to form quantitative attribute values for each watermark embedding method;
[0059] In an optional embodiment of the present invention, step S2 defines four adaptation attribute quantization values for each of the four dataset watermark embedding methods: pseudo-row embedding, pseudo-column embedding, invisible character embedding, and number perturbation embedding, forming an embedding method quantization attribute set. ,
[0060] in = Pseudo-line embedding, = Pseudo-column embedding, = Invisible character embedding, = Numerical perturbation embedding. The specific quantitative definition is based on four dimensions: field type matching degree, concealment coefficient, data integrity, and resistance to attacks. Among these, field type matching degree... Specifically defined as the degree of compatibility between the embedding method and the data set field types; concealment coefficient. Specifically defined as the natural concealment ability of this embedding method within the dataset, with higher values indicating greater difficulty in identification; data integrity. Specifically, it is defined as the degree to which the embedding method damages the original features of the dataset; a higher value indicates better data usability after embedding; resistance to attacks. Specifically, it is defined as the ability of this embedding method to resist data tampering, compression, and noise interference; the higher the value, the stronger the watermark stability. All four attributes for each embedding method are standardized quantitative values. A higher attribute value indicates better adaptability of the embedding method in that dimension. The specific definition standard is as follows:
[0061] Field type matching: Pseudo-rows > Pseudo-columns > Invisible characters > Numeric perturbations
[0062] Concealment coefficient: Numerical perturbation > Invisible characters > Pseudo-rows > Pseudo-columns
[0063] Data losslessness: Pseudo-columns > Invisible characters > Numeric perturbations > Pseudo-rows
[0064] Resistance to attacks: Numeric perturbations > Pseudo-rows > Invisible characters > Pseudo-columns
[0065] The specific value definition can be adjusted according to the user's emphasis on the four dimensions of watermark embedding. For example, the pseudo-line method quantization definition is M1 = {0.8, 0.3, 0.2, 0.6}.
[0066] S3. Calculate the optimal watermark embedding method by performing a multi-attribute weighted comprehensive score based on the multi-dimensional feature set and the quantized attribute values.
[0067] In an optional embodiment of the present invention, step S3 quantifies the attribute set based on three feature sets and embedding methods, and performs a multi-attribute weighted comprehensive score calculation based on the dataset features. The weight coefficients include: field feature weights, distribution feature weights, statistical feature weights, and anti-attack weights. These weight coefficients are dynamically calculated from the dataset's own features, rather than being preset. Specific steps include:
[0068] The weight coefficients are dynamically calculated based on the multidimensional feature set, and the basic adaptation score for each watermark embedding method is calculated in combination with the quantized attribute values.
[0069] Based on the multidimensional feature set, the feature correction value of each embedding method is calculated, and the basic adaptation score is corrected to obtain the correction score of multiple watermark embedding methods.
[0070] The optimal watermark embedding method is determined based on the modified scores of various watermark embedding methods.
[0071] In this embodiment, the dynamic nature of the weights is the core of the adaptive mechanism. First, the weight coefficients are dynamically calculated based on the multi-dimensional feature set, and the calculation method is as follows:
[0072] Field attribute feature weights , Number of numeric fields For character fields, the more singular the field type, the higher the weight.
[0073] : Distribution characteristic weights, , is the minimum sample density of the i-th field; the sparser the distribution, the higher the weight; m is the number of fields in the dataset.
[0074] Statistical feature weights The smaller the coefficient of variation (the more stable the data), the higher the weight. is the coefficient of variation; m is the number of fields in the dataset;
[0075] : Attack resistance requirement weight, The higher the information entropy, the higher the weight; m is the number of fields in the dataset.
[0076] Then, the baseline fit score for each embedding method on the target dataset is calculated. Baseline scores are calculated for each of the four watermark embedding methods M1 / M2 / M3 / M4. The calculation formula is:
[0077]
[0078] in, , , , These are the quantized values of the four adaptation attributes for the k-th watermark embedding method. , , , These are dynamic weight coefficients, calculated from the features of the dataset, and satisfying... + + + =1.
[0079] Then, the feature correction score for each watermark embedding method on the target dataset is calculated. The base score is corrected, and the correction logic is entirely based on the original features of the dataset without human intervention. The correction formula is as follows:
[0080]
[0081] in, The corrected score for the k-th watermark embedding method is given. The basic adaptation score for the k-th watermark embedding method. This is the feature correction value for the k-th watermark embedding method.
[0082] Feature correction value in this embodiment Differentiated design of correction logic for four watermark embedding methods to accurately match dataset features:
[0083] Pseudo-line embedding M1: The more rows in the sample, the higher the correction value of the pseudo-row embedding and the better the fit; m is the number of fields in the dataset, and n is the number of rows in the dataset;
[0084] Pseudo-column embedding M2: The lower the average relevance of the fields, the higher the correction value of pseudo-column embedding, and the better the adaptability. It refers to the correlation between various fields in the dataset;
[0085] Invisible character embedding M3: The higher the proportion of character fields, the higher the correction value for invisible character embedding, and the better the adaptability; m is the number of fields in the dataset;
[0086] Digital perturbation embedded in M4: The higher the proportion of numerical fields and the more stable the data, the higher the correction value of the numerical perturbation embedding and the better the adaptability; m is the number of fields in the dataset; This represents the average value of the coefficient of variation for a value-type field.
[0087] Finally, based on the corrected scores of the four embedding methods on the target dataset, the one with the highest score is selected as the optimal watermark embedding method, expressed as:
[0088] ; Score for each embedding method;
[0089] in, This is the optimal watermark embedding method.
[0090] S4. Generate the watermark set of the optimal embedding method based on the multidimensional feature set;
[0091] In an optional embodiment of the present invention, step S4 generates a watermark set based on the optimal embedding method.
[0092] If the optimal approach is pseudo-line embedding First, the number of pseudo-line watermarks, N, is determined based on the number of rows in the dataset. Then, the core watermark source information, such as copyright identification and source information, is converted into a binary stream using Base64 encoding. This stream is then split according to field type and converted into watermark fragments of the corresponding format. These fragments are then concatenated in the original dataset field order to form a single pseudo-line watermark data set, generating N pseudo-line watermark data sets. The specific process is as follows:
[0093] Step 1: Determine the watermark length. The number of rows in the watermark set is equal to the number of rows in the target dataset sample. Generate one pseudo-row for every 100 rows, rounded up. The number of fields in a single pseudo-row is equal to the number of fields in the original dataset m. Ensure that the pseudo-row format is completely consistent with the original sample.
[0094] Step 2: Adaptively determine the watermark encoding rules, match the field types of the original dataset, generate watermark fragments of the same precision for numeric fields (floating-point fields retain the same number of decimal places, and integer fields are integers), generate watermark fragments of the same length for character fields (consistent with the character length of the original field), and generate watermark fragments that conform to the enumeration / date rules for mixed constraint fields.
[0095] Step 3, Watermark Data Generation: Core watermark source information, such as copyright information and traceability details, is converted into a binary stream using Base64 encoding. This stream is then split according to field type and converted into watermark fragments of the corresponding format. These fragments are then concatenated according to the field order of the original dataset to form a single pseudo-line watermark data, generating the final watermark. The fake watermark data forms a fake watermark set. ;
[0096] Step 4, Redundancy Adaptive Adjustment: Redundancy (Average coefficient of variation of the dataset) The more stable the data, the lower the redundancy; the more discrete the data, the higher the redundancy, ensuring the recoverability of the watermark.
[0097] If the optimal method is pseudo-column embedding The watermark source information is segmented according to the pseudo-column length to generate a pseudo-column watermark sequence with the same number of sample rows. The value range of the sequence is consistent with the range of the same type of field in the original dataset, ensuring that the pseudo-column data is integrated into the original dataset. The specific process is as follows:
[0098] Step 1: Determine the watermark length. The number of pseudo columns is preset to 1, and the number of pseudo columns increases by 1 for every 20 additional pseudo columns in the total number of fields m.
[0099] Step 2: Determine the watermark encoding rules. If the original dataset is predominantly numerical, use "prime number mapping encoding" to generate a numerical pseudo-column watermark, mapping the watermark source information to a continuous sequence of prime numbers. If the original dataset is predominantly character-based, use UTF-8 encoding to generate a character pseudo-column watermark, converting the watermark source information into a fixed-length string.
[0100] Step 3: Watermark data generation. The watermark source information is segmented according to the pseudo-column length to generate a pseudo-column watermark sequence with the same number of rows as the target dataset. The range of values for the sequence is the same as that of fields of the same type in the original dataset. Consistency is ensured to integrate pseudo-column data into the original dataset;
[0101] Step 4, Redundancy Adaptive Adjustment: Redundancy The lower the correlation between fields, the lower the redundancy; the higher the correlation between fields, the higher the redundancy.
[0102] If the optimal method is invisible character embedding The watermark source information is converted into a binary stream. Distributed according to the length of the carrier field, the binary stream is split into invisible character sequences matching the field length, forming an invisible character watermark set. The amount of watermark information carried by a single field does not exceed 5% of the field capacity. The specific process is as follows:
[0103] Step 1, Adaptive Watermark Carrier Filtering: Automatically filter variable-length character fields in the original dataset as watermark carrier fields. Filtering criteria: Field information entropy. Average field length This ensures that the carrier field can carry sufficient watermark information and is highly concealed;
[0104] Step 2, Invisible character type adaptive determination: Select according to the encoding format of the carrier field. For ASCII encoded fields, select ASCII invisible control characters (0x00-0x1F). For UTF-8 encoded fields, select zero-width spaces / zero-width connectors to ensure that there is no visual display after embedding and that it does not affect data reading.
[0105] Step 3, Watermark Data Generation: Convert the watermark source information into a binary stream. Based on the length distribution of the carrier fields, split the binary stream into invisible character sequences matching the field lengths, forming an invisible character watermark set. The amount of watermark information carried by a single field = (10% of the field length), not exceeding the maximum field capacity;
[0106] Step 4, Redundancy Adaptive Adjustment: Redundancy The higher the information entropy, the lower the redundancy; the lower the information entropy, the higher the redundancy, ensuring that the watermark can be completely restored when characters are deleted.
[0107] If the optimal embedding method is digital perturbation The watermark source information is converted into a binary stream, and then mapped to a sequence of tiny increments that meet the perturbation threshold of the numeric field. This increment sequence is the numeric perturbation watermark set. The specific process is as follows:
[0108] Step 1, Adaptive Watermark Carrier Filtering: Automatically selects numeric fields from the original dataset as watermark carrier fields, using the coefficient of variation as the filter criterion. (Data stability), standard deviation (With room for perturbation) to ensure that the data is not significantly distorted after perturbation;
[0109] Step 2, Adaptive Determination of Perturbation Threshold: Core Formula The maximum perturbation of each numerical field is determined by its own standard deviation and coefficient of variation. There is no fixed perturbation value, ensuring that the perturbation is within the statistical tolerance range of the dataset. After embedding, the mean deviation of the data is ≤2% and the standard deviation deviation is ≤3%.
[0110] Step 3, Watermark Data Generation: Convert the watermark source information into a binary stream, and then map it into a sequence of tiny increments that meet the perturbation threshold. ,in The incremental sequence is the digital perturbation watermark set. The sign and magnitude of the increment are determined by the watermark source information.
[0111] S5. Use the watermark set of the optimal embedding method to embed data watermarks into the target dataset.
[0112] In an optional embodiment of the present invention, step S5 embeds a data watermark into the target dataset based on the generated watermark set and the optimal embedding method. The dataset watermark insertion sub-algorithm automatically determines the optimal embedding position based on the principles of sparse embedding, low-loss embedding, strength adaptation, and format consistency, according to the optimal embedding method, including:
[0113] If the optimal embedding method is pseudo-row embedding, then the core constraint is uniform distribution, while also considering data sparsity, avoiding clustering of pseudo-rows, ensuring that the pseudo-rows are evenly distributed throughout the dataset after embedding, and prioritizing embedding the row gaps with the sparsest data distribution. The steps include:
[0114] (1) Calculate the density of each row of data in the target dataset.
[0115] (2) Calculate the basic uniform insertion interval.
[0116] (3) Adaptive correction of row numbers based on sparsity.
[0117] (4) Output the row number suitable for pseudo-line insertion.
[0118] In this embodiment, when the optimal embedding method is pseudo-line embedding, the following process is executed:
[0119] Step 1: Calculate the average density of each row in the target dataset.
[0120] Extract the sample density distribution matrix from the second feature set D. For the j-th row sample The formula for calculating its row average density value is: in, The smaller the value, the sparser the data distribution in the interval containing row j, and the more suitable it is for embedding pseudo-rows; m is the number of fields in the dataset.
[0121] Step 2: Calculate the basic uniform insertion interval
[0122] Based on the total number of rows n and the number of pseudo-rows N in the dataset, the basic uniform interval G is calculated to ensure that pseudo-rows are uniformly distributed across the entire dataset. The formula is as follows: The initial sequence of the basic embedded line numbers is: .
[0123] Step 3: Adaptive correction of row numbers based on sparsity
[0124] For each base row number In its neighborhood interval Within, select the row average density value The smallest line is used as the corrected embedded line number. This ensures that the embedding position both conforms to the uniform distribution constraint and is located in the sparsest row gap of the data.
[0125] Step 4: Output the row number suitable for pseudo-line insertion.
[0126] The modified row number set is deduplicated and sorted to ensure that all row numbers are in the range [1, n] and are unique. The final output is the normalized embedded row number set: , and .
[0127] If the optimal embedding method is pseudo-column embedding, then embedding is mainly based on the column gaps with the weakest field correlation. The steps include:
[0128] (1) Extract the field correlation coefficient matrix.
[0129] (2) Traverse adjacent field pairs and calculate the correlation score.
[0130] (3) Exclude high-risk field pairs.
[0131] (4) Determine the optimal embedding column position and output it.
[0132] This embodiment executes the following process when the optimal embedding method is pseudo-column embedding:
[0133] Step 1: Extract the field correlation coefficient matrix.
[0134] Extract the inter-field Pearson correlation coefficient matrix from the second feature set D. ,in The closer the value is to 0, the weaker the correlation between the i-th field and the j-th field.
[0135] Step 2: Traverse adjacent field pairs and calculate the correlation score.
[0136] For all adjacent fields Calculate its relevance score using the following formula: The smaller the value, the weaker the correlation between two adjacent fields, making it more suitable to insert a pseudo column in between.
[0137] Step 3: Exclude high-risk fields.
[0138] Extract the primary key, unique key, and core business field identifier from the first feature set T. If an adjacent field pair contains a primary key / unique key / core business field, then include that field pair. By forcibly assigning a value of 1, it is excluded from eligibility as an embedding location, thus avoiding impacting the business usability of the dataset.
[0139] Step 4: Determine and output the optimal embedding column position.
[0140] Select The adjacent field pair (Fi, Fi+1) corresponding to the minimum value determines the insertion of a pseudo-column between the i-th and i+1-th columns.
[0141] The final output is the normalized embedded column position: = i+1.
[0142] If the optimal embedding method is invisible character embedding, then non-critical areas such as the end of a character, before a field separator, or at consecutive spaces are mainly selected as embedding locations. The steps include:
[0143] (1) Filter the valid carrier fields;
[0144] (2) Location positioning that can be embedded in a single data entry;
[0145] (3) Embedded capacity constraint verification and output.
[0146] In this embodiment, when the optimal embedding method is invisible character embedding, the following process is executed:
[0147] Step 1: Filter the valid carrier fields
[0148] Fields that meet the following conditions are selected from the first feature set T to form a carrier field set. :
[0149] The field type is variable-length character;
[0150] Average field length li ≥ 8;
[0151] Non-primary key, non-unique key, and non-enumeration constraint fields.
[0152] Step 2: Locating the embeddable location of a single data entry.
[0153] For carrier fields The j-th row of sample data, denoted as its string content is The total length of the string is Locate three types of legally embeddable regions:
[0154] Region 1: End of string, offset = ;
[0155] Area 2: Before and after separators (such as commas, spaces, and hyphens) within the field, the offset is ±1 from the position of the separator;
[0156] Region 3: The middle position of consecutive spaces, with the offset being the middle number of the consecutive spaces.
[0157] If the optimal embedding method is digital perturbation embedding, then the digital field selected in the digital perturbation watermark set generation stage (S40) is directly selected as the carrier field, and the watermark data is inserted in the mode specified in the data watermark set generation stage.
[0158] In this embodiment, when the optimal embedding method is digital perturbation embedding, the following process is executed:
[0159] The digital field selected during the digital perturbation watermark set generation stage is directly selected as the carrier field, and the watermark data is inserted in the pattern specified by the generation node.
[0160] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus systems, and computer program products according to embodiments of the invention. 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 illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0161] 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.
[0162] 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.
[0163] Specific embodiments have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.
[0164] Those skilled in the art will recognize that the embodiments described herein are intended to help the reader understand the principles of the invention, and should be understood that the scope of protection of the invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific modifications and combinations based on the technical teachings disclosed in this invention without departing from the spirit of the invention, and these modifications and combinations are still within the scope of protection of this invention.
Claims
1. A watermark adaptive embedding method based on dataset features, characterized in that, Includes the following steps: Obtain the target dataset and extract its multidimensional feature set; Multiple watermark embedding methods are quantitatively defined to form quantitative attribute values for each watermark embedding method; Based on the multi-dimensional feature set and the quantized attribute values, a multi-attribute weighted comprehensive score is calculated to determine the optimal watermark embedding method. Based on the multidimensional feature set, generate a watermark set with the optimal embedding method; The target dataset is watermarked using the watermark set with the optimal embedding method described above. The multidimensional feature set includes a field attribute feature set, a data distribution feature set, and a data statistical feature set; Based on the multi-dimensional feature set and the quantized attribute values, a multi-attribute weighted comprehensive score is calculated to determine the optimal watermark embedding method, including: The weight coefficients are dynamically calculated based on the multidimensional feature set, and the basic adaptation score for each watermark embedding method is calculated in combination with the quantized attribute values. Based on the multidimensional feature set, the feature correction value of each embedding method is calculated, and the basic adaptation score is corrected to obtain the correction score of multiple watermark embedding methods. The optimal watermark embedding method is determined based on the modified scores of multiple watermark embedding methods; Based on the multidimensional feature set, feature correction values for each embedding method are calculated, including: The feature correction value for pseudo-row embedding is calculated based on the ratio of the number of sample rows to the number of fields in the target dataset. The feature correction value of the pseudo-column embedding method is calculated based on the average correlation between fields in the multidimensional feature set; Calculate the feature correction value for invisible character embedding methods based on the proportion of character fields in the target dataset; The feature correction value of the numerical perturbation embedding method is calculated based on the proportion of numerical fields in the target dataset and the average coefficient of variation of the field data.
2. The watermark adaptive embedding method based on dataset features according to claim 1, characterized in that, The field attribute feature set includes field name, data type, length, precision, order, and primary key or unique key constraint features; The data distribution feature set includes field value ranges, a sample density distribution matrix, and a correlation coefficient matrix between fields. The data statistical feature set includes the mean, standard deviation, coefficient of variation, and information entropy of each field.
3. The watermark adaptive embedding method based on dataset features according to claim 1, characterized in that, The various watermark embedding methods include pseudo-row embedding, pseudo-column embedding, invisible character embedding, and number perturbation embedding; The quantitative definition is standardized from four dimensions: field type matching degree, concealment coefficient, data integrity, and resistance to attack.
4. The watermark adaptive embedding method based on dataset features according to claim 1, characterized in that, The weighting coefficients include the weights of field attribute features. Distribution characteristic weights Statistical feature weights Anti-attack requirement weight And satisfy ; Among them, field attribute feature weights Distribution feature weights are calculated based on the proportion of numeric and character fields. Statistical feature weights are calculated based on the sample density distribution matrix. The attack resistance requirement weight is calculated based on the coefficient of variation of each field. Calculation based on the information entropy of each field.
5. The watermark adaptive embedding method based on dataset features according to claim 1, characterized in that, The specific steps to correct the basic adaptation score are as follows: in, The corrected score for the k-th watermark embedding method is given. The basic adaptation score for the k-th watermark embedding method. This is the feature correction value for the k-th watermark embedding method.
6. The watermark adaptive embedding method based on dataset features according to claim 1, characterized in that, Based on the multidimensional feature set, a watermark set with the optimal embedding method is generated, including: Depending on whether the optimal embedding method is pseudo-row embedding, pseudo-column embedding, invisible character embedding, or number perturbation embedding, different adaptive logic is used to determine the watermark length, encoding rules, and / or redundancy of the watermark set.
7. The watermark adaptive embedding method based on dataset features according to claim 1, characterized in that, Embedding a watermark in the target dataset using the watermark set of the optimal embedding method includes: Depending on whether the optimal embedding method is pseudo-row embedding, pseudo-column embedding, invisible character embedding, or numeric perturbation embedding, the watermark embedding position is adaptively determined based on data sparsity, field correlation, or string structure, respectively.