A watermarking method, system, device and readable storage medium based on improved dynamic differential database

Through dynamic data compression and singular value decomposition technology, combined with clustering database grouping and differential expansion, the problem of insufficient robustness and traceability of existing database watermarking technology is solved, and higher watermark fault tolerance and reverse engineering attacks are achieved. Resistance capabilities ensure data security and integrity.

CN117909529BActive Publication Date: 2024-09-13BEIJING XINSHU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410016199.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-04
Publication Date
2024-09-13
Estimated Expiration
2044-01-04

AI Technical Summary

Technical Problem

Existing database watermarking technology is poor in robustness and traceability, is difficult to support high-level data integrity requirements, and lacks dynamic remainder adjustment, making it vulnerable to reverse engineering attacks and affecting security and confidentiality.

Method used

Using dynamic data compression and singular value decomposition technology, the QR code image is divided into blocks and then decomposed in the frequency domain. The clustering database grouping and differential expansion technology are used to embed the watermark. Dynamic remainder adjustment is introduced to improve the watermark fault tolerance and extraction accuracy, and resist Reverse engineering attacks.

Benefits of technology

It achieves higher robustness and traceability, enhances watermark fault tolerance and accuracy of embedding and extraction, improves resistance to reverse engineering attacks, and ensures data security and integrity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117909529B
    Figure CN117909529B
Patent Text Reader

Abstract

The present invention proposes a watermarking method, system, device and readable storage medium based on an improved dynamic differential database. The QR code image is subjected to frequency domain decomposition and eigenvalue extraction, and the two-dimensional sub-blocks are compressed into a one-dimensional sequence using singular value decomposition, thereby successfully embedding the watermark sequence. Furthermore, the watermark is embedded into the data carrier through clustering database grouping and differential expansion technology, and a dynamic remainder adjustment mechanism is introduced to enhance the watermark fault tolerance, improve the accuracy of watermark embedding and extraction, and explore more complex nonlinear calculation methods to improve the resistance of the watermark system to reverse engineering attacks. Finally, by clustering the database embedded with the watermark, the reverse operation is realized to restore the QR code and successfully extract the user's identity information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to an improved dynamic differential database watermark method, system, device and readable storage medium, belonging to the field of database privacy protection. Background Art

[0002] Database applications are becoming more and more widespread, involving various fields such as government, enterprises, and scientific research institutions. Therefore, data security and integrity are facing increasing threats. Attackers may tamper with or steal data in the database, causing losses to the data owner. In order to solve this problem, database watermarking technology has emerged. Most existing database watermarking technologies simply embed a string of digital sequences or an image, which are easily recognized and destroyed by attackers. In addition, these simple marking methods are also difficult to support higher-level data integrity requirements, such as data type, structure, semantics, etc.

[0003] After the watermark is destroyed by an attack, it will be impossible to lock the attacker based on the extracted information, and the robustness and traceability are poor. At the same time, the existing watermark embedding technology lacks dynamic remainder adjustment, and the watermark fault tolerance and the accuracy of watermark embedding and extraction need to be improved. In differential expansion, linear calculation is used, and the watermark is more vulnerable to reverse engineering attacks, affecting the security and confidentiality of the watermark. BRIEF DESCRIPTION OF THE DRAWINGS

[0004] Figure 1 This is the flow chart of watermark information preprocessing.

[0005] Figure 2 Embed the flow chart for watermarking.

[0006] Figure 3 This is a diagram of the watermark restoration process. Summary of the invention

[0007] In order to solve the problems existing in the prior art, the present invention adopts the idea of ​​dynamic data compression and proposes a watermark method based on an improved dynamic differential database. The specific steps of the method are as follows:

[0008] (1) The QR code image is divided into blocks and then subjected to frequency domain decomposition and eigenvalue extraction. The two-dimensional sub-blocks are compressed into a one-dimensional sequence using singular value decomposition to obtain an embedded watermark sequence.

[0009] (2) Use clustering database grouping to group similar data into K subgroups of different sizes {G1, G2, ..., G K}, using differential expansion to embed the watermark into the data carrier;

[0010] (3) After clustering the watermark-embedded database, the reverse operation is performed to restore the QR code, complete the watermark extraction, and obtain the user's identity information.

[0011] Furthermore, in step (1), the QR code is divided into blocks and then subjected to wavelet transform.

[0012] Furthermore, in step (2), the remainder of the subgroup is calculated [Arr1,Arr2,...,Arr N ] is the attribute array value to be embedded in the watermark. A1 and A2 are the attribute values ​​to be embedded in the watermark. i For embedded watermark bits, the difference between attribute values ​​is reduced by taking the remainder value. Among them, a1 and a2 are the attribute values ​​after modulus, and div1 and div2 represent the corresponding divisors. The mean and difference between the attribute values ​​after modulus are calculated, and the watermark is embedded in the watermark embedding stage by using the difference expansion method.

[0013] Further, when the difference is expanded, d′=k·d+b·W is calculated i +m·sin(c·W i ), where d represents the difference, k, b, m, c represent the adjustment parameters, and W i Represents the embedded watermark bit, and gets Where avg represents the mean of the attribute values ​​after taking the remainder. In the watermark extraction stage, the restoration difference calculation process is as follows: calculate d′=2·(a′1-avg)+1, and use the inverse sine transform to restore Restore the original difference After restoration Finally restore the property value

[0014] The present invention further proposes a watermark system based on an improved dynamic differential database, the system comprising:

[0015] (1) Preprocessing module, which divides the QR code image into blocks, performs frequency domain decomposition and eigenvalue extraction, and compresses the two-dimensional sub-blocks into a one-dimensional sequence using singular value decomposition to obtain an embedded watermark sequence;

[0016] (2) Watermark embedding module: This module uses clustering database grouping to group similar data into K subgroups of different sizes {G1, G2, ..., G K}, using differential expansion to embed the watermark into the data carrier;

[0017] (3) Watermark extraction module: This module performs clustering on the database embedded with watermarks, and then performs reverse operations to restore the QR code, complete watermark extraction, and obtain the user's identity information.

[0018] Furthermore, in the preprocessing module, the QR code is processed into blocks and then wavelet transformed.

[0019] Furthermore, in the watermark embedding module, the remainder value of the subgroup is calculated [Arr1,Arr2,...,Arr N ] is the attribute array value to be embedded in the watermark, A1 and A2 are the attribute values ​​to be embedded in the watermark, W i For embedded watermark bits, the difference between attribute values ​​is reduced by taking the remainder value. Among them, a1 and a2 are the attribute values ​​after modulus, and div1 and div2 represent the corresponding divisors. The mean and difference between the attribute values ​​after modulus are calculated, and the watermark is embedded by using the difference expansion in the watermark embedding stage.

[0020] Further, when the difference is expanded, d′=k·d+b·W is calculated i +m·sin(c·W i ), where d represents the difference, k, b, m, c represent the adjustment parameters, and W i Represents the embedded watermark bit, and gets Where avg represents the mean of the attribute values ​​after taking the remainder. In the watermark extraction stage, the restoration difference calculation process is as follows: calculate d′=2·(a′1-avg)+1, and use the inverse sine transform to restore Restore the original difference After restoration Finally restore the property value The present invention also provides a device, which includes: a data acquisition device, a processor and a memory; the data acquisition device is used to collect data; the memory is used to store one or more program instructions; the processor is used to execute one or more program instructions to execute any of the above methods.

[0021] The present invention further provides a computer-readable storage medium, wherein the computer storage medium contains one or more program instructions, and the one or more program instructions are used to execute any of the above methods.

[0022] The process of extracting watermarks first clusters the database embedded with watermarks and divides it into several subgroups. Then, the attribute bits of the subgroup embedded with watermarks are found. The attribute values ​​of each tuple embedded with watermarks are processed by differential expansion inverse operation in turn. The watermark set embedded in each subgroup is extracted. The set is voted by a majority vote to select the number that accounts for more than 50% as the watermark bit position finally extracted by the subgroup. The watermark bits are combined in the order of grouping to obtain the extracted watermark sequence. The attribute values ​​after watermark extraction are restored to the original values ​​and the subgroups are merged to obtain the original database. Then, the feature values ​​are extracted from the extracted watermark sequence by differential expansion inverse operation, and the low-frequency image of the QR code is restored by SVD inverse operation. Finally, the Haar wavelet inverse transform is performed to restore all 32×32 sub-blocks, and the padding value 0 is removed to obtain the original QR code. The information contained in the QR code can be scanned to track the attacker.

[0023] In order to compress the length of the watermark sequence while embedding more identity information, the watermark image needs to be preprocessed before the watermark is embedded in the database. QR code is a high-capacity information hiding method that can embed a large amount of original watermark information, such as identity information, copyright identification, source information, timestamp, etc., which provides protection for anti-counterfeiting traceability and copyright protection. In addition, QR code has good robustness and can be hidden in multimedia content such as images or videos, resisting various signal processing and malicious attacks, and ensuring the security and integrity of watermark information. In addition, the encoding and decoding process of QR code is efficient and accurate, which can realize the accurate extraction and efficient transmission of watermark information, meeting the needs of applications such as copyright protection and anti-counterfeiting traceability. Therefore, this patent uses QR code as the original watermark carrier and proposes a more robust database watermarking method.

[0024] The present invention successfully embeds the watermark sequence by performing frequency domain decomposition and eigenvalue extraction on the QR code image, and using singular value decomposition to compress the two-dimensional sub-blocks into a one-dimensional sequence. Furthermore, the watermark is embedded into the data carrier through clustering database grouping and differential expansion technology, and a dynamic remainder adjustment mechanism is introduced to enhance the watermark fault tolerance, improve the accuracy of watermark embedding and extraction, and explore more complex nonlinear calculation methods to improve the watermark system's resistance to reverse engineering attacks. Finally, by clustering the database embedded with the watermark, the reverse operation is realized to restore the QR code and successfully extract the user's identity information. DETAILED DESCRIPTION

[0025] Assuming that the QR code image is an M×N matrix, the QR code is divided into 32×32 sub-blocks without overlap. The vacant positions of the last sub-block smaller than 32×32 are filled with 0 to make it reach the size of 32×32. The low-frequency image of the watermark is obtained by frequency domain decomposition of each sub-block using wavelet transform. The wavelet transform of the segmented blocks can ensure that each block can be completely reconstructed back to the original block after wavelet transform without information loss. Then, the two-dimensional sub-blocks are compressed into a one-dimensional sequence using singular value decomposition. In order to minimize data distortion and improve database availability, the eigenvalue of the watermark sequence is modulo 2 to obtain the 01 sequence as the watermark sequence to be embedded, and the divisor is saved in the divisor array. This method effectively reduces the length of the watermark and improves the stability of the watermark sequence. The 01 sequence greatly reduces the data distortion caused by embedding a large number of watermarks. When the watermark is attacked and the value changes, at most only a difference of 1 absolute value will be generated, which has almost no effect on the recovery of the eigenvalue, thereby improving the watermark fault tolerance. Figure 1 This is the watermark information preprocessing process.

[0026] In order to solve the problem of redundancy in the way of embedding watermark sequence, a clustering database grouping method is used to group similar data into a group and divide them into K subgroups of different sizes {G1, G2, ..., G K}, avoiding the disorder problem of watermarks extracted from databases that have been subjected to scrambling attacks. Differential expansion technology uses the average and difference between values ​​to calculate and embed watermarks into data carriers. If the data difference is too large, the amount of change in the new data after calculation is also large. The present invention performs conditional remainder on the data to be embedded with watermarks, and dynamically adjusts the remainder value according to the numerical range of the embedded attribute value of each group, thereby optimizing the watermark fault tolerance and the accuracy of watermark embedding and extraction. Assume that the value of the attribute array to be embedded in the watermark is [Arr1, Arr2, ..., Arr N ], then calculate the remainder value of the subgroup After determining the remainder value, assuming that the attribute values ​​to be embedded in the watermark are A1 and A2, and the embedded watermark bits are W i , the improved differential expansion calculation uses the remainder value to reduce the difference between the values, such as:

[0027]

[0028] Among them, a1 and a2 are the attribute values ​​after taking the remainder, and div1 and div2 represent the corresponding divisors. Calculate the mean and difference between the attribute values ​​after taking the remainder, and use the difference expansion method to implement watermark embedding in the watermark embedding stage. When expanding the difference, calculate d′=k·d+b·W i +m·sin(c·W i ), where d represents the difference, k, b, m, c represent the adjustment parameters, and W iRepresents the embedded watermark bit, and gets Where avg represents the mean of the attribute value after taking the remainder, see Figure 2

[0029] When extracting watermarks, first cluster the database embedded with watermarks and divide it into several subgroups. Then find the attribute bits of the subgroups embedded with watermarks. Perform differential expansion inverse operations on the attribute values ​​of each tuple embedded with watermarks in turn. Extract the watermark set embedded in each subgroup. Perform a majority vote on the set to select the number that accounts for more than 50% as the final watermark bit extracted from the subgroup. Combine the watermark bits in the order of grouping to obtain the extracted watermark sequence. After extracting the watermarks, restore the attribute values ​​to the original values ​​and merge the subgroups to obtain the original database. At this stage, the difference calculation process is as follows: Calculate d′=2·(a′1-avg)+1, and use the inverse sine transform to restore Restore the original difference After restoration Finally restore the property value Then, the low-frequency image of the QR code is restored through the inverse SVD operation, and finally the Haar wavelet inverse transform is performed to restore all 32×32 sub-blocks. The padding value 0 is removed to get the original QR code. The information contained in the QR code can be scanned to track the attacker. Figure 3 .

[0030] A more specific example:

[0031] Take the QR code as the original watermark carrier, and take the M×N size QR code image as an example, divide it into several 32×32 sub-blocks, and set the filling value of the last sub-block that does not meet 32×32 to 0. First, preprocess the QR code, and use the Haar wavelet transform image compression algorithm to perform frequency domain decomposition on the QR image to obtain a low-frequency image. Further use singular value decomposition (SVD) to further compress the low-frequency image, extract some eigenvalues ​​to generate a watermark sequence, and the M×N matrix can be decomposed into A=U∑V T , where U∈R M×M is the left singular value matrix, V∈R N ×N is the right singular value matrix, ∑∈R M×N It is a singular value matrix with values ​​only on the diagonal and all other elements are 0. The low-frequency images of QR codes with embedded numerical information and text information are selected for SVD decomposition, and non-zero eigenvalues ​​are extracted from the eigenvalue matrix to obtain a one-dimensional watermark sequence W. In addition, in order to improve the watermark embedding capacity while minimizing data distortion, the idea of ​​division and remainder in the hash algorithm is used to make the watermark sequence W modulo 2, and the final 01 watermark sequence to be embedded is obtained.

[0032] After completing the watermark grouping through the clustering algorithm and selecting the best watermark embedding attribute bit using the adaptive differential evolution algorithm, the remainder value of each group is calculated as

[0033] Assume that the attributes of the watermark to be embedded are A1 and A2, and the watermark bits to be embedded are W i , the improved differential expansion calculation uses the remainder value to reduce the difference between the values, such as:

[0034]

[0035] The mean avg and difference d of the attribute value after taking the remainder are in Indicates rounding down. In the watermark embedding stage, the watermark is embedded by expanding the difference and calculating d′=k·d+b·W i +m·sin(c·W i ), where k, b, m, and c represent adjustment parameters respectively, so that the modulo attribute values ​​a1′ and a2′ of the embedded watermark are obtained as follows: The remainder and divisor are multiplied and added to the remainder attribute value of the embedded watermark to restore the final attribute values ​​of the embedded watermark A1′ and A2′:

[0036] In the watermark extraction stage, clustering algorithm is also used to group, extract watermark bits from each subgroup, and perform differential expansion inverse operation on the attribute value of each tuple embedded in the watermark. The process is as follows:

[0037] Calculate d′=2·(a′1-avg)+1 and restore it using inverse sine transform Restore the original difference After restoration Finally restore the property value

[0038] The present invention divides the QR code image matrix into 32×32 sub-blocks and fills in the missing positions. After the division, each sub-block is subjected to wavelet transform, and the original sub-block can be completely reconstructed, reducing or even eliminating the situation of information loss. At the same time, the clustering database grouping method is used to calculate the residual value of the attribute values ​​of different groups respectively, and the residual value is dynamically adjusted according to the numerical range of the embedded attribute value of each group, so as to optimize the watermark fault tolerance and the accuracy of watermark embedding and extraction.

[0039] The present invention also provides a device, which includes: a data acquisition device, a processor and a memory; the data acquisition device is used to collect data; the memory is used to store one or more program instructions; the processor is used to execute one or more program instructions to execute any of the above methods.

[0040] The present invention further provides a computer-readable storage medium, wherein the computer storage medium contains one or more program instructions, and the one or more program instructions are used to execute any of the above methods.

[0041] The units, devices or modules described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. For the convenience of description, the above devices are described separately by functions divided into various modules. Of course, when implementing this application, the functions of each module can be implemented in the same or more software and / or hardware, or the modules that implement the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0042] Those skilled in the art also know that, in addition to implementing the controller in a purely computer-readable program code, the controller can be made to implement the same function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered as a hardware component, and the devices for implementing various functions included therein can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules for implementing the method and structures within the hardware component.

[0043] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, classes, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0044] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a mobile terminal, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.

[0045] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc.

[0046] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present application. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.

Claims

1. A watermarking method based on an improved dynamic differential database, characterized in that: The specific steps of this method are as follows: (1) The QR code image is divided into blocks and then subjected to frequency domain decomposition and eigenvalue extraction. The two-dimensional sub-blocks are compressed into a one-dimensional sequence using singular value decomposition to obtain an embedded watermark sequence. (2) Use clustering database grouping to group similar data into K subgroups of different sizes {G1, G2, ..., G K }, using differential expansion to embed the watermark into the data carrier; (3) After clustering the watermark-embedded database, perform a reverse operation to restore the QR code, complete the watermark extraction, and obtain the user's identity information; In step (2), calculate the remainder of the subgroup is the value of the attribute array to be embedded in the watermark, N is the length of the attribute array to be embedded in the watermark; A1, A2 are the attribute values ​​to be embedded in the watermark, W i For embedded watermark bits, the difference between attribute values ​​is reduced by taking the remainder value. Among them, a1 and a2 are the attribute values ​​after taking the remainder, and div1 and div2 represent the corresponding divisors; the mean and difference between the attribute values ​​after taking the remainder are calculated, and the watermark is embedded in the watermark embedding stage by using the difference expansion method; When the difference is expanded, d′=k·d+b·W is calculated i +m·sin(c·W i ), where d represents the difference, k, b, m, c represent the adjustment parameters, and W i Represents the embedded watermark bit, and gets Where avg represents the mean of the attribute values ​​after taking the remainder; in the watermark extraction stage, the restoration difference calculation process is as follows: calculate d′=2·(a′1-avg)+1, and use the inverse sine transform to restore Restore the original difference After restoration Finally restore the property value 2. The improved dynamic differential database watermarking method according to claim 1, characterized in that: In step (1), the QR code is divided into blocks and then subjected to wavelet transform.

3. A watermark system based on an improved dynamic differential database, the system comprising: (1) Preprocessing module, which divides the QR code image into blocks, performs frequency domain decomposition and eigenvalue extraction, and compresses the two-dimensional sub-blocks into a one-dimensional sequence using singular value decomposition to obtain an embedded watermark sequence; (2) Watermark embedding module: This module uses clustering database grouping to group similar data into K subgroups of different sizes {G1, G2, ..., G K }, using differential expansion to embed the watermark into the data carrier; (3) Watermark extraction module, which performs clustering on the watermark-embedded database and then performs reverse operations to restore the QR code, complete watermark extraction, and obtain the user's identity information; In the watermark embedding module, calculate the remainder of the subgroup is the value of the attribute array to be embedded in the watermark, N is the length of the attribute array to be embedded in the watermark, A1 and A2 are the attribute values ​​to be embedded in the watermark, W i For embedded watermark bits, the difference between attribute values ​​is reduced by taking the remainder value. Among them, a1 and a2 are the attribute values ​​after taking the remainder, and div1 and div2 represent the corresponding divisors; the mean and difference between the attribute values ​​after taking the remainder are calculated, and the watermark is embedded by using the difference expansion in the watermark embedding stage; When the difference is expanded, d′=k·d+b·W is calculated i +m·sin(c·W i ), where d represents the difference, k, b, m, c represent the adjustment parameters, and W i Represents the embedded watermark bit, and gets Where avg represents the mean of the attribute values ​​after taking the remainder; in the watermark extraction stage, the restoration difference calculation process is as follows: calculate d′=2·(a′1-avg)+1, and use the inverse sine transform to restore Restore the original difference After restoration Finally restore the property value 4. The improved dynamic differential database watermark system according to claim 3, characterized in that: In the preprocessing module, the QR code is divided into blocks and then subjected to wavelet transform.

5. A watermark device based on an improved dynamic differential database, the device comprising: Data acquisition device, processor and memory; The data acquisition device is used to collect data; The memory is used to store one or more program instructions; The processor is used to execute one or more program instructions to perform any method of claims 1-2 above.

6. A computer-readable storage medium based on an improved dynamic differential database watermark, wherein the computer storage medium contains one or more program instructions, and the one or more program instructions are used to execute any one of the methods of claims 1-2 above.