Database watermark processing method and device, storage medium and readable storage medium

By selecting different embedding positions and encoding methods based on field types in the database table, the problem of data pollution in existing technologies is solved, fine-grained differentiated protection is achieved, and data security in high-precision computing scenarios is ensured.

CN120974465BActive Publication Date: 2026-06-05VIPSHOP (GUANGZHOU) SOFTWARE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
VIPSHOP (GUANGZHOU) SOFTWARE CO LTD
Filing Date
2025-09-15
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing database watermarking methods may cause data pollution when operating on the entire database table, which is unacceptable, especially in high-precision computing scenarios.

Method used

By determining the target field type in the database table and selecting different embedding locations and encoding methods based on the field type, differentiated fine-grained protection can be achieved, avoiding the risk of data pollution caused by overall embedding.

Benefits of technology

It achieves differentiated protection for different fields in the database table, effectively avoiding the risk of data contamination and ensuring the security and integrity of sensitive data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120974465B_ABST
    Figure CN120974465B_ABST
Patent Text Reader

Abstract

The application discloses a database watermark processing method and device, a storage medium and a readable storage medium, and relates to the technical field of digital watermarking. The database watermark processing method comprises the following steps: determining each target field in a to-be-processed database table; determining a corresponding field type according to each target field; determining a target embedding position of each target field in the to-be-processed database table according to each field type; obtaining watermark information to be added, and embedding the watermark information in the target embedding position corresponding to each target field respectively to obtain a target watermark database table. The application solves the technical problem that the existing database watermark processing method has a data pollution risk.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of digital watermarking, and in particular to a database watermarking processing method, device, storage medium, and readable storage medium. Background Technology

[0002] Digital watermarking technology, as a core supporting means of digital copyright protection, has formed an application system covering the entire multimedia field.

[0003] Current database watermarking technology primarily achieves functions such as copyright protection, data traceability, and tamper prevention by embedding invisible or visible identifiers within database tables. However, this method of watermarking the entire database table may require adding noise or modifying data in numerous irrelevant fields or all fields when operating on the entire table, potentially leading to the contamination of some fields. This data contamination, especially of sensitive data, may be unacceptable in scenarios requiring high-precision calculations (such as financial analysis, scientific computing, and medical decision-making). In other words, existing database watermarking methods carry the risk of data contamination.

[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0005] The main objective of this application is to provide a database watermarking method, device, storage medium, and readable storage medium, aiming to solve the technical problem of data pollution risk in existing database watermarking methods.

[0006] To achieve the above objectives, this application proposes a database watermarking method, which includes:

[0007] Identify the target fields in the database table to be processed;

[0008] Based on each of the target fields, determine the corresponding field type;

[0009] Based on the field types, determine the target embedding position in the database table to be processed for each target field;

[0010] Obtain the watermark information to be added, and embed the watermark information into the target embedding position corresponding to each target field to obtain the target watermark database table.

[0011] In one embodiment, a predetermined type mapping table is obtained, wherein the predetermined type mapping table includes mapping relationships between fields and field types, and the field types are divided by sensitivity and / or modifiability;

[0012] Based on the target field, query the predefined type mapping table to obtain the field type corresponding to the target field.

[0013] In one embodiment, the step of determining the target embedding position in the database table to be processed for each target field according to each of the field types includes:

[0014] If the target field is of sensitive-immutable type, then the field description in the metadata of the database table to be processed or the newly added virtual field will be used as the target embedding location.

[0015] If the target field is of sensitive-modifiable type, then the extended attribute field of the metadata in the database table to be processed or the light perturbation position of the target field is used as the target embedding position.

[0016] If the target field is of insensitive-non-modifiable type, then the metadata or index tree structure of the database table to be processed will be used as the target embedding location.

[0017] If the target field is of type insensitive-modifiable, then the least significant bit of the target field or the extended attribute field is used as the target embedding position.

[0018] In one embodiment, the step of embedding the watermark information into the target embedding positions corresponding to each of the target fields to obtain the target watermark database table includes:

[0019] Obtain the usage scenario category of the database table;

[0020] If the usage scenario category is a real-time scenario, then the key watermark content in the watermark information is subjected to a first encoding process to obtain the target watermark encoding;

[0021] If the usage scenario category is a large-capacity scenario, then the key watermark content in the watermark information is subjected to a first encoding process, and the extended watermark content in the watermark information is subjected to a second encoding process to obtain the target watermark code, wherein the computational overhead of the first encoding process is less than that of the second encoding process.

[0022] The target watermark encoding is embedded into the target embedding position corresponding to each target field to obtain the target watermark database table.

[0023] In one embodiment, after the step of determining the target embedding position in the database table to be processed for each target field according to each of the field types, the database watermarking method further includes:

[0024] In the index tree structure of the database table to be processed, an implicit identifier is inserted into the index node to identify the target embedding position of the target field whose field type is sensitive.

[0025] The storage order of index nodes in the index tree structure of the database table to be processed is adjusted to identify the target embedding position of the target field whose field type is insensitive.

[0026] In one embodiment, after the step of obtaining the watermark information to be added, the database watermark processing method further includes:

[0027] Obtain the core identifier content from the watermark information;

[0028] After performing a hash calculation on the core identifier content, the watermark hash value is obtained, and the watermark hash value is uploaded to the blockchain.

[0029] In one embodiment, after the step of embedding the watermark information into the target embedding positions corresponding to each of the target fields to obtain the target watermark database table, the database watermark processing method further includes:

[0030] Watermark extraction is performed on the target watermark database table to obtain watermark extraction information, and the core identifier content in the watermark extraction information is determined.

[0031] After performing a hash calculation on the core identifier content, a verification hash value is obtained;

[0032] The watermark hash value of the core identifier content can be queried through the blockchain.

[0033] If the watermark hash value is inconsistent with the verification hash value, it is determined that a watermark tampering event has occurred.

[0034] In addition, to achieve the above objectives, this application also proposes a database watermarking processing device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the database watermarking processing method as described above.

[0035] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the database watermarking method described above.

[0036] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the database watermarking method described above.

[0037] One or more technical solutions proposed in this application have at least the following technical effects:

[0038] This application identifies target fields in a database table to be processed, determines the corresponding field type based on each target field, and then determines the target embedding position for each target field within the database table based on the field type. This allows for fine-grained field-level classification of the database table, accommodating differentiated protection needs for different target fields within the same database table by selecting different target embedding positions based on field types. The watermark information to be added is then obtained and embedded into the target embedding positions corresponding to each target field, resulting in a target watermark database table. Compared to traditional methods of embedding watermarks across the entire database table, this application effectively avoids the data pollution risk associated with overall embedding by differentiating between different fields within the same database table for differentiated, fine-grained protection. Attached Figure Description

[0039] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0040] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 This is a flowchart illustrating an embodiment of the database watermarking method of this application.

[0042] Figure 2 This is a schematic diagram of a scenario of an embodiment of the database watermarking method of this application;

[0043] Figure 3 This is a flowchart illustrating Embodiment 2 of the database watermarking method of this application.

[0044] Figure 4 This is a flowchart illustrating Embodiment 3 of the database watermarking method of this application.

[0045] Figure 5 This is a schematic diagram of the database watermarking processing device in the embodiments of this application.

[0046] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0047] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0048] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0049] The main solution of this application embodiment is: to determine each target field in the database table to be processed; to determine the corresponding field type according to each target field; to determine the target embedding position in the database table to be processed corresponding to each target field according to each field type; to obtain the watermark information to be added, and to embed the watermark information into the target embedding position corresponding to each target field respectively, so as to obtain the target watermark database table.

[0050] Current database watermarking technology primarily achieves copyright protection, data traceability, and tamper prevention by embedding invisible or visible identifiers within database tables. However, this method of watermarking the entire database table may require adding noise or modifying data in numerous irrelevant fields or all fields during operations on the entire table, potentially leading to contamination of some fields. This data contamination, especially of sensitive data, is unacceptable in scenarios requiring high-precision calculations (such as financial analysis, scientific computing, and medical decision-making). In other words, existing database watermarking methods pose a risk of data contamination.

[0051] This application provides a solution that allows for fine-grained classification of the database table to be processed at the field level. This enables adaptation to differentiated protection requirements for different target fields within the same database table, selecting different target embedding positions based on field types. Then, the watermark information to be added is obtained and embedded into the target embedding positions corresponding to each target field, resulting in a target watermark database table. Compared to traditional methods of embedding watermarks across the entire database table, this application effectively avoids the data pollution risks associated with overall embedding by differentiating and fine-grained protection for different fields within the same database table.

[0052] Based on this, the embodiments of this application provide a database watermarking method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the database watermarking method of this application.

[0053] In this embodiment, the database watermarking processing method includes steps S10 to S40:

[0054] Step S10: Determine each target field in the database table to be processed;

[0055] It should be noted that the database table to be processed is the table in the database that is expected to have a watermark embedded, and the target field is the field in the database table that is expected to have a watermark embedded. For example, taking the database table as a user information table, the user information table may include fields such as balance (user balance), phone (mobile phone number), create_time (registration time), and comment (user remarks).

[0056] This embodiment can traverse the database table to be processed to obtain all fields in the database table to be processed. Then, all fields in the database table to be processed can be used as target fields, or only some fields in the database table to be processed can be used as target fields.

[0057] Step S20: Determine the corresponding field type based on each of the target fields;

[0058] It should be noted that there is a correspondence between the target fields and the field types, meaning that different target fields have corresponding field types. The field type is determined by at least one of sensitivity and modifiability. It is understood that the field type can be further subdivided based on sensitivity and / or modifiability, such as high-sensitivity type, medium-sensitivity type, low-sensitivity type, etc.

[0059] This embodiment can pre-build the correspondence between each field and its field type, and then, based on this correspondence, query the field type corresponding to each target field. For example, the field type may include sensitive and non-sensitive types, or the field type may also include modifiable and immutable types, or the field type may include sensitive-immutable, sensitive-modifiable, non-sensitive-immutable, and non-sensitive-modifiable types.

[0060] In some embodiments, step S20 may include steps S21-S22:

[0061] Step S21: Obtain a predetermined type mapping table, wherein the predetermined type mapping table includes the mapping relationship between fields and field types, and the field types are divided by sensitivity and / or modifiability;

[0062] Step S22: Based on the target field, query the predetermined type mapping table to obtain the field type corresponding to the target field.

[0063] It should be noted that the predetermined type mapping table includes the mapping relationship between fields and field types. The field types are divided by sensitivity and / or modifiability, that is, the field types are obtained by at least one of sensitivity and modifiability. For example, the field types may include sensitive types and insensitive types, or the field types may also include modifiable types and immutable types, or the field types may include sensitive-immutable types, sensitive-modifiable types, insensitive-immutable types, and insensitive-modifiable types.

[0064] This implementation can obtain a predefined type mapping table describing the mapping relationship between fields and field types. Then, it can query the predefined type mapping table and use the field type corresponding to the field matching the target field in the predefined type mapping table as the field type corresponding to the target field. For example, if the target field is balance (user balance), its corresponding field type is sensitive-unmodifiable; if the target field is phone (phone number), its corresponding field type is sensitive-modifiable; if the target field is create_time (registration time), its corresponding field type is insensitive-unmodifiable; and if the target field is comment (user remarks), its corresponding field type is insensitive-modifiable.

[0065] Step S30: Determine the target embedding position in the database table to be processed for each target field according to the field type.

[0066] It should be noted that there is a correspondence between the field type and the target embedding position; that is, different field types have corresponding target embedding positions to adapt to the characteristics of different field types. The target embedding position is an object in the database table that can embed watermark information, such as metadata, newly added virtual fields, extended attribute fields, index tree structures, least significant bits, etc.

[0067] This embodiment can pre-establish a mapping relationship between field types and target embedding positions. For example, for a field type that is immutable (e.g., sensitive-immutable or insensitive-immutable), the corresponding target embedding position is an embedding position in the database table where the content of the target field (i.e., the original data content stored in the target field) is not disturbed (e.g., metadata, index tree structure, etc.), thus preventing modification of the target field's content. For a field type that is sensitive (e.g., sensitive-modifiable or sensitive-immutable), the corresponding target embedding position is an embedding position with high robustness (i.e., an embedding position in the database table where the attack resistance is higher than a predetermined attack resistance threshold), enhancing the watermark information's resistance to attacks. For a field type that is insensitive or modifiable, the corresponding target embedding position is an embedding position with a large watermark capacity (i.e., an embedding position in the database table where the watermark capacity is higher than a predetermined capacity threshold), increasing the overall watermark capacity to embed more watermark information. Furthermore, this embodiment can query the mapping relationship based on the field type of each target field to obtain the target embedding position in the database table to be processed for each target field. For example, if the target field's field type is sensitive-immutable, then the field description or newly added virtual field in the metadata of the database table to be processed is used as the target embedding location; if the target field's field type is sensitive-modifiable, then the extended attribute field of the metadata in the database table to be processed or the light perturbation position of the target field is used as the target embedding location; if the target field's field type is insensitive-immutable, then the metadata or index tree structure of the database table to be processed is used as the target embedding location; if the target field's field type is insensitive-modifiable, then the least significant bit of the target field or the extended attribute field is used as the target embedding location.

[0068] In some embodiments, step S30 may include steps S31 to S34:

[0069] Step S31: If the field type of the target field is sensitive-immutable, then the field description in the metadata of the database table to be processed or the newly added virtual field is used as the target embedding location.

[0070] Step S32: If the field type of the target field is sensitive-modifiable, then the extended attribute field of the metadata in the database table to be processed or the light perturbation position of the target field is taken as the target embedding position.

[0071] Step S33: If the field type of the target field is insensitive-immutable, then the metadata or index tree structure of the database table to be processed is used as the target embedding location.

[0072] Step S34: If the field type of the target field is insensitive-modifiable, then the least significant bit of the target field or the extended attribute field is used as the target embedding position.

[0073] It should be noted that the field descriptions in the metadata are information describing the fields, such as COLUMN_COMMENT. The newly added virtual fields are fields added to the metadata that do not store business information, and the extended attribute fields are fields in the metadata that describe extended attributes, such as JSONB extended fields. The lightweight perturbation position of the target field is the position where the field content of the target field is modified using a lightweight perturbation watermark embedding method. For example, the lightweight perturbation watermark embedding method could be ±1 of the last digit of a numeric target field, in which case the last digit of the numeric target field would be the lightweight perturbation position. That is, for target fields of the sensitive-modifiable type, a lightweight perturbation watermark embedding method can be used to ensure the security of modifiable sensitive data. The index tree structure can be a B-tree or its variant (such as a B+ tree). The index tree structure can organize data through multi-level nodes, with each node storing a key value and a pointer to a data page. Nodes between the root node level and the leaf node level are called intermediate nodes, and leaf nodes store the actual key value and pointers to data rows. When a query is performed, the system starts from the root node and searches downwards level by level until it finds a leaf node containing the required data.

[0074] If the target field's field type is sensitive and cannot be modified, this embodiment can use the field description or a newly added virtual field in the metadata of the database table to be processed as the target embedding location. Since using the field description or a newly added virtual field in the metadata as the target embedding location does not change the original data in the target field, and requires DDL (Data Definition Language) permissions to tamper with, the security of the watermark embedded at this target embedding location is effectively guaranteed. If the target field's field type is sensitive and can be modified, this embodiment can use the extended attribute field of the metadata in the database table to be processed or the lightly perturbed position of the target field as the target embedding location. Since the content of this part of the target field, although sensitive data, can be modified, this embodiment can use the extended attribute field of the metadata as the target embedding location. The extended attribute field is used as an independent storage area, which can maintain the integrity of the original data and store more complex watermark information through structures such as JSON, providing a larger watermark capacity compared to the field description or a newly added virtual field. This embodiment can also use the lightly perturbed position of the target field as the target embedding location for later lightly perturbed watermark embedding, which also provides a large watermark capacity. If the target field's field type is insensitive and immutable, since embedding watermarks into metadata or the index tree structure will not modify the target field's content, this embodiment can use the metadata or index tree structure of the database table to be processed as the target embedding location. If the target field's field type is insensitive and modifiable, this embodiment can use the least significant bit of the target field or the extended attribute field as the target embedding location to achieve a larger watermark capacity.

[0075] Step S40: Obtain the watermark information to be added, and embed the watermark information into the target embedding position corresponding to each target field to obtain the target watermark database table.

[0076] It should be noted that the watermark information may include preset static identification information, such as identifying text like "copyright owner's name" or "digital signature," as well as dynamically acquired identification information in real time, such as the viewer's identity information (e.g., account, employee ID), browsing time, and IP address. It is understood that the watermark information may include different watermark content corresponding to each of the target fields, or it may be the same watermark content.

[0077] Taking the watermark information as including different watermark content corresponding to each of the target fields as an example, this embodiment can embed the different watermark content corresponding to each of the target fields into the target embedding position corresponding to each of the target fields to obtain the target watermark database table.

[0078] In some embodiments, after the step of obtaining the watermark information to be added in step S40, the database watermark processing method further includes steps A10 to A20:

[0079] Step A10: Obtain the core identifier content from the watermark information;

[0080] Step A20: After performing a hash calculation on the core identifier content, the watermark hash value is obtained, and the watermark hash value is uploaded to the blockchain.

[0081] It should be noted that the core identifier content refers to the watermark content with the highest priority (i.e., importance) among the watermark information, such as key identifiers like "copyright owner's name" and "digital signature".

[0082] To further protect the watermark information and facilitate subsequent tamper-proof authentication, this embodiment can obtain the core identifier content within the watermark information; then, using a predetermined hash algorithm, it performs a hash calculation on the core identifier content to obtain the watermark hash value. For example... Figure 2 As shown, the execution entity in this embodiment is a database watermarking processing device, which can then upload the watermark hash value to the blockchain. The predetermined hash algorithm can be MD4 (Message Digest 4), MD5 (Message Digest 5), SHA-256, SHA-512, SHA-3, etc. Taking the digital signature "Sign_2023" as an example, this embodiment can calculate a 256-bit watermark hash value from the digital signature "Sign_2023" using the predetermined hash algorithm SHA-256, and then upload and store the watermark hash value to the blockchain.

[0083] In some embodiments, after step S40, the database watermarking method further includes steps B10 to B40:

[0084] Step B10: Extract watermarks from the target watermark database table to obtain watermark extraction information, and determine the core identifier content in the watermark extraction information;

[0085] Step B20: After performing a hash calculation on the core identifier content, a verification hash value is obtained;

[0086] Step B30: Query the watermark hash value of the core identifier content through the blockchain;

[0087] Step B40: After the watermark hash value is inconsistent with the verification hash value, it is determined that a watermark tampering event has occurred.

[0088] In the watermark extraction stage, this embodiment can extract watermarks from the target watermark database table to obtain watermark extraction information and determine the core identifier content in the watermark extraction information. Then, based on a predetermined hash algorithm, a verification hash value is obtained by hashing the core identifier content. It is understood that the hash algorithm used in step S20 needs to be consistent with the hash algorithm used in step A20. Therefore, this embodiment can query the watermark hash value of the core identifier content through the blockchain and compare the watermark hash value with the verification hash value. If the watermark hash value and the verification hash value are inconsistent, it indicates that the core identifier content in the watermark extraction information is different from the core identifier content in the watermark information when the watermark was embedded, and a watermark tampering event can be determined. If the watermark hash value and the verification hash value are consistent, it indicates that no watermark tampering event has occurred, and the verification is successful.

[0089] This implementation uses blockchain to store core identifier content, thereby verifying the watermark extraction process through the blockchain. This allows for accurate detection of watermark tampering events without contaminating the original data content stored in the target field.

[0090] The first embodiment of this application provides a database watermarking method. This method involves determining each target field in a database table to be processed, then determining the corresponding field type based on each target field, and finally determining the target embedding position for each target field within the database table based on the field type. This embodiment allows for fine-grained classification of the database table at the field level, thus adapting to the differentiated protection needs of different target fields within the same database table by selecting different target embedding positions based on the field type. Then, the watermark information to be added is obtained and embedded into the target embedding positions corresponding to each target field, resulting in a target watermarked database table. Compared to traditional methods of embedding watermarks across the entire database table, this embodiment effectively avoids the data pollution risk associated with overall embedding by distinguishing different fields within the same database table and performing differentiated fine-grained protection.

[0091] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 The step S40, which involves embedding the watermark information into the target embedding positions corresponding to each target field to obtain the target watermark database table, may include steps S41 to S44:

[0092] Step S41: Obtain the usage scenario category of the database table;

[0093] Step S42: If the usage scenario category is a real-time scenario, then the key watermark content in the watermark information is subjected to a first encoding process to obtain the target watermark encoding.

[0094] Step S43: If the usage scenario category is a large-capacity scenario, then the key watermark content in the watermark information is subjected to a first encoding process, and the extended watermark content in the watermark information is subjected to a second encoding process to obtain the target watermark encoding, wherein the computational overhead of the first encoding process is less than that of the second encoding process.

[0095] Step S44: Embed the target watermark encoding into the target embedding position corresponding to each target field to obtain the target watermark database table.

[0096] It should be noted that the types of use cases include at least real-time scenarios (i.e., scenarios that require watermark embedding with higher real-time performance) and large-capacity scenarios (i.e., scenarios that require watermark capacity higher).

[0097] This embodiment can obtain the usage scenario information of the database table and determine the usage scenario category of the database table based on the usage scenario information. The usage scenario information may include the content category of the watermark information. If the watermark information contains only key watermark content, it can be determined as a real-time scenario; if the watermark information contains both key watermark content and extended watermark content, it can be determined as a high-capacity scenario. Of course, the usage environment information may also include network environment, user needs, etc. This embodiment can prioritize the watermark information to obtain key watermark content (such as the copyright owner's name) and extended watermark content (such as a timestamp). For example, this embodiment can pre-mark different watermark contents with corresponding priorities, thereby obtaining the priority of each watermark content in the watermark information. Watermark content with a priority higher than a predetermined priority threshold can be designated as key watermark content, and watermark content with a priority lower than the predetermined priority threshold can be designated as extended watermark content.

[0098] Therefore, in this embodiment, when the usage scenario is a real-time scenario, the key watermark content in the watermark information undergoes a first encoding process to obtain the target watermark code. This first encoding process is an encoding operation using an encoding algorithm with computational overhead less than a predetermined overhead threshold. This utilizes an encoding algorithm with lower computational overhead to quickly encode the key watermark content, improving the real-time performance of the watermark embedding process. In the usage scenario of a large-capacity scenario, the key watermark content in the watermark information undergoes a first encoding process, and the extended watermark content in the watermark information undergoes a second encoding process. The key watermark content after the first encoding process and the extended watermark content after the second encoding process are then concatenated to obtain the target watermark code. The computational overhead of the first encoding process is less than that of the second encoding process. Therefore, this embodiment utilizes the more expensive second encoding process to reduce the data volume compression of the extended watermark content, increasing the watermark capacity. Furthermore, this embodiment can embed the target watermark code into the target embedding positions corresponding to each target field to obtain a target watermark database table.

[0099] In the second embodiment of this application, the usage scenario category of the database table is obtained. If the usage scenario category is a real-time scenario, the key watermark content in the watermark information undergoes a first encoding process to obtain a target watermark code. If the usage scenario category is a large-capacity scenario, the key watermark content in the watermark information undergoes a first encoding process, and the extended watermark content in the watermark information undergoes a second encoding process to obtain a target watermark code. The computational overhead of the first encoding process is less than that of the second encoding process. The target watermark codes are embedded into the target embedding positions corresponding to each target field to obtain a target watermark database table. Thus, this embodiment, on the one hand, performs lightweight encoding processing on the key watermark content according to different scenarios to improve the real-time performance of the entire watermark embedding; on the other hand, for large-capacity scenarios, lightweight encoding processing is performed on the key watermark content, while complex encoding is performed on the extended watermark content to increase watermark capacity.

[0100] Based on the first embodiment of this application, in the third embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 4 After step S30, the database watermarking processing method further includes steps C10 to C20:

[0101] Step C10: Insert a hidden identifier into the index node of the index tree structure of the database table to be processed to identify the target embedding position of the target field whose field type is sensitive.

[0102] Step C20: Adjust the storage order of index nodes in the index tree structure of the database table to be processed to identify the target embedding position of the target field whose field type is insensitive.

[0103] It should be noted that the hidden identifier is a special character that does not occupy visible space, such as a zero-width character, a word connector, or an invisible multiplication sign. The index tree structure is a B-tree or a variant thereof (such as a B+ tree), and the index node is a leaf node of the B-tree or its variant.

[0104] This embodiment can traverse the index tree structure of the database table to be processed, determine the index node corresponding to the target embedding position of the target field whose field type is sensitive (e.g., sensitive-modifiable or sensitive-immutable), and insert a hidden identifier into the index node to identify the target embedding position of the target field whose field type is sensitive. Therefore, in the watermark extraction stage, the hidden identifier in the index tree structure can be extracted to determine the target embedding position of the target field whose field type is sensitive, and then the watermark information can be extracted from that target embedding position. This embodiment can also traverse the index tree structure of the database table to be processed, determine the index node corresponding to the target embedding position of the target field whose field type is insensitive, and adjust the storage order (i.e., the order of storage locations) of the index node to identify the target embedding position of the target field whose field type is sensitive. Therefore, in the watermark extraction stage, the node sorting rules in the index tree structure can be extracted to identify the index node whose storage order adjustment operation is performed, thereby determining the target embedding position of the target field whose field type is insensitive (e.g., insensitive-modifiable or insensitive-immutable) corresponding to that index node, and then the watermark information can be extracted from that target embedding position.

[0105] In the third embodiment of this application, by inserting a hidden marker into the index node corresponding to the target embedding position of the sensitive target field and performing an order adjustment operation on the index node corresponding to the target embedding position of the non-sensitive target field, the target embedding position can be marked without modifying the original data or increasing the data volume. This avoids a full table scan of the target watermark database table in the subsequent watermark pre-processing stage, and can effectively improve the watermark information extraction efficiency.

[0106] This application provides a database watermarking processing device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the database watermarking processing method in the first embodiment described above.

[0107] The following is for reference. Figure 5The diagram illustrates a structural schematic of a database watermarking processing device suitable for implementing embodiments of this application. The database watermarking processing device in these embodiments may include, but is not limited to, terminals such as mobile phones, laptops, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), desktop computers, and servers. Figure 5 The database watermarking device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0108] like Figure 5 As shown, the database watermarking processing device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1002 or a program loaded from storage device 1003 into random access memory (RAM) 1004. The random access memory 1004 also stores various programs and data required for the operation of the database watermarking processing device. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An I / O (input / output) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the database watermarking processing device to communicate wirelessly or wiredly with other devices to exchange data. Although database watermarking processing devices with various systems are shown in the figures, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems can be implemented alternatively.

[0109] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0110] The database watermarking device provided in this application, employing the database watermarking method described in the above embodiments, can solve the technical problem of data contamination risks inherent in existing database watermarking methods. Compared with the prior art, the beneficial effects of the database watermarking device provided in this application are the same as those of the database watermarking method provided in the above embodiments, and other technical features of this database watermarking device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0111] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0112] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0113] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the database watermarking processing method in the above embodiments.

[0114] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0115] The aforementioned computer-readable storage medium may be included in the database watermarking device; or it may exist independently and not be assembled into the database watermarking device.

[0116] The aforementioned computer-readable storage medium carries one or more programs. When the aforementioned one or more programs are executed by the database watermarking processing device, the database watermarking processing device: determines each target field in the database table to be processed; determines the corresponding field type according to each target field; determines the target embedding position in the database table to be processed corresponding to each target field according to each field type; obtains the watermark information to be added, and embeds the watermark information into the target embedding position corresponding to each target field respectively, thereby obtaining the target watermark database table.

[0117] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0118] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0119] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0120] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described database watermarking processing method, thereby solving the technical problem of data contamination risk in existing database watermarking processing methods. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the database watermarking processing method provided in the above embodiments, and will not be repeated here.

[0121] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the database watermarking method described above.

[0122] The computer program product provided in this application can solve the technical problem of data pollution risk in existing database watermarking methods. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the database watermarking method provided in the above embodiments, and will not be repeated here.

[0123] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A database watermarking method, characterized in that, The database watermarking method includes: Identify the target fields in the database table to be processed; Based on each of the target fields, the corresponding field type is determined; wherein, the field type is divided by sensitivity and / or modifiability; Based on the field types, determine the target embedding position in the database table to be processed for each target field; Obtain the watermark information to be added, and embed the watermark information into the target embedding positions corresponding to each of the target fields to obtain the target watermark database table; The step of determining the target embedding position in the database table to be processed for each target field according to each field type includes: If the target field is of sensitive-immutable type, then the field description in the metadata of the database table to be processed or the newly added virtual field will be used as the target embedding location. If the target field is of sensitive-modifiable type, then the extended attribute field of the metadata in the database table to be processed or the light perturbation position of the target field is used as the target embedding position. If the target field is of insensitive-non-modifiable type, then the metadata or index tree structure of the database table to be processed will be used as the target embedding location. If the target field is of type insensitive-modifiable, then the least significant bit of the target field or the extended attribute field is used as the target embedding position.

2. The database watermarking method as described in claim 1, characterized in that, The step of determining the corresponding field type based on each of the target fields includes: Obtain a predefined type mapping table, wherein the predefined type mapping table includes the mapping relationship between fields and field types; Based on the target field, query the predefined type mapping table to obtain the field type corresponding to the target field.

3. The database watermarking method as described in claim 1, characterized in that, The step of embedding the watermark information into the target embedding positions corresponding to each of the target fields to obtain the target watermark database table includes: Obtain the usage scenario category of the database table; If the usage scenario category is a real-time scenario, then the key watermark content in the watermark information is subjected to a first encoding process to obtain the target watermark encoding; If the usage scenario category is a large-capacity scenario, then the key watermark content in the watermark information is subjected to a first encoding process, and the extended watermark content in the watermark information is subjected to a second encoding process to obtain the target watermark code, wherein the computational overhead of the first encoding process is less than that of the second encoding process. The target watermark encoding is embedded into the target embedding position corresponding to each target field to obtain the target watermark database table.

4. The database watermarking method as described in claim 1, characterized in that, After the step of determining the target embedding position in the database table to be processed for each target field according to each of the field types, the database watermarking method further includes: In the index tree structure of the database table to be processed, an implicit identifier is inserted into the index node to identify the target embedding position of the target field whose field type is sensitive. The storage order of index nodes in the index tree structure of the database table to be processed is adjusted to identify the target embedding position of the target field whose field type is insensitive.

5. The database watermarking method according to any one of claims 1 to 4, characterized in that, After the step of obtaining the watermark information to be added, the database watermark processing method further includes: Obtain the core identifier content from the watermark information; After performing a hash calculation on the core identifier content, the watermark hash value is obtained, and the watermark hash value is uploaded to the blockchain.

6. The database watermarking method as described in claim 5, characterized in that, After the step of embedding the watermark information into the target embedding positions corresponding to each of the target fields to obtain the target watermark database table, the database watermark processing method further includes: Watermark extraction is performed on the target watermark database table to obtain watermark extraction information, and the core identifier content in the watermark extraction information is determined. After performing a hash calculation on the core identifier content, a verification hash value is obtained; The watermark hash value of the core identifier content can be queried through the blockchain. If the watermark hash value is inconsistent with the verification hash value, it is determined that a watermark tampering event has occurred.

7. A database watermarking processing device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the database watermarking processing method as described in any one of claims 1 to 6.

8. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the database watermarking processing method as described in any one of claims 1 to 6.

9. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the database watermarking processing method as described in any one of claims 1 to 6.