Watermark embedding method and device based on pseudo column, equipment and storage medium

By using pseudo column data to embed watermarks in the database, the problems of database watermark distortion and low embedding efficiency in the prior art are solved, and efficient watermark embedding and extraction are realized, which is suitable for the rights confirmation and traceability of large databases.

CN120449135APending Publication Date: 2025-08-08CETC CYBERSPACE SECURITY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510595100.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The existing database watermarking technology will cause distortion to the original data during the embedding process, affecting data retrieval and statistics, and the embedding algorithm is inefficient, especially in large databases.

Method used

The pseudo-column data embedding method is used to convert the watermark data into binary data, and the pseudo-column data is embedded by modifying flag bits or invisible characters according to the data type, so as to avoid modification of the original data.

Benefits of technology

It realizes embedding of watermarks without distortion, supports database rights confirmation and traceability, improves the efficiency of watermark embedding and extraction, and is suitable for large databases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120449135A_ABST
    Figure CN120449135A_ABST
Patent Text Reader

Abstract

The invention discloses a pseudo-column-based digital watermark embedding method, device and equipment and a storage medium, which are applied to the field of digital watermarking, and are used for inserting pseudo-column data into a target table of a target database; converting the watermark data into binary data; grouping tuples in the target table, determining tuples to be embedded, and determining the data type of the pseudo column data; the number of the tuple sets is the same as the bit length of the binary data; when the data type is a numeric type, embedding binary data into a flag bit of pseudo column data in the tuple to be embedded based on a first preset rule; and when the data type is a character type, determining an invisible character associated with the binary data, and embedding the invisible character into the pseudo-column data in the tuple to be embedded based on a second preset rule. According to the method, the pseudo-column data is inserted into the database, and the data watermark is embedded into the pseudo-column data, so that the condition of original data distortion caused by modification of the original data is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of digital watermarks, and in particular to a pseudo-column-based watermark embedding method, a pseudo-column-based watermark embedding device, an electronic device, and a computer-readable storage medium. Background Art

[0002] With the advent of the big data era, more and more individuals and businesses are turning to databases to manage their data. However, as database applications continue to expand, their use and sharing face a series of security challenges. Watermarking is a common copyright protection method, widely used in documents, images, audio, and video. Similarly, this technology can be used in relational databases to confirm ownership and trace the source of data, preventing malicious data distribution and sharing and ultimately protecting the database. Given that some business scenarios require high accuracy of raw data, some database watermarking technologies can distort the database's raw data, affecting data retrieval and statistics, and thus limiting their application scenarios. Summary of the Invention

[0003] The purpose of the present invention is to provide a pseudo-column-based watermark embedding method, device, equipment and storage medium, which are applied to the field of digital watermarking. The method inserts pseudo-column data into the database and embeds the data watermark in the pseudo-column data, thereby avoiding the situation where the original data is modified and thus distorted.

[0004] To solve the above technical problems, the present invention provides a watermark embedding method based on pseudo-columns, comprising:

[0005] Generate pseudo column data, and insert the pseudo column data into a target table of a target database; generate watermark data, and convert the watermark data into binary data;

[0006] Grouping the tuples in the target table to obtain a plurality of tuple sets, determining a tuple to be embedded from each of the tuple sets, and determining a data type of the pseudo column data; the number of the tuple sets is the same as the bit length of the binary data;

[0007] When the data type is a numeric type, determining a flag bit, and embedding the binary data into the flag bit of the pseudo column data in the to-be-embedded tuple based on a first preset rule;

[0008] When the data type is a character type, an invisible character associated with the binary data is determined, and the invisible character is embedded into the pseudo column data in the to-be-embedded tuple based on a second preset rule.

[0009] Optionally, the tuples in the target table are grouped to obtain multiple tuple sets, including:

[0010] generating a first identifier for the tuple based on a primary key of the tuple in the target table and a first private key;

[0011] A result of a modulo operation between the first identifier and the bit length of the binary data is used as a group identifier of the tuple; each group identifier corresponds to a bit sequence number of the binary data;

[0012] The tuples having the same grouping identifier are divided into the same set to obtain a plurality of tuple sets.

[0013] Optionally, determining a tuple to be embedded from each of the tuple sets includes:

[0014] generating a second identifier for the tuple based on a primary key of the tuple in the set of tuples and a second private key;

[0015] A result of performing a modulo operation on the second identifier and a preset value is used as a screening identifier for the tuple;

[0016] Determining a target bit sequence number from the bit sequence numbers of the binary data;

[0017] The tuple with the same screening identifier as the target bit sequence number is used as the tuple to be embedded.

[0018] Optionally, the first identifier is the unique hash identifier of the primary key of the tuple and the first private key; the second identifier is the unique hash identifier of the primary key of the tuple and the second private key; and the preset value is the same as the value of the bit length.

[0019] Optionally, when the data type is a numeric type, determining a flag bit, and embedding the binary data into the flag bit of the pseudo column data in the to-be-embedded tuple based on a first preset rule includes:

[0020] When the data type is a numerical type, determining the flag bit of the pseudo column data, and reading the value of the flag bit;

[0021] Associating the tuple to be embedded with the bit sequence number of the binary data;

[0022] Determining a bit value of the bit sequence number associated with the tuple to be embedded;

[0023] When the bit value is 0, modify the value of the flag bit to an even number;

[0024] When the bit value is 1, the value of the flag bit is modified to an odd number.

[0025] Optionally, when the data type is a character type, determining an invisible character associated with the binary data, and embedding the invisible character into the pseudo column data in the to-be-embedded tuple based on a second preset rule includes:

[0026] When the data type is a character type, determining the invisible character associated with the binary data;

[0027] Associating the tuple to be embedded with the bit sequence number of the binary data;

[0028] Determining a bit value of the bit sequence number associated with the tuple to be embedded;

[0029] When the bit value is 0, inserting the invisible character associated with the bit value 0 into the pseudo column data in the tuple to be embedded;

[0030] When the bit value is 1, the invisible character associated with the bit value 1 is inserted into the pseudo column data in the to-be-embedded tuple.

[0031] Optionally, determining the invisible character associated with the binary data includes:

[0032] Determining that the invisible character associated with the bit value 0 is a space zero-width character;

[0033] The invisible character associated with the bit value 1 is determined to be a zero-width non-hyphen character.

[0034] In order to solve the above technical problems, the present invention provides a watermark embedding device based on pseudo-columns, comprising:

[0035] The first module is configured to generate pseudo column data and insert the pseudo column data into a target table of a target database; generate watermark data and convert the watermark data into binary data;

[0036] A second module is configured to group the tuples in the target table to obtain a plurality of tuple sets, determine a tuple to be embedded from each of the tuple sets, and determine a data type of the pseudo column data; the number of the tuple sets is the same as the bit length of the binary data;

[0037] A third module is configured to, when the data type is a numeric type, determine a flag bit, and embed the binary data into the flag bit of the pseudo column data in the to-be-embedded tuple based on a first preset rule;

[0038] The fourth module is configured to determine, when the data type is a character type, an invisible character associated with the binary data, and embed the invisible character into the pseudo column data in the to-be-embedded tuple based on a second preset rule.

[0039] To solve the above technical problems, the present invention provides an electronic device, comprising:

[0040] Memory for storing computer programs;

[0041] A processor is configured to implement the above-mentioned pseudo-column-based watermark embedding method when executing the computer program.

[0042] To solve the above technical problems, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are executed by a processor, the above-mentioned pseudo-column-based watermark embedding method is implemented.

[0043] It can be seen that the present invention generates pseudo-column data and inserts the pseudo-column data into the target table of the target database; generates watermark data and converts the watermark data into binary data; groups the tuples in the target table to obtain multiple tuple sets, determines the tuple to be embedded from each tuple set, and determines the data type of the pseudo-column data; the number of tuple sets is the same as the bit length of the binary data; when the data type is a numeric type, determines the flag bit, and embeds the binary data into the flag bit of the pseudo-column data in the tuple to be embedded based on the first preset rule; when the data type is a character type, determines the invisible character associated with the binary data, and embeds the invisible character into the pseudo-column data in the tuple to be embedded based on the second preset rule. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0045] Figure 1 A flowchart of a pseudo-column-based watermark embedding method provided by an embodiment of the present invention;

[0046] Figure 2 This is a structural block diagram of a pseudo-column-based watermark embedding device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0047] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0048] With the advent of the big data era, more and more individuals and businesses are turning to databases to manage their data. However, as database applications continue to expand, their use and sharing face a series of security challenges. Digital watermarking is a common copyright protection method, widely used in documents, images, audio, and video. Similarly, this technology can be used in relational databases to confirm ownership and trace the source of data, preventing malicious data distribution and sharing, and ultimately protecting the database.

[0049] At present, the database watermark technology in the existing related technologies will cause distortion to the original data of the database, affect the retrieval and statistics of the corresponding data, and thus limit the business scenarios of the application; the zero-watermark database watermark solution in the existing related technologies, although it will not cause distortion of the database data, the relevant watermark can only be used for property rights confirmation and cannot be applied in traceability application scenarios; the database watermark embedding algorithm in the existing related technologies is less efficient, especially when it is aimed at large databases, it often takes a long time.

[0050] Considering that certain business scenarios require high accuracy for raw data, making watermark embedding unsuitable, this paper proposes a method for embedding watermarks in pseudo-columns. This watermark supports both numeric and non-numeric data types and can be used for data ownership confirmation and traceability to protect the original database. To address the inefficient watermark embedding in large databases, an efficient watermark embedding and extraction algorithm is proposed that supports controllable adjustment of the watermark embedding ratio, thereby improving system efficiency.

[0051] The following combination Figure 1 , Figure 1 A flowchart of a pseudo-column-based watermark embedding method provided by an embodiment of the present invention may include:

[0052] S101: Generate pseudo column data and insert the pseudo column data into a target table of a target database; generate watermark data and convert the watermark data into binary data.

[0053] This embodiment can generate pseudo column data and insert the pseudo column data into the target table of the target database. This embodiment does not limit the specific type of pseudo column data, which is generally numerical pseudo column data and non-data value pseudo column data.

[0054] In this embodiment, the target database is the database in which the watermark is to be embedded. This embodiment does not limit the specific type of the target database. This embodiment can select a target data table from the target database for inserting pseudo column data. Therefore, the number of pseudo column data generated in this embodiment must be consistent with the number of tuples in the target data table.

[0055] This embodiment can generate watermark data and convert the watermark data into binary data. This embodiment does not limit the length or type of the watermark data. Generally, the watermark data can be a string of data, which is converted into binary data using UTF-8 (a coding format).

[0056] S102: Grouping tuples in the target table to obtain multiple tuple sets, determining tuples to be embedded from each tuple set, and determining the data type of the pseudo column data; the number of tuple sets is the same as the bit length of the binary data.

[0057] In this embodiment, tuples in the target table can be grouped to obtain multiple tuple sets. In this embodiment, each bit in the binary data can be embedded in a tuple set, so the number of tuple sets is the same as the bit length of the binary data.

[0058] This embodiment does not limit the specific method of tuple grouping. Generally, the first identifier of the tuple is generated based on the primary key of the tuple in the target table and the first private key; the result of the modulo operation of the first identifier and the bit length of the binary data is used as the group identifier of the tuple; each group identifier corresponds to the bit sequence number of a binary data; tuples with the same group identifier are divided into the same set to obtain multiple tuple sets.

[0059] This embodiment does not limit the specific method for generating the first identifier of the tuple based on the primary key and the first private key of the tuple in the target table. Generally, any algorithm that can obtain a unique identifier using the primary key and the first private key of the tuple can be used. For example, the first identifier in this embodiment can be a unique hash identifier generated based on the primary key and the first private key of the tuple, that is, a hash value of the primary key and the first private key of the tuple is obtained by using a hash algorithm as the first identifier.

[0060] Furthermore, in this embodiment, the result of a modulo operation of the first identifier and the bit length bit_length of the binary data can be used as the grouping identifier of the tuple. Generally, the result of the modulo operation of the first identifier and the bit length of the binary data is in the range of 0 to bit_length-1.

[0061] In this embodiment, grouping can be performed by grouping identifiers, and tuples with the same grouping identifier can be grouped together to obtain multiple tuple sets. Tuples in each tuple set have the same grouping identifier.

[0062] In order to allow each bit value to be embedded in a tuple set, in this embodiment, the obtained group identifier needs to fully cover the bit sequence number of the binary data.

[0063] Since the group identifier in this embodiment is obtained modulo the bit length, the value under each bit sequence number can be embedded in the tuple set with the same group identifier. For example, if the group identifier of the tuple set is 0, the bit sequence number 0, that is, the 0th bit in the binary data, can be embedded in the group set with the group identifier 0.

[0064] In this embodiment, to save computing resources, tuples to be embedded can be selected from each tuple set. This embodiment does not limit the specific method of selecting tuples to be embedded. Generally, the second identifier of the tuple is generated based on the primary key of the tuple in the tuple set and the second private key; the result of a modulo operation between the second identifier and a preset value is used as the tuple screening identifier; the target bit sequence number is determined from the bit sequence number of the binary data; and the tuple with the same screening identifier and the target bit sequence number is selected as the tuple to be embedded.

[0065] This embodiment does not limit the specific method of generating the first identifier of the tuple based on the primary key and the second private key of the tuple in the target table. Generally, any algorithm that can obtain a unique identifier based on the primary key and the second private key of the tuple can be used. For example, the second identifier in this embodiment can be a unique hash identifier generated based on the primary key and the second private key of the tuple, that is, the hash value of the primary key and the second private key of the tuple is obtained by using a hash algorithm as the second identifier. This embodiment also does not limit the selection of the preset value. Generally, the preset value is the same as the bit length of the binary data.

[0066] In this embodiment, the target bit sequence number is determined from the bit sequence number of the binary data. For example, when the bit length of the binary data is 10, the bit sequence number is 0-9. At this time, the target bit sequence number can be selected from 0-9, such as 0, 1, 2, 5, 8, etc.

[0067] Furthermore, tuples whose target bit sequence number is the same as the filter identifier can be used as tuples to be embedded. That is, in any tuple set, the filter identifier of each tuple is calculated, and tuples whose target bit sequence number is the same as the filter identifier are used as tuples to be embedded. For example, if the target bit sequence number is 0, 1, 2, 5, 8, then the tuples whose filter identifiers are 0, 1, 2, 5, 8 in the tuple set can be set as tuples to be embedded.

[0068] S103: When the data type is a numeric type, determine a flag bit, and embed the binary data into the flag bit of the pseudo column data in the to-be-embedded tuple based on a first preset rule.

[0069] In this embodiment, binary data may be embedded into the pseudo column data in the tuple to be embedded according to the data type of the pseudo column data.

[0070] In this embodiment, when the data type is a numeric type, a flag bit of the pseudo column data can be determined. This flag bit is the bit in the pseudo column data that needs to be modified. For example, the flag bit can be the units, tens, or hundreds digit of the pseudo column data, or the first, second, or third digits after the decimal point. This embodiment does not limit this and can be set based on actual applications.

[0071] Furthermore, the binary data is embedded in the flag bit of the pseudo-column data to be embedded in the tuple based on the first preset rule. This embodiment does not limit the specific content of the first preset rule. As long as the binary data is embedded in the flag bit according to the first preset rule, the 01 value (i.e., the bit value) of the binary data can be extracted based on the data characteristics of the flag bit.

[0072] For example, when the data type is numeric, determine the flag bit of the pseudo column data and read the value of the flag bit; associate the tuple to be embedded with the bit sequence number of the binary data; determine the bit value of the bit sequence number associated with the tuple to be embedded; when the bit value is 0, modify the value of the flag bit to an even number; when the bit value is 1, modify the value of the flag bit to an odd number. Alternatively, when the bit value is 1, modify the value of the flag bit to an even number; when the bit value is 0, modify the value of the flag bit to an odd number.

[0073] This embodiment does not limit the specific method of associating the tuple to be embedded with the bit number of the binary data. Generally, the tuple to be embedded with the same group identifier and bit number can be associated with the binary data. For example, if the group identifier of the tuple to be embedded is 1, the tuple to be embedded can be associated with the binary data with a bit number of 1.

[0074] In this embodiment, the binary data 01 value can be embedded by modifying the parity of the flag bit. Specifically, in this embodiment, the bit value of the bit sequence number associated with the tuple to be embedded can be determined first. When the bit value is 0, it is determined whether the value of the pseudo column data flag bit is even or odd; if it is odd, the value of the flag bit can be increased by 1 to make it even; if it is even, the value of the flag bit can be kept unchanged. When the bit value is 1, it is determined whether the value of the pseudo column data flag bit is even or odd; if it is odd, the value of the flag bit can be kept unchanged; if it is even, the value of the flag bit can be increased by 1 to make it odd.

[0075] Therefore, when extracting watermarks, the parity of the flag bit can be used to determine whether the corresponding tuple is embedded with 0 or 1. If the flag bit value is odd, the embedded data can be determined to be 1; if the flag bit value is even, the embedded data can be determined to be 0.

[0076] S104: When the data type is a character type, determine invisible characters associated with the binary data, and embed the invisible characters into the pseudo column data to be embedded in the tuple based on a second preset rule.

[0077] In this embodiment, when the data type of the pseudo column data is character type, invisible characters associated with the binary data may be determined, and the invisible characters may be embedded into the pseudo column data to be embedded in the tuple based on a second preset rule.

[0078] This embodiment does not limit the specific manner in which invisible characters are associated with binary data, nor does it limit the specific type of invisible characters. Generally, the invisible character associated with a bit value of 0 can be determined to be a zero-width space character, and the invisible character associated with a bit value of 1 can be determined to be a zero-width non-hyphen character. For example, the invisible character associated with a bit value of 0 can be \u200B, and the invisible character associated with a bit value of 0 can be \u200C, where \u200B is a zero-width space and \u200C is a zero-width non-line-breaking space.

[0079] In this embodiment, when the data type is character type, the invisible character associated with the binary data is determined; the tuple to be embedded is associated with the bit sequence number of the binary data; the bit value of the bit sequence number associated with the tuple to be embedded is determined; when the bit value is 0, the invisible character associated with the bit value 0 is inserted into the pseudo column data in the tuple to be embedded; when the bit value is 1, the invisible character associated with the bit value 1 is inserted into the pseudo column data in the tuple to be embedded.

[0080] This embodiment does not limit the specific method of associating the tuple to be embedded with the bit number of the binary data. Generally, the tuple to be embedded with the same group identifier and bit number can be associated with the binary data. For example, if the group identifier of the tuple to be embedded is 1, the tuple to be embedded can be associated with the binary data with a bit number of 1.

[0081] This embodiment does not limit the specific method of inserting invisible characters into the pseudo column data to be embedded in the tuple. Generally, the invisible characters can be inserted at the end of the character string of the pseudo column data.

[0082] This embodiment does not limit the method for extracting the watermark data. Generally, the watermark data can be extracted from the pseudo column data by performing inversion according to the embedding method of the watermark data.

[0083] Specifically, this embodiment can generate a first identifier of the tuple based on the primary key and the first private key of the tuple in the target table; the result of a modulo operation between the first identifier and the bit length of the binary data is used as the group identifier of the tuple; each group identifier corresponds to a bit number of the binary data; and tuples with the same group identifier are divided into the same set to obtain multiple tuple sets.

[0084] A second identifier of a tuple is generated based on the primary key and the second private key of the tuple in the tuple set; the result of a modulo operation between the second identifier and a preset value is used as a screening identifier of the tuple; a target bit number is determined from the bit number of the binary data; and a tuple with the same second identifier and the target bit number is used as a tuple to be embedded.

[0085] Determine the data type of the pseudo-column data. If the data type is numeric, extract the flag bit from the pseudo-column data to be embedded in the tuple and determine the embedded 01 value based on the parity of the flag bit. If the data type is character, extract the invisible character at the end of the pseudo-column data to be embedded in the tuple and determine the embedded 01 value based on the type of the invisible character. Concatenate the 01 values extracted from each tuple set in order of group identifier size to obtain restored binary data. Perform data conversion on the binary data to extract the watermark data. This watermark data can be used for database verification and traceability.

[0086] In general, the 01 values extracted from the tuples to be embedded in each tuple set are the same. For example, if there are 10 tuples to be embedded in the tuple set, the 01 values extracted from the 10 tuples to be embedded are the same. However, in some cases, data changes may occur, resulting in different 01 values extracted from the tuples to be embedded in the same tuple set. For example, if there are 10 tuples to be embedded in the tuple set, 8 0s and 2 1s are extracted from the 10 tuples to be embedded. In this case, voting can be used to determine the 01 value with the largest number as the 01 value of the tuple set, that is, 0 can be determined as the 01 value embedded in the tuple set, to avoid watermark extraction errors caused by data changes.

[0087] Based on the above embodiments, the present invention inserts pseudo column data into the database and embeds data watermarks in the pseudo column data, thereby avoiding the situation where the original data is modified and thus distorted.

[0088] The following combination Figure 2 , Figure 2 This is a structural block diagram of a pseudo-column-based watermark embedding device provided by an embodiment of the present invention. The device may include:

[0089] The first module 100 is configured to generate pseudo column data and insert the pseudo column data into a target table of a target database; generate watermark data and convert the watermark data into binary data;

[0090] The second module 200 is configured to group the tuples in the target table to obtain a plurality of tuple sets, determine a tuple to be embedded from each of the tuple sets, and determine a data type of the pseudo column data; the number of the tuple sets is the same as the bit length of the binary data;

[0091] The third module 300 is configured to, when the data type is a numeric type, determine a flag bit, and embed the binary data into the flag bit of the pseudo column data in the tuple to be embedded based on a first preset rule;

[0092] The fourth module 400 is configured to determine, when the data type is a character type, an invisible character associated with the binary data, and embed the invisible character into the pseudo column data in the to-be-embedded tuple based on a second preset rule.

[0093] Based on the above embodiments, the present invention inserts pseudo column data into the database and embeds data watermarks in the pseudo column data, thereby avoiding the situation where the original data is modified and thus distorted.

[0094] Based on the above embodiment, the second module 200 may include:

[0095] A first unit, configured to generate a first identifier for the tuple based on a primary key and a first private key of the tuple in the target table;

[0096] The second unit is configured to use a result of a modulo operation between the first identifier and the bit length of the binary data as a group identifier of the tuple; each group identifier corresponds to a bit sequence number of the binary data;

[0097] The third unit is used to group the tuples with the same grouping identifier into the same set to obtain multiple tuple sets.

[0098] Based on the above embodiments, the second module 200 may include:

[0099] A fourth unit is configured to generate a second identifier of the tuple based on the primary key of the tuple in the tuple set and the second private key;

[0100] A fifth unit, configured to use a result of performing a modulo operation between the second identifier and a preset value as a screening identifier for the tuple;

[0101] A sixth unit is configured to determine a target bit sequence number from the bit sequence numbers of the binary data;

[0102] The seventh unit is configured to use the tuple having the same screening identifier as the target bit sequence number as the tuple to be embedded.

[0103] Based on the above embodiments, the first identifier is the unique hash identifier of the primary key of the tuple and the first private key; the second identifier is the unique hash identifier of the primary key of the tuple and the second private key; the preset value is the same as the value of the bit length.

[0104] Based on the above embodiments, the third module 300 may include:

[0105] an eighth unit, configured to, when the data type is a numeric type, determine the flag bit of the pseudo column data and read the value of the flag bit;

[0106] A ninth unit, configured to associate the tuple to be embedded with a bit sequence number of the binary data;

[0107] a tenth unit, configured to determine a bit value of the bit sequence number associated with the tuple to be embedded;

[0108] An eleventh unit, configured to modify the value of the flag bit to an even number when the bit value is 0;

[0109] The twelfth unit is used to modify the value of the flag bit to an odd number when the bit value is 1.

[0110] Based on the above embodiments, the fourth module 400 may include:

[0111] A thirteenth unit is configured to determine the invisible character associated with the binary data when the data type is a character type;

[0112] A fourteenth unit is configured to associate the tuple to be embedded with the bit sequence number of the binary data;

[0113] A fifteenth unit is configured to determine a bit value of the bit sequence number associated with the tuple to be embedded;

[0114] A sixteenth unit is configured to, when the bit value is 0, insert the invisible character associated with the bit value 0 into the pseudo column data to be embedded in the tuple;

[0115] The seventeenth unit is configured to, when the bit value is 1, insert the invisible character associated with the bit value 1 into the pseudo column data in the to-be-embedded tuple.

[0116] Based on the above embodiments, the thirteenth unit may include:

[0117] A first subunit, configured to determine that the invisible character associated with the bit value 0 is a space zero-width character;

[0118] The second subunit is configured to determine that the invisible character associated with the bit value 1 is a zero-width non-hyphen character.

[0119] Based on the above embodiments, the present invention further provides an electronic device, which may include a memory and a processor. The memory stores a computer program, and the processor, when invoking the computer program in the memory, can implement the steps provided in the above embodiments. Of course, the device may also include various necessary network interfaces, a power supply, and other components.

[0120] The present invention also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by an execution terminal or a processor, the method provided in the embodiment of the present invention can be implemented. The storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., various media that can store program codes.

[0121] In this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.

Claims

1. A watermark embedding method based on pseudo-columns, characterized in that: include: Generate pseudo column data, and insert the pseudo column data into a target table of a target database; generating watermark data, and converting the watermark data into binary data; Grouping the tuples in the target table to obtain a plurality of tuple sets, determining a tuple to be embedded from each of the tuple sets, and determining a data type of the pseudo column data; The number of the tuple sets is the same as the bit length of the binary data; When the data type is a numeric type, determining a flag bit, and embedding the binary data into the flag bit of the pseudo column data in the to-be-embedded tuple based on a first preset rule; When the data type is a character type, an invisible character associated with the binary data is determined, and the invisible character is embedded into the pseudo column data in the to-be-embedded tuple based on a second preset rule.

2. The watermark embedding method based on pseudo-columns according to claim 1, characterized in that: The tuples in the target table are grouped to obtain multiple tuple sets, including: generating a first identifier for the tuple based on a primary key of the tuple in the target table and a first private key; A result of a modulo operation between the first identifier and the bit length of the binary data is used as a group identifier of the tuple; each group identifier corresponds to a bit sequence number of the binary data; The tuples having the same grouping identifier are divided into the same set to obtain a plurality of tuple sets.

3. The watermark embedding method based on pseudo-columns according to claim 2, characterized in that: Determining a tuple to be embedded from each of the tuple sets includes: generating a second identifier for the tuple based on a primary key of the tuple in the set of tuples and a second private key; A result of performing a modulo operation on the second identifier and a preset value is used as a screening identifier for the tuple; Determining a target bit sequence number from the bit sequence numbers of the binary data; The tuple with the same screening identifier as the target bit sequence number is used as the tuple to be embedded.

4. The watermark embedding method based on pseudo-columns according to claim 3, characterized in that: The first identifier is the unique hash identifier of the primary key of the tuple and the first private key; the second identifier is the unique hash identifier of the primary key of the tuple and the second private key; the preset value is the same as the value of the bit length.

5. The watermark embedding method based on pseudo-columns according to claim 1, characterized in that: When the data type is a numeric type, determining a flag bit, and embedding the binary data into the flag bit of the pseudo column data in the to-be-embedded tuple based on a first preset rule, includes: When the data type is a numerical type, determining the flag bit of the pseudo column data, and reading the value of the flag bit; Associating the tuple to be embedded with the bit sequence number of the binary data; Determining a bit value of the bit sequence number associated with the tuple to be embedded; When the bit value is 0, modify the value of the flag bit to an even number; When the bit value is 1, the value of the flag bit is modified to an odd number.

6. The watermark embedding method based on pseudo-columns according to claim 1, characterized in that: When the data type is a character type, determining an invisible character associated with the binary data, and embedding the invisible character into the pseudo column data in the to-be-embedded tuple based on a second preset rule, includes: When the data type is a character type, determining the invisible character associated with the binary data; Associating the tuple to be embedded with the bit sequence number of the binary data; Determining a bit value of the bit sequence number associated with the tuple to be embedded; When the bit value is 0, inserting the invisible character associated with the bit value 0 into the pseudo column data in the tuple to be embedded; When the bit value is 1, the invisible character associated with the bit value 1 is inserted into the pseudo column data in the to-be-embedded tuple.

7. The watermark embedding method based on pseudo-columns according to claim 1, characterized in that: Determining the invisible character associated with the binary data comprises: Determining that the invisible character associated with the bit value 0 is a space zero-width character; The invisible character associated with the bit value 1 is determined to be a zero-width non-hyphen character.

8. A watermark embedding device based on pseudo-columns, characterized in that: include: The first module is configured to generate pseudo column data and insert the pseudo column data into a target table of a target database; generating watermark data, and converting the watermark data into binary data; The second module is configured to group the tuples in the target table to obtain a plurality of tuple sets, determine a tuple to be embedded from each of the tuple sets, and determine a data type of the pseudo column data; The number of the tuple sets is the same as the bit length of the binary data; A third module is configured to, when the data type is a numeric type, determine a flag bit, and embed the binary data into the flag bit of the pseudo column data in the to-be-embedded tuple based on a first preset rule; The fourth module is configured to determine, when the data type is a character type, an invisible character associated with the binary data, and embed the invisible character into the pseudo column data in the to-be-embedded tuple based on a second preset rule.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the pseudo-column-based watermark embedding method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the pseudo-column-based watermark embedding method according to any one of claims 1 to 7 is implemented.