CN112948895A - Data watermark embedding method, watermark tracing method and device - Google Patents

Data watermark embedding method, watermark tracing method and device Download PDF

Info

Publication number
CN112948895A
CN112948895A CN201911259549.1A CN201911259549A CN112948895A CN 112948895 A CN112948895 A CN 112948895A CN 201911259549 A CN201911259549 A CN 201911259549A CN 112948895 A CN112948895 A CN 112948895A
Authority
CN
China
Prior art keywords
data
preset
digital watermark
embedded
watermark
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911259549.1A
Other languages
Chinese (zh)
Inventor
王杰斌
张皓
王煜
任俊龙
王泽浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Aisino Corp
Original Assignee
Aisino Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Aisino Corp filed Critical Aisino Corp
Priority to CN201911259549.1A priority Critical patent/CN112948895A/en
Publication of CN112948895A publication Critical patent/CN112948895A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Abstract

The application discloses a data watermark embedding method, a watermark tracing method and a device. The method comprises the steps of obtaining a digital watermark sequence to be embedded according to the digital watermark sequence and a preset prime number sequence; the method comprises the steps of dividing a data to be processed by adopting a secret code storage algorithm to obtain a preset number of sub-digital watermarks to be embedded, grouping the data to be processed by adopting a preset grouping algorithm according to data identifications of the data to be processed to obtain a preset number of data groups to be processed and corresponding group identifications, and embedding one sub-digital watermark to be embedded into the data to be processed of a data group to be processed by adopting a preset embedding rule to obtain data embedded with the digital watermark. In the watermark tracing process, watermark information extraction is carried out on the data embedded with the digital watermark according to the reverse process of watermark embedding, and the extracted watermark information and the original watermark information are compared to realize the tracing of the data. The method reduces the complexity of tracing and improves the accuracy of tracing.

Description

Data watermark embedding method, watermark tracing method and device
Technical Field
The present application relates to the field of digital watermarking technologies, and in particular, to a data watermark embedding method, a watermark tracing method, and an apparatus.
Background
Hbase is a distributed column storage system built on HDFS. Hbase is an important member of the Apache Hadoop ecosystem and is mainly used for large-scale structured data storage.
At present, data tracing methods mainly include a labeling method and a reverse query method. The annotation method is to record some important information of original data, such as background, author, time, origin, etc., in a way of annotation, and to make the annotation and the data propagate together, and to obtain the traceability of the data by looking at the annotation of the target data. Although the data tracing by the labeling method is simple, additional storage space is needed for storing labeling information, the labeling method is not suitable for fine-grained data, particularly for data tracing in a large data set, and the labeling is a plaintext which is easy to delete, so that the data tracing fails. The reverse query method is a process of inverting the query by reverse query or constructing a reverse function and tracing the result back to the original data. The reverse query method is mainly to construct a reverse function, the good and bad of the reverse function construction directly affects the query effect and the performance of the algorithm, and the reverse query method is complex for tracing the source of big data.
Therefore, the existing data tracing method is not suitable for tracing data, such as Hbase data.
Disclosure of Invention
The embodiment of the application provides a data watermark embedding method, a watermark tracing method and a watermark tracing device, solves the problem that Hbase data cannot be traced in the prior art, reduces tracing complexity, and improves tracing accuracy.
In a first aspect, a method for embedding a watermark in data is provided, and the method may include:
acquiring a digital watermark sequence to be embedded according to a digital watermark sequence corresponding to preset watermark information and a preset prime number sequence; the number of elements of the preset prime number sequence is the same as that of the elements of the digital watermark sequence;
dividing the digital watermark sequence to be embedded by adopting a secret code storage algorithm to obtain a preset number of sub-digital watermarks to be embedded;
grouping the data to be processed by adopting a preset grouping algorithm according to the data identification of the data to be processed to obtain the data groups to be processed with the preset number and the corresponding group identification;
and embedding a sub-digital watermark to be embedded into at least one piece of data to be processed of the group of data to be processed by adopting a preset embedding rule to obtain the data embedded with the digital watermark.
In an optional implementation, before the digital watermark sequence to be embedded is acquired according to the digital watermark sequence and the preset prime number sequence corresponding to the preset watermark information, the method further includes:
acquiring preset watermark information, wherein the watermark information comprises a character string consisting of at least one character type of letters, numbers and symbols;
if the watermark information has letters or symbols, performing decimal conversion on each character in the watermark information by adopting a preset decimal conversion algorithm to obtain a digital watermark sequence.
In an alternative implementation, the data identifier is a row key of the data to be embedded with the digital watermark;
grouping the data to be processed by adopting a preset grouping algorithm according to the data identification of the data to be processed to obtain the data groups to be processed with the preset number, wherein the method comprises the following steps:
performing hash operation on a row key of data to be processed in an Hbase database by using a preset hash algorithm through a preset secret key to obtain a hash value corresponding to the row key;
and grouping the data to be processed according to the hash value to obtain the data groups to be processed with the preset number and the corresponding group identifications.
In an alternative implementation, embedding a to-be-embedded sub-digital watermark into at least one to-be-processed data of a group of to-be-processed data sets by using a preset embedding rule, includes:
replacing the numerical value of the least significant value bit of each data to be processed in the data group to be processed with the sub-digital watermark to be embedded;
or, adding a bit to be embedded after the least significant value bit of each data to be processed in the data group to be processed;
and adding the sub-digital watermark to be embedded into the position to be embedded of the data to be processed.
In an optional implementation, the method further comprises:
storing the corresponding relation between the data identification and a preset secret key and the preset number of the data groups to be processed corresponding to the preset secret key;
and storing the corresponding relation between the group identification and the serial number of the corresponding sub-digital watermark to be embedded.
In a second aspect, a watermark tracing method for data is provided, which may include:
grouping the data embedded with the digital watermark by adopting a preset grouping algorithm according to the acquired data identification of the data embedded with the digital watermark to obtain a preset number of data groups embedded with the digital watermark and corresponding group identifications, wherein the preset number is the preset number of the data groups to be processed corresponding to the data identification stored during watermark embedding;
extracting the sub-digital watermarks from each digital watermark embedding data group of the preset number of digital watermark embedding data groups by adopting a preset extraction rule, wherein the preset extraction rule and the preset embedding rule are inverse rules;
reconstructing the extracted sub-digital watermarks with preset number by adopting a preset reconstruction algorithm to obtain a reconstructed digital watermark sequence;
and acquiring a digital watermark sequence and watermark information corresponding to the digital watermark sequence according to the reconstructed digital watermark sequence and a stored preset prime number sequence, wherein the element number of the preset prime number sequence is the same as that of the digital watermark sequence.
In an alternative implementation, extracting the sub-digital watermark from each of the digital watermark embedded data of each of the digital watermark embedded data groups includes:
extracting a least significant value from each of the digital watermark embedded data of each of the digital watermark embedded data groups;
and if the ratio of the number of the same minimum effective values extracted from the data group embedded with the digital watermark to the total number of the data embedded with the digital watermark in the data group embedded with the digital watermark is greater than a preset proportion threshold value, determining the same minimum effective values as the sub-digital watermarks of the data group embedded with the digital watermark.
In an alternative implementation, the data is identified as a row key of the data embedded with the digital watermark;
grouping the data embedded with the digital watermark by adopting a preset grouping algorithm according to the acquired data identification of the data embedded with the digital watermark, and acquiring the preset number of data groups embedded with the digital watermark, wherein the method comprises the following steps:
acquiring a key corresponding to the data identifier of the data embedded with the digital watermark in a preset key corresponding to the stored data identifier and a preset number of to-be-processed data groups corresponding to the stored key;
performing hash operation on the row key of the data embedded with the digital watermark by using a preset hash algorithm to obtain a hash value corresponding to the row key;
and grouping the data embedded with the digital watermarks according to the hash values to obtain the preset number of data groups embedded with the digital watermarks and corresponding group identifications.
In an optional implementation, the preset reconstruction algorithm includes a lagrangian threshold algorithm and a lagrangian interpolation polynomial algorithm;
reconstructing the extracted sub-digital watermarks with preset number by adopting a preset reconstruction algorithm to obtain a reconstructed digital watermark sequence, wherein the reconstruction algorithm comprises the following steps:
sequencing the preset number of sub-digital watermarks according to the corresponding relation between the stored group identification and the serial numbers of the corresponding sub-digital watermarks to obtain a digital watermark array;
and reconstructing the digital watermark array by adopting the Lagrange threshold algorithm and the Lagrange interpolation polynomial algorithm to obtain a reconstructed digital watermark sequence.
In a third aspect, an apparatus for embedding a watermark in data is provided, and the apparatus may include: the device comprises an acquisition unit, a segmentation unit, a grouping unit and an embedding unit;
the acquiring unit is used for acquiring a digital watermark sequence to be embedded according to a digital watermark sequence corresponding to preset watermark information and a preset prime number sequence; the number of elements of the preset prime number sequence is the same as that of the elements of the digital watermark sequence;
the dividing unit is used for dividing the digital watermark sequence to be embedded by adopting a secret code storage algorithm to obtain a preset number of sub-digital watermarks to be embedded;
the grouping unit is used for grouping the data to be processed according to the data identification of the data to be processed by adopting a preset grouping algorithm to obtain the data groups to be processed with the preset number and the corresponding group identification;
the embedding unit is used for embedding a sub-digital watermark to be embedded into at least one data to be processed of a data group to be processed by adopting a preset embedding rule to obtain the data embedded with the digital watermark.
In an alternative implementation, the apparatus further comprises a conversion unit;
the acquisition unit is further configured to acquire preset watermark information, where the watermark information includes a character string composed of at least one character type of letters, numbers, and symbols;
and the conversion unit is used for performing decimal conversion on each character in the watermark information by adopting a preset decimal conversion algorithm to obtain a digital watermark sequence if the watermark information has letters or symbols.
In an alternative implementation, the data identifier is a row key of the data to be embedded with the digital watermark;
the grouping unit is specifically configured to perform hash operation on a row key of data to be processed in an Hbase database by using a preset hash algorithm and using a preset key to obtain a hash value corresponding to the row key;
and grouping the data to be processed according to the hash value to obtain the data groups to be processed with the preset number and the corresponding group identifications.
In an optional implementation, the embedding unit is specifically configured to replace a numerical value of a least significant bit of each piece of to-be-processed data in the to-be-processed data group with the to-be-embedded sub-digital watermark;
or, adding a bit to be embedded after the least significant value bit of each data to be processed in the data group to be processed; and adding the sub-digital watermark to be embedded into the position to be embedded of the data to be processed.
In an alternative implementation, the apparatus further comprises a storage unit;
the storage unit is used for storing the corresponding relation between the data identification and a preset secret key and the preset number of the data groups to be processed corresponding to the preset secret key;
and storing the corresponding relation between the group identification and the serial number of the corresponding sub-digital watermark to be embedded.
In a fourth aspect, an apparatus for tracing a watermark of data is provided, which may include: the device comprises a grouping unit, an extracting unit, a reconstructing unit and an acquiring unit;
the grouping unit is used for grouping the data embedded with the digital watermark by adopting a preset grouping algorithm according to the acquired data identification of the data embedded with the digital watermark to obtain a preset number of data groups embedded with the digital watermark and corresponding group identifications, wherein the preset number is the preset number of the data groups to be processed corresponding to the data identification stored during watermark embedding;
the extracting unit is configured to extract the sub-digital watermark from each data group, in which the digital watermarks are embedded, of the data groups in which the digital watermarks are embedded in the preset number by using a preset extracting rule, where the preset extracting rule and the preset embedding rule are inverse rules to each other;
the reconstruction unit is used for reconstructing the extracted sub-digital watermarks with preset number by adopting a preset reconstruction algorithm to obtain a reconstructed digital watermark sequence;
the acquiring unit is configured to acquire a digital watermark sequence and watermark information corresponding to the digital watermark sequence according to the reconstructed digital watermark sequence and a stored preset prime number sequence, where the number of elements of the preset prime number sequence is the same as the number of elements of the digital watermark sequence.
In an alternative implementation, the extracting unit is specifically configured to extract a least significant value from each of the digital watermark embedded data of each of the digital watermark embedded data groups;
and if the ratio of the number of the same minimum effective values extracted from the data group embedded with the digital watermark to the total number of the data embedded with the digital watermark in the data group embedded with the digital watermark is greater than a preset proportion threshold value, determining the same minimum effective values as the sub-digital watermarks of the data group embedded with the digital watermark.
In an alternative implementation, the data is identified as a row key of the data embedded with the digital watermark;
the grouping unit is specifically configured to acquire a key corresponding to the data identifier of the data embedded with the digital watermark in a preset key corresponding to the stored data identifier, and a preset number of to-be-processed data groups corresponding to the stored key;
performing hash operation on the row key of the data embedded with the digital watermark by using a preset hash algorithm to obtain a hash value corresponding to the row key;
and grouping the data embedded with the digital watermarks according to the hash values to obtain the preset number of data groups embedded with the digital watermarks and corresponding group identifications.
In an optional implementation, the preset reconstruction algorithm includes a lagrangian threshold algorithm and a lagrangian interpolation polynomial algorithm;
the reconstruction unit is specifically configured to sort the preset number of sub-digital watermarks according to a correspondence between the stored group identifiers and the serial numbers of the corresponding sub-digital watermarks, and obtain a digital watermark array;
and reconstructing the digital watermark array by adopting the Lagrange threshold algorithm and the Lagrange interpolation polynomial algorithm to obtain a reconstructed digital watermark sequence.
In a fifth aspect, an electronic device is provided, which includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other via the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of the above first aspects or the method steps of any one of the above second aspects when executing a program stored in a memory.
A sixth aspect provides a computer readable storage medium having stored therein a computer program which, when executed by a processor, performs the method steps of any one of the above first aspects or performs the method steps of any one of the above second aspects.
The watermark embedding method of the data provided by the embodiment of the invention obtains a digital watermark sequence to be embedded according to a digital watermark sequence corresponding to preset watermark information and a preset prime number sequence; the element number of the preset prime number sequence is the same as the element number of the digital watermark sequence; dividing the digital watermark sequence to be embedded by adopting a secret code storage algorithm to obtain a preset number of sub-digital watermarks to be embedded; grouping the data to be processed by adopting a preset grouping algorithm according to the data identification of the data to be processed, and acquiring a preset number of data groups to be processed and corresponding group identifications; and then embedding a sub-digital watermark to be embedded into at least one piece of data to be processed of the group of data to be processed by adopting a preset embedding rule to obtain the data embedded with the digital watermark. In the watermark tracing process, extracting watermark information from the data embedded with the digital watermark according to the reverse process of watermark embedding, and comparing the consistency of the extracted watermark information and the original watermark information to realize the tracing of the data. The method solves the problem that Hbase data cannot be traced in the prior art, reduces the tracing complexity and improves the tracing accuracy.
Drawings
Fig. 1 is a flowchart illustrating a method for embedding a watermark in data according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for tracing a watermark of data according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a data watermark embedding apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a data watermark tracing apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without any creative effort belong to the protection scope of the present application.
The digital watermark technology is a technology for embedding the digital watermark into the carrier on the premise of not influencing the normal use of the carrier, the carrier can be at least one of an image, a document, a video and software, and the digital watermark can be identification information such as a secret key and anti-counterfeiting information. The digital watermark is not easy to be detected and modified again, but can be identified by an embedding party, and whether the carrier is tampered or not can be judged by identifying the digital watermark hidden in the carrier. For a carrier embedded with a digital watermark, the validity of the digital watermark is verified after the digital watermark is extracted from the carrier.
The watermark embedding method for the data determines the carrier as the data, such as big data stored in Hbase, so that the data is covertly identified under the condition of not influencing the use of the data, and an embedding algorithm has stronger robustness and can effectively resist common watermark attack. In the process of tracing the source of the data, the purpose of tracing the source of the data is achieved by comparing the consistency of the extracted watermark information and the original watermark information, and the accuracy of tracing the source is provided.
The preferred embodiments of the present application will be described below with reference to the accompanying drawings of the specification, it being understood that the preferred embodiments described herein are merely for illustrating and explaining the present invention and are not intended to limit the present invention, and that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
Fig. 1 is a flowchart illustrating a data watermark embedding method according to an embodiment of the present invention. As shown in fig. 1, the method may include:
and step 110, acquiring a digital watermark sequence to be embedded according to the digital watermark sequence corresponding to the preset watermark information and a preset prime number sequence.
Before the step is executed, preset watermark information is obtained, the watermark information may include a character string composed of at least one character type of letters, numbers and symbols, for example, the watermark information may be the character string 456-.
Since the watermark information is to be embedded into the data of the Hbase database, a meaningful character string can be selected as the watermark information, that is, the watermark information uniquely identifying the corresponding data, for example, the generation date of the corresponding data: 2001-02-03, or object information for generating corresponding data: ASDginsi (ASD Corp.).
If the watermark information has letters or symbols, a preset decimal conversion algorithm, such as an ASCLL algorithm, is adopted to perform decimal conversion on each character in the watermark information to obtain a digital watermark sequence A. That is, the digital watermark sequence a includes a plurality of decimal elements, i.e., numerical values.
If the watermark information does not have letters or symbols, the digital watermark sequence A corresponding to the watermark information can be directly obtained.
Returning to step 110, the digital watermark sequence corresponding to the preset watermark information and the preset prime number sequence may be calculated by using the chinese remainder theorem to obtain the digital watermark sequence to be embedded.
The derivation process of the formula of the Chinese remainder theorem is as follows:
let a positive integer m1,m2,…,mnTwo pairs of reciprocity, there is a set of unary linear congruence equations:
Figure BDA0002311242940000091
for any integer: a is1,a2,...,anThe system of equations S has a solution. And M is the mode M1·m2·…·mnThe solution below is unique, let
Figure BDA0002311242940000092
Is MiMold miReciprocal number theory (t)iIs MiMold miInverse element in the sense) Miti≡1(modmi),
Figure BDA0002311242940000101
The only solution to the system of equations S is:
Figure BDA0002311242940000102
k∈Z
namely, the formula of the Chinese remainder theorem is:
Figure BDA0002311242940000103
and then, randomly acquiring a plurality of prime numbers, and generating a preset prime number sequence K, wherein the element number of the preset prime number sequence K is the same as that of the digital watermark sequence A.
Setting the element in the digital watermark sequence A as a according to the Chinese remainder theorem formulaiSetting the element in the preset prime number sequence K as MiObtaining a watermark sequence X to be embedded corresponding to the digital watermark sequence a, which can be expressed as: x ═ CRT (a, K).
Therefore, under the condition that the preset prime number sequence K is not known, the digital watermark sequence A is difficult to be obtained by calculating the watermark sequence X to be embedded, and the safety of watermark information is ensured.
It should be noted that there may be other methods for obtaining the digital watermark sequence to be embedded according to the digital watermark sequence and the preset prime number sequence, for example, a key encryption algorithm is adopted to encrypt the elements in the digital watermark sequence in a one-to-one correspondence with the elements in the preset prime number sequence to obtain the digital watermark sequence to be embedded, and the like, which is not limited herein in the embodiment of the present invention.
And step 120, dividing the digital watermark sequence to be embedded by adopting a secret code storage algorithm to obtain a preset number of sub-digital watermarks to be embedded.
The adopted secret code memory algorithm can be a Lagrangian difference polynomial Shamir (t, n) secret key memory algorithm.
And (3) segmenting the digital watermark sequence to be embedded by adopting a key storage algorithm of a Lagrange's difference polynomial to obtain a preset number of sub-digital watermarks to be embedded.
And setting a serial number for each sub-digital watermark to be embedded, and forming an array Y1 to be embedded according to the sequence of the serial numbers.
For example, when the preset number is 3, the digital watermark sequence to be embedded may be {1, 2, 3}, and after the division is performed by using the cryptographic storage algorithm, the array Y formed by the sub-digital watermarks to be embedded may be represented as: [12,13,23], wherein the serial number of the sub-digital watermark 12 to be embedded is 1, the serial number of the sub-digital watermark 13 to be embedded is 2, and the serial number of the sub-digital watermark 23 to be embedded is 3.
And step 130, grouping the data to be processed according to the data identification of the data to be processed by adopting a preset grouping algorithm to obtain a preset number of data groups to be processed.
The preset grouping algorithm may be a Hash algorithm, and the data identifier may be a row key rowkey of data in the Hbase database. Hbase is retrieved according to rowkey, and a region where a certain rowkey (or a certain rowkey range) is located is found, and then a request for querying data is routed to the region to obtain corresponding data.
Specifically, a preset key is obtained. And storing, where the key may be input by a user or preset, and the embodiment of the present invention is not limited again.
Performing hash operation on the row key of the data to be processed in the Hbase database by using a preset hash algorithm through a preset key to obtain a hash value corresponding to the row key; and then, grouping the data to be processed according to the hash value to obtain a preset number of data groups to be processed. Wherein each to-be-processed data group may include at least one to-be-processed data.
For example, taking the preset number as 10 as an example, the preset key performs hash operation on 100 row keys, so as to obtain a hash value corresponding to each row key; then, according to the bit value of the hash value, the bit values of the row key with the same bit value are divided into a group, so as to obtain 10 groups of data to be processed with bit values of 0-9.
It should be noted that, the data identifier processed by using the preset key, such as the row key, is stored in the corresponding relationship with the key, and the preset number of the to-be-processed data group corresponding to the key is stored.
Step 140, embedding a sub-digital watermark to be embedded into at least one data to be processed of a group of data groups to be processed by using a preset embedding rule to obtain data embedded with the digital watermark.
And embedding the preset number of sub-digital watermarks to be embedded into the preset number of data groups to be processed in a one-to-one correspondence manner by adopting a preset embedding rule, namely embedding the ith sub-digital watermark to be embedded into at least one data to be processed of the ith data group to be processed, wherein i is a positive integer greater than zero.
Specifically, the numerical value of the least significant value bit of each piece of data to be processed in the ith data group to be processed may be replaced with the ith sub-digital watermark to be embedded, so as to obtain data embedded with the digital watermark;
alternatively, the bits to be embedded may be added after the least significant bit of each piece of data to be processed in the ith data group to be processed, where the bits to be embedded may include at least one numerical bit. And adding the ith to-be-embedded sub-digital watermark into to-be-embedded bits of the to-be-processed data to obtain the data embedded with the digital watermark.
That is, the sub-digital watermark to be embedded is taken as the least significant value of the corresponding data to be processed.
It should be noted that, after the data embedded with the digital watermark is obtained, the data embedded with the digital watermark is not only required to be stored according to the row key of the original data to be processed, but also required to be stored according to the corresponding relationship between each group identifier and the serial number of the corresponding sub-digital watermark, for example, the data group 1 to be processed corresponds to the serial number 2, the data group 2 to be processed corresponds to the serial number 3, and the data group 3 to be processed corresponds to the serial number 1.
Furthermore, after the data embedded with the digital watermark is provided to the outside, if the data embedded with the digital watermark is to be traced, the time when the data embedded with the digital watermark is sent to which user is determined, and the data embedded with the digital watermark after being circulated can be traced.
Fig. 2 is a schematic flowchart of a watermark extraction method according to an embodiment of the present invention. As shown in fig. 2, the method may include:
and step 210, grouping the data embedded with the digital watermark by adopting a preset grouping algorithm according to the acquired data identification of the data embedded with the digital watermark to obtain a preset number of data groups embedded with the digital watermark.
The data identifier may be a row key of the data embedded with the digital watermark, and the preset number of the to-be-processed data group corresponding to the stored key is obtained by searching for the key corresponding to the row key of the data embedded with the digital watermark from the preset key corresponding to the stored row key.
Performing hash operation on the row key of the acquired data embedded with the digital watermark by using a preset hash algorithm to obtain a hash value corresponding to the row key; and then, grouping the data embedded with the digital watermarks according to the hash value to obtain a preset number of data groups embedded with the digital watermarks and corresponding group identifications. Wherein each data set may include at least one digital watermark embedded data.
The specific grouping process is the same as step 130, and the embodiment of the present invention is not described herein again.
Since the key and the row key preset in step 130 are the same as the key and the row key preset in this step, the group identifier obtained in step 130 is the same as the group identifier obtained in this step.
And step 220, extracting the sub-digital watermarks from each digital watermark embedding data group of the preset number of digital watermark embedding data groups by adopting a preset extraction rule.
When the watermarks are embedded, only one sub-digital watermark is embedded in one to-be-processed data group, namely, the same sub-digital watermark is embedded in each to-be-processed data in the to-be-processed data group, so that one sub-digital watermark can be extracted from each data group embedded with the digital watermark. And the preset extraction rule and the preset embedding rule are inverse rules.
Specifically, the extracting of the sub-digital watermark from each digital watermark embedded data of each digital watermark embedded data group includes:
extracting a least significant value from each of the digital watermark embedded data of each of the digital watermark embedded data groups;
and if the ratio of the number of the same minimum effective values extracted from the data group embedded with the digital watermark to the total number of the data embedded with the digital watermark in the data group is greater than a preset proportion threshold value, determining the same minimum effective values as the sub-digital watermarks of the data group embedded with the digital watermark.
Thereby, a preset number of sub-digital watermarks are obtained.
And step 230, reconstructing the extracted sub-digital watermarks with the preset number by adopting a preset reconstruction algorithm to obtain a digital watermark sequence to be embedded.
The preset reconstruction algorithm comprises a Lagrange threshold algorithm and a Lagrange interpolation polynomial algorithm.
According to the corresponding relation between the stored group identification and the serial number of the corresponding sub-digital watermark, the serial number sequence of the digital watermark, that is, the combination sequence of the preset number of sub-digital watermarks can be obtained, and thus the digital watermark array Y2 formed by the preset number of sub-digital watermarks can be obtained.
And then, taking any t sub-digital watermarks by adopting a preset reconstruction algorithm, such as a Lagrangian Shamir (t, n) threshold algorithm, and obtaining a reconstructed digital watermark sequence by adopting a Lagrangian interpolation polynomial algorithm.
And step 240, acquiring the digital watermark sequence and watermark information corresponding to the digital watermark sequence according to the reconstructed digital watermark sequence and the stored preset prime number sequence.
And (4) operating the reconstructed digital watermark sequence and the stored preset prime number sequence by adopting the Chinese remainder theorem to obtain the digital watermark sequence and the watermark information corresponding to the digital watermark sequence.
Setting the elements in the preset prime number sequence K as M by adopting the Chinese remainder theoremiAnd setting the element in the reconstructed digital watermark sequence as x to obtain the digital watermark sequence.
And according to the ASCLL code correspondence rule, converting the digital watermark sequence into a corresponding character string, wherein the character string is the finally extracted watermark information, and matching the extracted watermark information with the stored original watermark information to realize data tracing.
The watermark embedding method of the data provided by the embodiment of the invention obtains a digital watermark sequence to be embedded according to a digital watermark sequence corresponding to preset watermark information and a preset prime number sequence; the element number of the preset prime number sequence is the same as the element number of the digital watermark sequence; dividing the digital watermark sequence to be embedded by adopting a secret code storage algorithm to obtain a preset number of sub-digital watermarks to be embedded; grouping the data to be processed by adopting a preset grouping algorithm according to the data identification of the data to be processed, and acquiring a preset number of data groups to be processed and corresponding group identifications; and then embedding a sub-digital watermark to be embedded into at least one piece of data to be processed of the group of data to be processed by adopting a preset embedding rule to obtain the data embedded with the digital watermark. In the watermark tracing process, extracting watermark information from the data embedded with the digital watermark according to the reverse process of watermark embedding, and comparing the consistency of the extracted watermark information and the original watermark information to realize the tracing of the data. The method solves the problem that Hbase data cannot be traced in the prior art, reduces the tracing complexity and improves the tracing accuracy.
Corresponding to the foregoing method, an embodiment of the present invention further provides a data watermark embedding apparatus, as shown in fig. 3, where the data watermark embedding apparatus includes: an acquisition unit 310, a segmentation unit 320, a grouping unit 330, and an embedding unit 340;
an obtaining unit 310, configured to obtain a digital watermark sequence to be embedded according to a digital watermark sequence corresponding to preset watermark information and a preset prime number sequence; the number of elements of the preset prime number sequence is the same as that of the elements of the digital watermark sequence;
a dividing unit 320, configured to divide the digital watermark sequence to be embedded by using a secret code storage algorithm, so as to obtain a preset number of sub-digital watermarks to be embedded;
the grouping unit 330 is configured to group the to-be-processed data according to the data identifier of the to-be-processed data by using a preset grouping algorithm, and obtain the preset number of to-be-processed data groups and the corresponding group identifiers;
the embedding unit 340 is configured to embed, by using a preset embedding rule, a to-be-embedded sub-digital watermark into at least one to-be-processed data of a to-be-processed group data set, so as to obtain data embedded with a digital watermark.
In an alternative implementation, the apparatus further comprises a conversion unit 350;
an obtaining unit 310, configured to obtain preset watermark information, where the watermark information includes a character string composed of at least one character type of letters, numbers, and symbols;
and a converting unit 350, configured to perform decimal conversion on each character in the watermark information by using a preset decimal conversion algorithm if the watermark information has a letter or a symbol, so as to obtain a digital watermark sequence.
In an alternative implementation, the data identifier is a row key of the data to be embedded with the digital watermark;
the grouping unit 330 is specifically configured to perform hash operation on a row key of data to be processed in an Hbase database by using a preset hash algorithm with a preset key, so as to obtain a hash value corresponding to the row key;
and grouping the data to be processed according to the hash value to obtain the data groups to be processed with the preset number and the corresponding group identifications.
In an optional implementation, the embedding unit 340 is specifically configured to replace a numerical value of a least significant bit of each to-be-processed data in the to-be-processed data group with the to-be-embedded sub-digital watermark;
or, adding a bit to be embedded after the least significant value bit of each data to be processed in the data group to be processed; and adding the sub-digital watermark to be embedded into the position to be embedded of the data to be processed.
In an alternative implementation, the apparatus further comprises a storage unit 360;
a storage unit 360, configured to store a corresponding relationship between the data identifier and a preset secret key, and a preset number of to-be-processed data sets corresponding to the preset secret key;
and storing the corresponding relation between the group identification and the serial number of the corresponding sub-digital watermark to be embedded.
The functions of the functional units of the data watermark embedding apparatus provided in the above embodiments of the present invention may be implemented by the above method steps, and therefore, detailed working processes and beneficial effects of the units of the data watermark embedding apparatus provided in the embodiments of the present invention are not described herein again.
Corresponding to the foregoing method, an embodiment of the present invention further provides a data watermark tracing apparatus, as shown in fig. 4, where the data watermark tracing apparatus includes: a grouping unit 410, an extracting unit 420, a reconstructing unit 430, and an obtaining unit 440;
a grouping unit 410, configured to group, by using a preset grouping algorithm, the data embedded with the digital watermark according to the obtained data identifier of the data embedded with the digital watermark, so as to obtain a preset number of data groups embedded with the digital watermark and corresponding group identifiers, where the preset number is a preset number of to-be-processed data groups corresponding to the data identifiers stored during watermark embedding;
an extracting unit 420, configured to extract a sub-digital watermark from each data group, in which the digital watermarks are embedded, of the data groups in which the digital watermarks are embedded in the preset number of data groups, using a preset extraction rule, where the preset extraction rule and the preset embedding rule are inverse rules to each other;
a reconstructing unit 430, configured to reconstruct the extracted sub-digital watermarks in a preset number by using a preset reconstruction algorithm, so as to obtain a reconstructed digital watermark sequence;
an obtaining unit 440, configured to obtain a digital watermark sequence and watermark information corresponding to the digital watermark sequence according to the reconstructed digital watermark sequence and a stored preset prime number sequence, where the number of elements of the preset prime number sequence is the same as the number of elements of the digital watermark sequence.
In an alternative implementation, the extracting unit 420 is specifically configured to extract a least significant value from each of the digital watermark embedded data of each of the digital watermark embedded data groups;
and if the ratio of the number of the same minimum effective values extracted from the data group embedded with the digital watermark to the total number of the data embedded with the digital watermark in the data group embedded with the digital watermark is greater than a preset proportion threshold value, determining the same minimum effective values as the sub-digital watermarks of the data group embedded with the digital watermark.
In an alternative implementation, the data is identified as a row key of the data embedded with the digital watermark;
the grouping unit 410 is specifically configured to obtain a key corresponding to the data identifier of the data embedded with the digital watermark in a preset key corresponding to a stored data identifier, and a preset number of to-be-processed data groups corresponding to the stored key;
performing hash operation on the row key of the data embedded with the digital watermark by using a preset hash algorithm to obtain a hash value corresponding to the row key;
and grouping the data embedded with the digital watermarks according to the hash values to obtain the preset number of data groups embedded with the digital watermarks and corresponding group identifications.
In an optional implementation, the preset reconstruction algorithm includes a lagrangian threshold algorithm and a lagrangian interpolation polynomial algorithm;
a reconstructing unit 430, configured to sort the preset number of sub-digital watermarks according to a correspondence between the stored group identifiers and the serial numbers of the corresponding sub-digital watermarks, so as to obtain a digital watermark array;
and reconstructing the digital watermark array by adopting the Lagrange threshold algorithm and the Lagrange interpolation polynomial algorithm to obtain a reconstructed digital watermark sequence.
The functions of each functional unit of the data watermark tracing apparatus provided in the above embodiments of the present invention may be implemented by the above method steps, and therefore, detailed working processes and beneficial effects of each unit in the data watermark tracing apparatus provided in the embodiments of the present invention are not described herein again.
An embodiment of the present invention further provides an electronic device, as shown in fig. 5, including a processor 510, a communication interface 520, a memory 530 and a communication bus 540, where the processor 510, the communication interface 520, and the memory 530 complete mutual communication through the communication bus 540.
A memory 530 for storing a computer program;
the processor 510, when executing the program stored in the memory 530, implements the following steps:
acquiring a digital watermark sequence to be embedded by adopting a digital watermark sequence and a preset prime number sequence corresponding to preset watermark information; the number of elements of the preset prime number sequence is the same as that of the elements of the digital watermark sequence;
dividing the digital watermark sequence to be embedded by adopting a secret code storage algorithm to obtain a preset number of sub-digital watermarks to be embedded;
grouping the data to be processed by adopting a preset grouping algorithm according to the data identification of the data to be processed to obtain the data groups to be processed with the preset number and the corresponding group identification;
and embedding a sub-digital watermark to be embedded into at least one piece of data to be processed of the group of data to be processed by adopting a preset embedding rule to obtain the data embedded with the digital watermark.
In an optional implementation, before the digital watermark sequence to be embedded is acquired according to the digital watermark sequence and the preset prime number sequence corresponding to the preset watermark information, the method further includes:
acquiring preset watermark information, wherein the watermark information comprises a character string consisting of at least one character type of letters, numbers and symbols;
if the watermark information has letters or symbols, performing decimal conversion on each character in the watermark information by adopting a preset decimal conversion algorithm to obtain a digital watermark sequence.
In an alternative implementation, the data identifier is a row key of the data to be embedded with the digital watermark;
grouping the data to be processed by adopting a preset grouping algorithm according to the data identification of the data to be processed to obtain the data groups to be processed with the preset number, wherein the method comprises the following steps:
performing hash operation on a row key of data to be processed in an Hbase database by using a preset hash algorithm through a preset secret key to obtain a hash value corresponding to the row key;
and grouping the data to be processed according to the hash value to obtain the data groups to be processed with the preset number and the corresponding group identifications.
In an alternative implementation, embedding a to-be-embedded sub-digital watermark into at least one to-be-processed data of a group of to-be-processed data sets by using a preset embedding rule, includes:
replacing the numerical value of the least significant value bit of each data to be processed in the data group to be processed with the sub-digital watermark to be embedded;
or, adding a bit to be embedded after the least significant value bit of each data to be processed in the data group to be processed;
and adding the sub-digital watermark to be embedded into the position to be embedded of the data to be processed.
In an optional implementation, the method further comprises:
storing the corresponding relation between the data identification and a preset secret key and the preset number of the data groups to be processed corresponding to the preset secret key;
and storing the corresponding relation between the group identification and the serial number of the corresponding sub-digital watermark to be embedded.
Alternatively, the following steps are performed:
grouping the data embedded with the digital watermark by adopting a preset grouping algorithm according to the acquired data identification of the data embedded with the digital watermark to obtain a preset number of data groups embedded with the digital watermark and corresponding group identifications, wherein the preset number is the preset number of the data groups to be processed corresponding to the data identification stored during watermark embedding;
extracting the sub-digital watermarks from each digital watermark embedding data group of the preset number of digital watermark embedding data groups by adopting a preset extraction rule, wherein the preset extraction rule and the preset embedding rule are inverse rules;
reconstructing the extracted sub-digital watermarks with preset number by adopting a preset reconstruction algorithm to obtain a reconstructed digital watermark sequence;
and acquiring a digital watermark sequence and watermark information corresponding to the digital watermark sequence according to the reconstructed digital watermark sequence and a stored preset prime number sequence, wherein the element number of the preset prime number sequence is the same as that of the digital watermark sequence.
In an alternative implementation, extracting the sub-digital watermark from each of the digital watermark embedded data of each of the digital watermark embedded data groups includes:
extracting a least significant value from each of the digital watermark embedded data of each of the digital watermark embedded data groups;
and if the ratio of the number of the same minimum effective values extracted from the data group embedded with the digital watermark to the total number of the data embedded with the digital watermark in the data group embedded with the digital watermark is greater than a preset proportion threshold value, determining the same minimum effective values as the sub-digital watermarks of the data group embedded with the digital watermark.
In an alternative implementation, the data is identified as a row key of the data embedded with the digital watermark;
grouping the data embedded with the digital watermark by adopting a preset grouping algorithm according to the acquired data identification of the data embedded with the digital watermark, and acquiring the preset number of data groups embedded with the digital watermark, wherein the method comprises the following steps:
acquiring a key corresponding to the data identifier of the data embedded with the digital watermark in a preset key corresponding to the stored data identifier and a preset number of to-be-processed data groups corresponding to the stored key;
performing hash operation on the row key of the data embedded with the digital watermark by using a preset hash algorithm to obtain a hash value corresponding to the row key;
and grouping the data embedded with the digital watermarks according to the hash values to obtain the preset number of data groups embedded with the digital watermarks and corresponding group identifications.
In an optional implementation, the preset reconstruction algorithm includes a lagrangian threshold algorithm and a lagrangian interpolation polynomial algorithm;
reconstructing the extracted sub-digital watermarks with preset number by adopting a preset reconstruction algorithm to obtain a reconstructed digital watermark sequence, wherein the reconstruction algorithm comprises the following steps:
sequencing the preset number of sub-digital watermarks according to the corresponding relation between the stored group identification and the serial numbers of the corresponding sub-digital watermarks to obtain a digital watermark array;
and reconstructing the digital watermark array by adopting the Lagrange threshold algorithm and the Lagrange interpolation polynomial algorithm to obtain a reconstructed digital watermark sequence.
The aforementioned communication bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
Since the implementation manner and the beneficial effects of the problem solving of each component of the electronic device in the foregoing embodiment can be implemented by referring to each step in the embodiment shown in fig. 1 and fig. 2, the specific working process and the beneficial effects of the electronic device provided in the embodiment of the present invention are not repeated herein.
In yet another embodiment, a computer-readable storage medium is provided, having stored thereon instructions, which, when executed on a computer, cause the computer to perform the method of any of the above embodiments.
In a further embodiment provided by the present invention, there is also provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of any of the above embodiments.
As will be appreciated by one of skill in the art, the embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all changes and modifications that fall within the true scope of the embodiments of the present application.
It is apparent that those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, if such modifications and variations of the embodiments of the present application fall within the scope of the claims of the embodiments of the present application and their equivalents, the embodiments of the present application are also intended to include such modifications and variations.

Claims (13)

1. A method of watermark embedding data, the method comprising:
acquiring a digital watermark sequence to be embedded according to a digital watermark sequence corresponding to preset watermark information and a preset prime number sequence; the number of elements of the preset prime number sequence is the same as that of the elements of the digital watermark sequence;
dividing the digital watermark sequence to be embedded by adopting a secret code storage algorithm to obtain a preset number of sub-digital watermarks to be embedded;
grouping the data to be processed by adopting a preset grouping algorithm according to the data identification of the data to be processed to obtain the data groups to be processed with the preset number and the corresponding group identification;
and embedding a sub-digital watermark to be embedded into at least one piece of data to be processed of the group of data to be processed by adopting a preset embedding rule to obtain the data embedded with the digital watermark.
2. The method according to claim 1, wherein before performing an operation according to a digital watermark sequence corresponding to the preset watermark information and a preset prime number sequence to obtain a digital watermark sequence to be embedded, the method further comprises:
acquiring preset watermark information, wherein the watermark information comprises a character string consisting of at least one character type of letters, numbers and symbols;
if the watermark information has letters or symbols, performing decimal conversion on each character in the watermark information by adopting a preset decimal conversion algorithm to obtain a digital watermark sequence.
3. The method of claim 1, wherein the data identification is a row key of data to be embedded with a digital watermark;
grouping the data to be processed by adopting a preset grouping algorithm according to the data identification of the data to be processed to obtain the data groups to be processed with the preset number, wherein the method comprises the following steps:
performing hash operation on a row key of data to be processed in an Hbase database by using a preset hash algorithm through a preset secret key to obtain a hash value corresponding to the row key;
and grouping the data to be processed according to the hash value to obtain the data groups to be processed with the preset number and the corresponding group identifications.
4. The method of claim 1, wherein embedding a sub-digital watermark to be embedded in at least one of the set of data to be processed using a predetermined embedding rule comprises:
replacing the numerical value of the least significant value bit of each data to be processed in the data group to be processed with the sub-digital watermark to be embedded;
or, adding a bit to be embedded after the least significant value bit of each data to be processed in the data group to be processed;
and adding the sub-digital watermark to be embedded into the position to be embedded of the data to be processed.
5. The method of claim 3, wherein the method further comprises:
storing the corresponding relation between the data identification and a preset secret key and the preset number of the data groups to be processed corresponding to the preset secret key;
and storing the corresponding relation between the group identification and the serial number of the corresponding sub-digital watermark to be embedded.
6. A method for tracing a watermark of data, the method comprising:
grouping the data embedded with the digital watermark by adopting a preset grouping algorithm according to the acquired data identification of the data embedded with the digital watermark to obtain a preset number of data groups embedded with the digital watermark and corresponding group identifications, wherein the preset number is the preset number of the data groups to be processed corresponding to the data identification stored during watermark embedding;
extracting the sub-digital watermarks from each digital watermark embedding data group of the preset number of digital watermark embedding data groups by adopting a preset extraction rule, wherein the preset extraction rule and the preset embedding rule are inverse rules;
reconstructing the extracted sub-digital watermarks with preset number by adopting a preset reconstruction algorithm to obtain a reconstructed digital watermark sequence;
and acquiring a digital watermark sequence and watermark information corresponding to the digital watermark sequence according to the reconstructed digital watermark sequence and a stored preset prime number sequence, wherein the element number of the preset prime number sequence is the same as that of the digital watermark sequence.
7. The method of claim 6, wherein extracting the sub-digital watermark from each of the digital watermark embedded data of each of the digital watermark embedded data sets comprises:
extracting a least significant value from each of the digital watermark embedded data of each of the digital watermark embedded data groups;
and if the ratio of the number of the same minimum effective values extracted from the data group embedded with the digital watermark to the total number of the data embedded with the digital watermark in the data group embedded with the digital watermark is greater than a preset proportion threshold value, determining the same minimum effective values as the sub-digital watermarks of the data group embedded with the digital watermark.
8. The method of claim 6, wherein the data identification is a row key of the digital watermark embedded data;
grouping the data embedded with the digital watermark by adopting a preset grouping algorithm according to the acquired data identification of the data embedded with the digital watermark, and acquiring the preset number of data groups embedded with the digital watermark, wherein the method comprises the following steps:
acquiring a key corresponding to the data identifier of the data embedded with the digital watermark in a preset key corresponding to the stored data identifier and a preset number of to-be-processed data groups corresponding to the stored key;
performing hash operation on the row key of the data embedded with the digital watermark by using a preset hash algorithm to obtain a hash value corresponding to the row key;
and grouping the data embedded with the digital watermarks according to the hash values to obtain the preset number of data groups embedded with the digital watermarks and corresponding group identifications.
9. The method of claim 6, wherein the pre-set reconstruction algorithm comprises a Lagrangian threshold algorithm and a Lagrangian interpolation polynomial algorithm;
reconstructing the extracted sub-digital watermarks with preset number by adopting a preset reconstruction algorithm to obtain a reconstructed digital watermark sequence, wherein the reconstruction algorithm comprises the following steps:
sequencing the preset number of sub-digital watermarks according to the corresponding relation between the stored group identification and the serial numbers of the corresponding sub-digital watermarks to obtain a digital watermark array;
and reconstructing the digital watermark array by adopting the Lagrange threshold algorithm and the Lagrange interpolation polynomial algorithm to obtain a reconstructed digital watermark sequence.
10. An apparatus for embedding a watermark in data, the apparatus comprising: the device comprises an acquisition unit, a segmentation unit, a grouping unit and an embedding unit;
the acquiring unit is used for acquiring a digital watermark sequence to be embedded according to a digital watermark sequence corresponding to preset watermark information and a preset prime number sequence; the number of elements of the preset prime number sequence is the same as that of the elements of the digital watermark sequence;
the dividing unit is used for dividing the digital watermark sequence to be embedded by adopting a secret code storage algorithm to obtain a preset number of sub-digital watermarks to be embedded;
the grouping unit is used for grouping the data to be processed according to the data identification of the data to be processed by adopting a preset grouping algorithm to obtain the data groups to be processed with the preset number and the corresponding group identification;
the embedding unit is used for embedding a sub-digital watermark to be embedded into at least one data to be processed of a data group to be processed by adopting a preset embedding rule to obtain the data embedded with the digital watermark.
11. An apparatus for watermark tracing of data, the apparatus comprising: the device comprises a grouping unit, an extracting unit, a reconstructing unit and an acquiring unit;
the grouping unit is used for grouping the data embedded with the digital watermark by adopting a preset grouping algorithm according to the acquired data identification of the data embedded with the digital watermark to obtain a preset number of data groups embedded with the digital watermark and corresponding group identifications, wherein the preset number is the preset number of the data groups to be processed corresponding to the data identification stored during watermark embedding;
the extracting unit is configured to extract the sub-digital watermark from each data group, in which the digital watermarks are embedded, of the data groups in which the digital watermarks are embedded in the preset number by using a preset extracting rule, where the preset extracting rule and the preset embedding rule are inverse rules to each other;
the reconstruction unit is used for reconstructing the extracted sub-digital watermarks with preset number by adopting a preset reconstruction algorithm to obtain a reconstructed digital watermark sequence;
the acquiring unit is configured to acquire a digital watermark sequence and watermark information corresponding to the digital watermark sequence according to the reconstructed digital watermark sequence and a stored preset prime number sequence, where the number of elements of the preset prime number sequence is the same as the number of elements of the digital watermark sequence.
12. An electronic device, characterized in that the electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for carrying out the method steps of any one of claims 1 to 5 or the method steps of any one of claims 6 to 9 when executing a program stored on a memory.
13. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any of the claims 1-5 or carries out the method steps of any of the claims 6-9.
CN201911259549.1A 2019-12-10 2019-12-10 Data watermark embedding method, watermark tracing method and device Pending CN112948895A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911259549.1A CN112948895A (en) 2019-12-10 2019-12-10 Data watermark embedding method, watermark tracing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911259549.1A CN112948895A (en) 2019-12-10 2019-12-10 Data watermark embedding method, watermark tracing method and device

Publications (1)

Publication Number Publication Date
CN112948895A true CN112948895A (en) 2021-06-11

Family

ID=76225608

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911259549.1A Pending CN112948895A (en) 2019-12-10 2019-12-10 Data watermark embedding method, watermark tracing method and device

Country Status (1)

Country Link
CN (1) CN112948895A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113688601A (en) * 2021-10-26 2021-11-23 北京凯睿数加科技有限公司 Watermark generation method and device based on form, electronic equipment and computer medium
CN114021085A (en) * 2021-11-03 2022-02-08 广州智算信息技术有限公司 Big data security digital watermarking system based on artificial intelligence
WO2024001585A1 (en) * 2022-06-30 2024-01-04 中兴通讯股份有限公司 Watermark embedding method, watermark extraction method, electronic device, and storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000156781A (en) * 1998-11-20 2000-06-06 Canon Inc Digital watermark imbedding device, illegality detector and computer-readable storage medium
US20030128863A1 (en) * 2002-01-10 2003-07-10 Canon Kabushiki Kaisha Information processing device and method for processing picture data and digital watermark information
CN1547138A (en) * 2003-12-12 2004-11-17 中国人民解放军总参谋部第六十一研究 Method for inserting digital watermarking to relation database and extracting it from the same
US20050180594A1 (en) * 2004-02-17 2005-08-18 Taichi Isogai Embedding and detecting digital watermark in image
US20060095775A1 (en) * 2004-10-18 2006-05-04 Sushil Jajodia Fragile watermarks
CN1924925A (en) * 2006-09-28 2007-03-07 北京理工大学 Document data waterprint embedded method
CN102184243A (en) * 2011-05-17 2011-09-14 沈阳化工大学 Text-type attribute-based relational database watermark embedding method
CN108665403A (en) * 2017-03-29 2018-10-16 腾讯科技(深圳)有限公司 Data waterprint embedded method, extracting method, device and digital watermarking system
CN109657426A (en) * 2019-01-30 2019-04-19 贵州大学 A kind of data source tracing method based on digital signature and digital watermarking
CN110322386A (en) * 2018-03-30 2019-10-11 中移(苏州)软件技术有限公司 A kind of insertion of digital text watermarking and detection method and device
CN110457873A (en) * 2018-05-08 2019-11-15 中移(苏州)软件技术有限公司 A kind of watermark embedding and detection method and device
CN110533572A (en) * 2019-08-29 2019-12-03 哈尔滨工业大学(深圳) A kind of watermark embedding method, system and relevant apparatus

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000156781A (en) * 1998-11-20 2000-06-06 Canon Inc Digital watermark imbedding device, illegality detector and computer-readable storage medium
US20030128863A1 (en) * 2002-01-10 2003-07-10 Canon Kabushiki Kaisha Information processing device and method for processing picture data and digital watermark information
CN1547138A (en) * 2003-12-12 2004-11-17 中国人民解放军总参谋部第六十一研究 Method for inserting digital watermarking to relation database and extracting it from the same
US20050180594A1 (en) * 2004-02-17 2005-08-18 Taichi Isogai Embedding and detecting digital watermark in image
US20060095775A1 (en) * 2004-10-18 2006-05-04 Sushil Jajodia Fragile watermarks
CN1924925A (en) * 2006-09-28 2007-03-07 北京理工大学 Document data waterprint embedded method
CN102184243A (en) * 2011-05-17 2011-09-14 沈阳化工大学 Text-type attribute-based relational database watermark embedding method
CN108665403A (en) * 2017-03-29 2018-10-16 腾讯科技(深圳)有限公司 Data waterprint embedded method, extracting method, device and digital watermarking system
CN110322386A (en) * 2018-03-30 2019-10-11 中移(苏州)软件技术有限公司 A kind of insertion of digital text watermarking and detection method and device
CN110457873A (en) * 2018-05-08 2019-11-15 中移(苏州)软件技术有限公司 A kind of watermark embedding and detection method and device
CN109657426A (en) * 2019-01-30 2019-04-19 贵州大学 A kind of data source tracing method based on digital signature and digital watermarking
CN110533572A (en) * 2019-08-29 2019-12-03 哈尔滨工业大学(深圳) A kind of watermark embedding method, system and relevant apparatus

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
刘, 罗守山, 吴秋新, 钮心忻, 杨义先: "基于中国剩余定理的数字水印分存技术", 北京邮电大学学报, no. 01, pages 17 - 21 *
周旭, 毕笃彦: "基于中国剩余定理的GIS数字水印算法", 中国图象图形学报, no. 05 *
王具龙;陈继红;: "基于(t, n)门限的数据库水印算法研究", 计算机科学, no. 05 *
王振;李建民;周南润;林振荣;: "基于分存分组的关系数据库数字水印算法", 通信技术, no. 04, pages 132 - 138 *
胡斌;施荣华;彭沛夫;: "基于密钥分存的关系数据库数字水印技术", 计算机应用研究, no. 08 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113688601A (en) * 2021-10-26 2021-11-23 北京凯睿数加科技有限公司 Watermark generation method and device based on form, electronic equipment and computer medium
CN114021085A (en) * 2021-11-03 2022-02-08 广州智算信息技术有限公司 Big data security digital watermarking system based on artificial intelligence
WO2024001585A1 (en) * 2022-06-30 2024-01-04 中兴通讯股份有限公司 Watermark embedding method, watermark extraction method, electronic device, and storage medium

Similar Documents

Publication Publication Date Title
Jain et al. A robust image encryption algorithm resistant to attacks using DNA and chaotic logistic maps
Huang et al. An image encryption algorithm based on hyper-chaos and DNA sequence
CN112948895A (en) Data watermark embedding method, watermark tracing method and device
CN105701755B (en) It is a kind of based on the image encryption method for dividing shape and DNA sequence dna to operate
DE102018125530A1 (en) Procedures and arrangements for implicit integrity
CN107819569A (en) The encryption method and terminal device of log-on message
CN110770725B (en) Data processing method and device
CN112487253B (en) User invitation code generation method, verification method, device, equipment and storage medium
CN107534549B (en) Readable storage medium, method and system for encrypting data stream block
CN111538969A (en) Document encryption method, document decryption device, electronic equipment and medium
CN114356919A (en) Watermark embedding method, tracing method and device for structured database
CN101442671B (en) Method and apparatus for embedding and extracting digital information
Gaur et al. A new PDAC (parallel encryption with digit arithmetic of cover text) based text steganography approach for cloud data security
Yang et al. Secret image sharing without keeping permutation key
CN114398375A (en) Watermark embedding method, device, equipment and storage medium
CN112288617B (en) Information hiding and recovering method, equipment and medium based on mosaic jigsaw
Ahmad et al. Fingerprinting non-numeric datasets using row association and pattern generation
CN113505348A (en) Data watermark embedding method, data watermark verifying method and data watermark verifying device
CN106357662A (en) MAC (media access control) address-based data encryption method
CN113272782A (en) Distributed random generation via multi-party computation
CN115085906B (en) Method for storing engineering cost data
CN116319084B (en) Random grouping method and device, computer program product and electronic equipment
CN114254339B (en) Leakage tracking method and device for electronic file, chip and terminal
Liu et al. A robust error control coding-based watermarking algorithm for FPGA IP protection
CN115134142B (en) Information hiding method and system based on file segmentation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination