Watermark adding method, watermark extracting method, device, equipment, storage medium and program product

By creating pseudo-rows, pseudo-columns, or insertion positions in the data, encrypted watermarks are generated, solving the problem of poor watermark security and achieving highly secure and identifiable data protection.

CN118981777BActive Publication Date: 2025-11-18CHINA UNIONPAY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410994208.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2025-11-18
Estimated Expiration
2044-07-23

AI Technical Summary

Technical Problem

Existing watermark technologies have poor security and become ineffective when the primary key is tampered with or missing, thus failing to effectively protect data security.

Method used

By extracting enhanced watermark elements from the original data and pre-set original watermark elements, a ciphertext watermark is generated, and pseudo-rows, pseudo-columns, or insertion positions are created in the data for marking, generating the marked original data.

Benefits of technology

It improves the security and recognizability of watermarks, prevents malicious forgery and tampering, and enhances the security protection capabilities of data during use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118981777B_ABST
    Figure CN118981777B_ABST
Patent Text Reader

Abstract

The application provides a watermark adding method, a watermark extracting method, a device, equipment, a storage medium and a program product, relates to the technical field of data security, and the watermark adding method comprises the following steps: in response to a processing instruction, at least one enhanced watermark element is extracted from original data corresponding to the processing instruction; based on the enhanced watermark element and at least one original watermark element set in advance, ciphertext watermark is determined; the adding position of the ciphertext watermark is determined according to the pre-set watermark density and data amount value; the adding position comprises at least one of the pseudo-row position, the pseudo-column position and the insertion position in the original data; the ciphertext watermark is inserted into the adding position to generate marked original data. The application can effectively prevent the ciphertext watermark from being maliciously counterfeited and tampered with, thereby improving the security protection capability of the original data in the use process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data security technology, and in particular to a watermark addition method, watermark extraction method, apparatus, device, storage medium, and program product. Background Technology

[0002] Data security is increasingly becoming a key concern for businesses and even nations.

[0003] However, common data encryption methods generally rely on primary keys. When the primary key is tampered with or is missing, the watermark used for encryption becomes ineffective. Furthermore, common watermarks have poor security. Summary of the Invention

[0004] This application provides a watermark addition method, a watermark extraction method, an apparatus, a device, a storage medium, and a program product to solve the problem of poor watermark security in the prior art.

[0005] Firstly, this application provides a watermark addition method, including:

[0006] In response to a processing instruction, at least one enhanced watermark element is extracted from the original data corresponding to the processing instruction;

[0007] Based on the enhanced watermark element and at least one pre-set original watermark element, a ciphertext watermark is determined.

[0008] The location for adding the ciphertext watermark is determined according to the preset watermark density and data volume value; the location for adding the watermark includes at least one of the following: pseudo-row position, pseudo-column position, and insertion position in the original data.

[0009] Insert the ciphertext watermark at the specified location to generate the marked original data.

[0010] In one embodiment, determining the encrypted watermark based on the enhanced watermark element and at least one pre-set original watermark element includes:

[0011] At least one of the enhanced watermark elements and at least one of the original watermark elements are individually encrypted;

[0012] The encrypted watermark is determined based on the encrypted enhanced watermark elements and the encrypted original watermark elements.

[0013] In one embodiment, determining the ciphertext watermark based on the encrypted enhanced watermark element and the encrypted original watermark element includes:

[0014] The encrypted enhanced watermark element and the encrypted original watermark element are randomly combined to obtain the ciphertext watermark;

[0015] Alternatively, any encrypted enhanced watermark element may be used as the ciphertext watermark;

[0016] Alternatively, any encrypted original watermark element can be used as the ciphertext watermark.

[0017] In one embodiment, the raw data includes structured data;

[0018] Determining the location for adding the encrypted watermark according to a pre-set watermark density and data volume value includes:

[0019] Based on the watermark density, the data volume value, and the preset density threshold, the number of times the encrypted watermark is used is calculated.

[0020] According to the data volume value, read the first data to be labeled that conforms to the data volume value from the structured data;

[0021] Based on the number of uses, the addition position is determined in the first data to be marked.

[0022] In one embodiment, the addition position includes the pseudo-row position in the first data to be labeled;

[0023] Determining the addition position in the first data to be marked based on the number of uses includes:

[0024] Randomly generate row numbers that match the number of uses, and determine the first marked row from the first data to be marked based on the row numbers;

[0025] A pseudo-line is created after each of the first marked lines, serving as the pseudo-line position.

[0026] In one embodiment, the addition location includes the pseudo-column location in the first data to be labeled;

[0027] Determining the addition position in the first data to be marked based on the number of uses includes:

[0028] Randomly generate column numbers that match the number of uses, and determine the labeled column from the first data to be labeled based on the column numbers;

[0029] A pseudo-column is created after each of the aforementioned marker columns, serving as the pseudo-column position.

[0030] In one embodiment, the addition position includes the insertion position in the first data to be labeled;

[0031] Determining the addition position in the first data to be marked based on the number of uses includes:

[0032] Randomly generate row numbers that match the number of uses, and determine the second marked row from the first data to be marked based on the row numbers;

[0033] The first preset position of each of the second mark rows is taken as the insertion position.

[0034] In one embodiment, the step of calculating the number of times the encrypted watermark is used based on the watermark density, the data volume value, and a preset density threshold is performed using the following formula to obtain the number of uses:

[0035]

[0036] Where k represents the number of times it is used; n represents the amount of data; N represents the watermark density; and T represents the density threshold.

[0037] In one embodiment, the raw data includes plain text data;

[0038] Determining the addition position in the first data to be marked based on the number of uses includes:

[0039] According to the data volume value, read the second data to be labeled that matches the data volume value from the plain text data;

[0040] A third labeled row is randomly determined from the second set of data to be labeled;

[0041] The second preset position in the third mark row is used as the insertion position.

[0042] In one embodiment, the raw data includes rich text data;

[0043] Determining the addition position in the first data to be marked based on the number of uses includes:

[0044] According to the data volume value, read the third data to be labeled that matches the data volume value from the rich text data;

[0045] A fourth label row is randomly determined from the third set of data to be labeled;

[0046] The third preset position in the fourth mark row is used as the insertion position.

[0047] In one embodiment, inserting the encrypted watermark at the addition location to generate the marked original data includes:

[0048] Based on the encrypted watermark, a hidden watermark is generated;

[0049] The hidden watermark is inserted at the added position to obtain the marked original data.

[0050] Secondly, this application also provides a watermark extraction method, including:

[0051] In response to the extraction command, according to the preset data reading value, the data to be extracted is obtained from the data to be processed corresponding to the extraction command; the data to be processed is the original data after marking obtained by the watermarking method in any of the above embodiments;

[0052] Extract the encrypted watermark carried by the data to be extracted from the location where it was added;

[0053] Decrypt the ciphertext watermark to obtain at least one of the original watermark elements and enhanced watermark elements corresponding to the ciphertext watermark.

[0054] Thirdly, this application also provides a watermark adding device, comprising:

[0055] An extraction module is used to extract at least one enhanced watermark element from the original data corresponding to the processing instruction in response to a processing instruction.

[0056] The watermark determination module is used to determine the encrypted watermark based on the enhanced watermark element and at least one pre-set original watermark element;

[0057] The position determination module is used to determine the addition position of the encrypted watermark according to the preset watermark density and data volume value; the addition position includes at least one of the pseudo row position, pseudo column position, and insertion position in the original data;

[0058] An insertion module is used to insert the encrypted watermark at the location where the original data is to be added, thereby generating the marked original data.

[0059] Fourthly, this application also provides a watermark extraction device, comprising:

[0060] The data reading module is used to respond to an extraction command and obtain the data to be extracted from the data to be processed corresponding to the extraction command according to a preset data reading volume value; the data to be processed is the original data after marking obtained by the watermarking method in any of the above embodiments;

[0061] The watermark extraction module is used to extract the encrypted watermark carried by the data to be extracted from the location where the watermark was added.

[0062] The decryption module is used to decrypt the ciphertext watermark to obtain at least one of the original watermark elements and enhanced watermark elements corresponding to the ciphertext watermark.

[0063] Fifthly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the watermark addition method or watermark extraction method described in any of the above embodiments.

[0064] Sixthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the watermark addition method or watermark extraction method described in any of the above embodiments.

[0065] Seventhly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the watermark addition method or watermark extraction method described in any of the above embodiments.

[0066] The aforementioned watermarking methods, watermark extraction methods, devices, equipment, storage media, and program products can generate multiple specially designed enhanced watermark elements based on the original data, on the basis of pre-set original watermark elements. This ensures that the final generated ciphertext watermark reflects the characteristics of the original data, guaranteeing the specialness and recognizability of the ciphertext watermark. Furthermore, it can use methods such as creating pseudo-rows, pseudo-columns, or direct insertion in the original data to perform diversified watermark marking on the original data. It has no primary key dependency and can effectively prevent the ciphertext watermark from being maliciously forged and tampered with, thereby improving the security protection capability of the original data during its use. It has the characteristics of high security performance, small data loss, and not being easily destroyed. Attached Figure Description

[0067] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0068] Figure 1 This is a diagram illustrating the application environment of a watermarking method in one embodiment.

[0069] Figure 2 This is a flowchart illustrating a watermark addition method in one embodiment;

[0070] Figure 3 This is a flowchart illustrating the watermark addition method in another embodiment;

[0071] Figure 4 This is a flowchart illustrating the watermark addition method in yet another embodiment;

[0072] Figure 5 This is a flowchart illustrating a watermark extraction method in one embodiment;

[0073] Figure 6 This is a schematic diagram of the watermark adding device in one embodiment;

[0074] Figure 7 This is a schematic diagram of the watermark extraction device in one embodiment;

[0075] Figure 8 This is an internal structural diagram of a computer device in one embodiment.

[0076] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0077] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0078] The watermarking method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 and server 104 can communicate via a network.

[0079] For example, the watermarking method is applied to terminal 102. Upon receiving a processing instruction, terminal 102 can extract at least one enhanced watermark element from the original data corresponding to the processing instruction; then, it retrieves at least one pre-set original watermark element from the data storage system of server 104, and determines the encrypted watermark based on the enhanced watermark element and the original watermark element; and determines the insertion position of the encrypted watermark according to a pre-set watermark density and data volume value; the insertion position includes one of the following: a pseudo-row position, a pseudo-column position, or an insertion position in the original data; finally, the encrypted watermark is inserted at the insertion position to generate the marked original data. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. Terminal 102 and server 104 can be directly or indirectly connected via wired or wireless communication, such as through a network connection.

[0080] For example, the watermarking method is applied to server 104. When terminal 102 receives a processing instruction, it sends the instruction to server 104. Server 104 extracts at least one enhanced watermark element from the original data corresponding to the processing instruction. Subsequently, server 104 retrieves at least one pre-set original watermark element from the data storage system and determines the ciphertext watermark based on the enhanced watermark element and the original watermark element. It also determines the ciphertext watermark insertion position according to the pre-set watermark density and data volume value. The insertion position includes one of the following: a pseudo-row position, a pseudo-column position, or an insertion position in the original data. Finally, the ciphertext watermark is inserted at the insertion position to generate the marked original data. It is understood that the data storage system can be an independent storage device, or the data storage system can be located on server 104, or the data storage system can be located on another terminal.

[0081] It should be noted that the network communication between terminal 102 and server 104 is applicable to different network standards, such as Global System for Mobile communication (GSM), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time Division-Synchronous Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE) systems, and future 5G network standards. Optionally, the above communication system can be a system in the scenario of Ultra-Reliable and Low Latency Communications (URLLC) transmission in 5G communication systems.

[0082] Therefore, optionally, the aforementioned base station can be a base station (BTS) and / or base station controller in GSM or CDMA, a base station (NodeB, NB) and / or radio network controller (RNC) in WCDMA, an evolved Node B (eNB or eNodeB) in LTE, a relay station or access point, or a base station (gNB) in future 5G networks, etc., which are not limited herein.

[0083] In one embodiment, a watermarking method is provided. This embodiment illustrates the application of this watermarking method to a terminal. It is understood that this method can also be applied to a server, and can also be applied to a system including a terminal and a server, and implemented through the interaction between the terminal and the server. Figure 2 As shown, the watermark addition method includes:

[0084] Step 202: In response to the processing instruction, extract at least one enhanced watermark element from the original data corresponding to the processing instruction.

[0085] Processing instructions refer to instructions that mark specific data so that subsequent data traceability and identification can be achieved.

[0086] As an example, the processing instruction could be issued by a worker through a fixed component on the terminal's human-computer interaction interface. This fixed component could be a pre-built page or mini-program; in this case, adding a watermark to the raw data is manually triggered. Alternatively, the processing instruction could be automatically generated synchronously upon receiving a data extraction instruction from a worker through the terminal's human-computer interaction interface. This data extraction instruction refers to instructions related to copying, forwarding, or other data usage of the raw data stored in a specific database; in this case, adding a watermark to the raw data is automatically triggered when the data is used. Or, the processing instruction could be automatically generated when new raw data is detected being stored in a specific database; in this case, adding a watermark to the raw data is automatically triggered when the raw data is stored in the specific database.

[0087] Specifically, the method for generating enhanced watermark elements can be as follows: when the original data is a text document, randomly extract text of a preset length from the original data. This text can be continuous or discontinuous, and each character contained in this text is used as an enhanced watermark element. The data type of the enhanced watermark element changes accordingly based on the data type of the original data and remains consistent with the data type of the original data.

[0088] Step 204: Determine the encrypted watermark based on the enhanced watermark element and at least one pre-set original watermark element.

[0089] The original watermark elements are pre-stored in the server's data storage system. The original watermark elements can be various types of data, such as text (including letters, numbers, symbols, etc.), images (which can be bitmap or vector graphics), and numbers (which can be numeric data, such as dates, serial numbers, etc.).

[0090] Ciphertext watermarking is used to mark the original data. Ciphertext watermarks can be obtained by splicing and combining enhanced watermark elements and original watermark elements, or they can be randomly selected from enhanced watermark elements and original watermark elements.

[0091] Step 206: Determine the location for adding the ciphertext watermark according to the preset watermark density and data volume value; the location for adding the watermark includes one of the following: pseudo-row location, pseudo-column location, or insertion location in the original data.

[0092] Watermark density refers to the spacing density between several watermarks inserted into the data that needs to be watermarked. In this embodiment, a higher watermark density indicates a smaller spacing between the watermarks inserted in the original data, and vice versa.

[0093] The data volume value refers to the quantity or size of the portion of original data used to insert the encrypted watermark. The data volume value can refer to the number of data rows, the number of data columns, etc.

[0094] Pseudo-rows and pseudo-columns are used to describe their relative positions in structured data. They are not actual row or column numbers. A pseudo-row position refers to the location of the inserted pseudo-row based on the actual row numbers in the original data; a pseudo-column position refers to the location of the inserted pseudo-column based on the actual column numbers in the original data.

[0095] The insertion position refers to the position corresponding to any row or column in the original data.

[0096] Step 208: Insert the ciphertext watermark at the added location to generate the marked original data.

[0097] As an example, the terminal can generate a ciphertext watermark in step 204, and segment the ciphertext watermark according to all the addition positions contained in the original data. Then, the segmented ciphertext watermark is randomly inserted into any addition position. This can be understood as the terminal using the ciphertext watermark only once to mark the original data. Alternatively, the terminal can generate a ciphertext watermark in step 204 and insert the complete ciphertext watermark into every addition position contained in the original data. This can be understood as the terminal using the same ciphertext watermark multiple times to mark the original data according to the number of addition positions. Alternatively, the terminal can generate multiple ciphertext watermarks in step 204 and randomly insert any complete ciphertext watermark into every addition position contained in the original data. This can be understood as the terminal using multiple different ciphertext watermarks to mark the original data according to the number of addition positions.

[0098] In the above watermarking method, the terminal can generate multiple specially designed enhanced watermark elements based on the original data, on the basis of the pre-set original watermark elements, so that the final generated ciphertext watermark can reflect the characteristics of the original data, ensuring the specialness and recognizability of the ciphertext watermark. Furthermore, it can use methods such as creating pseudo-rows, pseudo-columns or direct insertion in the original data to perform diversified watermark marking on the original data. Without primary key dependency, it can effectively prevent the ciphertext watermark from being maliciously forged and tampered with, thereby improving the security protection capability of the original data during use. It has the characteristics of high security performance, small data loss and not easy to be destroyed.

[0099] In some alternative embodiments, step 204 includes:

[0100] Encrypt at least one enhanced watermark element and at least one original watermark element separately;

[0101] The encrypted watermark is determined based on the encrypted enhanced watermark elements and the encrypted original watermark elements.

[0102] It should be noted that the terminal is equipped with a processing module and an encryption module. The processing module can respond to processing instructions and obtain at least one enhanced watermark element from the original data. Then, it sends the enhanced watermark element to the encryption module. The encryption module can obtain at least one original watermark element from the server's data storage system and encrypt the at least one enhanced watermark element and the at least one original watermark element respectively, thus ensuring the security of the ciphertext watermark.

[0103] The encryption module can encrypt both the enhanced and original watermark elements separately using encryption algorithms. Common encryption algorithms include symmetric and asymmetric algorithms. Symmetric encryption uses the same key for both encryption and decryption. Common symmetric encryption algorithms include Advanced Encryption Standard (AES) and Data Encryption Standard (DES). When encrypting the enhanced and original watermark elements, a key can be generated first, and then used to encrypt both the enhanced and original watermark elements. Only terminals or servers with that key can decrypt the encrypted enhanced and original watermark elements. Asymmetric encryption uses a public and private key pair. The public key is used to encrypt the data, and the private key is used to decrypt it. Common asymmetric encryption algorithms include RSA. When encrypting the enhanced and original watermark elements, the encryption module can use a pre-stored public key to encrypt both the enhanced and original watermark elements. Only terminals or servers with the corresponding private key can decrypt the encrypted enhanced and original watermark elements.

[0104] As an example, the terminal can randomly combine the encrypted enhanced watermark element and the encrypted original watermark element to obtain the ciphertext watermark; or use any one of the encrypted enhanced watermark elements as the ciphertext watermark; or use any one of the encrypted original watermark elements as the ciphertext watermark. The ciphertext watermark can be represented in hexadecimal.

[0105] like Figure 3 As shown, in some optional embodiments, the raw data includes structured data;

[0106] Step 206 includes:

[0107] Step 2062: Calculate the number of times the encrypted watermark is used based on the watermark density, data volume, and a pre-set density threshold;

[0108] Step 2064: According to the data volume value, read the first data to be labeled that matches the data volume value from the structured data;

[0109] Step 2066: Determine the addition position in the first set of data to be labeled based on the number of times it is used.

[0110] Structured data can refer to data in CSV, XLSX, or XLS formats.

[0111] The process of determining the number of uses in step 2062 can be obtained using the following formula:

[0112]

[0113] Where k represents the number of uses; n represents the amount of data; N represents the watermark density; and T represents the density threshold. This indicates that the watermark density is divided by the density threshold and then rounded down.

[0114] Furthermore, in step 2064, the terminal can read the first data to be labeled from the structured data according to the data volume value. In this process, when the data volume value includes the number of data rows, the terminal randomly reads the structured data that matches the number of data rows as the first data to be labeled; when the data volume value includes the number of data columns, the terminal randomly reads the structured data that matches the number of data columns as the first data to be labeled.

[0115] Furthermore, the addition position includes at least one of pseudo-row position, pseudo-column position, and insertion position.

[0116] In some optional embodiments, when the added position is a pseudo-line position, step 2066 includes: randomly generating a line number that matches the number of uses, and determining a first marked line from the first data to be marked based on the line number; and creating pseudo-lines after each first marked line as pseudo-line positions.

[0117] In this embodiment, the terminal is in K row numbers are randomly generated within the range. Then, each data row in the first data to be marked that matches the k row numbers is taken as the first marked row. After each first marked row, a pseudo row is created as the pseudo row position.

[0118] In some optional embodiments, when the added position is a pseudo-column position, step 2066 includes: randomly generating column numbers that match the number of uses, and determining the marked columns from the first data to be marked based on the column numbers; and creating pseudo-columns after each marked column as pseudo-column positions.

[0119] In this embodiment, the terminal is in K column numbers are randomly generated within the range. Then, each data column in the first set of data to be marked that matches the k column numbers is used as a marker column. After that, pseudo columns are created after each marker column as pseudo column positions.

[0120] In some optional embodiments, when the addition position is the insertion position, step 2066 includes: randomly generating row numbers that match the number of uses, and determining second marked rows from the first data to be marked based on the row numbers; and using the first preset position of each second marked row as the insertion position.

[0121] In this embodiment, the terminal is in K row numbers are randomly generated within the range. Then, each data row in the first set of data to be marked that matches the k row numbers is taken as a second marked row. Then, the first preset position in each second marked row is taken as the insertion position. The first preset position can refer to a preset column position.

[0122] In some optional embodiments, the raw data includes plain text data;

[0123] Step 206 includes:

[0124] Based on the data volume value, read the second data to be labeled from the plain text data that matches the data volume value;

[0125] The third labeled row is randomly determined from the second set of data to be labeled;

[0126] Use the second preset position in the third mark row as the insertion position.

[0127] In this embodiment, the terminal can read the second data to be marked from plain text data according to the data volume value. In this process, when the data volume value includes the number of data rows, the terminal randomly reads plain text data that matches the number of data rows as the second data to be marked; when the data volume value includes the number of data columns, the terminal randomly reads plain text data that matches the number of data columns as the second data to be marked.

[0128] The third marker row can contain one or more data rows. The second preset position can refer to another preset column position.

[0129] In some optional embodiments, the raw data includes rich text data;

[0130] Step 206 includes:

[0131] Based on the data volume value, read the third data to be labeled that matches the data volume value from the rich text data;

[0132] The fourth row of markers is randomly determined from the third set of data to be marked;

[0133] Use the third preset position in the fourth mark row as the insertion position.

[0134] In this embodiment, the terminal can read the second data to be labeled from the rich text data according to the data volume value. In this process, when the data volume value includes the number of data rows, the terminal randomly reads the rich text data that matches the number of data rows as the second data to be labeled; when the data volume value includes the number of data columns, the terminal randomly reads the rich text data that matches the number of data columns as the second data to be labeled.

[0135] The fourth marker row can contain one or more data rows. The third preset position can refer to yet another preset column position.

[0136] like Figure 4 As shown, in some optional embodiments, step 208 includes:

[0137] Step 2082: Generate a hidden watermark based on the encrypted watermark;

[0138] Step 2084: Insert the hidden watermark at the added position to obtain the marked original data.

[0139] In this embodiment, the process of generating a hidden watermark may include: concatenating a separator to the header of the ciphertext watermark, and then performing a bit-by-bit mapping conversion of the ciphertext watermark to obtain the hidden watermark. The mapping conversion process includes replacing each bit in the ciphertext watermark with a zero-width character or a whitespace character to obtain the hidden watermark.

[0140] The aforementioned watermarking process can generate multiple specially designed enhanced watermark elements based on the original data, building upon pre-set original watermark elements. This ensures that the final encrypted watermark reflects the characteristics of the original data, guaranteeing its uniqueness and recognizability. Furthermore, it allows for the encryption of individual original and enhanced watermark elements through separate modules, ensuring the security of the encryption process and improving the stability of the final encrypted watermark. It also employs methods such as creating pseudo-rows, pseudo-columns, or direct insertion into the original data to achieve diverse watermark markings. With no primary key dependency, it effectively prevents malicious forgery and tampering of the encrypted watermark, thereby enhancing the security of the original data during its use. The system features high security, minimal data loss, and resistance to damage.

[0141] like Figure 5 As shown, based on the same inventive concept, this application also provides a watermark extraction method. It is understood that this watermark extraction method can also be applied to the aforementioned terminal 102, server 104, and the system including terminal 102 and server 104. Alternatively, this watermark extraction method can also be applied to other terminals and servers, and implemented through interaction between other terminals and servers and the aforementioned terminal 102 and server 104. The watermark extraction method includes:

[0142] Step 502: In response to the extraction command, according to the preset data reading volume value, obtain the data to be extracted from the data to be processed corresponding to the extraction command; the data to be processed is the original data after marking obtained by the watermarking method in any of the above embodiments;

[0143] Step 504: Extract the encrypted watermark carried in the data to be extracted from the location where it was added;

[0144] Step 506: Decrypt the ciphertext watermark to obtain at least one of the original watermark elements and enhanced watermark elements corresponding to the ciphertext watermark.

[0145] Extraction instructions refer to instructions that extract watermarks from specific data.

[0146] The data volume refers to the quantity or size of the data to be processed for watermark extraction. The data volume can also refer to the number of rows, columns, etc.

[0147] The decryption process in step 506 corresponds to the encryption process of the enhanced watermark element and the original watermark element in step 204. When the watermark extraction method in this embodiment is applied to other terminals and servers, and the enhanced watermark element and the original watermark element are encrypted using a symmetric encryption algorithm in step 204, the decryption process in step 506 may include: issuing an acquisition command to terminal 102 or server 104 to obtain the key corresponding to the symmetric encryption algorithm, and then using the key to decrypt the ciphertext watermark carried by the data to be extracted, to obtain at least one of the original watermark element and the enhanced watermark element corresponding to the ciphertext watermark.

[0148] Alternatively, when the watermark extraction method in this embodiment is applied to other terminals and servers, and when an asymmetric encryption algorithm is used to encrypt the enhanced watermark element and the original watermark element in step 204, the decryption process in step 506 may include: issuing an acquisition command to terminal 102 or server 104 to obtain the private key corresponding to the asymmetric encryption algorithm, and then using the private key to decrypt the ciphertext watermark carried by the data to be extracted, to obtain at least one of the original watermark element and the enhanced watermark element corresponding to the ciphertext watermark.

[0149] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0150] Based on the same inventive concept, this application also provides a watermark adding device for implementing the watermark adding method described above, and a watermark extraction device for implementing the watermark extraction method described above. The solutions provided by these watermark adding and extraction devices are similar to the solutions described in the watermark adding and extraction methods above. Therefore, the specific limitations of one or more watermark adding and extraction device embodiments provided below can be found in the limitations of the watermark adding and extraction methods described above, and will not be repeated here.

[0151] In one embodiment, such as Figure 6 As shown, a watermark adding device 600 is provided, comprising:

[0152] The extraction module 602 is used to extract at least one enhanced watermark element from the original data corresponding to the processing instruction in response to the processing instruction.

[0153] The watermark determination module 604 is used to determine the encrypted watermark based on the enhanced watermark element and at least one pre-set original watermark element.

[0154] The position determination module 606 is used to determine the addition position of the encrypted watermark according to the preset watermark density and data volume value; the addition position includes at least one of the pseudo row position, pseudo column position, and insertion position in the original data;

[0155] The insertion module 608 is used to insert a ciphertext watermark at the location where the original data is added, generating the marked original data.

[0156] In some optional embodiments, the watermark determination module 604 is further configured to:

[0157] Encrypt at least one enhanced watermark element and at least one original watermark element separately;

[0158] The encrypted watermark is determined based on the encrypted enhanced watermark elements and the encrypted original watermark elements.

[0159] In some optional embodiments, the watermark determination module 604 is further configured to:

[0160] The encrypted enhanced watermark element and the encrypted original watermark element are randomly combined to obtain the ciphertext watermark;

[0161] Alternatively, any encrypted enhanced watermark element can be used as the ciphertext watermark;

[0162] Alternatively, any encrypted original watermark element can be used as a ciphertext watermark.

[0163] In some alternative embodiments, the raw data includes structured data;

[0164] The location determination module 606 is also configured as follows:

[0165] The number of times the encrypted watermark is used is calculated based on the watermark density, data volume, and a pre-set density threshold.

[0166] Based on the data volume value, read the first data to be labeled that matches the data volume value from the structured data;

[0167] The addition location is determined in the first set of data to be labeled based on the number of times it is used.

[0168] In some optional embodiments, the added location includes the pseudo-line location in the first data to be labeled;

[0169] The location determination module 606 is also configured as follows:

[0170] Randomly generate row numbers that match the number of uses, and determine the first marked row from the first set of data to be marked based on the row numbers;

[0171] Create pseudo-lines after each of the first marked lines to serve as pseudo-line positions.

[0172] In some optional embodiments, the added location includes the pseudo-column location in the first data to be labeled;

[0173] The location determination module 606 is also configured as follows:

[0174] Randomly generate column numbers that match the number of uses, and determine the labeled column from the first set of data to be labeled based on the column numbers;

[0175] Create pseudo-columns after each marker column to serve as pseudo-column positions.

[0176] In some optional embodiments, the addition position includes the insertion position in the first set of data to be labeled;

[0177] The location determination module 606 is also configured as follows:

[0178] Randomly generate row numbers that match the number of uses, and determine the second marked row from the first set of data to be marked based on the row numbers;

[0179] Use the first preset position of each second mark row as the insertion position.

[0180] In some optional embodiments, the location determination module 606 is also configured to process the number of uses using the following formula:

[0181]

[0182] Where k represents the number of times it is used; n represents the amount of data; N represents the watermark density; and T represents the density threshold.

[0183] In some optional embodiments, the raw data includes plain text data;

[0184] The location determination module 606 is also configured as follows:

[0185] Based on the data volume value, read the second data to be labeled from the plain text data that matches the data volume value;

[0186] The third labeled row is randomly determined from the second set of data to be labeled;

[0187] Use the second preset position in the third mark row as the insertion position.

[0188] In some optional embodiments, the raw data includes rich text data;

[0189] The location determination module 606 is also configured as follows:

[0190] Based on the data volume value, read the third data to be labeled that matches the data volume value from the rich text data;

[0191] The fourth row of markers is randomly determined from the third set of data to be marked;

[0192] Use the third preset position in the fourth mark row as the insertion position.

[0193] In some alternative embodiments,

[0194] Generate a hidden watermark based on the encrypted watermark;

[0195] Insert the hidden watermark at the added position to obtain the original data after marking.

[0196] In one embodiment, such as Figure 7 As shown, a watermark extraction device 700 is provided, comprising:

[0197] The data reading module 702 is used to respond to the extraction command and obtain the data to be extracted from the data to be processed corresponding to the extraction command according to a preset data reading volume value; the data to be processed is the original data after marking obtained by the watermarking method in any of the above embodiments;

[0198] The watermark extraction module 704 is used to extract the encrypted watermark carried in the data to be extracted from the location where the watermark was added.

[0199] The decryption module 706 is used to decrypt the ciphertext watermark and obtain at least one of the original watermark elements and enhanced watermark elements corresponding to the ciphertext watermark.

[0200] Each module in the above-mentioned device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0201] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 8As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a watermarking method or a watermark extraction method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0202] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0203] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the watermark addition method or watermark extraction method of any of the above embodiments.

[0204] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the watermark addition method or watermark extraction method of any of the above embodiments.

[0205] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0206] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0207] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for adding a watermark, characterized in that, include: In response to a processing instruction, at least one enhanced watermark element is extracted from the original data corresponding to the processing instruction; Based on the enhanced watermark element and at least one pre-set original watermark element, a ciphertext watermark is determined. The location for adding the ciphertext watermark is determined according to the preset watermark density and data volume value; the location for adding the watermark includes at least one of the following: pseudo-row position, pseudo-column position, and insertion position in the original data. Insert the encrypted watermark at the specified addition location to generate the marked original data; The raw data includes structured data; Determining the location for adding the encrypted watermark according to a pre-set watermark density and data volume value includes: Based on the watermark density, the data volume value, and the preset density threshold, the number of times the encrypted watermark is used is calculated. According to the data volume value, read the first data to be labeled that conforms to the data volume value from the structured data; Based on the number of uses, the addition position is determined in the first data to be marked.

2. The method according to claim 1, characterized in that, The step of determining the encrypted watermark based on the enhanced watermark element and at least one pre-set original watermark element includes: At least one of the enhanced watermark elements and at least one of the original watermark elements are individually encrypted; The encrypted watermark is determined based on the encrypted enhanced watermark elements and the encrypted original watermark elements.

3. The method according to claim 2, characterized in that, The process of determining the ciphertext watermark based on the encrypted enhanced watermark elements and the encrypted original watermark elements includes: The encrypted enhanced watermark element and the encrypted original watermark element are randomly combined to obtain the ciphertext watermark; Alternatively, any encrypted enhanced watermark element may be used as the ciphertext watermark; Alternatively, any encrypted original watermark element can be used as the ciphertext watermark.

4. The method according to claim 1, characterized in that, The added position includes the pseudo-line position in the first data to be marked; Determining the addition position in the first data to be marked based on the number of uses includes: Randomly generate row numbers that match the number of uses, and determine the first marked row from the first data to be marked based on the row numbers; A pseudo-line is created after each of the first marked lines, serving as the pseudo-line position.

5. The method according to claim 1, characterized in that, The added position includes the pseudo-column position in the first data to be labeled; Determining the addition position in the first data to be marked based on the number of uses includes: Randomly generate column numbers that match the number of uses, and determine the labeled column from the first data to be labeled based on the column numbers; A pseudo-column is created after each of the aforementioned marker columns, serving as the pseudo-column position.

6. The method according to claim 1, characterized in that, The addition position includes the insertion position in the first data to be labeled; Determining the addition position in the first data to be marked based on the number of uses includes: Randomly generate row numbers that match the number of uses, and determine the second marked row from the first data to be marked based on the row numbers; The first preset position of each of the second mark rows is taken as the insertion position.

7. The method according to claim 1, characterized in that, The step of calculating the number of times the encrypted watermark is used based on the watermark density, the data volume value, and a preset density threshold is performed using the following formula to obtain the number of uses: Where k represents the number of times it is used; n represents the amount of data; N represents the watermark density; and T represents the density threshold.

8. The method according to claim 1, characterized in that, The raw data includes plain text data; Determining the addition position in the first data to be marked based on the number of uses includes: According to the data volume value, read the second data to be labeled that matches the data volume value from the plain text data; A third labeled row is randomly determined from the second set of data to be labeled; The second preset position in the third mark row is used as the insertion position.

9. The method according to claim 1, characterized in that, The raw data includes rich text data; Determining the addition position in the first data to be marked based on the number of uses includes: According to the data volume value, read the third data to be labeled that matches the data volume value from the rich text data; A fourth label row is randomly determined from the third set of data to be labeled; The third preset position in the fourth mark row is used as the insertion position.

10. The method according to any one of claims 4-9, characterized in that, The process of inserting the encrypted watermark at the added position to generate the marked original data includes: Based on the encrypted watermark, a hidden watermark is generated; The hidden watermark is inserted at the added position to obtain the marked original data.

11. A watermark extraction method, characterized in that, include: In response to the extraction command, the data to be extracted is obtained from the data to be processed corresponding to the extraction command according to the preset data reading volume value; The data to be processed is the original data after marking obtained by the watermarking method according to any one of claims 1-10; Extract the encrypted watermark carried by the data to be extracted from the location where it was added; Decrypt the ciphertext watermark to obtain at least one of the original watermark elements and enhanced watermark elements corresponding to the ciphertext watermark.

12. A watermark adding device, characterized in that, include: An extraction module is used to extract at least one enhanced watermark element from the original data corresponding to the processing instruction in response to a processing instruction. The watermark determination module is used to determine the encrypted watermark based on the enhanced watermark element and at least one pre-set original watermark element; The position determination module is used to determine the addition position of the encrypted watermark according to the preset watermark density and data volume value; the addition position includes at least one of the pseudo row position, pseudo column position, and insertion position in the original data; An insertion module is used to insert the encrypted watermark at the location where the original data is to be added, thereby generating the marked original data. The raw data includes structured data; The location determination module is further configured to: Based on the watermark density, the data volume value, and the preset density threshold, the number of times the encrypted watermark is used is calculated. According to the data volume value, read the first data to be labeled that conforms to the data volume value from the structured data; Based on the number of uses, the addition position is determined in the first data to be marked.

13. A watermark extraction device, characterized in that, include: The data reading module is used to respond to the extraction command and obtain the data to be extracted from the data to be processed corresponding to the extraction command according to the preset data reading volume value; The data to be processed is the original data after marking obtained by the watermarking method according to any one of claims 1-10; The watermark extraction module is used to extract the encrypted watermark carried by the data to be extracted from the location where the watermark was added. The decryption module is used to decrypt the ciphertext watermark to obtain at least one of the original watermark elements and enhanced watermark elements corresponding to the ciphertext watermark.

14. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the watermark addition method according to any one of claims 1 to 10 or the watermark extraction method according to claim 11.

15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the watermark addition method according to any one of claims 1 to 10 or the watermark extraction method according to claim 11.

16. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the watermark addition method according to any one of claims 1 to 10 or the watermark extraction method according to claim 11.

Citation Information

Patent Citations

  • Data watermark processing method, tracing method and storage medium

    CN117708779A

  • Information processor, information processing program and storage medium

    JP2004236227A