CN110232263B - Method for tracing relational data - Google Patents
Method for tracing relational data Download PDFInfo
- Publication number
- CN110232263B CN110232263B CN201910438337.3A CN201910438337A CN110232263B CN 110232263 B CN110232263 B CN 110232263B CN 201910438337 A CN201910438337 A CN 201910438337A CN 110232263 B CN110232263 B CN 110232263B
- Authority
- CN
- China
- Prior art keywords
- value
- data
- watermark
- bit
- embedded
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 23
- 230000002159 abnormal effect Effects 0.000 claims 1
- 238000012986 modification Methods 0.000 description 4
- 230000004048 modification Effects 0.000 description 4
- 238000006467 substitution reaction Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/28—Databases characterised by their database models, e.g. relational or object models
- G06F16/284—Relational databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/10—Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
- G06F21/16—Program or content traceability, e.g. by watermarking
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Technology Law (AREA)
- Multimedia (AREA)
- Data Mining & Analysis (AREA)
- Editing Of Facsimile Originals (AREA)
- Image Processing (AREA)
Abstract
The invention discloses a method for tracing relational data, which comprises the following steps: firstly, different watermark information is respectively formed according to the shared person and is embedded into the relational data; then, respectively sharing the relation type data embedded with the watermark to corresponding shared persons; and finally, when data leakage occurs, extracting watermark information from the leaked data, and further confirming a leakage source. Before the relational data are shared by others, different watermark information is respectively formed according to the shared persons and is embedded into the relational data, and the source of data leakage can be effectively traced by tracing the relational data.
Description
Technical Field
The invention belongs to the field of data tracing, and particularly relates to a method for tracing relational data.
Background
With the widespread use of databases and the gradual rise of data sharing, the problem of data leakage becomes more and more serious. And tracing back the source of the data leakage is also difficult, as the data is often shared among multiple parties. If the method capable of tracing the data leakage source is widely used, a deterrent is formed for a data leakage person, and the problem that the data leakage is more violent is solved.
Disclosure of Invention
The present invention aims to solve the above problems in the prior art, and provide a method for tracing to the source of relational data, which is to embed watermark information into the relational data and extract a watermark from the relational data, so as to trace back to the source of data leakage.
In order to achieve the purpose, the technical scheme adopted by the invention comprises the following steps:
firstly, different watermark information is respectively formed according to the shared person and is embedded into the relational data;
then, respectively sharing the relation type data embedded with the watermark to corresponding shared persons;
and finally, when data leakage occurs, extracting watermark information from the leaked data, and further confirming a leakage source.
The specific steps of embedding the watermark information into the relational data comprise:
s1, encoding the watermark information W to obtain binary representation W thereofb;
S2, traversing the source data, and finding out a value V in which the watermark can be added;
s3, splicing the key and the main key corresponding to the value V and the serial number of the row where the value V is located to the value V capable of being added with the watermark, and judging the W in which the value V needs to be embedded according to the hash _ id of the value after the hashbThe bit of (1);
and S4, repeating the processing of the steps S1-S3 on all the data to obtain the data set embedded with the watermark information.
The method comprises the steps of S1, judging whether the watermark coding length is larger than the maximum watermark bit number maxMarkBit, if so, throwing an exception, otherwise, continuing to execute the method, wherein the value V capable of adding the watermark is numerical DATA or all character string DATA of which the value V modifies the amplitude fuzzyRate is larger than or equal to the value represented by the least significant bit L SB of the value V, judging whether the number of the value V capable of adding the watermark is smaller than the remainder of the maximum watermark bit number maxMarkBit multiplied by the minimum multiple MIN _ DATA _ TIMES, if so, throwing the exception, otherwise, continuing to execute the method, dividing the hash _ id of the value after the hash by the maximum watermark bit number maxMarkBit, judging that the value needs to be embedded with the bit of the coded watermark, when adding the watermark in the step S3, modifying the least significant bit L SB of the value V to enable the value to be consistent with the bit to be embedded with the DATA to be embedded, and when the number of the numerical DATA on the right side is different from the parity of the DATA of the string type DATA, adding the specific bit +1 bit to be embedded, and when the parity of the DATA on the right side is different from the DATA, the parity, the DATA of the DATA with the most special watermark bit number of the special watermark bit.
The method for extracting the watermark from the relational data comprises the following steps:
t1, traversing the source data to find out a value V in which the watermark can be added;
t2, splicing the key and the main key corresponding to the value V and the serial number of the value V to be hashed,the W in which the value V is embedded is judged by the hash value hash _ idbThe bit of (1);
t3 obtaining binary representation W of watermark information by step T2bAll possible values of bit are taken as actual values with more occurrence times to obtain binary representation W of watermark informationb;
T4, encoding WbAnd decoding is carried out to restore the watermark.
In step T2, the embedded bit value is obtained by the least significant bit L SB of the value V for the numeric data, the embedded bit value is obtained by the number of the specific characters at the end of the character string for the character string data, the specific operation steps are as follows, when the rightmost number of the numeric data is odd, the probability that the bit of the corresponding encoded watermark is 1 is increased by 1, when the rightmost number of the numeric data is even, the probability that the bit of the corresponding encoded watermark is 0 is increased by 1, when the number of the specific characters at the end of the character string is 2, the probability that the bit of the corresponding encoded watermark is 1 is increased by 1, when the number of the specific characters at the end of the character string is 1, the probability that the bit of the corresponding encoded watermark is 0 is increased by 1, and when the number of the specific characters at the end of the character string is 0, the watermark is not embedded.
Compared with the prior art, the invention has the following beneficial effects: by embedding watermark information into relational data, when data leakage occurs, watermark information is extracted from the leaked data, thereby confirming the source of the leakage. By utilizing the relational data tracing, the source of data leakage can be traced, and an effective way is provided for tracing the source of data leakage.
Drawings
FIG. 1 is a flow chart of embedding watermark information into relational data;
fig. 2 is a flow chart of extracting a watermark from relational data.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples.
The invention discloses a method for tracing relation data, which is characterized in that different watermark information is respectively formed according to shared persons and is embedded into the relation data before sharing the relation data to other persons. And respectively sharing the relational data embedded with the watermarks to corresponding shared persons. When data leakage occurs, watermark information is extracted from the leaked data, thereby confirming the source of the leakage.
The method for embedding watermark information into relational data is as follows:
step S1) encoding the watermark information W to obtain a binary representation W thereofb. The encoding may be performed in various ways, such as encoding by a two-dimensional code or UTF-8 encoding directly using a character string.
Step S2), judging whether the watermark coding length is larger than the maximum watermark bit number maxMarkBit, if so, throwing out the abnormity, otherwise, continuing to execute.
Step S3) of the source data, find out the value in which the watermark can be added, i.e. the value V x the modification amplitude (fuzzyRate) is greater than or equal to the value represented by the least significant bit L SB of the value V, or the whole string data.
Step S4) determines whether the number of values to which watermarks can be added is less than the maximum number of watermark bits (maxMarkBit) multiplied by the minimum multiple (MIN _ DATA _ TIMES). Throwing an exception if less than; otherwise, the execution is continued.
Step S5), splicing the key (private Key) and the row serial number of the primary key and the value V corresponding to the value V together to perform hash, and dividing the remainder of the hash value hash _ id by the maximum watermark bit number (maxMarkBit) to determine the bit of the encoded watermark to be embedded into the value, wherein the specific implementation steps are as follows: step S5-1) for numerical data, when the parity of the watermark bit to be embedded is different from the number at the rightmost side of the value, the number at the rightmost side of the value is increased by 1. Step S5-2) is to the numerical data, when the watermark bit needing to be embedded is the same as the number parity at the rightmost side of the value, the value is not changed. Step S5-3) adds bit +1 specific characters (txtAdd) to be embedded at the end of the data to the string-type data.
Step S6) all the data are processed as above to obtain a data set embedded with watermark information.
Before using this method, a preset key (privateKey), a maximum watermark bit number (maxMarkBit), a minimum multiple (MIN _ DATA _ TIMES), a modified amplitude (fuzzyRate), a specific character (txtad), and an encoding method are required, and these values are not changeable when extracting a watermark.
The method for extracting the watermark from the relational data comprises the following steps:
step T1) traverses the source data to find the value in which the watermark can be added.
Step T2) the value V which can be added with the watermark, the key (private Key) and the row serial number of the primary key corresponding to the value V and the value V are spliced together to be hashed, and the remainder of the hash _ id of the hashed value divided by the maximum watermark bit number (maxMarkBit) is used for judging the bit of the watermark which is embedded into the value and is coded. The method specifically comprises the following steps: step T2-1) of logarithmic value type data, when the rightmost number of the value is an odd number, the possibility that the corresponding encoded watermark bit is 1 is considered to be increased by 1 step T2-2) of logarithmic value type data, when the rightmost number of the value is an even number, the possibility that the corresponding encoded watermark bit is 0 is considered to be increased by 1 step T2-3) of logarithmic string type data, and when the number of the specific character (txtAdd) at the end of the string is 2, the possibility that the corresponding encoded watermark bit is 1 is considered to be increased by 1; when the number of the specific characters (txtad) at the end of the character string is 1, the possibility that the bit of the corresponding encoded watermark bit is 0 is considered to be increased by 1; when the number of the last specific character (txtad) of the character string is 0, it is considered that the watermark is not embedded.
Step T3) for all the coded watermark bits, according to the probability of 1 and 0, taking the bit actual value with high probability as the bit actual value, thereby forming the binary representation W of the coded watermarkb。
Step T4) encoding the watermark W according to the encoding modebAnd decoding is carried out to restore the watermark.
After the watermark information is extracted, the data set can be judged to be the data shared by the people.
The constraint of this scheme:
1. the data must be able to be slightly modified. A slight degree may be defined, such as a modification amplitude of one in a thousand (fuzzyRate).
2. There must be a large amount of data that can be slightly modified. It is proposed that the amount of data that can be modified is more than 10 times the maximum watermark bit number (maxMarkBit), so that robustness will be good.
3. These data must be critical data and discarding the data can seriously impact the value or integrity of the data.
The invention realizes a method for embedding watermark information into relational data and extracting watermarks from the relational data, traces the source of the relational data according to the method, and can trace the source of data leakage.
The foregoing is only a preferred embodiment of the present invention and is not intended to limit the invention in any way, it will be understood by those skilled in the art that various modifications and substitutions can be made without departing from the spirit and principle of the invention, and these modifications and substitutions will fall within the scope of protection defined by the appended claims.
Claims (4)
1. A method for tracing relational data is characterized by comprising the following steps:
firstly, different watermark information is respectively formed according to the shared person and is embedded into the relational data;
the specific steps of embedding the watermark information into the relational data comprise:
s1, encoding the watermark information W to obtain binary representation W thereofb;
Judging whether the watermark coding length is greater than the maximum watermark bit number maxMarkBit, if so, throwing out the abnormity, otherwise, continuing to execute;
s2, traversing the source data, and finding out a value V in which the watermark can be added;
the value V capable of adding the watermark is numerical DATA or all character string DATA of which the value V modifies the value fuzzyRate which is larger than or equal to the value represented by the least significant bit L SB of the value V, whether the number of the value capable of adding the watermark is smaller than the maximum watermark bit number maxMarkBit multiplied by the minimum multiple MIN _ DATA _ TIMES or not is judged, if so, the abnormal condition is thrown out, otherwise, the execution is continued;
s3, splicing the key and the main key corresponding to the value V and the serial number of the row where the value V is located to the value V capable of being added with the watermark, and judging the W in which the value V needs to be embedded according to the hash _ id of the value after the hashbThe bit of (1);
for the numeric data, the least significant bit L SB of the value V is modified to be consistent with the bit to be embedded when the watermark is added, and for the character string type data, bit +1 specific character txAdd to be embedded is added, and the specific operation is as follows:
for numerical data, when the parity of a watermark bit to be embedded is different from the parity of the rightmost number of the value, increasing the rightmost number of the value by 1; for numerical data, when the watermark bit needing to be embedded is the same as the number parity of the rightmost side of the value, the value is unchanged; for character string data, bit +1 specific characters txtad to be embedded are added at the end of the data;
s4, repeating the processing of the steps S1-S3 on all the data to obtain a data set embedded with watermark information;
then, respectively sharing the relation type data embedded with the watermark to corresponding shared persons;
and finally, when data leakage occurs, extracting watermark information from the leaked data, and further confirming a leakage source.
2. The method of tracing relational data according to claim 1, wherein: and dividing the hash _ id of the value after the hash by the remainder of the maximum watermark bit number maxMarkBit to judge the bit of the encoded watermark which needs to be embedded into the value.
3. The method of tracing relational data according to claim 1, wherein:
the method for extracting the watermark from the relational data comprises the following steps:
t1, traversing the source data to find out a value V in which the watermark can be added;
t2, joining the key and the key corresponding to the value V and the serial number of the value V into a value V which can be added with watermarkLine hash, which determines the W in which the value V has been embedded by the hash value hash _ idbThe bit of (1);
t3 obtaining binary representation W of watermark information by step T2bAll possible values of bit are taken as actual values with more occurrence times to obtain binary representation W of watermark informationb;
T4, encoding WbAnd decoding is carried out to restore the watermark.
4. The method for tracing the source of the relational data according to claim 3, wherein in the step T2, the embedded bit value is obtained through the least significant bit L SB of the value V for the numeric data, the embedded bit value is obtained according to the number of the specific character at the end of the character string for the character string data, the specific operation steps are as follows, when the rightmost number of the numeric data is odd, the probability that the bit of the corresponding encoded watermark is 1 is increased by 1, when the rightmost number of the numeric data is even, the probability that the bit of the corresponding encoded watermark is 0 is increased by 1, when the number of the specific character txtAdd at the end of the character string is 2, the probability that the bit of the corresponding encoded watermark is 1 is increased by 1, when the number of the specific character txtAdd at the end of the character string is 1, the probability that the bit of the corresponding encoded watermark is 0 is increased by 1, and when the number of the specific character txtAdd at the end of the character string is not 0, the watermark is not embedded.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910438337.3A CN110232263B (en) | 2019-05-24 | 2019-05-24 | Method for tracing relational data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910438337.3A CN110232263B (en) | 2019-05-24 | 2019-05-24 | Method for tracing relational data |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110232263A CN110232263A (en) | 2019-09-13 |
CN110232263B true CN110232263B (en) | 2020-07-14 |
Family
ID=67861573
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910438337.3A Active CN110232263B (en) | 2019-05-24 | 2019-05-24 | Method for tracing relational data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110232263B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110688675B (en) * | 2019-09-25 | 2021-07-13 | 卓尔智联(武汉)研究院有限公司 | Data leakage tracing device and method based on privacy protection and readable storage medium |
CN111241576B (en) * | 2020-01-03 | 2022-07-01 | 南京邮电大学 | Zero watermark method for distribution protection of database |
CN112383616A (en) * | 2020-11-12 | 2021-02-19 | 贝壳技术有限公司 | Data sharing method and device, electronic equipment and storage medium |
CN116541808A (en) * | 2023-07-06 | 2023-08-04 | 杭州美创科技股份有限公司 | Data watermark tracing method, device, computer equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106803047A (en) * | 2017-01-13 | 2017-06-06 | 中国电建集团成都勘测设计研究院有限公司 | Database water mark labeling method |
CN104866735B (en) * | 2015-05-22 | 2017-11-17 | 电子科技大学 | A kind of insertion of numeric type relational database watermark and extraction verification method |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107423629B (en) * | 2017-04-12 | 2020-10-27 | 北京溯斐科技有限公司 | Method and system for file information output anti-disclosure and tracing |
CN108985081B (en) * | 2018-07-06 | 2022-02-01 | 泰康保险集团股份有限公司 | Watermark encryption method, device, medium and electronic equipment |
-
2019
- 2019-05-24 CN CN201910438337.3A patent/CN110232263B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104866735B (en) * | 2015-05-22 | 2017-11-17 | 电子科技大学 | A kind of insertion of numeric type relational database watermark and extraction verification method |
CN106803047A (en) * | 2017-01-13 | 2017-06-06 | 中国电建集团成都勘测设计研究院有限公司 | Database water mark labeling method |
Also Published As
Publication number | Publication date |
---|---|
CN110232263A (en) | 2019-09-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110232263B (en) | Method for tracing relational data | |
Sion et al. | Rights protection for relational data | |
CN103049682B (en) | Character pitch encoding-based dual-watermark embedded text watermarking method | |
Shehab et al. | Watermarking relational databases using optimization-based techniques | |
Li et al. | Tamper detection and localization for categorical data using fragile watermarks | |
US8458476B2 (en) | Watermarking computer program code | |
CN111966974B (en) | Safe and reversible relational database copyright protection method | |
CN112016061A (en) | Excel document data protection method based on robust watermarking technology | |
CN101807208A (en) | Method for quickly retrieving video fingerprints | |
CN105303075A (en) | PDF format based adaptive text watermarking method | |
CN110770725A (en) | Data processing method and device | |
CN113626774A (en) | Reversible database watermarking method and system | |
Schaathun | The Boneh-Shaw fingerprinting scheme is better than we thought | |
Kumar et al. | Image steganography using index based chaotic mapping | |
Khanduja et al. | A robust watermarking approach for non numeric relational database | |
Chaabane et al. | The impact of error correcting coding in audio watermarking | |
Lohegaon | A robust, distortion minimization fingerprinting technique for relational database | |
Li et al. | A recoverable chaos‐based fragile watermarking with high PSNR preservation | |
Wang et al. | FBIPT: A new robust reversible database watermarking technique based on position tuples | |
Yu et al. | Group-oriented anti-collusion fingerprint based on bibd code | |
CN113609506A (en) | Text digital watermark tampering monitoring method based on NLP technology | |
Odeh et al. | Watermarking relational database systems | |
Tzouramanis | A robust watermarking scheme for relational databases | |
Saniei et al. | The capacity of arithmetic compression based text steganography method | |
Kadhem | Text steganography method based on modified run length encoding |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |