A watermarking method, device, and storage medium for relational databases

By dividing group domains and controlling feature domains for relational databases, and embedding them with watermark bit information, the problem of poor robustness of database watermarking methods in the prior art is solved, and a highly robust watermarking method is realized.

CN115658678BActive Publication Date: 2025-07-11HARBIN INST OF TECH SHENZHEN GRADUATE SCHOOL
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211072804.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-02
Publication Date
2025-07-11
Estimated Expiration
2042-09-02

AI Technical Summary

Technical Problem

现有关系型数据库水印方法鲁棒性较差,无法有效抵御删除攻击、修改攻击和添加攻击。

Method used

By dividing the relational database into multiple group domains, determining the insertion position of the data rows according to the feature domain and the control domain type, and embedding it in combination with the watermark bit information, ensuring the robustness of the watermark method.

Benefits of technology

It improves the robustness of database watermarks, can effectively resist various attacks, and keeps the original characteristics of the database undamaged.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115658678B_ABST
    Figure CN115658678B_ABST
Patent Text Reader

Abstract

The present invention discloses a watermarking method for a relational database. The watermarking method for a relational database includes dividing the relational database into multiple group domains according to the watermark embedding key; determining the feature domain type of each data row according to the feature domain calculation method; determining the control domain type of the data rows in each group domain according to the control domain parameters; determining the watermark-embedded data set and the watermark-inserted data set according to the original relational data set; dividing the watermark-embedded data set into multiple groups; determining whether to insert a data row and the feature domain type of the inserted data row according to the watermark bit information, the determined control domain type of each data row, and the feature domain type; and inserting the data rows in the watermark-inserted data set that conform to the feature domain type into the group domain where the current data row is located, so as to solve the technical problem of poor robustness of the database watermarking method in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of database security, and particularly relates to a watermarking method, device and storage medium for a relational database. Background Art

[0002] At present, data has become a new factor of production and gradually become the core driving force for the innovative development of the national economy. While mining and utilizing the data value, data security problems such as data copyright confirmation and tracing of sensitive data leakage have emerged. Database watermarking technology is one of the core technologies to solve data confirmation and traceability. Its technical principle is to embed watermark secret information that is difficult to be detected manually into the structured data (relation table) carrier. When data leakage occurs, the source of the leakage subject can be traced by extracting the watermark (including enterprise employees and organizations).

[0003] At present, for the copyright protection and data traceability of relational data, database watermarking technology is mainly considered, and a specified database watermarking method is adopted for specific data types. However, there are three major problems with the existing database watermarking methods: 1. After embedding the watermark, the original characteristics of the original database cannot be guaranteed, that is, the original data is damaged, such as algorithms like the least significant bit; 2. The robustness is poor, and the embedded watermark gradually fails as the attack intensity increases. The attack methods mainly include deletion attack, modification attack, addition attack, etc. Summary of the Invention

[0004] The present invention proposes a watermarking method for a relational database, aiming to solve the technical problem of poor robustness of the database watermarking method in the prior art.

[0005] To achieve the above object, the present invention proposes a watermarking method for a relational database, and the watermarking method for a relational database includes:

[0006] Obtain an original relational data set and a watermark embedding key;

[0007] Divide the relational database into multiple group domains according to the watermark embedding key, so that the original relational data set is converted into an intermediate relational data set of multiple group domains. Each group domain has N data rows and forms M data columns;

[0008] For each data column, determine the feature domain type of each data row according to the feature domain calculation method;

[0009] Obtain control domain parameters;

[0010] Based on each group domain, determine the control domain type of the data rows in each group domain according to the control domain parameters;

[0011] Determine the watermark-embedded data set and the watermark-embedding data set according to the original relationship data set;

[0012] Divide the watermark-embedded data set into multiple groups, each group having n data rows and forming m data columns; each data row of the watermark-embedding data set has a feature domain type;

[0013] Obtain the watermark bit information of each group;

[0014] According to the watermark bit information of each group, determine whether to insert a data row and the feature domain type of the inserted data row based on the control domain type and the feature domain type of each data row;

[0015] Insert the data rows of the watermark-embedding data set that conform to the feature domain type into the group domain where the current data row is located.

[0016] Optionally, the step of determining the control domain type of the data rows in each group domain according to the control domain parameter includes:

[0017] The calculation method of the control domain is:

[0018]

[0019] where H is a hash function, SK is a watermark embedding key, and FC is a fixed attribute; is the control domain parameter.

[0020] Optionally, for each data column, the step of determining the feature domain type of each data row according to the feature domain calculation method includes:

[0021] Denote the data column as ; this data column does not include the primary key and the fixed attribute column;

[0022] The feature domain calculation method is:

[0023] ;

[0024] ;

[0025] .

[0026] Optionally, the intermediate relationship data set further includes a primary key and fixed attribute columns.

[0027] Optionally, the step of determining whether to insert a data row and the feature domain type of the inserted data row according to the watermark bit information, the control domain type, and the feature domain type of each data row includes:

[0028] When the watermark bit information is 0, if the feature field type of the current data row is true - control field and the feature field type of the data row is 0 - feature field, insert the data row with the feature field type of 1 - feature field in the embedded watermark data set after the current data row;

[0029] When the watermark bit information is 1, if the feature field type of the current data row is true - control field and the feature field type of the data row is 1 - feature field, insert the data row with the feature field type of 0 - feature field in the embedded watermark data set after the current data row.

[0030] Optionally, the step of determining whether to insert a data row and the feature field type of the inserted data row according to the watermark bit information, the determined control field type of each data row, and the feature field type includes:

[0031] Step 1. Extract the primary key PK of the j - th data row in the same group j ;

[0032] Step 2. Extract the primary key PK of the (j + 1) - th data row in the same group j+1 ;

[0033] Step 3. Select a generated data row that conforms to the feature field from the embedded watermark data set, and set the primary key PK of the corresponding generated data row to a random number between PK j and PK j+1 ;

[0034] Step 4. If the data set of the watermark - embedded data set is an increment - type primary key, increment the primary keys of all data rows after the primary key PK by one, otherwise there is no need to process the group primary key;

[0035] Step 5. Insert the generated data row into the position of the primary key PK in the watermark - embedded data set;

[0036] Step 6. Iterate each data row j in the same group and execute the process of Steps 1 - 5.

[0037] Optionally, after the step of inserting the data row that conforms to the feature field type in the embedded watermark data set into the group domain where the current data row is located, it further includes:

[0038] For each group domain;

[0039] Determine the watermark variable parameter according to the feature field of the current data row and the feature fields of adjacent data rows;

[0040] Iterate each data row of each group domain in sequence to obtain the total watermark parameter;

[0041] Determine the distortion degree of the group domain according to the total watermark parameters of each group of domains.

[0042] Optionally, determine the watermark variable parameters according to the feature domain of the current data row and the feature domains of adjacent data rows;

[0043] Record the watermark variable parameters as zero_all, zero_hit, one_all, one_hit;

[0044] If the feature domain of the current data row is 1, increment one_all by 1, otherwise increment zero_all by 1;

[0045] If the feature domains of the current data row and the next adjacent data row within the group are different, when the feature domain type of the current data row is 0 - feature domain, increment zero_hit by 1; if the feature domains of the current data row and the next adjacent data row within the group are different, when the feature domain type of the current data row is 1 - feature domain, increment one_hit by 1.

[0046] Optionally, the step of iterating through each data row of each group of domains in sequence to obtain the total watermark parameters includes:

[0047] Based on each group of domains, if zero_hit / zero_all is greater than or equal to one_hit / one_all, the total watermark parameter extracted within this group is 0;

[0048] If zero_hit / zero_all is less than one_hit / one_all, the total watermark parameter extracted within this group is 0.

[0049] To achieve the above object, the present invention also proposes a storage medium storing a computer program, which when executed by a processor causes the processor to execute the watermark method for a relational database as described above.

[0050] The present invention involves obtaining an original relationship dataset and a watermark embedding key; dividing the relational database into multiple group domains according to the watermark embedding key, so that the original relationship dataset is converted into an intermediate relationship dataset of multiple group domains, each group domain having N data rows and forming M data columns; for each data column, determining the feature domain type of each data row according to the feature domain calculation method; obtaining the control domain parameters; based on each group domain, determining the control domain type of the data rows in each group domain according to the control domain parameters; determining the watermark-embedded dataset and the embedding watermark dataset according to the original relationship dataset; dividing the watermark-embedded dataset into multiple groups, each group having n data rows and forming m data columns; each data row of the embedding watermark dataset has a feature domain type; obtaining the watermark bit information of each group; determining whether to insert a data row and the feature domain type of the inserted data row according to the watermark bit information of each group, the determined control domain type of each data row, and the feature domain type; inserting the data rows of the embedding watermark dataset that conform to the feature domain type into the group domain where the current data row is located. Through the above steps, the relationship dataset can be watermarked by the above watermark method. Specifically, by dividing the dataset into time domain, control domain type, and feature domain type, and then performing watermarking according to the division of time domain, control domain type, and feature domain type and combining specific rules, all the feature information of the database is retained, and it has high robustness. Thus, the technical problem of poor robustness of the database watermark method in the prior art is solved.

[0051] Furthermore, the division methods of the time domain, control domain type, and feature domain type in this solution are not restricted by the data types in the dataset, and its watermark method can be applied to any type of database. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] The present invention will be further described below in conjunction with the drawings and embodiments;

[0053] Figure 1 It is a flowchart of the watermark method for a relational database in an embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0054] This part will describe the specific embodiments of the present invention in detail. The preferred embodiments of the present invention are shown in the drawings. The role of the drawings is to supplement the description of the text part of the specification, enabling people to intuitively and vividly understand each technical feature and the overall technical solution of the present invention, but it cannot be construed as a limitation on the protection scope of the present invention.

[0055] In order to solve the technical problem of poor robustness of the database watermark method in the prior art. The present invention proposes a watermark method for a relational database.

[0056] It should be noted that the watermarking method for relational databases mentioned in the present invention is mainly used for watermark encryption of databases.

[0057] In one embodiment, as Figure 1 shown, a watermarking method for relational databases, the watermarking method for relational databases includes:

[0058] S1. Obtain the original relational dataset and the watermark embedding key;

[0059] Among them, the original relational dataset can be data input by users, or a directly called database or part of the data. A relational database is based on a relational data model and is a database that processes data by means of mathematical concepts and methods such as set algebra. All kinds of entities in the real world and various relationships between entities can be represented by a relational model. A relational database stores data in the form of rows and columns, and this series of rows and columns is called a table, and a set of tables constitutes a database. The watermark embedding process also requires a watermark embedding key SK, and the watermark embedding key should meet the cryptographic security standard. Different watermark keys will produce completely different effects when performing the watermarking method. Suppose the primary key of a tuple is 21S151081. For example, user A uses his own watermark key as SecretA, and the secure hash value generated by user A for this tuple using Sha1 is 0aba69d8a58b49e4756efe2f24a31ca4691de038; user B uses the watermark key SecretB, and for the same tuple / data row, the generated secure hash value is 90c0f0593efd2af809b8ea4dea3cb10c32d54a42. Slightly different watermark keys will produce completely different results for the watermarking method. In this application, the meaning of a tuple and a data row is the same.

[0060] S2. Divide the relational database into multiple group domains according to the watermark embedding key, so that the original relational dataset is converted into intermediate relational datasets of multiple group domains, each group domain has N data rows, and M data columns A = {A1, A2,..., A M};

[0061] It should be noted that the watermark embedding key SK actually belongs to the product of the watermarking method and plays an extraction role and an identification role. In the above solution, the watermark embedding key is actually data with certain partitioning rules or directivity, such as a coordinate array, etc., so that the relational database can be divided into multiple group domains. Optionally, N and M are natural numbers greater than zero. Among them, M is the number of attributes of the dataset.

[0062] S3. For each data column, determine the feature domain type of each data row according to the feature domain calculation method;

[0063] S4. Obtain the control domain parameters;

[0064] Among them, the control domain parameters are input by the user or adopt the default values set in advance, which are the necessary parameters for the control domain parameters.

[0065] S5. Based on each of the above-mentioned group domains, determine the control domain type of the data rows in each group domain according to the control domain parameters;

[0066] S6. Determine the watermark-embedded data set and the watermark-embedding data set according to the original relationship data set;

[0067] Among them, the feature information of each database is different, and the division method and division effect will also be different. In the embodiments of the present invention, it can be defaulted that the data domain features are evenly distributed. Therefore, a part of the data is randomly selected from the data set D as the watermark-embedding data set I, and the remaining data forms the watermark-embedded data set D'. It should be noted that it is feasible to regard all the original data sets as the watermark-embedded database D'. At this time, the watermark-embedding data set I is an empty set, and all the inserted generated data will be generated by the generator.

[0068] Furthermore, in order to better maintain the original data characteristics of the database and reduce the use of generated data, the present invention preferentially uses the data rows in the watermark-embedding data part for insertion; if the watermark-embedding data part is insufficient, the generated data is used. In a preferred embodiment of the present invention, a CTGAN model can be used to generate generated data that conforms to the current data set D.

[0069] S7. Divide the watermark-embedded data set into multiple groups, each group having n data rows and forming m data columns; each data row of the watermark-embedding data set has a feature domain type;

[0070] S8. Obtain the watermark bit information of each group;

[0071] In one implementation, the watermark bit information can form a watermark string, such as 01010. If there are 5 groups, the watermark string 01010 is also divided into 5 watermark bits or 5 watermark bit information. One watermark bit corresponds to one group, and one bit is embedded into one group. For example, the watermark string specified by the user is W = w1, w2, w3,... w N ; The group is G = g 1, g2, g3,... g N, then, the watermark bit w1 will be embedded into the packet g1, the watermark bit w2 will be embedded into the packet g2, and so on. In addition, there can be a separate watermark bit information corresponding to a packet for embedding.

[0072] S9. Determine whether to insert a data row and the feature domain type of the inserted data row according to the watermark bit information of each packet, the control domain type and the feature domain type of each said data row;

[0073] S10. Insert the data rows in the embedded watermark data set that conform to the feature domain type into the group domain where the current data row is located.

[0074] Through the above steps, the relational data set can be watermarked by the above watermark method. Specifically, by dividing the data set into time domain, control domain type and feature domain type, and then performing watermarking according to the division of time domain, control domain type and feature domain type and combining specific rules, all the feature information of the database is retained, and it has high robustness. Thus, the technical problem of poor robustness of the database watermark method in the prior art is solved.

[0075] Furthermore, the division methods of the time domain, control domain type and feature domain type in this solution are not restricted by the data types in the data set, and its watermark method can be applied to any type of database. Thus, it can be applied to data of types such as text type, character type, integer type, floating-point type, etc. at the same time.

[0076] Among them, it should be noted that during the process of embedding a watermark bit information into a packet, only the data under the true-control domain will be selected for feature judgment. The control domain CF of the current data row belongs to the true-feature domain only when CF % α = 0.

[0077] When there are 1000 rows of data in the data table, assuming that the user inputs α = 1, then all 1000 rows of data belong to the control domain; assuming that the user inputs α = 10, then the number of data in the control domain is probabilistically 1000 / 10 = 100 rows; when the user does not specify α, α defaults to 1.

[0078] Optionally, the step of determining the control domain type of the data rows in each group domain according to the control domain parameter includes:

[0079] The calculation method of the control domain is:

[0080]

[0081] Among them, H is a hash function, SK is a watermark embedding key, and FC is a fixed attribute. Generally, fixed attributes are attributes of the data set that are not easily modified. Generally, there will be a column of attributes that are not easily modified in the data set to mark tuples; is the control field parameter.

[0082] In the above scheme, when is 0, the control field type of the data rows in the current group field is true-control field;

[0083] When is not 0, the control field type of the data rows in the current group field is false-control field;

[0084] When is empty, the control field type of the data rows in the current group field is true-control field.

[0085] Among them, through the above method, the control field types of the data rows in the current group field can be quickly divided, and some features of the original database can be effectively extracted, effectively improving the least significant bit.

[0086] Optionally, the step of determining the feature field type of each data row according to the feature field calculation method for each data column includes:

[0087] Denote the data column as ; This data column can include the primary key and fixed attribute columns, or may not include the primary key and fixed attribute columns;

[0088] Assume the data set is C = {PK, c1, c2, c3,..., c z , FC}; where FC is a fixed attribute, and its attributes can be {PK, c1, c2, c3,..., c z}, for the convenience of explanation, it is specially marked out; among the z attributes {c1, c2, c3,..., c z}, one attribute will be selected to extract feature bits;

[0089] The feature field calculation method is:

[0090] ;

[0091] ;

[0092] ;

[0093] Among them, h is the first hash value, and j represents the attribute subset {c1, c2, c3,..., c zSelect an attribute from}, where H is a hash function, SK is a watermark embedding key, FC is a fixed attribute, r represents the selectable bit range, offset represents the starting offset, and b represents the b-th bit of the j-th attribute.

[0094] In the above scheme, the computer memory can only store bits as 0 or 1, so there are two possible values for b.

[0095] When b is 0, determine that the feature domain type of the data row is 0 - feature domain;

[0096] When b is 1, determine that the feature domain type of the data row is 1 - feature domain.

[0097] Through the above scheme, the amount of features contained in a feature is increased as much as possible, improving the robustness when embedding watermarks based on this parameter later, and ensuring that the speed at which the embedded watermark gradually fails as the attack intensity increases is reduced. The attacks mainly include deletion attacks, modification attacks, addition attacks, etc.

[0098] Optionally, the intermediate relationship dataset further includes a primary key and a fixed attribute column.

[0099] Optionally, the step of determining whether to insert a data row and the feature domain type of the inserted data row according to the watermark bit information, the determined control domain type and feature domain type of each data row includes:

[0100] When the watermark bit information is 0, if the feature domain type of the current data row is true - control domain and the feature domain type of the data row is 0 - feature domain, insert the data row with the feature domain type of 1 - feature domain in the embedded watermark dataset after the current data row;

[0101] When the watermark bit information is 1, if the feature domain type of the current data row is true - control domain and the feature domain type of the data row is 1 - feature domain, insert the data row with the feature domain type of 0 - feature domain in the embedded watermark dataset after the current data row.

[0102] Optionally, the step of determining whether to insert a data row and the feature domain type of the inserted data row according to the watermark bit information, the determined control domain type and feature domain type of each data row includes:

[0103] Step 1. Extract the primary key PK of the j-th data row in the same group j ;

[0104] Step 2. Extract the primary key PK of the j + 1-th data row in the same group j+1 ;

[0105] Step 3. Select a generated data row that meets the feature domain from the embedded watermark dataset, and set the primary key PK of the corresponding generated data row to PK j and PK j+1 to a random number between;

[0106] Step 4. If the dataset of the embedded watermark dataset has an incremental primary key, increment the primary keys of all data rows after the primary key PK by one, otherwise there is no need to process the grouped primary key;

[0107] Step 5. Insert the generated data row into the position of the primary key PK of the embedded watermark dataset;

[0108] Step 6. Iterate through each data row j in the same group and execute the process of Steps 1 - 5.

[0109] For example, assuming that the dataset primary key is incremental, and the primary keys of the tuples in the group are PK s ={1, 5, 9, 13} and the group needs to embed the watermark bit 0; when iterating to PK j =5, assuming that the data row is a true - control domain and the feature domain is a 0 - feature domain, so a 1 - feature domain generated data row needs to be inserted after it. If the randomly selected PK is 7, then the primary keys of the group after inserting this data row are PKs = {1, 5, 7, 10, 14}. It should be noted that all primary keys in the original dataset greater than or equal to 7 need to be incremented by one. If the dataset primary key is not incremental, for example, PK s ={“ann”, “far”, “oli”}, if a generated data row is inserted between the primary keys “ann” and “far”, its primary key only needs to be set with a lexicographical order between the two, such as “bar”, and after insertion, it is PK s ={“ann”, “bar”, “far”, “oli”}, and there is no need to change the primary keys of other data rows in the dataset.

[0110] Optionally, after the step of inserting the data row that meets the feature domain type of the embedded watermark dataset into the group domain where the current data row is located, the following steps are further included:

[0111] For each group domain;

[0112] Determine the watermark variable parameter according to the feature domain of the current data row and the feature domains of adjacent data rows;

[0113] Iterate through each data row of each group domain in sequence to obtain the total watermark parameter;

[0114] Determine the distortion degree of the group domain according to the total watermark parameter of each group domain.

[0115] Among them, the above steps are used to confirm the reliability and distortion degree of the current database.

[0116] Optionally, determining the watermark variable parameters according to the feature field of the current data row and the feature fields of adjacent data rows;

[0117] Denote the watermark variable parameters as zero_all, zero_hit, one_all, one_hit;

[0118] If the feature field of the current data row is 1, increment one_all by 1, otherwise increment zero_all by 1;

[0119] If the feature fields of the current data row and the next adjacent data row within the group are different, when the feature field type of the current data row is 0 - feature field, increment zero_hit by 1; if the feature fields of the current data row and the next adjacent data row within the group are different, and the feature field type of the current data row is 1 - feature field, increment one_hit by 1.

[0120] Optionally, the step of iteratively processing each data row of each group domain in sequence to obtain the total watermark parameter includes:

[0121] Based on each group domain, if zero_hit / zero_all is greater than or equal to one_hit / one_all, the total watermark parameter extracted within this group is 0;

[0122] If zero_hit / zero_all is less than one_hit / one_all, the total watermark parameter extracted within this group is 0.

[0123] Through the above process, it can quickly confirm whether the current relational database has been attacked.

[0124] To solve the above problems, the present invention also proposes a storage medium. When the computer program is executed by a processor, the processor is caused to execute the watermark method for the relational database as described above.

[0125] It should be noted that since the storage medium of the present application includes all the steps of the watermark method for the relational database as described above, therefore, the storage medium can also implement all the solutions of the watermark method for the relational database and has the same beneficial effects, which will not be elaborated here.

[0126] Implement a watermarking method for a relational database in the above method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and their appropriate combinations. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassette, tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, a communication medium typically includes computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery medium.

[0127] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.

Claims

1. A watermarking method for relational databases, characterized in that, The watermarking method for relational databases includes: Obtaining an original relational dataset and a watermark embedding key; Dividing the relational database into multiple group domains according to the watermark embedding key, so that the original relational dataset is converted into intermediate relational datasets of multiple group domains, each group domain has N data rows, and M data columns are formed; For each data column, determining the feature domain type of each data row according to the feature domain calculation method; Obtaining control domain parameters; Based on each group domain, determining the control domain type of the data rows in each group domain according to the control domain parameters; Determining an embedded watermark dataset and an embedding watermark dataset according to the original relational dataset; Dividing the embedded watermark dataset into multiple groups, each group has n data rows, and m data columns are formed; each data row of the embedding watermark dataset has a feature domain type; Obtaining the watermark bit information of each group; According to the watermark bit information of each group, determining whether to insert a data row and the feature domain type of the inserted data row according to the control domain type and the feature domain type of each data row; Inserting the data rows of the embedding watermark dataset that conform to the feature domain type into the group domain where the current data row is located.

2. The watermarking method for a relational database according to claim 1, characterized in that The step of determining the control domain type of the data rows in each group domain according to the control domain parameters includes: The calculation method of the control domain is: ; Among them, H is a hash function, SK is a watermark embedding key, and FC is a fixed attribute; It is a control field parameter.

3. The watermarking method for relational databases according to claim 1, characterized in that, The step of determining the feature domain type of each data row according to the feature domain calculation method for each data column includes: Record the data column as ; the data column does not contain a primary key or fixed attribute columns; The feature domain calculation method is: ; ; ; Where h is the first hash value, j represents selecting an attribute from the attribute subset {c1, c2, c3,..., cz}, H is the hash function, SK is the watermark embedding key, FC is the fixed attribute, r represents the selectable bit range, offset represents the starting offset, and b represents the b-th bit of the j-th attribute.

4. The watermarking method for a relational database according to claim 1, characterized in that The intermediate relational dataset also includes a primary key and a fixed attribute column.

5. The watermarking method for relational databases according to claim 1, characterized in that, The step of determining whether to insert a data row and the feature domain type of the inserted data row according to the watermark bit information, the control domain type, and the feature domain type of each data row includes: When the watermark bit information is 0, if the feature domain type of the current data row is true-control domain and the feature domain type of the data row is 0-feature domain, insert the data row with the feature domain type of 1-feature domain in the embedding watermark dataset after the current data row; When the watermark bit information is 1, if the feature domain type of the current data row is true-control domain and the feature domain type of the data row is 1-feature domain, insert the data row with the feature domain type of 0-feature domain in the embedding watermark dataset after the current data row.

6. The watermarking method for relational databases according to claim 1, characterized in that The step of determining whether to insert a data row and the feature domain type of the inserted data row according to the watermark bit information, the control domain type, and the feature domain type of each data row includes: Step 1. Extract the primary key PK of the j-th data row in the same group j ; Step 2. Extract the primary key PK of the (j + 1)-th data row in the same group j+1 ; Step 3. Select a generated data row that meets the feature domain from the embedded watermark dataset, and set the primary key PK of the corresponding generated data row to a random number between PK j and PK j+1 ; Step 4. If the dataset of the watermark-embedded dataset is an incrementing primary key, increment the primary key of all data rows after the primary key PK by one; otherwise, there is no need to process the grouped primary key. Step 5. Insert the generated data row into the position of the primary key PK of the watermark-embedded dataset. Step 6. Iterate through each data row j in the same group and execute the process of Steps 1 - 5.

7. The watermarking method for a relational database according to claim 1, characterized in that, After the step of inserting the data row that conforms to the feature domain type of the watermark-embedded dataset into the group domain where the current data row is located, the following steps are further included: For each group domain; Determine the watermark variable parameters based on the feature domain of the current data row and the feature domains of adjacent data rows. Iterate through each data row in each group domain in sequence to obtain the total watermark parameters. Determine the distortion degree of the group domain based on the total watermark parameters of each group domain.

8. The watermarking method for a relational database according to claim 7, characterized in that, The step of determining the watermark variable parameters based on the feature domain of the current data row and the feature domains of adjacent data rows; Denote the watermark variable parameters as zero_all, zero_hit, one_all, one_hit. If the feature domain of the current data row is 1, increment one_all by 1; otherwise, increment zero_all by 1. If the feature domain of the current data row is different from that of the next adjacent data row within the group, when the feature domain type of the current data row is 0 - feature domain, increment zero_hit by 1; if the feature domain of the current data row is different from that of the next adjacent data row within the group, when the feature domain type of the current data row is 1 - feature domain, increment one_hit by 1.

9. The watermarking method for relational databases according to claim 8, characterized in that, The step of iterating through each data row in each group domain in sequence to obtain the total watermark parameters includes: Based on each group domain, if zero_hit / zero_all is greater than or equal to one_hit / one_all, the total watermark parameter extracted within this group is 0; If zero_hit / zero_all is less than one_hit / one_all, the total watermark parameter extracted within this group is 0.

10. A storage medium stores a computer program, characterized in that, When the computer program is executed by a processor, it causes the processor to execute the watermark method for a relational database as described in any one of claims 1 - 9.

Citation Information

Patent Citations

  • Vector map watermark method for resisting geometric attacks

    CN102054262A

  • Robust digital watermarking method based on grouping

    CN109872267A