Text tracing detection method and system

Through the text watermark algorithm based on ASCII code and DNA encoding, the hidden embedding and robust extraction of watermark information in text documents is realized. Combined with the image repair algorithm of DNA encoding, the problem of limited embedding and source detection of text watermarks is solved, and the copyright traceability and source detection of documents are realized.

CN113971266BActive Publication Date: 2025-08-26CHINA MOBILE COMM GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010708909.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-22
Publication Date
2025-08-26
Estimated Expiration
2040-07-22

AI Technical Summary

Technical Problem

The prior art has limited embedding amount and poor robustness in text watermark embedding, making it impossible to effectively realize source detection during data leakage.

Method used

The image encryption and decryption algorithm based on ASCII code is adopted to embed watermark information by invisible characters and DNA encoding, and image encryption and repair are used to realize document rights confirmation and source detection of leakage.

Benefits of technology

It improves the amount and robustness of the embedded information of the watermark algorithm, realizes copyright traceability and source detection of documents, and ensures the concealment and reliability of the watermark information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113971266B_ABST
    Figure CN113971266B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a text traceability detection method and system, which can effectively improve the amount of embedded information and robustness of the watermark algorithm. By using invisible characters to convert the watermark signal into corresponding codes, a large amount of watermark information is hidden and embedded; by embedding the watermark image into the document carrier, the robust restoration of the ownership identification is achieved. The copyright tracing of the document and the detection of the source of leakage can also be achieved at the same time. The user's user identification image is encrypted and decrypted using the personal key of the copyright user to complete the carrier copyright tracing of the document; the extracted watermark identification is repaired by the DNA base repair algorithm to detect the source of leakage of the document.
Need to check novelty before this filing date? Find Prior Art

Description

Technical field

[0001] The present application relates to the field of digital copyright protection technology, and in particular to a text tracing detection method and system. [Background Technology]

[0002] Data is the third most important fundamental strategic resource after materials and energy, and serves as a catalyst for accelerating the transformation and upgrading of various industries. Opening up and sharing data is a crucial means of activating data assets and breaking down information silos. However, with the opening up and sharing of big data, problems such as illegal transactions and theft and resale have become increasingly prominent, posing unprecedented challenges to digital copyright protection and data leak detection.

[0003] Digital watermarking is an information hiding technique that embeds identifying information into digital media without affecting the original media's usability. The basic concept is to embed digital information containing copyright identifiers such as the author's electronic signature, date, trademark, and usage permissions as a watermark signal into digital works such as images, text, video, and audio. When necessary, the watermark can be extracted through certain technical detection methods, serving as electronic evidence to determine the copyright ownership of the digital work and track illegal infringement. Plain text documents are the most widely used file type in big data platform storage and computing. Common examples include .txt, .csv, and log files without suffixes. txt is the most common file format, primarily storing textual information, making it an important data type for big data text processing and analysis. Comma-separated value (CSV) files consist of any number of records, each separated by a line break character. Each record consists of fields, often delimited by a comma, and all records typically have the same field sequence. CSV files are the most common file type used for big data storage, computing, and sharing. They can be directly converted into Excel (spreadsheet software) for direct user use. Plain text documents can be converted between each other. Embedding invisible watermarks in plain text documents provides technical support for digital asset copyright protection and facilitates big data ownership verification. Therefore, copyright protection technology based on digital watermarks is a powerful method for anti-counterfeiting and traceability of big data.

[0004] DNA (deoxyribonucleic acid) sequences are crucial for crime detection. DNA coding is a significant research area developed through the integration of computer science and molecular biology. A DNA sequence contains four bases (A: adenine, C: cytosine, G: guanine, and T: thymine), of which A and T form a complementary pair, and C and G form a complementary pair. In binary logic, 0 and 1 form a complementary pair, and so the DNA hydrogen bonds 00 and 11 form a complementary pair, as do 10 and 01. In this paper, A, C, G, and T represent 00, 01, 10, and 11, respectively. If there exists a binary sequence 01111011, it can be represented as CTGT using DNA coding. Using binary logic operation rules, we define two DNA base operation algorithms, as shown in Tables 1 and 2: base addition and base complement.

[0005] ASCII (American Standard Code for Information Interchange) is a computer encoding system based on the Latin alphabet, primarily used to represent modern English and other Western European languages. It is the most commonly used single-byte encoding system today and is equivalent to the international standard ISO / IEC 646. ASCII uses 7-bit or 8-bit binary numbers to represent 128 or 256 possible characters. In standard ASCII, decimal values ​​0 to 31 and 127 (a total of 33 characters) are control characters or communication-specific characters. These characters do not have specific graphical representations, but may appear differently in text depending on the application. We used C++ to write these characters into a text document (.TXT). Analysis of experimental data revealed that ASCII values ​​28, 29, 30, and 31 render these characters completely invisible—they contain information but do not occupy display space. Therefore, this algorithm uses these invisible characters as watermark signals embedded in the document carrier to achieve information hiding. The comparison of the parameters of the watermark signal and the ASCII code is shown in Table 3. If a decimal watermark signal is embedded in a text document, we first read the binary code of the value, then format it into a quaternary watermark signal according to Table 3. Finally, the signal is converted into the corresponding invisible characters and embedded into the text document. The resulting document carrier containing the watermark information is the invisible ASCII code string (octal) corresponding to the watermark signal: "\36\34\34\35\35\34\34\35\37".

[0006] Current text watermarking schemes primarily utilize ASCII special control characters, character replacement, interference columns, and image Arnold (a scrambling algorithm) transformations to embed digital watermarks. Watermarking algorithms based on ASCII special control characters primarily utilize the invisibility of "space" and "tab" characters to achieve the imperceptible effect of embedded watermark signals; row permutation algorithms map tuples to secret locations in text data, making the embedding position independent of the tuple structure and improving the robustness of the algorithm; Arnold-based watermarking algorithms generally transform copyrighted images to make the watermark information private and resistant to attack; and interference column-based watermarking algorithms use numerical data as an aid to generate interference columns and embed watermark information in the interference columns, enhancing the robustness of the embedded watermark.

[0007] The shortcomings of the existing technology are mainly manifested in the following aspects:

[0008] (1) In the existing technical solutions, text watermark embedding and extraction are achieved through Unicode character replacement, semantic role replacement, predicate replacement, special control character embedding, etc., resulting in limited embedding amount of watermark information and poor robustness.

[0009] (2) In existing technical solutions, watermark information is mainly embedded in the document carrier to complete the copyright protection of the document. When data is leaked, although data ownership protection can be completed, it is impossible to effectively detect the source of the leak. [Summary of the invention]

[0010] In view of this, the embodiments of the present application provide a text tracing detection method and system to solve the above-mentioned technical problems existing in the prior art.

[0011] In a first aspect, an embodiment of the present application provides a text tracing detection method, the method comprising the following steps:

[0012] Embed watermark: encrypt the user's watermark image bmp, and embed the encrypted watermark image into the host carrier T in the form of invisible characters to obtain the watermark carrier T';

[0013] Extract watermark: extract the watermark information from the watermark carrier T', decrypt the extracted watermark information, and obtain a recognizable watermark extraction image bmp b ″;

[0014] Repair watermark: extract the watermark image bmp through the watermark image bmp b Repair and output the repaired watermark repair image bmp b ', according to the watermark image bmp and the watermark repair image bmp b 'Detect the source of the leak.

[0015] Through the solution provided by this embodiment, the user's authentication watermark is embedded and extracted through a text watermark algorithm based on invisible characters of ASCII code; the watermark image BMP decryption and restoration is completed using an image encryption and decryption algorithm based on DNA coding, thereby realizing document tracking and authentication; with the help of a watermark image repair algorithm based on DNA coding, the user's authentication watermark is repaired, thereby realizing document leakage source detection.

[0016] In a preferred embodiment, the watermark embedding step comprises:

[0017] The watermark image bmp is subjected to information binarization processing to obtain a binary watermark image bmp b , and the binary watermark image bmp b Perform scrambling processing to generate a scrambled identity confirmation image bmp a ;

[0018] The scrambled identity image bmp a Perform binary encryption to obtain the ciphertext image bmp c And decrypt the ciphertext image bmp c ;

[0019] For the ciphertext image bmp c Perform invisible character encoding to form the ciphertext image bmp c Invisible character encoding table bmp of watermark information cw , according to the invisible character encoding table bmp cw and host vector T to obtain the watermark-containing vector T'.

[0020] Through the solution provided by this embodiment, according to the watermark embedding algorithm, the user's watermark image bmp needs to be preprocessed before watermark embedding, the data involved in encryption needs to be retained during the encryption process, and the ciphertext image bmp needs to be processed during the embedding process. c Encode invisible characters.

[0021] In a preferred embodiment, the binary watermark image bmp b The steps of scrambling include: using the user key key to scramble the binary watermark image bmp b Key t The wheels are in disarray.

[0022] Through the solution provided by this embodiment, after multiple rounds of scrambling, the binary watermark image bmp b After encryption again, the image information is further hidden, which can greatly improve the robustness of the watermark carrier T'.

[0023] In a preferred embodiment, the scrambled authentication image bmp a Perform binary encryption to obtain the ciphertext image bmp c And decrypt the ciphertext image bmp c The steps include:

[0024] The said confirmation image bmp a And user key key to perform DNA encoding to obtain DNA image bmp d and DNA user key d ;

[0025] Select random parameter r and perform DNA encoding to obtain DNA random parameter r d ;

[0026] The said confirmation image bmp a The corresponding base coded image is encrypted to obtain the ciphertext image bmp c ;

[0027] According to the DNA image bmp d , the DNA user key key d and the DNA random parameter r d For the ciphertext image bmp c Decrypt.

[0028] Through the solution provided in this embodiment, the identity confirmation image bmp is encoded by DNA. a Encode it so that its base code image can be encrypted, and then obtain the ciphertext image bmp that can be decrypted by the user and document traced c .

[0029] In a preferred embodiment, the step of extracting the watermark comprises:

[0030] Extract the suspicious watermark carrier T″ that may be attacked from the watermark carrier T′, read the invisible character information in the suspicious watermark carrier T″, and transcode the invisible character information into the suspicious invisible character encoding table bmp cw ″;

[0031] The suspicious invisible character encoding table bmp cw Convert the binary system into a decimal watermark signal, and obtain the suspicious ciphertext image bmp by mapping the row and column information of the decimal watermark signal c ″;

[0032] Perform DNA encoding on the user key, select random parameter r and perform DNA encoding to obtain the DNA user key d and random parameter rd , using the DNA user key key d and random parameter r d For suspicious ciphertext images bmp c Decrypt the bases in ″ to get the scrambled plaintext watermark image bmp a ″, and then use the user key key to authenticate the plain text watermark image bmp a ″Perform inverse scrambling to obtain a recognizable watermark image.

[0033] Through the solution provided by this embodiment, before watermark extraction, the suspicious watermark carrier T″ in the watermark carrier T′ needs to be scanned and encoded. c In the process of generating ", the decimal watermark signal needs to be inversely mapped to the rows and columns, and in the process of watermark restoration, the plaintext watermark image bmp needs to be mapped to the row and column inverse of the watermark signal. a "Perform reverse scrambling.

[0034] In a preferred embodiment, the watermark repairing step includes:

[0035] The watermark image bmp is binarized and DNA encoded to obtain the DNA image bmp of the person being tested. d , extract the watermark image bmp b "Carry out DNA encoding to obtain the DNA image bmp to be repaired d ″;

[0036] The DNA image bmp d Perform DNA repair to obtain the DNA complement image bmp of the person being tested p , and the DNA complement image bmp p and the DNA image to be repaired bmp d "Perform matching analysis to repair the DNA image bmp to be repaired d ″, and output the watermark repair image bmp b ';

[0037] Taking the watermark image bmp as the master, the watermark extraction image bmp is calculated separately b ″ and the watermark repair image bmp b The parent-child matching rate p of the watermark image bmp is used to detect the data leakage probability of the detected person;

[0038] The larger the value of the mother-child matching rate p is, the greater the probability that the person being detected is a data leaker.

[0039] Through the solution provided by this embodiment, the watermark image bmp of the detector needs to be preprocessed before watermark repair, and the DNA image bmp to be repaired needs to be preprocessed during the watermark repair process. d "To perform matching analysis, when detecting the source of leakage, it is necessary to calculate the matching rate of the watermark image bmp of the detector.

[0040] In a preferred embodiment, the DNA complement image bmp p and the DNA image to be repaired bmp d The steps of performing matching analysis are:

[0041] Complement the DNA image bmp p As the parent chain, the DNA image to be repaired bmp d ″ is a subchain, and the DNA image bmp to be repaired d ″ base hydrogen bonds were analyzed;

[0042] If there is a hydrogen bond deficiency between the bases matching the parent chain and the daughter chain, the DNA image bmp to be repaired d ″Make repairs;

[0043] If there is a hydrogen bond disorder between the bases matching the parent chain and the daughter chain, the DNA image bmp to be repaired is deleted. d ″.

[0044] Through the solution provided by this embodiment, in the watermark repair process, the DNA image bmp to be repaired d ″ base hydrogen bonds are deleted or repaired.

[0045] In a second aspect, an embodiment of the present application provides a text tracing detection system, the system comprising:

[0046] The embedding module is used to encrypt the user's watermark image bmp and embed the encrypted watermark image into the host carrier T in the form of invisible characters to obtain the watermark carrier T';

[0047] Extraction module, used to extract the watermark information from the watermark carrier T', decrypt the extracted watermark information, and obtain a recognizable watermark extraction image bmp b ″;

[0048] Repair module, used to extract the watermark image bmp through the watermark image bmp b Repair and output the repaired watermark repair image bmp b ', according to the watermark image bmp and the watermark repair image bmp b 'Detect the source of the leak.

[0049] Through the solution provided by this embodiment, the embedding module completes the embedding and extraction of the user's authentication watermark through a text watermark algorithm based on invisible characters of ASCII code; the extraction module uses an image encryption and decryption algorithm based on DNA coding to complete the watermark image bmp decryption and restoration, thereby realizing document tracking and authentication; the repair module uses a watermark image repair algorithm based on DNA coding to complete the user's authentication watermark repair, thereby realizing document leakage source detection.

[0050] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory and a processor:

[0051] The memory is used to store computer programs;

[0052] The processor is configured to execute the computer program stored in the memory, so that the electronic device executes the method according to the first aspect.

[0053] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, comprising a program or instructions. When the program or instructions are run on a computer, the method described in the first aspect is executed.

[0054] Compared with the existing technology, this technical solution has at least the following beneficial effects:

[0055] The text traceability detection method and system disclosed in the embodiments of the present application can effectively improve the amount of embedded information and robustness of the watermark algorithm. By using invisible characters to convert the watermark signal into corresponding codes, a large amount of watermark information is hidden and embedded; by embedding the watermark image into the document carrier, the robust restoration of the ownership identification is achieved. The copyright tracing of the document and the detection of the source of leakage can also be achieved at the same time. The user's user identification image is encrypted and decrypted using the personal key of the copyright user to complete the carrier copyright tracing of the document; the extracted watermark identification is repaired by the DNA base repair algorithm to detect the source of leakage of the document.

Brief Description of the Drawings

[0056] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0057] Figure 1 This is a schematic diagram of the steps of the text tracing detection method provided in Example 1 of the present application;

[0058] Figure 2This is a flowchart of the text tracing detection method provided in Example 1 of the present application;

[0059] Figure 3 This is a schematic diagram of the watermark embedding step in the text traceability detection method provided in Example 1 of the present application;

[0060] Figure 4 This is a diagram showing the execution effect of binary watermark image encryption in the watermark embedding step of the text traceability detection method provided in Example 1 of the present application;

[0061] Figure 5 This is a schematic diagram of the steps of extracting watermarks in the text traceability detection method provided in Example 1 of the present application;

[0062] Figure 6 This is a schematic diagram of the watermark repair step in the text traceability detection method provided in Example 1 of the present application;

[0063] Figure 7 This is a diagram of the repair process of DNA repair in the watermark repair step of the text traceability detection method provided in Example 1 of the present application;

[0064] Figure 8 This is a module diagram of the text traceability detection system provided in Example 2 of the present application.

[0065] Reference numerals:

[0066] 1-Embed module;

[0067] 2- Extraction module;

[0068] 3- Repair module. [Specific implementation method]

[0069] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0070] It should be clear that the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0071] Example 1

[0072] Example 1 of the present application discloses a text traceability detection method based on DNA coding and digital watermarking. First, a watermark information encoding algorithm is designed based on the invisible characteristics of ASCII code characters to complete the hidden embedding and efficient blind extraction of a large amount of text watermark information, thereby realizing the copyright protection of text documents; then, a watermark image repair algorithm is designed based on the hydrogen bond matching characteristics of DNA bases to complete the hydrogen bond repair of the watermark image, thereby realizing the detection of the source of leakage. Finally, a big data plain text traceability detection algorithm is constructed based on the above method to complete the ownership tracing and data leakage source detection of big data plain text documents.

[0073] The text source detection method of this embodiment can solve the technical problems in the prior art, specifically:

[0074] (1) A text watermarking algorithm based on invisible characters in ASCII code is proposed. The watermark information is encoded based on four invisible characters (28, 29, 30, 31) in ASCII code to achieve covert embedding and robust reproduction of large amounts of watermark information.

[0075] (2) Propose a watermark image encryption and repair algorithm based on DNA coding. Design a watermark image encryption algorithm based on the characteristics of DNA bases to achieve the privacy security of the watermark; design a watermark image repair algorithm based on the characteristics of DNA hydrogen bond pairing, thereby completing copyright protection and realizing leakage source detection.

[0076] The text tracing detection method disclosed in Example 1 of the present application is described in detail below with reference to the accompanying drawings.

[0077] like Figure 1 and Figure 2 As shown, the text tracing detection method of this embodiment includes the following steps:

[0078] Step 100: Embed watermark EmWater(bmp, T, key)→T': Encrypt the user's watermark image bmp, and embed the encrypted watermark image into the host carrier T in the form of invisible characters to obtain the watermark carrier T'.

[0079] The watermark embedding step uses the watermark embedding algorithm EmWater(bmp,T,key) to select a random parameter r and encrypt the user's watermark identification image bmp through the user key key of the data copyright owner. Then, the encrypted watermark image is embedded in the host carrier T in the form of invisible characters to obtain the watermark carrier T', thereby realizing the covert embedding of the encrypted watermark image into the host carrier T.

[0080] like Figure 3 As shown, the watermark embedding steps include:

[0081] Step 101: Watermark information preprocessing Arnold (bmp, key) → bmp a :Carry out information binarization processing on the watermark image bmp to obtain the binary watermark image bmp b , and for the binary watermark image bmp b Perform scrambling processing to generate a scrambled identity confirmation image bmp a .

[0082] Among them, for the binary watermark image bmp b The steps of scrambling include: using the user key key to scramble the binary watermark image bmp b Key t The wheels are in disarray.

[0083] The text traceability detection method disclosed in this embodiment, after multiple rounds of scrambling, makes the binary watermark image bmp b After encryption again, the image information is further hidden, which can greatly improve the robustness of the watermark carrier T'.

[0084] Specifically, the watermark information needs to be preprocessed before watermark embedding to improve the robustness of the watermark signal. First, the embedding algorithm performs binarization on the grayscale watermark image bmp to obtain a binary watermark image bmp b ={b} m×m , where b∈{0,1}; then, due to the periodicity of Arnold scrambling, if the binary watermark image bmp b The minimum period under Arnold transformation is t, and the number of scrambling rounds of the watermark is key using the user key. t =keymodt. Finally, according to formula (1), bmp b Key t Arnold scrambling to generate a scrambled identity image bmp a The inverse scrambling formula is (2).

[0085]

[0086]

[0087] Step 102: Binary watermark image encryption Emcrypt (bmp a ,key)→bmp c :The right confirmation image bmp for the chaos a Perform binary encryption to obtain the ciphertext image bmp c And decrypt the ciphertext image bmp c .

[0088] Among them, the scrambled identity image bmpa Perform binary encryption to obtain the ciphertext image bmp c And decrypt the ciphertext image bmp c The steps include:

[0089] Right confirmation image bmp a And user key key to perform DNA encoding to obtain DNA image bmp d and DNA user key d ;

[0090] Select random parameter r and perform DNA encoding to obtain DNA random parameter r d ;

[0091] Right confirmation image bmp a The corresponding base-coded image is encrypted to obtain the ciphertext image bmp c ;

[0092] According to DNA image bmp d 、DNA user key key d and the DNA random parameter r d For ciphertext image bmp c Decrypt.

[0093] The text traceability detection method disclosed in this embodiment uses DNA coding to identify the identity image bmp a Encode it so that its base code image can be encrypted, and then obtain the ciphertext image bmp that can be decrypted by the user and document traced c .

[0094] Specifically, in order to improve the privacy of watermark information, the watermark information needs to be encrypted before embedding the watermark. First, the encryption algorithm is used to encrypt the bmp file according to Table 1. a And key for DNA encoding to get bmp d and key d Then, a random parameter r is selected and DNA encoding is performed to obtain r d Finally, according to formula (3), bmp a Corresponding base code image bmp a Encrypt and get the ciphertext image bmp c , its execution effect is as follows Figure 4 After encryption is completed, the encrypted user retains r d In order to complete the correct decryption, the decryption formula is (4).

[0095]

[0096]

[0097] Table 1 DNA base addition

[0098]

[0099] Step 103: Watermark encoding to obtain a binary image EmcodeWater(bmp c ,T)→bmp cw :For the ciphertext image bmp c Perform invisible character encoding to form a ciphertext image bmp c Invisible character encoding table bmp of watermark information cw , according to the invisible character encoding table bmp cw and host vector T to obtain watermark-containing vector T'.

[0100] Specifically, first, the ciphertext image bmp c Each pixel is encoded with row i∈[1,2,···,m], column j∈[1,2,···,m] and watermark signal value b∈{0,1}, and the decimal watermark information table bmp is obtained. w ={w} m×m , where w ij =(i,j,b) 10 Secondly, according to the correspondence between the invisible characters and ASCII codes in Table 3, the formatting code is performed according to Table 4 to form the invisible character code table bmp of the watermark signal cw ={cw} m×m , cw ij =(i,j,b)4. Then, scan the watermark carrier T in rows and columns, read the rows and columns where the character field in T is located, and generate the embeddable bit index table T p ={p} n×n , where p=(i',j')∈[1,2,···,n] 2 And n≥m; Finally, cw ij Append to T in order p i'j' After pointing to the cell in row i' and column j', the watermark carrier T'={c+cw} is obtained. n×n . “+” is the string concatenation operator.

[0101] The text traceability detection method disclosed in this embodiment, according to the watermark embedding algorithm, needs to pre-process the user's watermark image bmp before watermark embedding, and needs to retain the data involved in encryption during the encryption process. c Encode invisible characters.

[0102] Step 200: Extract watermark Dewater: Extract the watermark information from the watermark carrier T', decrypt the extracted watermark information, and obtain a recognizable watermark extraction image bmp b ″.

[0103] like Figure 5 As shown, the watermark extraction steps include:

[0104] Step 201: Watermark information extraction: Extract the suspicious watermark carrier T″ that may be attacked from the watermark carrier T′, read the invisible character information in the suspicious watermark carrier T″, and transcode the invisible character information into the suspicious invisible character encoding table bmp cw ″.

[0105] Specifically, the extraction algorithm sequentially scans the suspicious watermark carrier T″ that may be attacked, reads the invisible character information from it, and transcodes it into the watermark information code bmp″ according to Table 2 and Table 3 below. cw ={cw″} m×m ,cw″ ij =(i,j,b)4.

[0106] Table 2 Watermark signal-ASCII code parameter comparison table

[0107]

[0108] Table 3 Watermark information encoding table

[0109]

[0110] Step 202: Cipher image generation: Encode the suspicious invisible characters into bmp cw Convert the binary system into a decimal watermark signal, and map the row and column information of the decimal watermark signal to obtain the suspicious ciphertext image bmp c ″.

[0111] Specifically, first, the generation algorithm converts the suspicious invisible character encoding table bmp cw The quaternary watermark signal cw in ″ i ” j =(i,j,b)4 converted to decimal watermark signal cw″ ij =(i,j,b) 10 ; Then, according to cw ij ″The row and column information (i, j) contained in it will be (b) 10 Mapping to bmp c ″(i) 10 Row(j) 10 Column, get the ciphertext image bmp″ c ={B}m×m .Where B={1,0,-1}," -1 ” indicates missing hydrogen bonds.

[0112] Step 203: Restoration of the authentication image: DNA encode the user key key, and select a random parameter r and perform DNA encoding to obtain the DNA user key key d and random parameter r d , using DNA user key d and random parameter r d For suspicious ciphertext images bmp c Decrypt the bases in ″ to get the scrambled plaintext watermark image bmp a ″, and then use the user key key to authenticate the plaintext watermark image bmp a ″Perform inverse scrambling to obtain a recognizable watermark image.

[0113] Specifically, first, the restoration algorithm generates a key by encoding the key with DNA. d Afterwards, with the help of r d Using formula (4) to calculate bmp c Decrypt the bases in ″ to get the scrambled plaintext watermark image bmp a ″; Then, use key to bmp a ″According to formula (2) key t Arnold inverse scrambling is performed to obtain a recognizable watermark image, and finally the robust reproduction of the document carrier’s watermark is completed.

[0114] The text traceability detection method disclosed in this embodiment needs to scan and encode the suspicious watermark carrier T' in the watermark carrier T' before watermark extraction. c In the process of generating ", the decimal watermark signal needs to be inversely mapped to the rows and columns, and in the process of watermark restoration, the plaintext watermark image bmp needs to be mapped to the row and column inverse of the watermark signal. a "Perform reverse scrambling.

[0115] Step 300: Repair watermark Repair: Extract watermark image bmp through watermark image bmp b Repair and output the repaired watermark repair image bmp b ', according to the watermark image bmp and watermark repair image bmp b 'Detect the source of the leak.

[0116] like Figure 6 As shown, the steps for repairing watermarks include:

[0117] Step 301: DNA preprocessing: Binarize the watermark image bmp and perform DNA encoding to obtain the DNA image bmp of the person being tested. d , extract the extracted watermark image bmp b "Carry out DNA encoding to obtain the DNA image bmp to be repaired d ″.

[0118] Specifically, first, the preprocessing algorithm performs binarization on the grayscale image bmp and performs DNA encoding according to Table 1 listed above to obtain the DNA image bmp of the person being tested. d ; Then extract the binary watermark image bmp b "Carry out DNA encoding to obtain the DNA image bmp to be repaired d ″.

[0119] Step 302: DNA repair: DNA image bmp d Perform DNA repair to obtain the DNA complement image bmp of the person being tested p , and the DNA complement image bmp p and the DNA image to be repaired bmp d "Perform matching analysis to repair the DNA image bmp to be repaired d ″, and output the watermark repair image bmp b '.

[0120] Among them, the DNA complement image bmp p and the DNA image to be repaired bmp d The steps of performing matching analysis are:

[0121] DNA complement image bmp p The parent chain, the DNA image to be repaired bmp d ″ is the sub-chain, the DNA image bmp to be repaired d ″ base hydrogen bonds were analyzed;

[0122] If there is a hydrogen bond loss between the matching bases of the parent chain and the daughter chain, the DNA image bmp to be repaired d ″Make repairs;

[0123] If there is a hydrogen bond disorder between the matching bases of the parent chain and the daughter chain, the DNA image bmp to be repaired will be deleted d ″.

[0124] The text traceability detection method disclosed in this embodiment requires the DNA image bmp to be repaired during the watermark repair process. d ″ base hydrogen bonds are deleted or repaired.

[0125] Specifically, first, the repair algorithm for bmp d Perform DNA complement operation according to Table 4 to obtain the DNA complement image bmp of the person being tested. p ; Then, with bmp p As the parent chain, bmp d ″ is a daughter chain that analyzes the hydrogen bonds of bases according to Table 5. If the hydrogen bonds of the matched bases are missing, they are repaired; if they are disordered, they are deleted. The repair process is as follows: Figure 7 shown.

[0126] Table 4 DNA base complement algorithm

[0127]

[0128] Table 5 DNA hydrogen bond repair table

[0129]

[0130] Step 303: Leakage source detection: Take the watermark image bmp as the master, and calculate the watermark extraction image bmp separately b ″ and watermark repair image bmp b The parent-child matching rate p of ' and the watermark image bmp is used to detect the data leakage probability of the detected person;

[0131] The larger the value of the mother-child matching rate p, the greater the probability that the person being detected is a data leaker.

[0132] Specifically, the detection algorithm uses the watermark image bmp as the master, and extracts the watermark image bmp respectively. b ″、watermark repair image bmp b Calculate the mother-child matching rate p according to formula (5), where u represents the total number of bases with zero hydrogen bonds in the original mother watermark image (the identification of the watermark image is mainly black dots), and v represents the total number of bases in the daughter image that match the mother image. b ″、watermark repair image bmp b If the matching rate with the suspected image, i.e., the watermark image bmp, is significantly increased, and the recognition of the watermark image bmp is somewhat stronger, it means that the probability of the detected person being the data leaker is relatively high.

[0133]

[0134] The text traceability detection method disclosed in this embodiment requires pre-processing the watermark image bmp of the detector before watermark repair, and the DNA image bmp to be repaired needs to be processed during the watermark repair process. d "To perform matching analysis, when detecting the source of leakage, it is necessary to calculate the matching rate of the watermark image bmp of the detector.

[0135] The text traceability detection method disclosed in this embodiment completes the embedding and extraction of the user's authentication watermark through a text watermark algorithm based on invisible characters of ASCII code; utilizes an image encryption and decryption algorithm based on DNA coding to complete the watermark image bmp decryption and restoration, thereby realizing document tracking and authentication; and uses a watermark image repair algorithm based on DNA coding to complete the user's authentication watermark repair, thereby realizing document leakage source detection.

[0136] Example 2

[0137] like Figure 8 As shown, Example 2 of the present application discloses a text tracing detection system, which includes:

[0138] Embedding module 1 is used to encrypt the user's watermark image bmp and embed the encrypted watermark image into the host carrier T in the form of invisible characters to obtain the watermark carrier T';

[0139] Extraction module 2 is used to extract the watermark information in the watermark carrier T', decrypt the extracted watermark information, and obtain a recognizable watermark extraction image bmp b ″;

[0140] Repair module 3, used to extract watermark image bmp through watermark image bmp b Repair and output the repaired watermark repair image bmp b ', according to the watermark image bmp and watermark repair image bmp b 'Detect the source of the leak.

[0141] In the text traceability detection system disclosed in the embodiment of the present application, the embedding module 1 completes the embedding and extraction of the user's authentication watermark through a text watermark algorithm based on invisible characters of ASCII code; the extraction module 2 uses an image encryption and decryption algorithm based on DNA coding to complete the watermark image bmp decryption and restoration, thereby realizing document tracking and authentication; the repair module 3 uses a watermark image repair algorithm based on DNA coding to complete the user's authentication watermark repair, thereby realizing document leakage source detection.

[0142] The present application also provides an electronic device including a memory and a processor.

[0143] memory for storing computer programs;

[0144] The processor is used to execute the computer program stored in the memory so that the electronic device executes the text tracing detection method disclosed in Example 1 of the present application.

[0145] An embodiment of the present application also provides a computer-readable storage medium, including a program or instruction. When the program or instruction runs on a computer, the text tracing detection method disclosed in Example 1 of the present application is executed.

[0146] The text traceability detection method and system disclosed in the embodiments of the present application can effectively improve the amount of embedded information and robustness of the watermark algorithm. By using invisible characters to convert the watermark signal into corresponding codes, a large amount of watermark information is hidden and embedded; by embedding the watermark image into the document carrier, the robust restoration of the ownership identification is achieved. The copyright tracing of the document and the detection of the source of leakage can also be achieved at the same time. The user's user identification image is encrypted and decrypted using the personal key of the copyright user to complete the carrier copyright tracing of the document; the extracted watermark identification is repaired by the DNA base repair algorithm to detect the source of leakage of the document.

[0147] The above are only preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.

Claims

1. A text tracing detection method, characterized in that: The method comprises the following steps: Embed watermark: Encrypt the user's watermark image bmp and embed the encrypted watermark image into the host carrier T in the form of invisible characters to obtain the watermark carrier T ' ; Extract watermark: extract the watermark carrier T ' The watermark information in the image is decrypted to obtain a recognizable watermark extraction image bmp. b '' ; Repair watermark: extract the watermark image bmp through the watermark image bmp b '' Repair and output the repaired watermark repair image bmp b ' , according to the watermark image bmp and the watermark repair image bmp b ' Detect the source of the leak; The watermark image bmp and the watermark repair image bmp b ' Detecting the source of the leak, including: taking the watermark image bmp as the master, respectively calculating the watermark extraction image bmp b '' and the watermark repair image bmp b ' The data leakage probability of the detected person is detected by using the mother-child matching rate p of the watermark image bmp; wherein the larger the value of the mother-child matching rate p is, the greater the probability that the detected person is a data leaker.

2. The text tracing detection method according to claim 1, characterized in that: The embedding watermark comprises: The watermark image bmp is subjected to information binarization processing to obtain a binary watermark image bmp b , and the binary watermark image bmp b Perform scrambling processing to generate a scrambled identity confirmation image bmp a ; The scrambled identity image bmp a Perform binary encryption to obtain the ciphertext image bmp c And decrypt the ciphertext image bmp c ; For the ciphertext image bmp c Perform invisible character encoding to form the ciphertext image bmp c Invisible character encoding table bmp of watermark information cw , according to the invisible character encoding table bmp cw and host vector T, to obtain the watermark-containing vector T ' .

3. The text tracing detection method according to claim 2, characterized in that: The binary watermark image bmp b The steps of scrambling include: using the user key key to scramble the binary watermark image bmp b Key t The wheels are in disarray.

4. The text tracing detection method according to claim 2, characterized in that: The right confirmation image bmp of the scrambled a Perform binary encryption to obtain the ciphertext image bmp c And decrypt the ciphertext image bmp c ,include: The said confirmation image bmp a And user key key to perform DNA encoding to obtain DNA image bmp d and DNA user key d ; Select random parameter r and perform DNA encoding to obtain DNA random parameter r d ; The said confirmation image bmp a The corresponding base coded image is encrypted to obtain the ciphertext image bmp c ; According to the DNA image bmp d , the DNA user key key d and the DNA random parameter r d For the ciphertext image bmp c Decrypt.

5. The text tracing detection method according to claim 1, characterized in that: The watermark extraction comprises: In the watermark carrier T ' Extract the suspicious watermark carrier T that may be attacked '' , read the suspicious watermark carrier T '' The invisible character information in the code is converted into a suspicious invisible character encoding table bmp. cw '' ; The suspicious invisible character encoding table bmp cw '' Convert the binary system into a decimal watermark signal, and obtain the suspicious ciphertext image bmp by mapping the row and column information of the decimal watermark signal. c '' ; Perform DNA encoding on the user key, select random parameter r and perform DNA encoding to obtain the DNA user key d and random parameter r d , using the DNA user key key d and random parameter r d For suspicious ciphertext images bmp c '' Decrypt the bases in the image to get the scrambled plaintext watermark image bmp a '' , and then use the user key key to authenticate the plain text watermark image bmp a '' Perform inverse scrambling to obtain a recognizable watermark image.

6. The text tracing detection method according to claim 5, characterized in that: The repair watermark includes: The watermark image bmp is binarized and DNA encoded to obtain the DNA image bmp of the person being tested. d , extract the watermark image bmp b '' Perform DNA encoding to obtain the DNA image bmp to be repaired d '' ; The DNA image bmp d Perform DNA repair to obtain the DNA complement image bmp of the person being tested p , and the DNA complement image bmp p and the DNA image to be repaired bmp d '' Perform matching analysis to repair the DNA image bmp to be repaired d '' , and output the watermark repair image bmp b ' .

7. The text tracing detection method according to claim 6, characterized in that: The DNA complement image bmp p and the DNA image to be repaired bmp d '' Perform matching analysis, including: Complement the DNA image bmp p As the parent chain, the DNA image to be repaired bmp d '' As a subchain, the DNA image bmp to be repaired d '' Analyze the hydrogen bonds of bases; If there is a hydrogen bond deficiency between the bases matching the parent chain and the daughter chain, the DNA image bmp to be repaired d '' Make repairs; If there is a hydrogen bond disorder between the bases matching the parent chain and the daughter chain, the DNA image bmp to be repaired is deleted. d '' .

8. A text tracing detection system, characterized in that: The system comprises: The embedding module is used to encrypt the user's watermark image bmp and embed the encrypted watermark image into the host carrier T in the form of invisible characters to obtain the watermark carrier T ' ; Extraction module, used to extract the watermark carrier T ' The watermark information in the image is decrypted to obtain a recognizable watermark extraction image bmp. b '' ; Repair module, used to extract the watermark image bmp through the watermark image bmp b '' Repair and output the repaired watermark repair image bmp b ' , according to the watermark image bmp and the watermark repair image bmp b ' Detect the source of the leak; The repair module is specifically used to use the watermark image bmp as the master, and to extract the watermark image bmp by respectively calculating the watermark b '' and the watermark repair image bmp b ' The data leakage probability of the detected person is detected by using the mother-child matching rate p of the watermark image bmp; wherein the larger the value of the mother-child matching rate p is, the greater the probability that the detected person is a data leaker.

9. An electronic device, characterized in that: include: Memory and processor: The memory is used to store computer programs; The processor is configured to execute the computer program stored in the memory, so as to enable the electronic device to perform the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The method comprises a program or an instruction, and when the program or the instruction is run on a computer, the method according to any one of claims 1 to 7 is executed.

Citation Information

Patent Citations

  • Multi-chaotic mapping and DNA coding-integrated image encryption method and device

    CN107610037A

  • A watermark embedding method for data texts

    CN109840401A