Data watermark implanting and identifying method for lossless data content
Through the watermark embedding method of data grouping and features, combined with primary key processing and hash grouping, the problem of implicit watermark insufficient impact and robustness on data quality is solved, and efficient implantation and identification of lossless data watermarks is realized, ensuring that users are Experience and data integrity.
Patent Information
- Application Number
- CN202411648251.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2024-12-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing implicit watermarking technology has a great impact on data quality, is not robust enough, and the embedding and extraction mechanisms are not strict enough, making it prone to malicious tampering or deletion.
Using the watermark embedding method of data grouping and features, the watermark is implanted by changing the arrangement order of data, combined with primary key processing and hash grouping, a unique watermark value is generated, and the watermark value is extracted through similarity calculation during data processing to ensure the watermark's Robustness and data integrity.
It effectively reduces the perceived impact of watermarks on data, improves the robustness of watermarks, ensures that the user experience is not affected, and can accurately identify the watermarks during data processing or changes, and determine whether the data has been tampered with.
Smart Images

Figure CN119150264A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital watermarking, and in particular to a data watermark implantation and recognition method for lossless data content. Background Art
[0002] With the increasing demand for data protection and copyright management, digital watermarking technology, as an effective means of data protection, has been widely used in the protection of various digital contents. In the prior art, digital watermarking technology is generally divided into explicit watermarking and implicit watermarking, among which implicit watermarking is more commonly used. Implicit watermarking technology aims to embed watermark information into digital content so that it has the least impact on the perceptibility of the original data content. However, the current implicit watermarking technology has the problem of serious data quality degradation after watermark implantation, such as the degradation of visual and auditory quality of data, especially in the case of highly compressed data. This degradation in quality will seriously affect the data usage experience. At the same time, the existing watermark recognition is not robust enough. In the face of various data processing operations, such as compression, shearing, rotation, etc., the robustness is insufficient, which can easily lead to recognition failure or misrecognition in practical applications.
[0003] At the same time, existing implicit watermarking technologies mainly focus on the protection of multimedia data such as images, videos, and audio, while their applications in structured data (such as database tables, CSV files, etc.) are relatively rare. However, with the advent of the big data era, more and more sensitive data are stored and transmitted in structured forms, which face the risk of unauthorized tampering, copying, and distribution. Summary of the invention
[0004] The technical problem to be solved by the present invention is that the existing invisible watermark technology has a great impact on data quality, and its watermark recognition is not robust enough. In addition, the embedding and extraction mechanism of the existing invisible watermark technology is not strict enough and is easily tampered with or deleted maliciously.
[0005] In order to solve the above technical problems, the first aspect of the present invention adopts the following technical solution: a data watermark embedding method for lossless data content, comprising the following steps: S1: Acquire the data to be watermarked, where the acquired data can be ordinary data or structured data; S2: Divide the data into several data groups according to the preset logic, each data group contains data records with similar characteristics; S3: After completing the division of the data groups, a unique watermark value is generated for each data group; S4: sorting the data records of the plurality of data groups, and adjusting the order of the data records according to the watermark value of each data group; S5: Reorganize the adjusted data set into a complete data set, and save the data set into the data.
[0006] When the present invention works, it effectively reduces the perceptible impact of the watermark on the data by combining data grouping and feature watermark embedding. The watermark can be embedded only by changing the arrangement order of the data, which can maintain the original characteristics of the data and ensure that the user experience is not affected. At the same time, it can greatly improve the robustness of the watermark, and can still ensure that the watermark can be accurately identified in the case of data processing or changes.
[0007] Preferably, in step S2, when dividing the data into a plurality of data groups according to a preset logic, the following steps are adopted: A1: Process the data by primary key, extract the primary keys of several data records, and concatenate them into strings to form a unique composite key; A2: Use a hash algorithm to calculate the key combination and generate a hash value for quick search and comparison of the key combination. A3: The hash value is distributed to several data groups through modulo operation to achieve data division.
[0008] When the present invention is working, it can perform primary key processing on structured data and divide the data into multiple data groups. At the same time, based on the hash grouping method, it can ensure that data with similar characteristics are divided into the same group, so that when embedding the data watermark, the influence range of the data watermark can be more accurately controlled, and the interference with the original data characteristics can be minimized.
[0009] Preferably, in step A1, primary key processing is performed on the data, the primary keys of several data records are extracted, and the primary keys are string-connected to form a unique composite key, using the following formula: ; in: is a key combination, is the primary key, The number of primary keys, Represents a string concatenation operation.
[0010] Preferably, in step A2, when a hash algorithm is used to perform hash calculation on the combination key and a hash value for quickly searching and comparing the combination key is generated, the following formula is used to calculate the hash value: ; in: Input for hash function The hash value output later is is the hash seed, is the primary key, is the modulus constant, is the length of the key combination string, is the modulo operator.
[0011] Preferably, in step A3, the hash value is distributed to several data groups by modulo operation to achieve reasonable data division, and the following formula is used to achieve division: ; in: is the number of the data group, Input for hash function The hash value output later is is the modulo operator, The number of groups the data needs to be divided into.
[0012] Preferably, in step S3, after completing the division of the data groups, when generating a unique watermark value for each data group, the following steps are adopted: after completing the division of the data groups, the characteristic fields within the data groups are randomly arranged, and the arrangement results are converted into binary watermark values.
[0013] When the present invention is working, the arrangement result is converted into a binary watermark value by arranging and combining the data group features, which can ensure the strong correlation between the data watermark and the data. Even if the data group is partially modified or rearranged, the embedded data watermark can still be accurately extracted through similarity calculation.
[0014] Preferably, in step S3, when converting the arrangement results into binary watermark values, the following formula is used to generate the watermark value: ; in: is the watermark value, is the sequence after arrangement, is the watermark generation function.
[0015] In order to solve the above technical problems, the second aspect of the present invention adopts the following technical solution: a data watermark recognition method for lossless data content, using the data watermark embedding method for lossless data content as described above, comprising the following steps: B1: Obtaining data in a structured form that needs to identify data watermarks; B2: Group the data according to the logic when the data watermark is implanted; B3: After completing the data grouping, extract the embedded watermark value for each data group; B4: Perform similarity calculation to determine whether the arrangement order of the current data group matches that of the original data group. When the degree of matching reaches a preset threshold, it is determined that the data watermark is successfully extracted; B5: Compare the extracted watermark value with the original watermark value when embedded to verify the integrity of the data and the validity of the watermark. When the extracted watermark value is consistent with the original watermark value, the data has not been tampered with. Otherwise, it is judged that tampering has occurred or the data is abnormal.
[0016] When the present invention is working, it can realize the extraction and recognition of data watermarks, and at the same time compare the extracted watermark value with the original watermark value when embedded to verify the integrity of the data and the validity of the watermark, and can determine whether the data has been tampered with or is abnormal, and can improve the robustness of the data watermark, so that even if the data has been processed or changed to a certain extent, the data watermark can still be restored by rearranging and calculating the characteristics of the data group, thereby greatly improving the accuracy of watermark recognition.
[0017] Preferably, in step B2, when the data is grouped according to the logic when the data watermark is implanted, the following steps are adopted: the group of each data record is calculated using the formula and algorithm when the data watermark is implanted, and the hash formula for data grouping adopts the following formula: ; in, is the number of the data group, The hash function acts on The combined string, is the primary key value, Represents the string concatenation operation. is the modulo operator, The number of groups the data needs to be divided into.
[0018] The beneficial technical effects of the present invention include: 1. The present invention effectively reduces the perceptible impact of watermarks on data by combining data grouping and feature watermark embedding. The watermark can be embedded simply by changing the order of data arrangement, which can maintain the original characteristics of the data and ensure that the user experience is not affected. At the same time, the robustness of the watermark can be greatly improved, and the watermark can still be accurately identified in the case of data processing or changes.
[0019] 2. The present invention can perform primary key processing on structured data and divide the data into multiple data groups. At the same time, based on the hash grouping method, it can ensure that data with similar characteristics are divided into the same group, so that when embedding the data watermark, the influence range of the data watermark can be more accurately controlled, which can minimize the interference with the original data characteristics.
[0020] 3. The present invention converts the arrangement results into binary watermark values by arranging and combining the data group features, which can ensure the strong correlation between the data watermark and the data. Even if the data group is partially modified or rearranged, the embedded data watermark can still be accurately extracted through similarity calculation.
[0021] 4. The present invention can realize the extraction and recognition of data watermarks, and compare the extracted watermark value with the original watermark value when embedded to verify the integrity of the data and the validity of the watermark. It can determine whether the data has been tampered with or is abnormal, and can improve the robustness of the data watermark. Even if the data has undergone certain processing or changes, the data watermark can still be restored by rearranging and calculating the characteristics of the data group, which greatly improves the accuracy of watermark recognition.
[0022] Other features and advantages of the present invention will be disclosed in detail in the following specific embodiments and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The present invention will be further described below in conjunction with the accompanying drawings: Attached Figure 1 The present invention is a workflow diagram of a method for embedding data watermark in lossless data content. DETAILED DESCRIPTION
[0024] The technical solutions of the embodiments of the present invention are explained and described below in conjunction with the drawings of the embodiments of the present invention, but the following embodiments are only preferred embodiments of the present invention, not all. Based on the embodiments in the implementation mode, other embodiments obtained by those skilled in the art without creative work are all within the protection scope of the present invention.
[0025] In the following description, terms such as "inside", "outside", "up", "down", "left", "right", etc. that indicate directions or positional relationships are only used to facilitate the description of the embodiments and simplify the description, and do not indicate or imply that the referred device or element must have a specific direction, be constructed and operate in a specific direction. Therefore, it should not be understood as a limitation of the present invention. Embodiment 1:
[0026] Please refer to the attached Figure 1 This embodiment discloses a method for embedding a data watermark in lossless data content, comprising the following steps: S1: Obtain the data to be watermarked; S2: Divide the data into several data groups according to the preset logic, each data group contains data records with similar characteristics; S3: After completing the division of the data groups, a unique watermark value is generated for each data group; S4: sorting the data records of the plurality of data groups, and adjusting the order of the data records according to the watermark value of each data group; S5: Reorganize the adjusted data set into a complete data set, and save the data set into the data.
[0027] When this embodiment is working, the perceptible impact of the watermark on the data is effectively reduced by combining data grouping and feature watermark embedding. The watermark can be embedded only by changing the arrangement order of the data, which can maintain the original characteristics of the data and ensure that the user experience is not affected. At the same time, the robustness of the watermark can be greatly improved, and the watermark can still be accurately identified in the case of data processing or changes.
[0028] Preferably, in step S3, after completing the division of the data groups, when generating a unique watermark value for each data group, the following steps are adopted: after completing the division of the data groups, randomly arrange the characteristic fields within the data groups, and convert the arrangement results into binary watermark values.
[0029] In specific implementation, in step S3, when converting these arrangement results into binary watermark values, the following formula is used to generate the watermark value, so that the watermark value is closely related to the characteristics of the data. Even if the data changes slightly, the watermark value can be restored by recalculating and arranging the characteristics of the data group: ; in: is the watermark value, indicating the sequence after arrangement Generate binary numbers in the , which can be used to verify or steganographic watermark information; It is an arranged sequence, which indicates the data elements after a preset arrangement or processing, or the arrangement of the values of a data set obtained by a preset sorting or hashing algorithm; is the watermark generation function, which is used to Convert to watermark value , which can select the appropriate function form according to the relative order of data elements, numerical size, parity, etc., as well as algorithm design.
[0030] Embodiment 2: Please refer to the attached Figure 1 This embodiment discloses a method for embedding data watermark in lossless data content. The same points as those in the first embodiment will not be described in detail, and the differences will be described in detail below.
[0031] In this embodiment, in step S2, when the data is divided into a plurality of data groups according to a preset logic, the following steps are adopted: A1: Process the data by primary key, extract the primary keys of several data records, and concatenate them into strings to form a unique composite key; A2: Use a hash algorithm to calculate the key combination and generate a hash value for quick search and comparison of the key combination. A3: The hash value is distributed to several data groups through modulo operation to achieve reasonable data division.
[0032] When this embodiment is working, it can perform primary key processing on structured data and divide the data into multiple data groups. At the same time, based on the hash grouping method, it can ensure that data with similar characteristics are divided into the same group, so that when embedding the data watermark, the influence range of the data watermark can be more accurately controlled, which can minimize the interference with the original data characteristics.
[0033] Preferably, in step A1, primary key processing is performed on the data, the primary keys of several data records are extracted, and the primary keys are string-connected to form a unique composite key, using the following formula: ; in: A composite key is a unique key generated by string concatenation of multiple primary keys. It is a composite identifier used to uniquely identify the data record. is the primary key, each Represents a field of a data record, such as userID, orderID, etc., so that multiple primary key values can together form a composite key; The number of primary keys, indicating the number of all primary keys contained in the composite key; Represents a string concatenation operation, which is used to concatenate multiple primary key values together to form a complete composite key.
[0034] In the specific implementation, in step A2, a hash algorithm is used to perform hash calculation on the combination key to generate a hash value for quickly searching and comparing the combination key. The following formula is used to calculate the hash value: ; in: Input for hash function The hash value output later; Hash seed is used to initialize the hash function. It can be set to a fixed constant value according to actual needs to ensure the randomness of the hash function and avoid hash conflicts. is the primary key, It is a modulus constant used to limit the hash value to a suitable range so as to be mapped to a fixed-size storage space or hash table; is the length of the key combination string, is the modulo operator.
[0035] Preferably, in step A3, the hash value is distributed to several data groups by modulo operation to achieve reasonable data division, and the following formula is used to achieve division: ; in: It is the number of the data group, indicating the group to which the current data record is assigned, for the convenience of recording; Input for hash function The hash value outputted after that, in specific implementation, the hash function can be adjusted according to the application scenario, such as using MD5, SHA-256 or simple polynomial hash; is the modulus operator, which means the hash value Model The remainder can be calculated by performing the operation to map the hash value to the corresponding In the data set; The number of groups the data needs to be divided into can be customized to facilitate encryption and anti-cracking.
[0036] Embodiment three: Please refer to the attached Figure 1 This embodiment discloses a data watermark recognition method for lossless data content, and uses a data watermark embedding method for lossless data content as in the above embodiment, including the following steps: B1: Obtaining data in a structured form that needs to identify data watermarks; B2: Group the data according to the logic when the data watermark is implanted; B3: After completing the data grouping, extract the embedded watermark value for each data group; B4: Perform similarity calculation to determine whether the arrangement order of the current data group matches that of the original data group. When the degree of matching reaches a preset threshold, it is determined that the data watermark is successfully extracted; B5: Compare the extracted watermark value with the original watermark value when embedded to verify the integrity of the data and the validity of the watermark. When the extracted watermark value is consistent with the original watermark value, the data has not been tampered with. Otherwise, it is judged that tampering has occurred or the data is abnormal.
[0037] When this embodiment is working, it can realize the extraction and recognition of data watermarks, and at the same time compare the extracted watermark value with the original watermark value when embedded to verify the integrity of the data and the validity of the watermark, and can determine whether the data has been tampered with or is abnormal, and can improve the robustness of the data watermark, so that even if the data has been processed or changed to a certain extent, the data watermark can still be restored by rearranging and calculating the characteristics of the data group, which greatly improves the accuracy of watermark recognition.
[0038] Preferably, in step B2, when the data is grouped according to the logic when the data watermark is implanted, the following steps are adopted: the group of each data record is calculated using the formula and algorithm when the data watermark is implanted, and the hash formula for data grouping adopts the following formula: ; in, is the number of the data group, The hash function acts on The combined string, is the primary key value, Represents the string concatenation operation. is the modulo operator, The number of groups into which the data needs to be divided is determined by regrouping the data using the same primary key and hash algorithm as when the data watermark is embedded. This ensures that the data grouping is consistent with that when the data watermark is embedded. The watermark information can be accurately extracted, facilitating encryption while having a high security level and making it difficult to crack.
[0039] The beneficial technical effects of this embodiment include: the present invention effectively reduces the perceptible impact of watermarks on data by combining data grouping and feature watermark embedding methods, and can embed watermarks simply by changing the order of data arrangement, thereby maintaining the original characteristics of the data and ensuring that the user experience is not affected. At the same time, it can greatly improve the robustness of the watermark, and can still ensure that the watermark can be accurately identified in the event of data processing or changes.
[0040] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Those skilled in the art should understand that the present invention includes but is not limited to the contents described in the drawings and the above specific embodiments. Any modification that does not deviate from the functional and structural principles of the present invention will be included in the scope of the claims.
Claims
1. A data watermarking method for lossless data content, It is characterized in that The following steps are involved: S1: Obtain the data to be watermarked; S2: Divide the data into several data groups according to the preset logic, each data group contains data records with similar characteristics; S3: After completing the division of the data groups, a unique watermark value is generated for each data group; S4: sorting the data records of the plurality of data groups, and adjusting the order of the data records according to the watermark value of each data group; S5: Reorganize the adjusted data set into a complete data set, and save the data set into the data.
2. A method for embedding data watermark in lossless data content according to claim 1, Features: In the step S1, the acquired data is set as structured data stored in a structured form.
3. A method for embedding data watermark in lossless data content according to claim 1, Features: In step S2, when the data is divided into several data groups according to the preset logic, the following steps are adopted: A1: Process the data by primary key, extract the primary keys of several data records, and concatenate them into strings to form a unique composite key; A2: Use a hash algorithm to calculate the key combination and generate a hash value for quick search and comparison of the key combination. A3: The hash value is distributed to several data groups through modulo operation to achieve reasonable data division.
4. A method for embedding data watermark in lossless data content according to claim 3, Features: In step A1, the data is processed by primary key, the primary keys of several data records are extracted, and the primary keys are connected by string to form a unique composite key, using the following formula: ; in: is a key combination, is the primary key, The number of primary keys, Represents a string concatenation operation.
5. A method for embedding data watermark in lossless data content according to claim 3, Features: In step A2, a hash algorithm is used to perform hash calculation on the combination key to generate a hash value for quickly searching and comparing the combination key. The following formula is used to calculate the hash value: ; in: Input for hash function The hash value output later is is the hash seed, is the primary key, is the modulus constant, is the length of the key combination string, is the modulo operator.
6. A method for embedding data watermark in lossless data content according to claim 3, Features: In step A3, when the hash value is distributed to several data groups through modulo operation to achieve reasonable data division, the following formula is used to achieve division: ; in: is the number of the data group, Input for hash function The hash value output later is is the modulo operator, The number of groups the data needs to be divided into.
7. A method for embedding data watermark in lossless data content according to claim 1, Features: In step S3, after the data groups are divided, when a unique watermark value is generated for each data group, the following steps are adopted: after the data groups are divided, the characteristic fields in the data groups are randomly arranged, and the arrangement results are converted into binary watermark values.
8. A method for embedding data watermark in lossless data content according to claim 1, Features: In step S3, when converting these arrangement results into binary watermark values, the following formula is used to generate the watermark value: ; in: is the watermark value, is the sequence after arrangement, is the watermark generation function.
9. A data watermark recognition method for lossless data content, using a data watermark embedding method for lossless data content as claimed in any one of claims 1 to 8, It is characterized in that The following steps are involved: B1: Obtaining data in a structured form that needs to identify data watermarks; B2: Group the data according to the logic when the data watermark is implanted; B3: After completing the data grouping, extract the embedded watermark value for each data group; B4: Perform similarity calculation to determine whether the arrangement order of the current data group matches that of the original data group. When the degree of matching reaches a preset threshold, it is determined that the data watermark is successfully extracted; B5: Compare the extracted watermark value with the original watermark value when embedded to verify the integrity of the data and the validity of the watermark. When the extracted watermark value is consistent with the original watermark value, the data has not been tampered with. Otherwise, it is judged that tampering has occurred or the data is abnormal.
10. A data watermark recognition method for lossless data content according to claim 9, Features: In step B2, when the data is grouped according to the logic when the data watermark is implanted, the following steps are adopted: the group of each data record is calculated using the formula and algorithm when the data watermark is implanted, and the hash formula for data grouping adopts the following formula: ; in, is the number of the data group, The hash function acts on The combined string, is the primary key value, Represents the string concatenation operation. is the modulo operator, The number of groups the data needs to be divided into.
Citation Information
Patent Citations
Method for embedding and extracting digital watermarks of Oracle Spatial spatial database
CN101661495A
Watermark embedding and detecting method and device
CN110457873A
Enhanced vehicle operation
CN113496452A
Database watermark processing method and device, equipment and storage medium
CN115114599A
Database watermark embedding method and extraction method, storage medium and electronic equipment
CN116150716A
