Database watermark processing method and device, storage medium and readable storage medium
By performing fine-grained classification of database tables at the field level and selecting the embedding position according to the field type, the problem of data pollution in database watermarking is solved, differentiated protection is achieved, and data security and integrity are improved.
Patent Information
- Application Number
- CN202511311897.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-15
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-09-15
AI Technical Summary
Existing database watermarking methods may cause data pollution when operating on the entire database table, which is unacceptable, especially in high-precision computing scenarios.
By performing fine-grained classification of each target field in the database table, selecting different embedding positions according to the field type, and embedding the watermark information into each target field respectively, a target watermark database table is constructed.
It effectively avoids the data pollution risk brought about by overall embedding, adapts to the differentiated protection needs of different target fields, and improves the security and integrity of data.
Smart Images

Figure CN120974465A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of digital watermarking, and in particular to a database watermark processing method and device, a storage medium and a readable storage medium. BACKGROUND
[0002] As a core supporting means of digital copyright protection, digital watermarking technology has formed an application system covering all fields of multimedia.
[0003] Current database watermarking technology mainly embeds invisible or visible marks in database tables to achieve copyright protection, data tracing, tamper prevention and other functions. However, this way of watermarking the entire database table in the database may need to add noise or modify data on a large number of irrelevant fields or all fields when operating on the entire table, which may cause some fields to be contaminated. This data contamination, especially for sensitive data, may not be acceptable in scenarios that require high-precision calculations, such as financial analysis, scientific calculations, and medical decision-making. That is, the existing database watermark processing method has a data contamination risk.
[0004] The above content is only used to assist in understanding the technical solutions of the present application and does not represent the acknowledgement of the above content as prior art. SUMMARY
[0005] The main purpose of the present application is to provide a database watermark processing method, device, storage medium and readable storage medium, aiming to solve the technical problem of data contamination risk in the existing database watermark processing method.
[0006] To achieve the above purpose, the present application provides a database watermark processing method, which comprises: determining each target field in a to-be-processed database table; determining the corresponding field type according to each target field; determining the 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 to obtain a target watermark database table.
[0007] In an embodiment, a predetermined type mapping table is obtained, wherein the predetermined type mapping table comprises a mapping relationship between a field and a field type, and the field type is divided by sensitivity and / or modifiability; According to the target field, the predetermined type mapping table is queried to obtain the field type corresponding to the target field.
[0008] In an embodiment, the step of determining the target embedding position of each target field in the to-be-processed database table according to the field type of each target field comprises: If the field type of the target field is sensitive-unmodifiable, a field description in metadata of the to-be-processed database table or a virtual field is added as the target embedding position; If the field type of the target field is sensitive-modifiable, an extended attribute field in metadata of the to-be-processed database table or a lightweight perturbation position of the target field is taken as the target embedding position; If the field type of the target field is insensitive-unmodifiable, metadata or an index tree structure of the to-be-processed database table is taken as the target embedding position; If the field type of the target field is insensitive-modifiable, the least significant bit of the target field or the extended attribute field is taken as the target embedding position.
[0009] In an embodiment, the step of embedding the watermark information into the target embedding position corresponding to each target field to obtain a target watermark database table comprises: Obtaining a use scenario category of the database table; If the use scenario category is a real-time scenario, performing first encoding processing on key watermark content in the watermark information to obtain a target watermark code; If the use scenario category is a large-capacity scenario, performing first encoding processing on key watermark content in the watermark information and performing second encoding processing on extended watermark content in the watermark information to obtain a target watermark code, wherein the operation overhead of the first encoding processing is less than that of the second encoding processing; Embedding the target watermark code into the target embedding position corresponding to each target field to obtain a target watermark database table.
[0010] In an embodiment, after the step of determining the target embedding position of each target field in the to-be-processed database table according to the field type of each target field, the database watermark processing method further comprises: Inserting a hidden identifier into an index node in an index tree structure of the to-be-processed database table to identify the target embedding position of a target field with a field type of sensitive; Adjusting the storage order of the index node in the index tree structure of the to-be-processed database table to identify the target embedding position of a target field with a field type of insensitive.
[0011] In an embodiment, after the step of obtaining the watermark information to be added, the database watermark processing method further comprises: Obtaining core identification content in the watermark information; Hashing the core identification content to obtain a watermark hash value, and uploading the watermark hash value to a blockchain.
[0012] In an embodiment, after the step of embedding the watermark information into the target embedding positions corresponding to the target fields respectively to obtain a target watermark database table, the database watermark processing method further comprises: Watermark extraction is performed on the target watermark database table to obtain watermark extraction information, and the core identification content in the watermark extraction information is determined; Hashing the core identification content to obtain a verification hash value; Querying the watermark hash value of the core identification content through the blockchain; If the watermark hash value and the verification hash value are inconsistent, it is determined that there is a watermark tampering event.
[0013] In addition, to achieve the above-mentioned purpose, the present application also provides a database watermark processing device, which comprises a memory, a processor and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the database watermark processing method as described above.
[0014] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, which is a computer readable storage medium, and a computer program is stored on the storage medium, and the computer program is executed by the processor to implement the steps of the database watermark processing method as described above.
[0015] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which comprises a computer program, and the computer program is executed by the processor to implement the steps of the database watermark processing method as described above.
[0016] The one or more technical solutions provided by the present application have at least the following technical effects: The application can determine target fields in a to-be-processed database table, and then determine corresponding field types according to the target fields, and determine target embedding positions of the target fields in the to-be-processed database table according to the field types. Thus, the application can perform field-level fine-grained classification on the to-be-processed database table, thereby adapting to differentiated protection requirements of different target fields in the same database table, and selecting different target embedding positions according to different field types. Then, watermark information to be added is obtained, and the watermark information is embedded in the target embedding positions corresponding to the target fields respectively, to obtain a target watermark database table. Thus, compared with a traditional watermark embedding method for the entire database table, the application can effectively avoid data pollution risk caused by overall embedding by distinguishing different fields in the same database table and performing differentiated fine-grained protection. BRIEF DESCRIPTION OF DRAWINGS
[0017] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application.
[0018] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings are only used to explain the technical solutions of the present application and thus, for those ordinarily skilled in the art, other drawings can be obtained without creative effort.
[0019] Figure 1 A flowchart provided for the database watermark processing method embodiment one of the present application; Figure 2 A scene diagram of the database watermark processing method one embodiment of the present application; Figure 3 A flowchart provided for the database watermark processing method embodiment two of the present application; Figure 4 A flowchart provided for the database watermark processing method embodiment three of the present application; Figure 5 A structure diagram of the database watermark processing device in the embodiments of the present application.
[0020] The object implementation, functional features and advantages of the present application will be further explained with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0021] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application, and are not used to limit the present application.
[0022] For better understanding of the technical solutions of the present application, the following will be described in detail in conjunction with the accompanying drawings and specific embodiments.
[0023] The main solution of the embodiment of the present application is: determining each target field in the to-be-processed database table; determining the corresponding field type according to each target field; determining the target embedding position of each target field in the to-be-processed database table according to each field type; obtaining the 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.
[0024] Since the current database watermark technology mainly embeds invisible or visible marks in the database table to realize copyright protection, data tracing, tamper prevention and other functions. However, this way of watermarking the entire database table in the database may need to add noise or modify data on a large number of irrelevant fields or all fields when operating the entire table, which may cause some fields to be contaminated. This data pollution, especially for sensitive data, may not be acceptable in scenarios that require high-precision calculations, such as financial analysis, scientific calculation, and medical decision-making. That is, the existing database watermark processing method has the risk of data pollution.
[0025] The present application provides a solution that can perform field-level fine-grained classification on the to-be-processed database table, thereby adapting to the differentiated protection needs of different target fields in the same database table, and selecting different target embedding positions according to the differences in field types. Then obtain the watermark information to be added, and embed the watermark information in the target embedding position corresponding to each target field respectively to obtain a target watermark database table. Compared with the traditional way of embedding watermark in the entire database table, the present application can effectively avoid the data pollution risk caused by the overall embedding by distinguishing different fields in the same database table and performing differentiated fine-grained protection.
[0026] Based on this, the embodiment of the present application provides a database watermark processing method, referring to Figure 1 , Figure 1 The flowchart of the first embodiment of the database watermark processing method of the present application.
[0027] In this embodiment, the database watermark processing method includes steps S10-S40: Step S10, determining each target field in the to-be-processed database table; It should be noted that the to-be-processed database table is a table in the database that is expected to be embedded with a watermark, and the target field is a field in the database table that is expected to be embedded with a watermark. For example, the database table is a user information table, which can include fields such as balance (user balance), phone (mobile phone number), create_time (registration time), comment (user note), and the like.
[0028] The embodiment can traverse the to-be-processed database table to obtain all fields in the to-be-processed database table, and then all fields in the to-be-processed database table can be used as target fields, or part of the fields in the to-be-processed database table can be used as target fields.
[0029] Step S20: determining a corresponding field type according to each target field; It should be noted that there is a corresponding relationship between the target field and the field type, that is, different target fields have corresponding field types. The field type is at least divided by at least one of sensitivity and modifiability. It can be understood that the field type can also be further subdivided on the basis of sensitivity and / or modifiability, for example, high sensitivity type, medium sensitivity type, low sensitivity type, and the like.
[0030] The embodiment can pre-construct the corresponding relationship between each field and the field type, and then query the field type corresponding to each target field based on the corresponding relationship. For example, the field type can include a sensitive type and a non-sensitive type, or the field type can also include a modifiable type and an unmodifiable type, or the field type includes sensitive-unmodifiable type, sensitive-modifiable type, non-sensitive-unmodifiable type, and non-sensitive-modifiable type.
[0031] In some embodiments, step S20 can include steps S21-S22: Step S21: obtaining a predetermined type mapping table, wherein the predetermined type mapping table includes a mapping relationship between a field and a field type, and the field type is divided by sensitivity and / or modifiability; Step S22: querying the predetermined type mapping table according to the target field to obtain the field type corresponding to the target field.
[0032] It should be noted that the predetermined type mapping table includes a mapping relationship between a field and a field type, and the field type is divided by sensitivity and / or modifiability, i.e., the field type is divided by at least one of sensitivity and modifiability. For example, the field type can include a sensitive type and an insensitive type, or the field type can further include a modifiable type and a non-modifiable type, or the field type includes a sensitive-non-modifiable type, a sensitive-modifiable type, an insensitive-non-modifiable type, and an insensitive-modifiable type.
[0033] The embodiment can obtain a predetermined type mapping table describing the mapping relationship between a field and a field type, and then query the predetermined type mapping table to determine the field type corresponding to the target field in the predetermined type mapping table as the field type corresponding to the target field. For example, the target field is balance (user balance), and the corresponding field type is a sensitive-non-modifiable type; the target field is phone (mobile phone number), and the corresponding field type is a sensitive-modifiable type; the target field is create_time (registration time), and the corresponding field type is an insensitive-non-modifiable type; and the target field is comment (user note), and the corresponding field type is an insensitive-modifiable type.
[0034] In step S30, a target embedding position in the to-be-processed database table corresponding to each target field is determined according to each field type. It should be noted that there is a corresponding relationship between the field type and the target embedding position, i.e., 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, a newly added virtual field, an extended attribute field, an index tree structure, a least significant bit, etc.
[0035] The embodiment can construct a mapping relationship between a field type and a target embedding position in advance. For example, for the field type being a non-modifiable type (such as a sensitive-non-modifiable type or a non-sensitive-non-modifiable type), the corresponding target embedding position is an embedding position (such as metadata, an index tree structure, etc.) in which the field content of the target field (that is, the original data content stored in the target field) is not disturbed in the database table, so as to avoid the field content of the target field being modified. For the field type being a sensitive type (such as a sensitive-modifiable type or a sensitive-non-modifiable type), the corresponding target embedding position is an embedding position at a high robustness (that is, an embedding position in the database table that has a higher attack resistance ability than a predetermined attack resistance threshold), so as to enhance the ability of the target field to resist attacks. For the field type being a non-sensitive type or a modifiable type, the corresponding target embedding position is an embedding position at a large watermark capacity (that is, an embedding position in the database table that has a higher watermark capacity than a predetermined capacity threshold), so as to increase the overall watermark capacity and embed more watermark information. Further, the embodiment can query the mapping relationship according to the field type of each target field to obtain the target embedding position of each target field in the to-be-processed database table. For example, if the field type of the target field is sensitive-non-modifiable, the field description in the metadata of the to-be-processed database table or a newly added virtual field is taken as the target embedding position. If the field type of the target field is sensitive-modifiable, the extension attribute field of the metadata in the to-be-processed database table or the lightweight disturbance position of the target field is taken as the target embedding position. If the field type of the target field is non-sensitive-non-modifiable, the metadata or the index tree structure of the to-be-processed database table is taken as the target embedding position. If the field type of the target field is non-sensitive-modifiable, the least significant bit of the target field or the extension attribute field is taken as the target embedding position.
[0036] In some embodiments, step S30 can include steps S31-S34: Step S31, if the field type of the target field is sensitive-non-modifiable, the field description in the metadata of the to-be-processed database table or a newly added virtual field is taken as the target embedding position. Step S32, if the field type of the target field is sensitive-modifiable, the extension attribute field of the metadata in the to-be-processed database table or the lightweight disturbance position of the target field is taken as the target embedding position. Step S33, if the field type of the target field is non-sensitive-non-modifiable, the metadata or the index tree structure of the to-be-processed database table is taken as the target embedding position. Step S34, if the field type of the target field is insensitive-modifiable, the least significant bit of the target field or the extended attribute field is taken as the target embedding position.
[0037] It should be noted that the field description in the metadata is information for describing the field in the metadata, such as COLUMN_COMMENT (field comment). The newly added virtual field is a field not storing business information added in the metadata, and the extended attribute field is a field describing the extended attribute in the metadata, such as a JSONB extended field. The lightweight perturbation position of the target field is a position for modifying the field content of the target field by using a watermark embedding mode of lightweight perturbation processing. For example, the watermark embedding mode of lightweight perturbation processing can be ±1 for the last digit of the numerical target field, and the last digit of the numerical target field is the lightweight perturbation position. That is, for the target field with the field type of sensitive-modifiable, the watermark embedding mode of lightweight perturbation processing can be used to ensure the security of the modifiable sensitive data. The index tree structure can be a B-tree or a variant (such as a B+ tree) index tree structure. The index tree structure can organize data through multiple levels of nodes, and each node stores a key value and a pointer to a data page. The nodes between the root node layer and the leaf node layer are called intermediate nodes, and the leaf nodes store actual key values and pointers to data rows. When a query is performed, the system starts from the root node, searches level by level downward, and finds the leaf node containing the required data.
[0038] If the field type of the target field is sensitive-unmodifiable, the embodiment can add or add a virtual field as the target embedding position in the field description of the metadata of the to-be-processed database table, because the field description or the added virtual field as the target embedding position in the metadata will not change the original data in the target field, and the DDL (Data Definition Language) permission is required to tamper, which effectively guarantees the watermark security of the target embedding position embedded. If the field type of the target field is sensitive-modifiable, the embodiment can add the extended attribute field of the metadata or the lightweight disturbance position of the target field as the target embedding position. Because the field content of this part of the target field is sensitive data but can be modified, the embodiment can add the extended attribute field of the metadata as the target embedding position, and the extended attribute field is an independent storage area, which can maintain the integrity of the original data and store more complex watermark information through JSON structure, and has greater watermark capacity than the field description or the added virtual field. The embodiment can also add the lightweight disturbance position of the target field as the target embedding position, so as to perform watermark embedding in the lightweight disturbance mode in the later period, which also has greater watermark capacity. If the field type of the target field is not sensitive-unmodifiable, because the metadata or the index tree structure is not modified, the embodiment can add the metadata or the index tree structure of the to-be-processed database table as the target embedding position. If the field type of the target field is not sensitive-modifiable, the embodiment can add the least significant bit of the target field or the extended attribute field as the target embedding position, so as to have greater watermark capacity.
[0039] In step S40, the watermark information to be added is obtained, and the watermark information is embedded in the target embedding position corresponding to each target field to obtain a target watermark database table.
[0040] It should be noted that the watermark information can include preset static identification information, such as identification text "copyright owner name", "digital signature", and real-time acquisition of dynamic identification information, such as the identity information of the viewer (for example, account number, employee number, etc.), browsing time, IP address, etc. It can be understood that the watermark information can include different watermark contents corresponding to each target field, or the same watermark content.
[0041] Taking the watermark information that can include different watermark contents corresponding to each target field as an example, the embodiment can embed different watermark contents corresponding to each target field in the target embedding position corresponding to each target field to obtain a target watermark database table.
[0042] 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: Step A10: Obtain the core identifier content from the watermark information; 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.
[0043] 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".
[0044] 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.
[0045] In some embodiments, after step S40, the database watermarking method further includes steps B10 to B40: 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; Step B20: After performing a hash calculation on the core identifier content, a verification hash value is obtained; Step B30: Query the watermark hash value of the core identifier content through the blockchain; Step B40: After the watermark hash value is inconsistent with the verification hash value, it is determined that a watermark tampering event has occurred.
[0046] At the watermark extraction link, the embodiment can perform watermark extraction on the target watermark database table to obtain watermark extraction information, and determine the core identification content in the watermark extraction information. Then, based on a predetermined hash algorithm, the core identification content is subjected to hash calculation to obtain a verification hash value. It can be understood that the hash algorithm used in step S20 needs to be consistent with the hash algorithm used in step A20. Thus, the embodiment can query the watermark hash value of the core identification 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 identification content in the watermark extraction information is different from the core identification content in the watermark information when the watermark is embedded, and it can be determined that there is a watermark tampering event. 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 passed.
[0047] The embodiment stores the core identification content by means of the blockchain, so that the occurrence of a watermark tampering event can be accurately detected through blockchain verification when the watermark is extracted, and the original data content stored in the target field is not polluted.
[0048] The first embodiment of the present application provides a database watermark processing method. Each target field in a to-be-processed database table is determined, and then the corresponding field type is determined according to each target field. According to each field type, a target embedding position in the to-be-processed database table corresponding to each target field is determined. Thus, the embodiment can perform field-level fine-grained classification on the to-be-processed database table, so that the differentiated protection needs of different target fields in the same database table can be adapted, and different target embedding positions are selected according to the differences in field types. Then, the watermark information to be added is obtained, and the watermark information is embedded in the target embedding position corresponding to each target field to obtain a target watermark database table. Thus, compared with the traditional method of embedding watermarks in the entire database table, the embodiment can effectively avoid the data pollution risk caused by the overall embedding by differentiating different fields in the same database table and performing differentiated fine-grained protection.
[0049] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as the above embodiment one can be referred to the above introduction, and will not be described in detail. On this basis, please refer to Figure 3 The step of embedding the watermark information in the target embedding position corresponding to each target field in step S40 to obtain a target watermark database table can include steps S41-S44: Step S41: obtaining the use scenario category of the database table; Step S42, if the use scenario category is real-time scenario, then the key watermark content in the watermark information is processed by first encoding to obtain target watermark encoding; Step S43, if the use scenario category is large capacity scenario, then the key watermark content in the watermark information is processed by first encoding, and the extended watermark content in the watermark information is processed by second encoding to obtain target watermark encoding, wherein the operation overhead of the first encoding is less than the second encoding; Step S44, the target watermark encoding is embedded into the target embedding position corresponding to each target field to obtain target watermark database table.
[0050] It should be noted that the use scenario type at least includes real-time scenario (i.e. the scenario that requires higher real-time watermark embedding) and large capacity scenario (i.e. the scenario that requires higher watermark capacity).
[0051] The embodiment can obtain the use scenario information of the database table, and determine the use scenario category of the database table according to the use scenario information. The use scenario information can include the content category of the watermark information. If only the key watermark content exists in the watermark information, it can be determined as real-time scenario. If both the key watermark content and the extended watermark content exist in the watermark information, it can be determined as large capacity scenario. Of course, the use environment information can also include network environment, user demand and other information. The embodiment can prioritize the watermark information to obtain key watermark content (such as copyright owner name) and extended watermark content (such as timestamp). Exemplarily, the embodiment can mark the corresponding priority for different watermark content in advance, and then obtain the priority of each watermark content in the watermark information. The watermark content with priority higher than the predetermined priority threshold can be regarded as key watermark content, and the watermark content with priority not higher than the predetermined priority threshold can be regarded as extended watermark content.
[0052] Further, in the case that the use scenario category is a real-time scenario, the key watermark content in the watermark information is subjected to first encoding processing to obtain target watermark encoding, wherein the first encoding processing is an encoding processing operation of an encoding algorithm with an operation cost less than a predetermined cost threshold. Thus, the encoding processing of the key watermark content is quickly realized by means of the encoding algorithm with a smaller operation cost, so as to improve the real-time performance of the watermark embedding process. In the case that the use scenario category is a large capacity scenario, the key watermark content in the watermark information is subjected to first encoding processing, and the extended watermark content in the watermark information is subjected to second encoding processing, so as to splice the key watermark content after the first encoding processing and the extended watermark content after the second encoding processing to obtain the target watermark encoding, wherein the operation cost of the first encoding processing is less than the second encoding processing. Thus, the second encoding processing with a larger cost is used in the embodiment to make the data volume compression of the extended watermark content smaller, so as to improve the watermark capacity. Further, the target watermark encoding can be embedded into the target embedding position corresponding to each target field to obtain a target watermark database table.
[0053] In the second embodiment of the present application, the use scenario category of the database table is acquired; in the case that the use scenario category is a real-time scenario, the key watermark content in the watermark information is subjected to first encoding processing to obtain target watermark encoding; in the case that the use scenario category is a large capacity scenario, the key watermark content in the watermark information is subjected to first encoding processing, and the extended watermark content in the watermark information is subjected to second encoding processing to obtain target watermark encoding, wherein the operation cost of the first encoding processing is less than the second encoding processing; and the target watermark encoding is embedded into the target embedding position corresponding to each target field to obtain a target watermark database table. Thus, in the embodiment, on the one hand, according to different scenarios, the key watermark content is subjected to lightweight encoding processing to improve the real-time performance of the entire watermark embedding; on the other hand, in the case of a large capacity scenario, the key watermark content is subjected to lightweight encoding processing, and the extended watermark content is subjected to complex encoding to improve the watermark capacity.
[0054] Based on the first embodiment of the present application, in the third embodiment of the present application, the same or similar contents as the above-mentioned first embodiment can be referred to the above description, and will not be described in detail. On this basis, please refer to Figure 4 , after step S30, the database watermark processing method further includes steps C10-C20: Step C10, inserting a stealth identifier into an index node in the index tree structure of the to-be-processed database table to identify the target embedding position of the target field with a sensitive field type; Step C20, adjusting the storage order of the index nodes in the index tree structure of the to-be-processed database table to identify the target embedding position of the target field with the field type of insensitive.
[0055] It should be noted that the invisible identifier is a special character that does not occupy visible space, such as a zero-width character, a word joiner, an invisible multiplication sign, and the like. 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 the variant thereof.
[0056] The embodiment can traverse the index tree structure of the to-be-processed database table, determine the index node corresponding to the target embedding position of the target field with the field type of sensitive, and insert an invisible identifier in the index node to identify the target embedding position of the target field with the field type of sensitive. Thus, in the watermark extraction link, the invisible identifier in the index tree structure can be extracted to determine the target embedding position of the target field with the field type of sensitive, and then the watermark information can be extracted from the target embedding position. The embodiment can traverse the index tree structure of the to-be-processed database table, determine the index node corresponding to the target embedding position of the target field with the field type of insensitive, and adjust the storage order (i.e., the order of the storage positions) of the index node to identify the target embedding position of the target field with the field type of sensitive. Thus, in the watermark extraction link, the node ordering rule in the index tree structure can be extracted to identify the index node of the storage order adjustment operation, thereby determining the target embedding position of the target field with the field type of insensitive (such as insensitive-modifiable or insensitive-non-modifiable) corresponding to the index node, and then extracting the watermark information from the target embedding position.
[0057] In the third embodiment of the present application, the invisible identifier is inserted in the index node corresponding to the target embedding position of the sensitive target field, and the order adjustment operation is performed on the index node corresponding to the target embedding position of the insensitive target field. Thus, the target embedding position can be marked without modifying the original data and increasing the data volume, so that in the subsequent watermark extraction link, the full table scan of the target watermark database table can be avoided, and the extraction efficiency of the watermark information can be effectively improved.
[0058] The present application provides a database watermark processing device, which comprises at least one processor and a memory in communication connection with the at least one processor. 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 watermark processing method in the first embodiment.
[0059] The following refers to 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.
[0060] 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.
[0061] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program comprising program code for performing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a read-only memory 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.
[0062] The database watermark processing device provided by the present application adopts the database watermark processing method in the above-mentioned embodiments, and can solve the technical problem of data pollution risk existing in the prior art. Compared with the prior art, the database watermark processing device provided by the present application has the same beneficial effects as the database watermark processing method provided by the above-mentioned embodiments, and other technical features in the database watermark processing device are the same as the features disclosed in the previous embodiment method, which will not be repeated here.
[0063] It should be understood that various parts of the present disclosure can be realized by hardware, software, firmware or a combination thereof. In the description of the above-mentioned embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0064] The above is merely specific implementation of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0065] The present application provides a computer readable storage medium having stored thereon computer readable program instructions (i.e. computer program) for performing the database watermark processing method in the above-mentioned embodiments.
[0066] The computer readable storage medium provided in the application may be, for example, a U disk, but is not limited to an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system or device, or any combination thereof. More specific examples of the computer readable storage medium may include, but are not limited to, an electric connection with one or more conductive wires, a portable computer disk, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM or flash memory), an optical fiber, a portable compact disk read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the embodiment, the computer readable storage medium may be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system or device. The program code contained in the computer readable storage medium can be transmitted by any suitable medium, including but not limited to an electric wire, an optical cable, an RF (Radio Frequency), and the like, or any suitable combination thereof.
[0067] The computer readable storage medium described above may be contained in the database watermark processing device, or may exist separately without being assembled into the database watermark processing device.
[0068] The computer readable storage medium described above carries one or more programs, which, when executed by the database watermark processing device, cause the database watermark processing device to: determine each target field in a to-be-processed database table; determine a corresponding field type according to each target field; determine a target embedding position in the to-be-processed database table corresponding to each target field according to each field type; obtain watermark information to be added, and embed the watermark information in the target embedding position corresponding to each target field respectively to obtain a target watermark database table.
[0069] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0070] The flow diagrams and the block diagrams in the drawings are meant as methodological and functional description of implementations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flow diagrams or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may
[0071] The modules involved in the embodiments of the present application can be implemented in software or hardware. In some cases, the names of the modules do not constitute a limitation on the modules themselves.
[0072] The readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e. computer programs) for executing the above database watermark processing method, and can solve the technical problem of data pollution risk existing in the prior art database watermark processing method. Compared with the prior art, the computer readable storage medium provided by the present application has the same beneficial effects as the database watermark processing method provided by the above embodiments, and will not be described here.
[0073] The application further provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the database watermark processing method as described above.
[0074] The computer program product provided by the application can solve the technical problem of the data pollution risk existing in the prior art database watermark processing method. Compared with the prior art, the beneficial effects of the computer program product provided by the application are the same as those of the database watermark processing method provided by the above-mentioned embodiments, and are not described here.
[0075] The above-mentioned is only part of the embodiments of the application, and does not limit the patent scope of the application. Any equivalent structural transformation, direct / indirect application in other related technical fields, or direct / indirect application in other related technical fields based on the technical concept of the application, the contents of the specification and the drawings are included in the patent protection scope of the 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, determine the corresponding field type; 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 position corresponding to each target field to obtain the target watermark database table.
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, and the field types are divided by sensitivity and / or modifiability; 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 2, characterized in that, 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: 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.
4. 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.
5. 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.
6. The database watermarking method according to any one of claims 1 to 5, 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.
7. The database watermarking method as described in claim 6, 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.
8. 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 7.
9. 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 7.
10. 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 7.
Citation Information
Patent Citations
Watermark embedding and query data providing method and device and data processing method
CN110866858A
Relational database-oriented watermark adaptation method and device and storage medium
CN114357393A
Application log desensitization test method and device, storage medium and computer equipment
CN115186298A
Watermark embedding and tracing method for relational database
CN117272333A
Semi-fragile watermarking algorithm capable of resisting video compression
CN118984356A