A Database Watermarking Method Based on Lagrange Interpolation Method
By applying Lagrangian interpolation method in database watermarks, the watermark information is divided into polynomial points, which solves the problems of insufficient robustness and complex calculations in the prior art, and realizes efficient watermark extraction under strong deletion attacks.
Patent Information
- Application Number
- CN202210890065.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-27
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2042-07-27
AI Technical Summary
The existing robust database watermarking scheme cannot correctly extract watermark information when facing a strong deletion attack, and the digital watermark embedding method in the prior art has a large amount of computing and complex calculation process.
The database watermark method based on Lagrangian interpolation method is used to divide the watermark information into several parts to form a polynomial on the finite domain. The several points on the polynomial are embedded in the data. When extracting the watermark, the polynomial is restored by Lagrangian interpolation method.
The watermark information can still be extracted correctly under the strong deletion attack, which improves robustness, simplifies the calculation process and reduces the amount of calculation.
Smart Images

Figure CN115481412B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of digital watermarking, and particularly relates to a database watermarking method based on Lagrange interpolation method. Background Art
[0002] During the creation, transmission, and sharing of databases published on the network (such as product parameter specifications, survey research data, life science data, etc.), problems such as data theft, illegal copying, and copyright infringement are likely to occur. To solve the above problems, database watermarking technology has emerged. Embedding copyright information as a watermark into the original data can detect the copyright of the database; in the transaction of the database, embedding the unique identification information of the buyer as a watermark into the database can be used for tracing and tracking when the database is illegally leaked; in addition, database watermarks can also be used to detect the integrity of data, that is, to detect whether the data has been tampered with.
[0003] Watermarks can be divided into two categories: robust watermarks and fragile watermarks. Robust watermarks refer to the fact that although the original data has been changed after operations such as modification, deletion, and addition of the database, the watermark can still remain partially intact and be detected. This type of watermark is mainly used for copyright protection and tracing. Fragile watermarks refer to the fact that when the data changes, the watermark information also changes accordingly, and thus it can detect whether the database has been tampered with. This type of watermark is mainly used for data integrity protection and authentication.
[0004] Most of the existing robust database watermarking schemes embed the watermark bit by bit into the least significant bit of the data, and the robustness against deletion attacks is not good enough. Under strong deletion attacks, the watermark information cannot be correctly extracted.
[0005] In addition, the prior art points out that according to the watermark embedding method, watermarks can be divided into two categories: spatial domain watermarks and transform domain watermarks. Spatial domain watermarks hide the watermark by changing the spatial domain characteristics of the carrier information, and transform domain watermarks hide the watermark by changing some systems in the data transform domain, and then after the change, the image after embedding the watermark is obtained through inverse transformation. However, various existing technologies including digital watermark embedding based on Lagrange interpolation formula are all for data sharing or re-encryption to improve data security, with a relatively large amount of computation and a relatively complex calculation process. Summary of the Invention
[0006] Object of the Invention: Aiming at the deficiency that the existing robust database watermarking schemes cannot resist strong deletion attacks, the present invention proposes a database watermarking method based on Lagrange interpolation method.
[0007] Technical solution: A database watermarking method based on Lagrange interpolation method. The method includes converting the watermark plaintext into a binary string, then splitting the binary string to obtain several numbers, using these numbers as coefficients to determine a polynomial f(x) over the finite field GF(p), and embedding data at several points in the polynomial. When extracting the watermark, the polynomial is restored by Lagrange interpolation method to achieve it.
[0008] This method includes establishing a database for watermark embedding and extraction, and the steps are as follows:
[0009] S1. Watermark encoding: The user submits the watermark plaintext to the watermark embedding system, converts the watermark plaintext into a binary string, splits the binary string to obtain several numbers, and uses the split numbers as coefficients to determine a polynomial f(x) over the finite field GF(p);
[0010] S2. Preprocessing: Sort the attributes according to the attribute names, and group each tuple in the database according to the key and the primary key value;
[0011] S3. Embedding watermark: Embed the points (x, y) on the polynomial f(x). In each tuple, select the attributes for embedding x and y respectively according to the key and the primary key value, and the same points are embedded in each tuple within each group;
[0012] S4. Preprocessing: The user submits the database with the embedded watermark to the watermark extraction system. The watermark extraction system sorts the attributes of the database according to the attribute names, and groups each tuple in the database according to the key and the primary key value;
[0013] S5. Extracting watermark: For each tuple, first select the attributes of the embedded points respectively according to the key and the primary key value, then extract the points contained in the tuple, and select the point with the most occurrences as the point contained in the group according to the voting mechanism within the group. Each group can obtain a point;
[0014] S6. Watermark decoding: Restore the polynomial according to the extracted point set by Lagrange interpolation method, convert the polynomial coefficients into binary and splice them to obtain the binary watermark, and then decode the bit string to obtain the watermark plaintext.
[0015] Further, the specific steps of step S1 watermark encoding are as follows:
[0016] (1) The watermark embedding system converts the watermark plaintext into a binary bit string of length l;
[0017] (2) The bit string of length l is evenly split into m groups, and an m - 1 degree polynomial f(x) over the finite field GF(p) is determined. When the deletion ratio is r, the finite field size p and the number of split groups m are obtained according to the following formula,
[0018]
[0019] In the above formula, M is the set of factors of l, next_prime(x) represents the smallest prime number greater than x. Traverse M to find the m that makes h(m) the smallest. This m is the optimal number of segmentation groups, and the length of each group is g = l / m, obtaining the minimum value q of the function. Calculate the number of bits in the embedding attribute, that is bits. Next, the size p of the finite field can be determined, and the expression is as follows:
[0020] p = next_prime(2 t -1).
[0021] Furthermore, in step S2, the database is grouped according to the key and the primary key value, including traversing each tuple of the database, calculating the group number of each tuple in the data, and the calculation expression is as follows:
[0022] H(ks||H(ks||t u ·PK)) mod p
[0023] In the above formula, H(·) is a hash function, ks is the key, and t u ·PK is the primary key value of tuple t u .
[0024] Furthermore, in step S3, the process of embedding the watermark is as follows:
[0025] In each tuple, select the attribute for embedding the watermark (the point (x, y) on the polynomial f(x)). The attribute index for embedding x is:
[0026] x index = H(ks||H(ks||t u ·PK)) mod attribute_num
[0027] The attribute index for embedding y is:
[0028] y index = (x index +1) mod attribute_num
[0029] The above indexes are all indexes after attribute sorting;
[0030] Among them, for different data types, the watermark embedding methods include the following three cases:
[0031] (a) If the data type is a string, add blank characters at the end of the string to embed the points. Use 32 blank characters, and one blank character can represent 5 bit information. Embed blank characters at the end of the data;
[0032] (b) If the data type is an integer, convert it to binary and modify the last t bits to embed the point;
[0033] (c) If the data type is a floating-point number, convert the fractional part to binary and modify the last t bits to embed the point.
[0034] Furthermore, in step S5, the watermark extraction process is as follows:
[0035] In each tuple, select the attribute for which the watermark (point (x, y)) is to be extracted. The attribute index for embedding x is:
[0036] x index = H(ks||H(ks||t u ·PK)) mod attribute_num
[0037] The attribute index for embedding y is:
[0038] y index = (x index + 1) mod attribute_num
[0039] The above indices are the indices after attribute sorting;
[0040] Among them, the watermark extraction methods for different data types include the following three cases:
[0041] (a) If the data type is a string, read the whitespace characters at the end of the string and convert them to decimal to obtain the point;
[0042] (b) If the data type is an integer, convert it to binary and take the last t bits and convert them to decimal to obtain the point;
[0043] (c) If the data type is a floating-point number, convert the fractional part to binary and take the last t bits and convert them to decimal to obtain the point;
[0044] Finally, within each group, count the number of occurrences of different points, and select the point with the most occurrences as the point extracted from this group. If there is more than one type of point in this group, it indicates that the data has been tampered with.
[0045] Furthermore, in step S6, the running steps of watermark decoding are as follows:
[0046] First, randomly select m points from the points extracted in step S5. Using the Lagrange interpolation method, the polynomial f'(x) of degree m - 1 can be restored, and the calculation is as follows:
[0047]
[0048] Next, the coefficients of f'(x) are respectively converted into bit strings of g bits and concatenated, and finally a watermark bit string of l bits is obtained.
[0049] Beneficial effects: The present invention uses the Lagrange interpolation method to encode and decode watermarks, divides the watermark information into several parts to form an (m - 1)-th degree polynomial over a finite field, and embeds several points on this polynomial into the data. When extracting the watermark, only m different points need to be extracted to restore the polynomial using the Lagrange interpolation method. Compared with the prior art, the present invention resists high-intensity deletion attacks by using the Lagrange interpolation method to restore the polynomial, and only needs to ensure that there are still m different points after deleting some data to restore the watermark information. Description of the Drawings
[0050] Figure 1 It is the overall schematic diagram of the watermark library watermark model based on the Lagrange interpolation method in the present invention;
[0051] Figure 2 It is the schematic diagram of the watermark embedding process for the model in the present invention;
[0052] Figure 3 It is the schematic diagram of the watermark extraction process for the model in the present invention;
[0053] Figure 4 It is the schematic diagram of the robustness of the model against deletion attacks in the present invention. Specific Embodiments
[0054] The following further illustrates the above solution with specific embodiments. It should be understood that these embodiments are for illustrating the present invention and not for limiting the scope of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the protection scope of the present invention.
[0055] The present invention provides a database watermark method based on the Lagrange interpolation method. The specific setting environment of the problem to be solved can be: the user has low requirements for data accuracy, requires the watermark to be restored under strong deletion attacks, and the deletion is in units of rows.
[0056] See Figure 1, in this embodiment, the database watermarking method based on the Lagrange interpolation method is as follows: The user provides the original database, watermark parameters, and a key. The watermark embedding system encodes the watermark information to obtain a polynomial over a finite field. Preprocess the original database, including sorting the attributes by attribute name and grouping the database by the key and tuple primary key value. Select the attributes for each tuple to embed the watermark according to the key and tuple primary key value, and embed the points on the polynomial in different ways according to the attribute data type. The system outputs the database with the embedded watermark, and the user can share and publish this database. An attacker may tamper with and maliciously spread this database. The user can extract the copyright information embedded in the database to prove ownership and achieve copyright protection. The user provides the database with the embedded watermark, watermark parameters, and a key. The watermark extraction system preprocesses this database, including sorting the attributes by attribute name and grouping the database by the key and tuple primary key value. Determine the attributes for each tuple to embed the watermark according to the key and tuple primary key value, and parse the points on the polynomial contained in the tuple in different ways according to the attribute data type. Determine the points embedded in this group through a voting mechanism within each group. Given several points on the polynomial, the polynomial can be restored using the Lagrange interpolation method, and the watermark information can be decoded by processing the coefficients of this polynomial.
[0057] Specifically, the implementation steps of the database watermarking method based on the Lagrange interpolation method of the present invention are as follows:
[0058] Taking the raisingrainsdataset dataset as an example for experiments, this dataset has a total of 900 tuples, contains 8 attributes, and the data types include integers, floating-point numbers, and strings. A column of auto-incrementing primary key IDs is generated in the experiment. The attribute information in the dataset is shown in Table 1.
[0059] Table 1 Dataset Attribute Information Table
[0060]
[0061]
[0062] See Figure 2 , in this embodiment, the implementation steps of the watermark embedding process are as follows:
[0063] S1: Watermark encoding: The user submits the watermark plaintext to the watermark embedding system, and the system converts the watermark plaintext into a binary string. Dividing this binary string can obtain several numbers, and using these numbers as coefficients can uniquely determine a polynomial f(x) over the finite field GF(p).
[0064] Further, the specific steps of step S1 are as follows:
[0065] S11: The watermark embedding system converts the watermark plaintext into a binary bit string of length l.
[0066] S12: The bit string of length \(l\) is evenly divided into \(m\) groups, and an \((m - 1)\)-degree polynomial \(f(x)\) over the finite field \(GF(p)\) is determined. It is required that when the deletion ratio is \(r\), the watermark can be correctly extracted. The size \(p\) of the finite field and the number of divided groups \(m\) are obtained according to the following formula.
[0067]
[0068] In the above formula, \(M\) is the set of factors of \(l\), and next_prime(x) represents the smallest prime number greater than \(x\). The maximum value of the coefficient is Restoring the polynomial requires \(m\) different points; at the deletion ratio \(r\), it is necessary to embed points to ensure that the remaining points must contain \(m\) different points. The proof is as follows:
[0069] Suppose there are a total of \(n\) tuples, \(x\) different points are embedded, and the deletion ratio is \(r\). Then each point is embedded \(n / x\) times. It is required that the remaining tuples contain at least \(m\) different points. There is the following inequality:
[0070]
[0071] Therefore, there is:
[0072]
[0073] Traverse \(M\) to find the \(m\) that minimizes \(h(m)\). This \(m\) is the optimal number of divided groups, and the length of each group is \(g = l / m\). The minimum value \(q\) of the function is obtained, and the number of bits embedded in the attribute can be obtained, that is bits. Next, the size \(p\) of the finite field can be determined. The expression for the size \(p\) of the finite field is as follows:
[0074] p = next_prime(2 t - 1)
[0075] In this embodiment, the length of the binary watermark string is 48, and the deletion ratio is 0.9. Substituting into the above formula, it can be obtained that the watermark is divided into 8 groups, the number of bits embedded in the attribute is 7, and the size of the finite field is 127.
[0076] S2: Preprocessing: The system sorts the attributes according to the attribute names and groups each tuple in the database according to the key and the primary key value.
[0077] Furthermore, the specific steps of database grouping in step S2 are as follows:
[0078] S21: Group the database using the following formula, traverse each tuple in the database, and obtain the group number of each tuple in the data,
[0079] H(ks||H(ks||t u·PK)) mod p
[0080] In the above formula, H(·) is a hash function, ks is the key, and t u ·PK is the primary key value of the tuple t u .
[0081] In this embodiment, the database is divided into 127 groups, and the same points are embedded in each group. The point (i, f(i)) is embedded in the i-th group.
[0082] S3: Embed the watermark: Embed the point (x, y) on the polynomial f(x). In each tuple, select the attributes for embedding x and y respectively according to the key and the primary key value, and the same points are embedded in each tuple within each group.
[0083] Further, the specific steps of step S3 are as follows:
[0084] S31: In each tuple, select the attributes for embedding the watermark (the point (x, y) on the polynomial f(x)). The attribute index for embedding x is:
[0085] x index = H(ks || H(ks || t u ·PK)) mod attribute_num
[0086] The attribute index for embedding y is:
[0087] y index = (x index + 1) mod attribute_num
[0088] The above indexes are the indexes after attribute sorting.
[0089] S32: The watermark embedding methods for different data types are different. If the data type is a string, blank characters are added at the end of the string to embed the point. 32 blank characters (i.e., ASCII codes 129 - 160) are used, and one blank character can represent 5 bits of information. blank characters are embedded at the end of the data; if the data type is an integer, it is converted to binary and the last t bits are modified to embed the point; if the data type is a floating point number, the fractional part is converted to binary and the last t bits are modified to embed the point.
[0090] In this embodiment, all tuples are traversed, and the attributes embedding x and y are selected (the primary key is not embedded with the watermark). Here, x is the current tuple group number. Therefore, only y = f(x) needs to be embedded. If the attribute for embedding y selected for the current tuple is a string, then two blank characters, char(129 + y / 32) and char(129 + y % 32) respectively, are added at the end of the string; if it is an integer, then the last 7 bits are directly replaced with y; if it is a floating-point number, then only the decimal part is converted to binary, and then the last 7 bits are replaced with y.
[0091] See Figure 3 , in this embodiment, the implementation steps of the watermark extraction process are as follows:
[0092] The user knows the watermark parameters including the watermark length, the number of bits in the embedding attribute, the size of the polynomial domain, and the polynomial degree, as well as the key, and can extract the watermark information in the database. The specific steps are as follows:
[0093] S4: Preprocessing: The user submits the database embedded with the watermark to the watermark extraction system. The watermark extraction system sorts the attributes of the database according to the attribute names, and groups each tuple in the database according to the key and the primary key value, the same as step S2.
[0094] S5: Extract the watermark: For each tuple, first select the attribute at the embedding point according to the key and the primary key value respectively, and then extract the point contained in the tuple. The point that appears most frequently is selected as the point contained in the group according to the voting mechanism within the group. Each group can obtain a point.
[0095] Further, the specific steps of step S5 are as follows:
[0096] S51: In each tuple, select the attribute for extracting the watermark (point (x, y)). The attribute index for embedding x is:
[0097] x index = H(ks || H(ks || t u ·PK)) mod attribute_num
[0098] The attribute index for embedding y is:
[0099] y index = (x index + 1) mod attribute_num
[0100] The above indexes are all the indexes after the attribute sorting.
[0101] S52: The watermark extraction methods for different data types are different. If the data type is a string, then read the Convert the last t bits of the binary representation of the data to decimal to obtain the point. If the data type is integer, convert it to binary and take the last t bits to obtain the point. If the data type is floating-point, convert the fractional part to binary and take the last t bits to obtain the point.
[0102] S53: For each group, count the occurrences of different points and select the point with the most occurrences as the point extracted from the group. If there is more than one type of point in the group, it indicates that the data has been tampered with.
[0103] In this embodiment, traverse all tuples and select the attributes that embed x and y (the primary key does not embed the watermark). Here, x is the group number of the current tuple. Therefore, only y needs to be extracted. If the attribute for extracting y in the current tuple is a string, read the last 2 blank characters c 1 c 2 , and we can get y = (ord(c 1 ) - 129) × 32 + (ord(c 2 ) - 129); if it is an integer, the last 7 bits are y; if it is a floating-point number, only convert the fractional part to binary, and the last 7 bits are y. In each group, record the occurrence times of each point. The point with the most occurrences is considered the correct point and can be used to restore the polynomial. If there is more than one type of point in the group, it can be considered that the data in the group has been tampered with.
[0104] S6: Watermark decoding: Restore the polynomial according to the Lagrange interpolation method from the extracted set of points. Convert the polynomial coefficients to binary and splice them to obtain the binary watermark, and then decode this bit string to obtain the watermark plaintext.
[0105] Furthermore, the specific steps of step S6 are as follows:
[0106] S61: Randomly select m points from the points extracted in step S5. Using the Lagrange interpolation method, an m - 1 degree polynomial f'(x) can be restored, and its calculation expression is as follows:
[0107]
[0108] S62: Convert each coefficient of f'(x) into a g - bit bit string and splice them. Finally, an l - bit watermark bit string is obtained.
[0109] S63: Convert the l - bit watermark bit string into the watermark plaintext.
[0110] In this example, select 8 different points from the extracted points, restore the polynomial through the Lagrange interpolation method to obtain a 7 - degree polynomial. Convert the 8 coefficients of this polynomial into 6 - bit binary forms respectively and splice them to obtain a 48 - bit binary watermark string.
[0111] In this embodiment, the experimental results of the robustness of the watermark are as follows Figure 4 shown, and the operations are as follows:
[0112] The robustness evaluation index of the database is the bit error rate BER, that is, the correct rate of the extracted watermark bits. The formula is as follows:
[0113]
[0114] In the above formula, w i is the i-th bit of the original watermark information, and w i ' is the i-th bit of the watermark information extracted from the i-th bit, and l is the length of the watermark.
[0115] Only considering the strong deletion attack, since there are 900 tuples in total, at least 8 different points are required to restore the polynomial. Therefore, the deletion ratio is at most considered up to 99%. In this experiment, 90%, 91%,..., 99% of the database are deleted respectively, and the bit error rate under each deletion ratio is statistically calculated. The experiment is repeated 100 times to obtain the average value, and the bit error rate under each deletion ratio is as follows Figure 4 shown. Figure 4 In the figure, the abscissa is the deletion ratio, that is, the ratio of the number of deleted tuples to the initial number of tuples, and the ordinate is the bit error rate. It can be seen from the figure that when the deletion ratio is as high as 98%, the watermark can still be correctly extracted; when the deletion ratio is as high as 99%, the bit error rate is 3%. It can be understood that in 100 experiments, only 3 times the watermark cannot be restored because the remaining 9 tuples do not meet the condition of containing 8 different points. Therefore, it can be seen that the present invention has high robustness against strong deletion attacks.
[0116] Table 2 shows the analysis of the impact of the present invention on data availability.
[0117] Table 2 Analysis of the impact on data availability
[0118] Attribute MSE Area 284.539 MajorAxisLength 3.875e-12 MinorAxisLength 3.418e-12 Eccentricity 3.432e-16 ConvexArea 309.231 Extent 2.857e-16 Perimeter 1.861e-3
[0119] The experiment measures the impact on data availability by calculating the MSE (Mean Square Error) of each attribute between the original database and the database after embedding the watermark. The calculation formula of the MSE of a certain attribute is as follows:
[0120]
[0121] In the above formula, a i is the i-th value of this attribute in the original database, a' i is the i-th value of this attribute in the database embedded with the watermark, and n is the number of tuples. It can be seen from Table 2 that the overall distortion of the data is small.
Claims
1. A database watermarking method based on Lagrange interpolation method, characterized in that: The method includes converting the watermark plaintext into a binary string, then splitting the binary string to obtain several numbers, using these numbers as coefficients to determine a polynomial f(x) over the finite field GF(p), and embedding data through several points in the polynomial. When extracting the watermark, the polynomial is restored by Lagrange interpolation method to achieve it; This method includes establishing a database for watermark embedding and extraction, and the steps are as follows: S1. Watermark encoding: The user submits the watermark plaintext to the watermark embedding system, converts the watermark plaintext into a binary string, splits the binary string to obtain several numbers, and uses the split numbers as coefficients to determine a polynomial f(x) over the finite field GF(p); The specific steps of watermark encoding are as follows: (1) The watermark embedding system converts the watermark plaintext into a binary bit string of length l; (2) The bit string of length l is evenly split into m groups, determining an (m - 1)-th degree polynomial f(x) over the finite field GF(p). When the deletion ratio is r, the finite field size p and the number of split groups m are obtained according to the following formula, In the above formula, M is the set of factors of l, next_prime(x) represents the smallest prime number greater than x. Traverse M to find the m that makes h(m) the smallest. This m is the optimal number of segmentation groups, and the length of each group is g = l / m, obtaining the minimum value q of the function. Calculate the number of bits in the embedding attribute, that is bits. Next, determine the finite field size p, and the expression is as follows: p = next_prime(2 t - 1); S2. Preprocessing: Sort the attributes according to the attribute names, and group each tuple in the database according to the key and the primary key value; S3. Embed the watermark: Embed the points (x, y) on the polynomial f(x). In each tuple, select the attributes for embedding x and y respectively according to the key and the primary key value, and the same points are embedded in each tuple within each group; S4. Preprocessing: The user submits the database with the embedded watermark to the watermark extraction system. The watermark extraction system sorts the attributes of the database according to the attribute names, and groups each tuple in the database according to the key and the primary key value; S5. Extract the watermark: For each tuple, first select the attributes of the embedded points respectively according to the key and the primary key value, then extract the points contained in the tuple, and select the point with the most occurrences as the point contained in the group according to the voting mechanism within the group. Each group can obtain a point; S6. Watermark decoding: Restore the polynomial according to the extracted point set by Lagrange interpolation method, convert the polynomial coefficients into binary and splice them to obtain the binary watermark, and then decode the binary string to obtain the watermark plaintext.
2. The database watermarking method based on Lagrange interpolation method according to claim 1, characterized in that: In step S2, grouping the database according to the key and the primary key value includes traversing each tuple of the database, calculating the group number of each tuple in the data, and the calculation expression is as follows: H(ks||H(ks||t u .PK))mod p In the above formula, H(·) is a hash function, ks is the key, and t u .PK is the primary key value of the tuple t u .
3. The database watermarking method based on Lagrange interpolation method according to claim 1, characterized in that: In step S3, the process of embedding the watermark is as follows: In each tuple, select the attribute for embedding the watermark. This attribute corresponds to the point (x, y) on the polynomial f(x). The attribute index for embedding x is: x index = H(ks||H(ks‖|| u .PK)) mod attribute_num The attribute index for embedding y is: y index = (x index + 1) mod attribute_num The above indexes are all the indexes after attribute sorting; Among them, the watermark embedding methods for different data types include the following three situations: (a) If the data type is a string, add blank characters at the end of the string to embed dots. Use 32 blank characters. One blank character can represent 5-bit information, and blank characters are embedded at the end of the data; (b) If the data type is an integer, convert it to binary and modify the last t bits to embed the point; (c) If the data type is a floating point number, convert the decimal part to binary and modify the last t bits to embed the point.
4. The database watermarking method based on Lagrange interpolation method according to claim 1, characterized in that: In step S5, the process of extracting the watermark is as follows: Among each tuple, select the attributes of the watermark to be extracted (point (x, y)), and the attribute index for embedding x is: x index = H(ks || H(ks || t u .PK)) mod attribute_num The attribute index for embedding y is: y index = (x index + 1) mod attribute_num The above indexes are all indexes after attribute sorting; Among them, the watermark extraction methods for different data types include the following three cases: (a) If the data type is a string, read the whitespace characters at the end of the string and convert them to decimal to obtain a point; (b) If the data type is an integer, convert it to binary and take the last t bits and convert them to decimal to obtain the point; (c) If the data type is a floating point number, convert the fractional part to binary and take the last t bits and convert them to decimal to obtain the point; Finally, count the number of occurrences of different points within each group, and select the point with the most occurrences as the point extracted from this group. If there is more than one type of point in this group, it means that the data has been tampered with.
5. The database watermarking method based on Lagrange interpolation method according to claim 1, characterized in that: In step S6, the running steps of watermark decoding are: First, randomly select m points from the points extracted according to step S5, and the m - 1 degree polynomial f'(x) can be restored by using the Lagrange interpolation method, and the calculation is as follows: Next, each coefficient of f'(x) is converted into a g-bit bit string and concatenated, and finally an l-bit watermark bit string is obtained.
Citation Information
Patent Citations
Data watermark embedding method, watermark tracing method and device
CN112948895A
Wireless terminal apparatus and method for generating and transmitting image which location information is watermarked
KR100953141B1