Database watermarking modification method for preserving statistical characteristics
By constructing a residual column R to adjust the numerical attribute column X in the database and embedding watermark information in columns XW, the problem of watermarks affecting data analysis in traditional databases is solved, and the statistical characteristics of data are maintained and the accuracy of analysis results is achieved during the watermark embedding process.
Patent Information
- Application Number
- CN202310446046.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-24
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2043-04-24
AI Technical Summary
Traditional robust database watermarking techniques impair data analysis, and reversible database watermarking techniques pose a risk of original database leakage, thus failing to meet data analysis requirements.
By constructing a residual column R, adjusting the numerical attribute column X in the database using formulas, embedding watermark information in column XW, and keeping the statistical characteristics of column X unchanged, the system modifies the data using hyperparameters k1, k2, kx, kmy and the standard normal distribution α.
The statistical characteristics of the database are kept unchanged during the watermark embedding process to ensure that data analysis is not affected, and the watermark is automatically calculated and multiple modification methods are available.
Smart Images

Figure CN116401235B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of database watermarking technology, and in particular to a database watermark modification method that preserves statistical characteristics. Background Technology
[0002] With the development of information technology, the rapid increase in data volume has made database technology particularly important. A crucial role of databases is to provide data analysis resources, thereby better supporting production and daily life. To effectively protect database privacy and copyright, database watermarking technology has been extensively researched. Traditional robust database watermarking embeds watermarks by modifying data values according to certain rules, commonly by modifying the least significant bit of the data. Some methods repeatedly embed the watermark in different positions to enhance robustness, so that even if attacked, the embedded watermark can still be extracted from the attacked database, thus protecting copyright. However, this watermarking scheme has a potential drawback: the embedding of the watermark can alter the database data, thereby affecting data analysis and other operations based on that database.
[0003] To address this issue, researchers have proposed reversible database watermarking technology. Reversible database watermarking can effectively achieve watermark extraction and lossless recovery of the original data. This means that even if a watermark is embedded in the database, authorized users can still recover the original database using reversible algorithms. Common operations include histogram shifting and differential expansion. However, reversible watermarking algorithms cannot directly meet the requirements of data analysis because data values can still change due to the watermark embedding before reversible operations are implemented. Furthermore, if data analysts have reversible operation permissions, the original database is at risk of being leaked. Based on this analysis, copyright holders will not grant data analysts reversible operation permissions; data analysts can only use watermarked databases, and the analysis results will still be affected by the embedded watermark. Summary of the Invention
[0004] The purpose of this invention is to provide a database watermark modification method that preserves statistical characteristics, so as to embed watermarks in the database while ensuring that data analysis is not affected.
[0005] To achieve the above objectives, the technical solution adopted by this invention is as follows: a database watermark modification method that maintains statistical characteristics, comprising the following steps: determining the numerical attribute column in the database that can be embedded with a watermark, denoted as column X; determining the numerical attribute column in the database related to column X, denoted as Y. m A column, where m = 1, 2, 3, ...; construct the residual column, denoted as column R, according to the following formula: In the formula, i = 1, 2, 3, ..., n, where n is the number of rows in the database; r i x i ymi Columns R, X, and Y are respectively. m The values in the i-th row of column; k1, k2, k x k my It is a hyperparameter; α is obtained by random sampling from N columns, and N columns are independent of columns X and Y. m The columns follow a standard normal distribution; adding column R to column X yields the watermark information X. W List.
[0006] Compared with the prior art, the present invention has the following technical advantages: the scheme retains the statistical characteristics of the data during the watermark embedding process, so as not to affect the statistical analysis of the database; by adopting this modification scheme, the modification value can be automatically calculated, and for each value, there can be multiple modification values, so as to select a better modification method according to other needs. Attached Figure Description
[0007] Figure 1 This is a flowchart illustrating the present invention. Implementation
[0008] The following is combined Figure 1 The present invention will be described in further detail below.
[0009] Before introducing this invention, we will first introduce some basic concepts to help readers understand the content described in this invention.
[0010] u X (or EX), representing the expected value of column X;
[0011] , representing the standard deviation of column X;
[0012] (or DX), representing the variance of column X;
[0013] (or COV(X,Y)), representing the covariance of columns X and Y;
[0014] , representing the correlation coefficient between columns X and Y.
[0015] See Figure 1This invention discloses a database watermark modification method that preserves statistical characteristics, comprising the following steps: determining the numerical attribute columns in the database that can be embedded with watermarks, denoted as column X. Generally, we can select one column, or we can select multiple columns, and perform the modification method on each column. However, regardless of whether it is one column or multiple columns, it is essential to select numerical attribute columns, because the modification method in this invention modifies numerical values. For example, in a database containing information such as student name, height, weight, age, and grades, height and weight can both be used as column X.
[0016] Identify the numeric attribute column in the database that is related to column X, and denote it as Y. m Columns, where m = 1, 2, 3, ...; the correlation mentioned here refers to the relationship between column X and column Y. m Columns have a certain degree of correlation. Continuing with the example of the database containing student information, if column X represents height, then name is an unrelated column because there is no connection between the two. While there is no necessary correlation between weight and height—height cannot be derived from height—taller individuals tend to be heavier. Therefore, weight can be considered both a related and unrelated column to height. Whether it is specifically related depends on the specific circumstances. Furthermore, we can also determine the correlation based on the content to be statistically analyzed. If a statistical statistic requires both height and weight, then weight is a related column to height.
[0017] Determine the watermark column X and the related column Y. m Then, we can construct the residual column, denoted as column R, according to the following formula: In the formula, i = 1, 2, 3, ..., n, where n is the number of rows in the database; r i x i y mi Columns R, X, and Y are respectively. m The values in the i-th row of column; k1, k2, k x k my It is a hyperparameter; α is obtained by random sampling from N columns, and N columns are independent of columns X and Y. m The column follows a standard normal distribution; column R is constructed using the formula above, and its first term can be used to adjust the variance. Since α is from random sampling, r can be adjusted by adjusting the value of α. i The value of the first term; the constant in the second term is used to adjust the expectation; the third and fourth terms reflect the relationship with columns X and Y, respectively. m The relationship between columns.
[0018] After constructing column R, simply add column R to column X to obtain the watermark information X. W Therefore, modifying column X is achieved without altering its statistical characteristics.
[0019] As a preferred embodiment of the present invention, the hyperparameters k1, k2, k... x k my The following steps are used to calculate: The variance of column R is preset to be any constant greater than 0; based on column X and X... W Construct an equation using the properties that remain unchanged in column X and Y; m Substituting the statistical characteristics of column R and the variance of column R into the constructed equations yields a system of M+3 equations. When m=1, the system of M+3 equations is a system of 4 equations; when m=2, the system of M+3 equations is a system of 5 equations. Solving the system of equations yields the hyperparameters k1, k2, and k... x k my Hyperparameters can be preset or calculated using the above steps. After calculating the hyperparameters and constructing column R, adding them to column X will not change the statistical characteristics of column X.
[0020] To further describe the modification method of column X in detail, a specific example is provided below.
[0021] Specifically, the database contains only one column of numerical attributes related to column X, denoted as column Y, with hyperparameters k1, k2, and k... x k y The following formula is used for calculation:
[0022] ,
[0023] In the formula, u X u Y The expected values for columns X and Y are respectively. , , These are the variances of columns R, X, and Y, respectively. The covariance of columns X and Y, The correlation coefficients for columns X and Y, among which, excluding the variance in column R, are... The values are preset, and the other parameters can be calculated based on the values in columns X and Y. Therefore, given columns X and Y, as long as the variance of column R is given, the specific values of the four hyperparameters can be calculated.
[0024] The calculation formulas for these four hyperparameters are also derived from the steps described above. Specifically, when we follow r... i After constructing column R using the formula, we can further introduce the covariance of the variables on both sides of this formula to obtain the following formula: COV(R,X)=COV((k x X+k y From Y+k1N+K2),X), we can further obtain an equation: Divide both sides by The equation is then obtained: Using the class approach, we can obtain the other three equations, which together form the following system of four equations:
[0025] ,
[0026] Solving the above system of four equations allows us to determine the hyperparameters k1, k2, and k... x k y Represented as:
[0027] ,
[0028] Our goal is to ensure that X contains watermarks. W If the statistical characteristics of column X and column X remain unchanged, then our objective can be expressed as: Further simplification yields the following requirements for column R: Substituting this formula into the hyperparameters k1, k2, k x k y The hyperparameters k1, k2, and k can be obtained from the expression. x k y The calculation formula is used to calculate the hyperparameters. Therefore, the R column, constructed based on the hyperparameters obtained from this formula, can be added to the X column to ensure that its statistical characteristics remain unchanged.
[0029] Furthermore, the determination of watermark-eligible numerical attribute columns in the database is obtained through the following steps: First, it is determined whether the content stored in the column is floating-point data. If so, proceed to the next step; otherwise, the column is not eligible for watermark embedding. Second, it is determined whether the stored values in the column can be modified by a small percentage. If so, the column can be used as column X; otherwise, the column is not eligible for watermark embedding. For example, if a column contains height data, a small percentage modification will not affect the content, such as changing the height from 170.15 to 170.20. In this case, the column can be considered eligible for watermark embedding. However, if a column contains monetary data, such as 500.04, then a small percentage modification is not allowed because banks cannot arbitrarily modify monetary amounts. Therefore, this monetary amount column is not eligible for watermark embedding.
[0030] The process of determining the numerical attribute columns related to column X in the database is achieved through the following steps: First, determine if the content stored in the column is floating-point data. If so, proceed to the next step; otherwise, the column is considered irrelevant. Second, determine if the value stored in the column is related to the value in column X. If so, the column is considered relevant; otherwise, it is considered irrelevant. The correlation between different columns in the database depends on the specific content. For example, name and grades are irrelevant, while height and weight are somewhat correlated. These two steps facilitate the identification of column X, which can be used to embed watermarks, and the related column Y.
[0031] This invention also discloses a computer-readable storage medium and an electronic device. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the database watermark modification method for maintaining statistical characteristics as described above. The electronic device includes a memory, a processor, and a computer program stored in the memory, which, when executed by the processor, implements the database watermark modification method for maintaining statistical characteristics as described above.
Claims
1. A database watermarking modification method that preserves statistical characteristics, characterized by: The method comprises the following steps: The numerical attribute column in the database which can be embedded with the watermark is determined as an X column, wherein the numerical attribute column in the database which can be embedded with the watermark is screened according to the following steps: It is judged whether the content stored in the column is floating point data, if yes, the next step is entered, otherwise the column is a column which cannot be embedded with the watermark; it is judged whether the numerical value stored in the column can be modified by a small ratio, if yes, the column can be used as the X column, otherwise the column is a column which cannot be embedded with the watermark; determining a numerical attribute column in the database related to the column X, denoted as Y m column, where m = 1, 2, 3,...; The residual column, denoted as R column, is constructed according to the following formula: ; In the formula, i = 1, 2, 3, ..., n, where n is the number of rows in the database; r i x i y mi Columns R, X, and Y are respectively. m The values in the i-th row of column; k1, k2, k x k my It is a hyperparameter; α is obtained by random sampling from N columns, and N columns are independent of columns X and Y. m The column follows a standard normal distribution, wherein the hyperparameters k1, k2, k... x k my The following steps were used to calculate the result: The variance of the R column is preset as any constant greater than 0; According to the X column and the X W Column statistics invariant property construction equation; The statistical characteristics of X column and Y m column and the variance of R column into the constructed equation to obtain a M+3-element equation group; Solving the equation set obtains the hyperparameters k1, k2, k x , k my ; The database has only one numerical attribute column associated with the X column, denoted as Y column, and hyperparameters k1, k2, k x y The following formula is used for calculation: ; where u X , u Y are the expected values of the columns X and Y, respectively, are the variances of the columns R, X, Y, respectively, is the covariance of the columns X and Y, is the correlation coefficient of the columns X and Y. X column plus R column gives X column with watermark information W column.
2. The database watermarking modification method that preserves statistical characteristics of claim 1, wherein: The numerical attribute column in the database which is related to the X column is screened according to the following steps: It is judged whether the content stored in the column is floating point data, if yes, the next step is entered, otherwise the column is a non-related column; It is judged whether the numerical value stored in the column is related to the numerical value of the X column, if yes, the column can be used as a related column, otherwise the column is a non-related column.
3. A computer-readable storage medium, characterized in that: The computer program is stored on the computer readable medium, and the computer program is executed by the processor to implement the database watermark modification method for keeping statistical characteristics according to any one of claims 1-2.
4. An electronic device, comprising: The computer readable medium comprises a memory, a processor and a computer program stored on the memory, and the processor executes the computer program to implement the database watermark modification method for keeping statistical characteristics according to any one of claims 1-2.
Citation Information
Patent Citations
Database watermark embedding method and extraction method, storage medium and electronic equipment
CN116150716A