Data processing methods
By converting the data user number into binary arrays and groups, and embedding the watermark with blank characters, the problem of difficulty in tracing data leakage during data sharing is solved, and efficient data traceability and self-certification are achieved, and corporate reputation is protected.
Patent Information
- Application Number
- CN202310100118.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-02
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2043-02-02
AI Technical Summary
During the data sharing process, it is difficult for enterprises to control data leakage and abuse, especially when plain text data is transferred to third parties, which lacks traceability and self-certification capabilities, affecting brand and reputation.
By converting the user number of the target data into a binary array, determining the number of packets, grouping the data, and adding watermarks using preset whitespace characters to generate watermark data, ensuring that the data is embedded invisible characters during transmission, realizing data traceability Positioning and self-certification.
Improves the anti-aggressiveness of data, allowing enterprises to accurately trace the source to the data recipient when data is leaked, protecting the brand and reputation without affecting the original meaning and format of the data.
Smart Images

Figure CN115987682B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present specification relate to the field of computer technology, and in particular, to a data processing method. Background Art
[0002] With the rapid development of emerging technologies, the rapid expansion of application scenarios, and the ever-changing security situation, while data has become a key factor in enterprise development, data, as a core asset of enterprises, also faces security challenges. When enterprises share and cooperate with third parties, there are scenarios where plaintext data needs to be provided to third parties. Once the plaintext data flows to third parties, it is difficult for enterprises to control data leakage and abuse. Since there are various factors that may lead to data leakage, at this time, enterprises need to have the ability to trace the source of the leaked data to the third party, and complete self-certification to avoid affecting the corporate brand and reputation. Summary of the invention
[0003] In view of this, the embodiments of this specification provide two data processing methods. One or more embodiments of this specification simultaneously involve two data processing devices, a computing device, a computer-readable storage medium and a computer program to solve the technical defects existing in the prior art.
[0004] According to a first aspect of an embodiment of this specification, a data processing method is provided, including:
[0005] Converting a user number of a data receiver of the target data into a binary array, and determining the number of first groups according to the length of the binary array;
[0006] Grouping the target data according to the first grouping quantity to obtain a first type of grouping, and determining a grouping binary number corresponding to the first type of grouping according to the order of binary numbers in the binary array;
[0007] Adding a watermark to target data of the first type of group according to the group binary number and a preset blank character corresponding to the first type of group to generate first watermark data;
[0008] The first watermark data is sent to the data receiver.
[0009] According to a second aspect of an embodiment of this specification, there is provided a data processing device, including:
[0010] A first data conversion module is configured to convert a user number of a data recipient of the target data into a binary array, and determine a first grouping quantity according to a length of the binary array;
[0011] A first data grouping module is configured to group the target data according to the first grouping quantity to obtain a first type of grouping, and determine a grouping binary number corresponding to the first type of grouping according to a binary number sequence in the binary array;
[0012] A first watermark adding module is configured to add a watermark to the target data of the first type of group according to the group binary number corresponding to the first type of group and a preset blank character to generate first watermark data;
[0013] The first data sending module is configured to send the first watermark data to the data receiving party.
[0014] According to a third aspect of an embodiment of this specification, a data processing method is provided, including:
[0015] Converting the user number of the data receiver of the target data into a binary array, and determining the number of groups according to the length of the binary array;
[0016] Grouping the target data according to the number of groups to obtain target groups and group numbers of the target groups;
[0017] Adding a watermark to the target data according to the binary numbers in the binary array and the group number of the target group to generate target watermark data;
[0018] The target watermark data is sent to the data receiver.
[0019] According to a fourth aspect of an embodiment of this specification, there is provided a data processing device, including:
[0020] A second data conversion module is configured to convert a user number of a data recipient of the target data into a binary array, and determine the number of groups according to the length of the binary array;
[0021] A second data grouping module is configured to group the target data according to the number of groups, and obtain a target group and a group number of the target group;
[0022] A second watermark adding module is configured to add a watermark to the target data according to the binary number in the binary array and the group number of the target group to generate target watermark data;
[0023] The second data sending module is configured to send the target watermark data to the data receiving party.
[0024] According to a fifth aspect of an embodiment of this specification, a computing device is provided, including:
[0025] Memory and processor;
[0026] The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the above data processing method are implemented.
[0027] According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the above-mentioned data processing method are implemented.
[0028] According to a seventh aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned data processing method.
[0029] An embodiment of the present specification implements a data processing method, including converting a user number of a data recipient of target data into a binary array, and determining a first grouping quantity based on the length of the binary array; grouping the target data according to the first grouping quantity to obtain a first type of grouping, and determining a grouping binary number corresponding to the first type of grouping based on the order of binary numbers in the binary array; adding a watermark to the target data of the first type of grouping based on the grouping binary number corresponding to the first type of grouping and a preset blank character to generate a first watermark data; and sending the first watermark data to the data recipient.
[0030] Specifically, after determining the target data that needs to be sent to the data recipient, the data processing method uses an invisible character (i.e., blank character, such as line feed, carriage return, space, etc.) watermark embedding scheme to embed invisible characters in all places in the target data where invisible characters can be embedded, based on the group binary number corresponding to the first type of group and the preset blank character. The method is not limited to long text formats and does not need to add too much pseudo data. It can use as much embedded watermark information as possible in a limited space to achieve watermarking of the target data, so that the target data has better anti-attack properties. Then, when the first watermark data sent to the data recipient is leaked, the enterprise can accurately trace the source and locate the data recipient based on the watermark added in the leaked data. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 This is a specific scenario diagram of a data processing method provided by an embodiment of this specification;
[0032] Figure 2 is a flow chart of a data processing method provided by an embodiment of this specification;
[0033] Figure 3 is a method flow chart of another data processing method provided by an embodiment of this specification;
[0034] Figure 4 It is a schematic diagram of a specific processing flow of adding watermarks and extracting watermarks from data according to a grouping order in another data processing method provided by an embodiment of the present specification;
[0035] Figure 5 is a structural schematic diagram of a data processing device provided by an embodiment of this specification;
[0036] Figure 6 is a schematic diagram of the structure of another data processing device provided by an embodiment of this specification;
[0037] Figure 7 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION
[0038] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.
[0039] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0040] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0041] First, the terms involved in one or more embodiments of this specification are explained.
[0042] Data watermark: It includes two types: explicit watermark and implicit watermark. Data watermark embeds watermark information in the original data by adding pseudo rows and pseudo columns to the original data, implanting marks into the original data, etc. without affecting the data function. When data leakage occurs, the purpose of traceability and verification can be achieved by extracting the watermark information embedded in the data.
[0043] Traceability and proof of innocence: When an enterprise provides plaintext data to a third party, it no longer has the ability to control and audit data leakage and abuse. When a third party leaks data, tracing refers to the use of technical means to confirm that the data was leaked by a third party, not the enterprise, thereby enabling the enterprise to prove its innocence.
[0044] Based on the above problems, data watermarking is a solution. Before sharing data with a third party, watermark information is added to the data. If data is leaked, the source can be traced based on the watermark of the leaked data. Data watermarks include explicit watermarks and implicit watermarks. An explicit watermark is a mark on data behavior, thereby tracing the leaked data. Common methods include adding pseudo rows and pseudo columns to the original data, adding marks to the original data, and so on. However, implicit watermarking does not require adding rows or columns, nor does it require adding dirty data. It only requires algorithmic mapping of appropriate data fields. However, the existing data watermarking methods have poor anti-attack capabilities for the watermarks added to the data.
[0045] Based on this, two data processing methods are provided in this specification. One or more embodiments of this specification simultaneously involve two data processing devices, a computing device, a computer-readable storage medium and a computer program, which are described in detail one by one in the following embodiments.
[0046] See also Figure 1 , Figure 1 A specific scenario schematic diagram of a data processing method provided according to an embodiment of the present specification is shown.
[0047] Figure 1 The data sender 102 and the data receiver 104 are included, wherein the data sender 102 can be understood as the above-mentioned enterprise, and the data receiver 104 can be understood as the above-mentioned third party.
[0048] In actual applications, the data sender 102 will add watermark information to the target data before sending the target data to the data receiver 104 to realize data sharing with the data receiver 104, so as to ensure that in the event of data leakage of the target data, the watermark information added in the target data can be traced back to the data sender 102 to prove its innocence. At the same time, it serves as a safety reminder for the data receiver 104 to ensure the safety of subsequent use of the target data.
[0049] The specific implementation is as follows:
[0050] Before sending the target data to the data receiver 104, the data sender 102 will first confirm the unique user number set for the data receiver 104 (i.e., the user number of the data receiver 104), and convert the user number into a binary array; then, according to the length of the binary array and the binary numbers in the binary array, combined with preset invisible characters (such as line feeds, carriage returns, spaces, etc.), a watermark is added to the target data to generate target data with a watermark. Finally, the data sender 102 sends the target data with a watermark to the data receiver 104; if the target data is subsequently leaked, the user number can be restored by extracting the watermark in the target data, thereby tracing back to the data receiver 104, and completing the self-proof of innocence.
[0051] See also Figure 2 , Figure 2 A flow chart of a data processing method provided according to an embodiment of the present specification is shown, which specifically includes the following steps.
[0052] Step 202: Convert the user number of the data recipient of the target data into a binary array, and determine the first grouping quantity according to the length of the binary array.
[0053] Specifically, the data processing method is applied to the data sender, wherein the target data can be understood as the data to be sent to the data recipient, such as the target data can be a document or table in any format; the data recipient can be understood as any enterprise that needs to use the target data; the user number of the data recipient can be understood as a unique decimal number configured by the data sender for each data recipient, or a character number, etc.
[0054] Then, when the user number of the data recipient is a decimal number, the decimal number can be directly converted into a binary array. For example, if the user number of the data recipient is 8, the user number 5 of the data recipient can be converted into a binary array: 101; and when the user number of the data recipient is a character number or other type of number, it is necessary to first convert the user number of the data recipient into a character of a numeric type, and then convert the character of the data type into a corresponding binary array.
[0055] For ease of understanding, the following embodiments are described by taking the user number of the data receiver as a decimal number as an example.
[0056] Still taking the above as an example, when the binary array is 101, the length of the binary array is 3, then it can be determined that the number of first groups is 3, that is, when the target data is subsequently grouped, it can be divided into 3 groups.
[0057] Step 204: Group the target data according to the first grouping quantity to obtain a first type of grouping, and determine the grouping binary number corresponding to the first type of grouping according to the order of the binary numbers in the binary array.
[0058] Still taking the above as an example, when the number of first groups is 3, the target data is grouped according to the number of first groups, and the target data can be divided into 3 first type groups, such as first type group 1, first type group 2, and first type group 3.
[0059] Specifically, the target data is grouped according to the first grouping quantity, and the first type of grouping includes at least two grouping situations. The first is when there is a primary key in the target data and the primary key is a numeric type, the target data can be grouped according to the primary key of the numeric type; the second is when there is a primary key in the target data, but the primary key is a text type, the primary key needs to be converted to a numeric type, and then the target data is grouped according to the primary key of the numeric type. The following describes in detail the specific grouping methods of the two target data.
[0060] The first method is that when the target data has a primary key and the primary key is of a numeric type, the target data can be grouped according to the primary key of the numeric type. The specific implementation method is as follows:
[0061] The step of grouping the target data according to the first number of groups to obtain a first type of grouping includes:
[0062] When it is determined that the target data has a primary key and the primary key is a numerical type, determining a group number of the target data according to the first group quantity, the primary key, and a preset hash algorithm;
[0063] The target data is grouped according to the grouping number of the target data to obtain a first type of grouping.
[0064] The preset hash algorithm can be set according to actual application, and the embodiments of this specification do not impose any limitation on this. In addition, when calculating the group number of the target data, the preset hash algorithm can include one hash algorithm or two hash algorithms.
[0065] For example, the target data is as described in Table 1 below:
[0066] Certificate Number Name Student ID Home address 1 aa 111 a province a city 2 bb 222 b Province b City 3 cc 333 c Province c City
[0067] If the certificate number is the primary key in the target data, then it can be determined that the target data has a primary key and the primary key is a numeric type. At this time, the group number of each row in the target data can be calculated according to the first group number, the primary key, and the preset hash algorithm. The specific calculation formula is as follows:
[0068] t=H((K||H(K||t pk )))mod L
[0069] Where t represents the group number of each row, H represents the preset hash algorithm, K represents the key, and t pk Represents the primary key for each row.
[0070] By using the above calculation formula, the group number corresponding to each row in the table of the above target data can be calculated. For example, the group number corresponding to the second row is 1, the group number corresponding to the third row is 2, and the group number corresponding to the fourth row is 3.
[0071] Finally, the target data is grouped according to the grouping number of the target data to obtain the first type of grouping, that is, it can be understood that according to the grouping number 1 corresponding to the second row of the target data, the grouping number 2 corresponding to the third row, and the grouping number 3 corresponding to the fourth row, the second row is divided into the first type of grouping, such as the first type of grouping 1, the third row is divided into another first type of grouping, such as the first type of grouping 2, and the fourth row is divided into another first type of grouping, such as the first type of grouping 3.
[0072] In addition, in the process of grouping the target data, in order to provide security and randomness for the grouping and make the watermarks subsequently added to the target data as dispersed as possible, the double hash positioning algorithm in the above calculation formula can be used to group the target data. Currently, in practical applications, a single hash positioning algorithm can also be used to group the target data.
[0073] The data processing method provided in the embodiments of this specification can directly calculate the group number corresponding to each row of data in the target data based on the first grouping quantity, the primary key, and a preset hash algorithm when it is determined that the target data has a primary key and the primary key is of a numerical type. The target data can then be quickly grouped according to the group number.
[0074] The second method is that when the target data has a primary key but it is a text type, the primary key needs to be converted to a numeric type, and then the target data is grouped according to the numeric primary key. The specific implementation method is as follows:
[0075] The step of grouping the target data according to the first number of groups to obtain a first type of grouping includes:
[0076] If it is determined that the target data has a primary key and the primary key is of text type, converting the primary key into a numeric type;
[0077] Determine the group number of the target data according to the first group quantity, the primary key, and a preset hash algorithm;
[0078] The target data is grouped according to the grouping number of the target data to obtain a first type of grouping.
[0079] Specifically, different from the first method of grouping target data, when the primary key is of text type, it is necessary to determine the character number corresponding to the primary key. For example, if the primary key is: name, the character number corresponding to the surname in the text dictionary is 1, and the character number corresponding to the first name is 9, then the character number corresponding to the primary key is 19. The specific implementation method is as follows:
[0080] The step of converting the primary key from text type data to numeric type data includes:
[0081] The character number corresponding to the primary key is determined according to a preset text dictionary, and the primary key is replaced by the character number to convert the primary key from text type data to numerical type data.
[0082] Finally, the character number corresponding to the primary key of the numeric type can be used to calculate the group number of the target data according to the following calculation formula:
[0083] t=H((K||H(K||A)))modL
[0084] Among them, t represents the group number of each row, H represents the preset hash algorithm, K represents the key, and A represents the character number corresponding to the primary key.
[0085] By using the above calculation formula, the group number corresponding to each row in the table of the above target data can be calculated. For example, the group number corresponding to the second row is 1, the group number corresponding to the third row is 2, and the group number corresponding to the fourth row is 3.
[0086] Finally, the target data is grouped according to the grouping number of the target data to obtain the first type of grouping, that is, it can be understood that according to the grouping number 1 corresponding to the second row of the target data, the grouping number 2 corresponding to the third row, and the grouping number 3 corresponding to the fourth row, the second row is divided into the first type of grouping, such as the first type of grouping 1, the third row is divided into another first type of grouping, such as the first type of grouping 2, and the fourth row is divided into another first type of grouping, such as the first type of grouping 3.
[0087] Similar to the above embodiment, in the process of grouping the target data, in order to provide security and randomness for the grouping and make the watermark subsequently added to the target data as dispersed as possible, the double hash positioning algorithm in the above calculation formula can be used to group the target data. Currently, in practical applications, a single hash positioning algorithm can also be used to group the target data.
[0088] The data processing method provided in the embodiments of this specification, when it is determined that the target data has a primary key, but the primary key is of text type, needs to obtain the character code corresponding to the text type primary key, and then calculate the group number corresponding to each row of data in the target data based on the character code of the numeric type, the first grouping number, and the preset hash algorithm. The target data can then be quickly grouped according to the group number.
[0089] In another possible implementation, when there is a non-numeric primary key in the target data, or when there is no primary key in the target data but there is a numeric column in the target data, the numeric column can be used as the primary key to group the target data; of course, if there is no primary key in the target data and all the data in the target data are text type, one of the text columns can be selected and the character number corresponding to the text column can be used to group the target data. The specific grouping calculation process can be referred to the above embodiment and will not be repeated here.
[0090] In addition, after the target data is grouped according to the first grouping quantity to obtain the first type of groups, the grouping binary number corresponding to each first type of group can be determined according to the order of the binary numbers in the binary array.
[0091] For example, the first type of grouping includes: first type of grouping 1, first type of grouping 2, and first type of grouping 3; the order of binary numbers in the binary value is 101; then, according to the order of binary numbers in the binary array, the group binary number corresponding to each first type of grouping can be understood as follows: the group binary number corresponding to the first type of grouping 1 is 1, the group binary number corresponding to the first type of grouping 2 is 0, and the group binary number corresponding to the first type of grouping 3 is 1.
[0092] Step 206: Add a watermark to the target data of the first type of group according to the group binary number corresponding to the first type of group and a preset blank character to generate first watermark data.
[0093] The preset blank characters include but are not limited to line feed, carriage return, space, etc.
[0094] Specifically, after determining each first type group and the binary number corresponding to each first type group, a watermark can be added to the target data of the first type group according to the group binary number corresponding to the first type group and the preset blank character to generate the first watermark data. The specific implementation method is as follows:
[0095] The step of adding a watermark to the target data of the first type of group according to the group binary number corresponding to the first type of group and the preset blank character to generate the first watermark data includes:
[0096] When it is determined that the group binary number corresponding to the first type of group is 1, a preset blank character is added to the target data of the first type of group; and when it is determined that the group binary number corresponding to the first type of group is 0, the preset blank character is not added to the target data of the first type of group, so as to generate the first watermark data.
[0097] Continuing with the above example, the group binary number corresponding to the first type group 1 is 1, the group binary number corresponding to the first type group 2 is 0, and the group binary number corresponding to the first type group 3 is 1.
[0098] If the preset blank character is a space, then, when it is determined that the group binary number corresponding to the first type group 1 and the first type group 3 is 1, a watermark is added to each line of target data of the first type group 1 and each line of target data of the first type group 3 by adding a space; and when it is determined that the group binary number corresponding to the first type group 2 is 0, no space is added to each line of target data of the first type group 2. In this way, watermarking is completed in the target data to generate the first watermark data (i.e., the target data with the watermark added).
[0099] In the embodiments of this specification, preset blank characters, such as line feed characters, carriage return characters, spaces, etc., are used to add watermarks to the target data. After the watermark is embedded, the original meaning of the text type or other types of target data will not be changed, and the mean, variance, and other values will not be changed. Therefore, it has good invisibility, and can avoid the visual distress caused by the target data with the watermark to the data recipient, thereby greatly improving the watermark adding effect.
[0100] In addition, in order to further improve the difficulty of cracking the watermark effect and the security, when adding a watermark to the target data, different preset blank characters can be used to add the watermark. For example, the preset blank characters can be set to three types: carriage return, line feed and space. When adding a watermark to the target data, different watermark information can be added to different lines. The specific implementation method is as follows:
[0101] The step of adding a watermark to the target data of the first type of group according to the group binary number corresponding to the first type of group and the preset blank character to generate the first watermark data includes:
[0102] Determine, according to the number of the first groups and the group number of the target data, a hash value corresponding to the target data of the first type of group using a preset hash value calculation method;
[0103] According to the group binary number corresponding to the first type of group and the preset blank character corresponding to the hash value, a watermark is added to the target data of the first type of group to generate first watermark data.
[0104] Still taking the above as an example, if the number of first groups is 3 and the group number of the target data is 1, the preset hash value calculation method can be used to calculate the hash value corresponding to the target data of each first type group. For example, the preset hash value calculation method is as follows:
[0105] k = tmod 3
[0106] Among them, as in the above formula, t represents the group number corresponding to each row of target data in the target data, and 3 is the length of the binary array.
[0107] For example, when K=0, the preset blank character represents a carriage return character, when K=1, the preset blank character represents a line feed character, and when K=2, the preset blank character represents a space.
[0108] Specifically, firstly, according to the number of first groups and the group number corresponding to the target data, a hash value corresponding to each target data of the first type group is calculated using a hash value calculation method, and then, according to the group binary number corresponding to the first type and the preset blank character corresponding to each hash value, a watermark is added to the target data of the first type group to generate the first watermark data. The specific implementation method is as follows:
[0109] The step of adding a watermark to the target data of the first type of group according to the group binary number corresponding to the first type of group and the preset blank character corresponding to the hash value to generate the first watermark data includes:
[0110] When it is determined that the group binary number corresponding to the first type of group is 1, the preset blank character corresponding to the hash value is added to the target data of the first type of group; and when it is determined that the group binary number corresponding to the first type of group is 0, the preset blank character corresponding to the hash value is not added to the target data of the first type of group, so as to generate the first watermark data.
[0111] Still using the above example, the group binary number corresponding to the first type group 1 is 1, the group binary number corresponding to the first type group 2 is 0, and the group binary number corresponding to the first type group 3 is 1.
[0112] Then, when it is determined that the group binary number corresponding to the first type group 1 is 1, determine what the hash value corresponding to the target data of the first type group 1 is. If the hash value is 0, add the preset blank character corresponding to the hash value 0: carriage return to each row of target data of the first type group. If the hash value is 1, add the preset blank character corresponding to the hash value 1: line feed to each row of target data of the first type group. If the hash value is 2, add the preset blank character corresponding to the hash value 2: space to each row of target data of the first type group. Similarly, the method of adding watermarks to the target data of the first type group 3 can refer to the method of adding watermarks to the target data of the first type group 1. For the first type group 2, since its corresponding group binary number is 0, no watermark needs to be added. In this way, the watermark addition in the target data is completed to generate the first watermark data.
[0113] The data processing method provided in the embodiment of this specification embeds different invisible characters (preset blank characters) in the target data according to different hash values to complete the watermarking of the target data, thereby greatly improving the difficulty of cracking the watermark effect and the security of the generated first watermark data.
[0114] Step 208: Send the first watermark data to the data receiver.
[0115] Specifically, after adding a watermark to the target data to generate the first watermark data, the first watermark data may be sent to a data receiver and shared with the data receiver.
[0116] The data processing method provided in the embodiment of this specification, after determining the target data that needs to be sent to the data recipient, uses a watermark embedding scheme of invisible characters (i.e., blank characters, such as line feeds, carriage returns, spaces, etc.) to embed invisible characters in all places in the target data where invisible characters can be embedded, according to the group binary number corresponding to the first type of grouping and preset blank characters. It is not limited to long text formats and does not need to add too much pseudo data. It can use as much embedded watermark information as possible in a limited space to achieve watermarking of the target data, so that the target data has better anti-attack properties. Then, when the first watermark data sent to the data recipient is leaked, the enterprise can accurately trace the source and locate the data recipient based on the watermark added to the leaked data.
[0117] If it is necessary to perform third-party tracing of the target data based on the watermark, that is, to trace the target data to the data recipient based on the watermark, after obtaining the first watermark data, it is necessary to extract the watermark in the first watermark data and restore it to the user number of the data recipient to achieve tracing of the data recipient. The specific implementation method is as follows:
[0118] After sending the first watermark data to the data receiving party, the method further includes:
[0119] Acquire the first watermark data, and delete preset blank characters in the first watermark data through a preset function to obtain verification data;
[0120] Grouping the verification data according to the first grouping quantity to obtain a second type of grouping;
[0121] A verification watermark is generated according to a preset blank character corresponding to the verification data in the second type group, and the data recipient is determined according to the verification watermark.
[0122] Among them, the preset function can be understood as the strip() function. Since the data sender adds watermarks to all the target data sent with invisible characters, when extracting the watermark, in order to avoid affecting the watermark extraction effect, the preset function can be used to remove the invisible characters in the first watermark data.
[0123] Specifically, the first watermark data, that is, the target data to be watermarked, is obtained. First, preset blank characters in the first watermark data are deleted through a preset function to obtain verification data. Then, the verification data is grouped according to the first grouping quantity to obtain a second type of grouping. The specific implementation steps of grouping the verification data according to the first grouping quantity to obtain the second type of grouping can be referred to the specific implementation process of grouping the target data according to the first grouping quantity to obtain the first type of grouping in the above embodiment, which will not be repeated here.
[0124] Then, a verification watermark is generated according to the preset blank characters corresponding to the verification data in the second type group. Specifically, the specific implementation method of generating the verification watermark according to the preset blank characters corresponding to the verification data in the second type group is as follows:
[0125] In the case where there is a preset blank character corresponding to the verification data in the second type group, the recorded watermark information is 1; in the case where there is no preset blank character corresponding to the verification data in the second type group, the recorded watermark information is 0;
[0126] A verification watermark is generated according to the watermark information corresponding to the second type of group.
[0127] For example, the second type grouping includes: second type grouping 1, second type grouping 2, and second type grouping 3; respectively determine that the verification data in second type grouping 1 corresponds to preset blank characters, the verification data in second type grouping 2 corresponds to preset blank characters, and the verification data in second type grouping 3 corresponds to preset blank characters.
[0128] For example, if the second type group 1 includes 10 lines of verification data, and these 10 lines of verification data all correspond to preset blank characters, then the watermark information corresponding to the 10 lines of verification data in the second type group 1 can be recorded as [1, 1, 1, 1, 1, 1, 1, 1, 1], that is, 10 1s, and then according to the majority principle, it can be determined that the watermark information corresponding to the second type group 1 is 1; if the second type group 2 includes 5 lines of verification data, and some of the 5 lines of verification data correspond to preset blank characters, while others do not have corresponding preset blank characters, if the second type group 2 When the watermark information records corresponding to the 5 lines of verification data in group 2 are [1, 0, 0, 0, 1], then according to the majority principle, it can be determined that the watermark information corresponding to the second type group 2 is 0; similarly, if the watermark information corresponding to the second type group 3 is 1, it can be determined that the verification watermark corresponding to the first watermark data is 101, and then the binary number 101 is converted to decimal 5; finally, according to the decimal number, by matching the user numbers of all data recipients, the data recipient of the first watermark data can be quickly and accurately determined, and the traceability of the first watermark data can be completed.
[0129] The above embodiment introduces the implementation method of completing watermark extraction when there is a numeric primary key in the first watermark data; and when the first watermark data is full text type data, the specific implementation method of completing watermark extraction is as follows:
[0130] When it is determined that the first watermark data has a primary key and the primary key is of text type, determining a character number corresponding to the primary key according to the preset text dictionary, and replacing the primary key with the character number to convert the primary key from text type data to numeric type data;
[0131] Then, according to the first group quantity, the primary key, and the preset hash algorithm, the group number of the first watermark data is determined;
[0132] The first watermark data is grouped according to the grouping number of the first watermark data to obtain a second type of grouping.
[0133] Then, the specific implementation method of generating the verification watermark according to the preset blank characters corresponding to the verification data in the second type group is as follows:
[0134] Determine the character number corresponding to the primary key of the verification data in the second type group;
[0135] If there is a preset blank character corresponding to the verification data in the second type group, and the character number corresponding to the preset blank character matches the character number corresponding to the primary key, the recorded watermark information is 1, otherwise, the recorded watermark information is 0;
[0136] A verification watermark is generated according to the watermark information corresponding to the second type of group.
[0137] For example, the second type group 1, the second type group 2, and the second type group 3, then match the character number corresponding to the primary key of each row of verification data in each second type group with the character number corresponding to the preset blank character corresponding to the row of verification data. When a match occurs, the watermark information is recorded as "1", otherwise the watermark information is recorded as "0". In each second type group, a 0-1 sequence set will be obtained, and the watermark information corresponding to the second type group is finally obtained according to the principle of taking the majority. For example, there are 11 rows of data in a second type group, and the extraction results of the 11 rows of data are [0, 1, 1, 1, 1, 0, 1, 1, 0], then the watermark information finally extracted from the second type group is "1". When the watermark information of the three second type groups is extracted, they are spliced together to obtain the binary string of the watermark, which is converted into a decimal value to obtain the final watermark information, that is, the user number of the data provider. Based on the user number, the data provider can be quickly and accurately traced back.
[0138] In practical applications, in order to improve the robustness of the watermark, after embedding invisible characters in the target data to complete the watermarking, another layer of watermark can be added on the first watermark data by changing the data order, so that the target data with the watermark added can resist frequent data change operations, including common changes such as deletion, update, and insertion, and has a higher watermarking effect. The specific implementation method is as follows:
[0139] After adding a watermark to the target data of the first type group to generate the first watermark data, the method further includes:
[0140] Determine the second number of groups according to the length of the binary array;
[0141] Grouping the first watermark data according to the second grouping quantity to obtain a third type of group and a grouping number of the third type of group;
[0142] Adding a watermark to the first watermark data according to the binary numbers in the binary array and the group number of the third type of group to generate second watermark data;
[0143] The second watermark data is sent to the data receiver.
[0144] Still taking the above example, the length L of the binary value is 3, then the number of the second group can be understood as N. g =L+1, i.e. 4 groups.
[0145] After determining the second grouping number, the first watermark data can be grouped according to the second grouping number to obtain the third type of grouping and the grouping number of the third type of grouping. Specifically, the specific implementation of grouping the first watermark data according to the second grouping number is the same as the specific implementation of grouping the target data according to the first grouping number in the above embodiment, and will not be repeated here. The only difference is that the calculation parameters are different. Specifically, the implementation formula for grouping the first watermark data according to the second grouping number is as follows:
[0146] t=H((K||H(K||t pk )))mod N g
[0147] Where t represents the group number of each row, H represents the preset hash algorithm, K represents the key, and t pk Represents the primary key of each row, N g It indicates the number of the second group.
[0148] Then, after obtaining the third type of group and the group number of the third type of group, the first watermark data can be watermarked according to the binary number in the binary array and the group number of the third type of group to generate the second watermark data. Finally, the second watermark data with two layers of watermarks is sent to the data receiver.
[0149] Specifically, adding a watermark to the first watermark data according to the binary number in the binary array and the group number of the third type group to generate the second watermark data includes:
[0150] Determine the binary numbers in the binary array in sequence, and when the binary number is 1, adjust the position of the third type of grouping according to the order of the binary number in the binary array; and when the binary number is 0, do not adjust the position of the third type of grouping, so as to add a watermark to the first watermark data and generate second watermark data.
[0151] In a specific implementation, the binary numbers in the binary data are determined in sequence. If the binary number is 1, the position of the third type of grouping is adjusted according to the order of the binary numbers in the binary array. For example, the watermark information of the binary array is W={ω1, ω2, ...ω L}, that is, the watermark information is a binary array composed of 0 or 1, each watermark can be a binary number of 0 or 1, and the subscript j represents the jth watermark ωj If w j =1, keep the positions of the j-1 third type groups in all the third type groups unchanged, and exchange the positions of the j third type group and the j+1 third type group; if the binary number is 0, the position of the third type group is not adjusted. By adjusting the position of the third type group in this way, the watermarking of the first watermark data is realized. For example, the binary number is 10, and the data sequence numbers are 1, 2, 3, 4, 5, 6. After grouping, [1, 2] is the first group, and the group number is 1; [3, 4] is the second group, and the group number is 2; [5, 6] is the third group, and the group number is 3. According to the binary number 10, the data after watermark embedding is [3, 4], [1, 2], [5, 6], and the data sent is [3, 4], [1, 2], [5, 6], that is, the watermark is embedded by changing the position of each group of data.
[0152] As described in Table 2 below:
[0153] 1 2 4 5 2 1 5 4 3 3 6 6
[0154] It can be seen from Table 2 that the order of the group numbers of the third type of groups corresponding to each row in the first watermark data table calculated according to the above formula is shown in the left column of Table 2. After watermark embedding, the order of the group numbers of the third type of groups corresponding to each row in the first watermark data table is shown in the right column of Table 2.
[0155] The data processing method provided in the embodiments of this specification embeds invisible characters to achieve target data watermarking, obtains the first watermark data, and then completes another layer of watermark coverage by changing the order of the first watermark data. The watermarking will not modify any data or introduce any errors. It only adds watermark information to the data by changing the order, which is another layer of protection based on the previous watermarking and has good robustness.
[0156] Then, after the second watermark data is sent to the data receiver, when the data receiver is subsequently traced, the watermark information in the second watermark data can be extracted to accurately trace the data receiver. The specific implementation method is as follows:
[0157] After sending the second watermark data to the data receiving party, the method further includes:
[0158] Acquire the second watermark data, and group the second watermark data according to the second group quantity to obtain a fourth type of group;
[0159] A verification watermark is generated according to the group number of the fourth type of group, and the data recipient is determined according to the verification watermark.
[0160] Among them, the specific implementation method of grouping the second watermark data according to the second group quantity to obtain the fourth type of group and the group number of the fourth type of group is the same as the specific implementation method of grouping the first watermark data according to the second group quantity to obtain the third type of group and the group number of the third type of group in the above embodiment, and will not be repeated here.
[0161] After the group number of the fourth type of group is determined, a verification watermark may be generated according to the group number of the fourth type of group, and the data recipient may be determined according to the verification watermark.
[0162] Specifically, according to the group number of the fourth type of group, the specific implementation method of generating the verification watermark is as follows:
[0163] The step of generating a verification watermark according to the group number of the fourth type of group includes:
[0164] Determining a target group from the fourth type of groups;
[0165] When the group number of the target group is smaller than the group number of the previous group of the target group, the watermark information is recorded as 1, and when the group number of the target group is larger than the group number of the previous group of the target group, the watermark information is recorded as 0;
[0166] A verification watermark is generated according to the watermark information corresponding to the fourth type of group.
[0167] Among them, the target group can be understood as any one of the fourth type groups in the fourth type groups, for example, the fourth type group includes fourth type group 1, fourth type group 2, fourth type group 3, and fourth type group 4; then the target group can be understood as any one of the fourth type groups in the fourth type group 1, fourth type group 2, fourth type group 3, and fourth type group 4.
[0168] In specific implementation, when the group number of the target group is determined to be smaller than the group number of the previous group of the target group, the watermark information is recorded as 1; and when the group number of the target group is greater than the group number of the previous group of the target group, the watermark information is recorded as 0.
[0169] Using the above example, the data grouping method in the second watermark data is the same as that in watermark embedding. The relative position of each fourth type group is recorded. By obtaining the relative position of each fourth type group, the watermark information is extracted in sequence from the back to the front, in groups of two. That is, the last two group numbers are compared first. If the Nth group number is g -1 where the group number is less than N gThe group number at the Nth position shows that the group position has not changed, that is, the embedded bit information is 0. Then compare the Nth g -2 groups with a number less than N g -1, it can be seen that the position of the group has not changed; if the Nth g -1 where the group number is greater than N g The group number at , we can get the group position has changed, the position is swapped, that is, the embedded bit information is 1, and then the group numbers of these two positions are swapped, and this cycle is repeated until the watermark information is extracted. Subsequently, the binary array corresponding to the watermark information can be converted into decimal, so as to accurately trace the data recipient.
[0170] Still taking the above as an example, for example, the acquired data is 3, 4, 1, 2, 5, 6, and after grouping, [3, 4], [1, 2], [5, 6] are obtained, among which [1, 2] is the first group, and the group number is 1; [3, 4] is the second group, and the group number is 2; [5, 6] is the third group, and the group number is 3; according to the above implementation method, it can be known that the group number 1 of [1, 2] is less than the group number 3 of [5, 6], then the positions of the [1, 2] group and the [5, 6] group remain unchanged, and the watermark information recorded is 0; the group number 2 of [3, 4] is greater than the group number 1 of the [1, 2] group, then the positions of the [3, 4] group and the [1, 2] group are adjusted, and the watermark information is recorded as 1, and the watermark information 10 can be obtained.
[0171] In addition, the data of each fourth type group appears in clusters, so the relative position of each fourth type group can be calculated based on the data distribution. Since the first watermark data will undergo operations such as deletion, addition, and modification, deviations will occur when calculating the relative position of the fourth type group. For example, after a data increase attack, many tuples or data rows may be inserted into each fourth type group, which will cause great interference to the position of the fourth type group. In order to increase the robustness of the algorithm, the center of mass of each fourth type group can be calculated, and the relative position of the fourth type group can be determined by the relative position of the center of mass. That is, get a set of data, mark 0, 1, 2... according to the relative position of the data row, and assume that the relative position in a fourth type group is marked as [m1, m2,..., m n ], then the centroid of this group of data is the average value of the group of data. Finally, the relative positions of different groups are determined according to the centroids corresponding to different groups, and finally the watermark is extracted according to the relative positions. The specific implementation formula for determining the relative position according to the centroid is as follows:
[0172]
[0173] Among them, X iRepresents the current relative serial number of each element in the group. For example, the acquired data is 3, 1, 4, 2, 5, 6, and the corresponding relative position serial numbers are 1, 2, 3, 4, 5, 6 respectively; and after grouping, they are still 34 in one group, 12 in one group, and 56 in one group; then x1=1 and x2=3 corresponding to 3 and 4, so when 3 and 4 are in one group, the relative position of the group m is equal to (1+3) / 2=2.
[0174] The data processing method provided in the embodiment of this specification, when obtaining a data (such as target data) that needs to be shared with a third party (data recipient), can first embed characters in all places in the target data where invisible characters can be embedded based on the invisible character watermark embedding scheme, so as to achieve watermark addition in the target data. The scheme has a large character embedding space and has good anti-attack performance. After the watermark embedding is completed in this way, based on the target data after the watermark is embedded, a watermark embedding scheme based on the grouping order is used to embed invisible characters and complete a layer of watermark coverage on the first watermark data through changes in the order. The scheme will not modify any data or introduce any errors. It only adds watermark information to the data by changing the order, which is another layer of protection based on the first watermark addition. The watermark embedding method is no longer single and has good robustness. That is, on the basis of the first layer of watermarking scheme having sufficient watermark embedding space, another layer of watermark protection is added, so that the data finally sent to the data recipient can resist frequent data change operations, including common changes such as deletion, update, and insertion, to ensure the security of the data.
[0175] See also Figure 3 , Figure 3 A method flow chart of another data processing method provided by an embodiment of the present specification is shown, which specifically includes the following steps.
[0176] Step 302: Convert the user ID of the data receiver of the target data into a binary array, and determine the number of groups according to the length of the binary array.
[0177] Step 304: Group the target data according to the number of groups to obtain target groups and group numbers of the target groups.
[0178] Step 306: Add a watermark to the target data according to the binary numbers in the binary array and the group number of the target group to generate target watermark data.
[0179] Step 308: Send the target watermark data to the data receiver.
[0180] Optionally, after sending the target watermark data to the data receiver, the method further includes:
[0181] Acquire the target watermark data, and group the target watermark data according to the number of groups, to obtain the verification group and the group number of the fourth type group;
[0182] The data receiver is determined according to the group number of the verification group and according to the verification watermark.
[0183] Specifically, the specific implementation process of the data processing method is the same as the implementation method of adding watermarks to data based on the grouping order in the above embodiment, only the target object is different, that is, the target object of adding watermarks to data based on the grouping order in the above embodiment is the first watermark data that has been watermarked once; while the target object of adding watermarks to data based on the grouping order in the embodiment of this specification is the original target data to be sent to the data receiver. Other specific watermark adding processes and watermark extraction processes can refer to the introduction of the above embodiment, and will not be repeated here.
[0184] Another data processing method provided in the embodiments of this specification completes a watermark coverage on the target data by changing the order. This scheme will not modify any data or introduce any errors. It only adds watermark information to the data by changing the order, and has good robustness.
[0185] See also Figure 4 , Figure 4 A schematic diagram of a specific processing flow of adding and extracting watermarks from data according to a grouping order in another data processing method provided by an embodiment of the present specification is shown.
[0186] Step 402: watermark embedding.
[0187] Step 404: Convert the watermark into a binary array W of length L.
[0188] Specifically, the watermark can be understood as the user number of the data receiver, so converting the watermark into a binary array W of length L can be understood as converting the user number of the data receiver into a binary array W of length L.
[0189] Step 406: Divide the target data into L+1 groups, ie, L+1 third type groups.
[0190] Step 408: Determine whether i is greater than or equal to L, if so, execute step 410, if not, execute step 412.
[0191] Wherein, i represents the i-th third type group.
[0192] Specifically, judging whether i is greater than or equal to L can be understood as judging whether the i-th third-type group is greater than or equal to the length of the binary array; in actual applications, since the number of target data groups is determined according to the length of the binary array, the number of target data groups cannot be greater than the length of the binary array.
[0193] Step 410: The watermark is added.
[0194] Step 412: Determine whether the binary number in the binary array W is equal to 0, if so, execute step 414, if not, execute step 416.
[0195] Step 414: The positions of the two third-type groups before and after are not changed, and i is incremented by 1, and step 408 is continued.
[0196] Step 416: adjust the positions of the i-th third type group and the (i+1)-th third type group, increment i by 1, and continue to execute step 408.
[0197] Step 418: After the watermark is added in step 410, the watermark is extracted from the target data to which the watermark is added according to steps 420 to 416.
[0198] Step 420: Calculate the group number to which each row of data in the target data with the watermark added belongs, and select the interval with the largest density.
[0199] That is, the target data with watermarks added are grouped according to the grouping method of the above embodiment to obtain the fourth type of grouping, and the maximum density interval of each fourth type of grouping is determined. For example, among the data 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 5, 6, 10 is a fourth type of grouping, and the maximum density interval of the fourth type of grouping is 5-6, and 1 and 10 are too discrete relative to the entire grouping; subsequently, the center of the fourth type of grouping can be calculated according to the maximum density interval of each fourth type of grouping.
[0200] Step 422: Calculate the center of each fourth type grouping and determine the relative position of each fourth type grouping.
[0201] Step 424: extract the watermark according to the change of the relative position of each fourth type grouping, and complete the watermark extraction.
[0202] Another data processing method provided by the embodiment of this specification completes a watermark coverage on the target data by changing the order. This solution will not modify any data, nor will it introduce any errors. It only adds watermark information to the data by changing the order, and has good robustness; and has good blind detection. When the scheme is leaked and traced later, the original data form does not need to participate in the watermark detection and extraction process. Since the data form will have frequent update operations, if it does not have blind detection, if you want to extract the original watermark, you need to extract the watermark from the original data form saved at the beginning, resulting in a waste of resources.
[0203] Corresponding to the above method embodiment, this specification also provides a data processing device embodiment, Figure 5 FIG. 1 is a schematic diagram showing the structure of a data processing device provided by an embodiment of the present specification. Figure 5 As shown, the device comprises:
[0204] The first data conversion module 502 is configured to convert the user number of the data recipient of the target data into a binary array, and determine the first grouping quantity according to the length of the binary array;
[0205] A first data grouping module 504 is configured to group the target data according to the first grouping quantity to obtain a first type of grouping, and determine a grouping binary number corresponding to the first type of grouping according to the binary number sequence in the binary array;
[0206] A first watermark adding module 506 is configured to add a watermark to the target data of the first type of group according to the group binary number corresponding to the first type of group and a preset blank character to generate first watermark data;
[0207] The first data sending module 508 is configured to send the first watermark data to the data receiving party.
[0208] Optionally, the first data grouping module 504 is further configured to:
[0209] When it is determined that the target data has a primary key and the primary key is a numerical type, determining a group number of the target data according to the first group quantity, the primary key, and a preset hash algorithm;
[0210] The target data is grouped according to the grouping number of the target data to obtain a first type of grouping.
[0211] Optionally, the first data grouping module 504 is further configured to:
[0212] When it is determined that the target data has a primary key and the primary key is of text type, converting the primary key from text type data to numeric type data;
[0213] Determine the group number of the target data according to the first group quantity, the primary key, and a preset hash algorithm;
[0214] The target data is grouped according to the grouping number of the target data to obtain a first type of grouping.
[0215] Optionally, the first data grouping module 504 is further configured to:
[0216] The character number corresponding to the primary key is determined according to a preset text dictionary, and the primary key is replaced by the character number to convert the primary key from text type data to numerical type data.
[0217] Optionally, the first watermark adding module 506 is further configured to:
[0218] When it is determined that the group binary number corresponding to the first type of group is 1, a preset blank character is added to the target data of the first type of group; and when it is determined that the group binary number corresponding to the first type of group is 0, the preset blank character is not added to the target data of the first type of group, so as to generate the first watermark data.
[0219] Optionally, the first watermark adding module 506 is further configured to:
[0220] Determine, according to the number of the first groups and the group number of the target data, a hash value corresponding to the target data of the first type of group using a preset hash value calculation method;
[0221] According to the group binary number corresponding to the first type of group and the preset blank character corresponding to the hash value, a watermark is added to the target data of the first type of group to generate first watermark data.
[0222] Optionally, the first watermark adding module 506 is further configured to:
[0223] When it is determined that the group binary number corresponding to the first type of group is 1, the preset blank character corresponding to the hash value is added to the target data of the first type of group; and when it is determined that the group binary number corresponding to the first type of group is 0, the preset blank character corresponding to the hash value is not added to the target data of the first type of group, so as to generate the first watermark data.
[0224] Optionally, the device further comprises:
[0225] The first watermark extraction module is configured as follows:
[0226] Acquire the first watermark data, and delete preset blank characters in the first watermark data through a preset function to obtain verification data;
[0227] Grouping the verification data according to the first grouping quantity to obtain a second type of grouping;
[0228] A verification watermark is generated according to a preset blank character corresponding to the verification data in the second type group, and the data recipient is determined according to the verification watermark.
[0229] Optionally, the device further comprises:
[0230] The watermark data sending module is configured as follows:
[0231] Determine the second number of groups according to the length of the binary array;
[0232] Grouping the first watermark data according to the second grouping quantity to obtain a third type of group and a grouping number of the third type of group;
[0233] Adding a watermark to the first watermark data according to the binary numbers in the binary array and the group number of the third type of group to generate second watermark data;
[0234] The second watermark data is sent to the data receiver.
[0235] Optionally, the watermark data sending module is further configured to:
[0236] Determine the binary numbers in the binary array in sequence, and when the binary number is 1, adjust the position of the third type of grouping according to the order of the binary number in the binary array; and when the binary number is 0, do not adjust the position of the third type of grouping, so as to add a watermark to the first watermark data and generate second watermark data.
[0237] Optionally, the device further comprises:
[0238] The second watermark extraction module is configured as follows:
[0239] Acquire the second watermark data, and group the second watermark data according to the second group quantity to obtain a fourth type of group and a group number of the fourth type of group;
[0240] A verification watermark is generated according to the group number of the fourth type of group, and the data recipient is determined according to the verification watermark.
[0241] Optionally, the second watermark extraction module is further configured to:
[0242] Determining a target group from the fourth type of groups;
[0243] When the group number of the target group is smaller than the group number of the previous group of the target group, the watermark information is recorded as 1, and when the group number of the target group is larger than the group number of the previous group of the target group, the watermark information is recorded as 0;
[0244] A verification watermark is generated according to the watermark information corresponding to the fourth type of group.
[0245] The data processing method provided in the embodiment of this specification, after determining the target data that needs to be sent to the data recipient, uses a watermark embedding scheme of invisible characters (i.e., blank characters, such as line feeds, carriage returns, spaces, etc.) to embed invisible characters in all places in the target data where invisible characters can be embedded, according to the group binary number corresponding to the first type of grouping and preset blank characters. It is not limited to long text formats and does not need to add too much pseudo data. It can use as much embedded watermark information as possible in a limited space to achieve watermarking of the target data, so that the target data has better anti-attack properties. Then, when the first watermark data sent to the data recipient is leaked, the enterprise can accurately trace the source and locate the data recipient based on the watermark added to the leaked data.
[0246] The above is a schematic scheme of a data processing device of this embodiment. It should be noted that the technical scheme of the data processing device and the technical scheme of the above data processing method belong to the same concept, and the details of the technical scheme of the data processing device that are not described in detail can be referred to the description of the technical scheme of the above data processing method.
[0247] Corresponding to the above method embodiment, this specification also provides another data processing device embodiment, Figure 6 FIG. 2 shows a schematic diagram of the structure of another data processing device provided by an embodiment of the present specification. Figure 6 As shown, the device comprises:
[0248] The second data conversion module 602 is configured to convert the user number of the data recipient of the target data into a binary array, and determine the number of groups according to the length of the binary array;
[0249] The second data grouping module 604 is configured to group the target data according to the number of groups, and obtain a target group and a group number of the target group;
[0250] A second watermark adding module 606 is configured to add a watermark to the target data according to the binary number in the binary array and the group number of the target group to generate target watermark data;
[0251] The second data sending module 608 is configured to send the target watermark data to the data receiving party.
[0252] Optionally, the device further comprises:
[0253] The third watermark extraction module is configured as follows:
[0254] Acquire the target watermark data, and group the target watermark data according to the number of groups, to obtain the verification group and the group number of the fourth type group;
[0255] A verification watermark is generated according to the group number of the verification group, and the data recipient is determined according to the verification watermark.
[0256] Another data processing device provided in an embodiment of this specification completes a watermark coverage on the target data by changing the order. This scheme will not modify any data or introduce any errors. It only adds watermark information to the data by changing the order, and has good robustness.
[0257] The above is a schematic scheme of another data processing device of this embodiment. It should be noted that the technical scheme of the another data processing device and the technical scheme of the another data processing method mentioned above belong to the same concept, and the details of the technical scheme of the another data processing device that are not described in detail can all be referred to the description of the technical scheme of the another data processing method mentioned above.
[0258] Figure 7 The block diagram of a computing device 700 according to an embodiment of the present specification is shown. The components of the computing device 700 include but are not limited to a memory 710 and a processor 720. The processor 720 is connected to the memory 710 via a bus 730, and the database 750 is used to store data.
[0259] The computing device 700 also includes an access device 740 that enables the computing device 700 to communicate via one or more networks 760. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 740 may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
[0260] In one embodiment of the present specification, the above components of the computing device 700 and Figure 7 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 7 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0261] The computing device 700 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 700 may also be a mobile or stationary server.
[0262] The processor 720 is used to execute the following computer executable instructions, which implement the steps of the above-mentioned data processing method when executed by the processor. The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned data processing method belong to the same concept, and the details of the technical scheme of the computing device that are not described in detail can be found in the description of the technical scheme of the above-mentioned data processing method.
[0263] An embodiment of the present specification further provides a computer-readable storage medium storing computer-executable instructions, which can implement the steps of the above-mentioned data processing method when executed by a processor.
[0264] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above data processing method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above data processing method.
[0265] An embodiment of the present specification further provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned data processing method.
[0266] The above is a schematic scheme of a computer program of this embodiment. It should be noted that the technical scheme of the computer program and the technical scheme of the above data processing method belong to the same concept, and the details not described in detail in the technical scheme of the computer program can be referred to the description of the technical scheme of the above data processing method.
[0267] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0268] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0269] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.
[0270] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0271] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.
Claims
1. A data processing method, comprising: Converting a user number of a data receiver of the target data into a binary array, and determining the number of first groups according to the length of the binary array; Grouping the target data according to the first grouping quantity to obtain a first type of grouping, and determining a grouping binary number corresponding to the first type of grouping according to the order of binary numbers in the binary array; Adding a watermark to target data of the first type of group according to the group binary number and a preset blank character corresponding to the first type of group to generate first watermark data; Determine the second number of groups according to the length of the binary array; Grouping the first watermark data according to the second grouping quantity to obtain a third type of group and a grouping number of the third type of group; sequentially determining the binary numbers in the binary array, and when the binary numbers are 1, adjusting the positions of the third type of groups according to the order of the binary numbers in the binary array, and when the binary numbers are 0, not adjusting the positions of the third type of groups, so as to add a watermark to the first watermark data and generate second watermark data; The second watermark data is sent to the data receiver.
2. The data processing method according to claim 1, wherein grouping the target data according to the first number of groups to obtain a first type of grouping comprises: When it is determined that the target data has a primary key and the primary key is a numerical type, determining a group number of the target data according to the first group quantity, the primary key, and a preset hash algorithm; The target data is grouped according to the grouping number of the target data to obtain a first type of grouping.
3. The data processing method according to claim 1, wherein grouping the target data according to the first number of groups to obtain a first type of grouping comprises: When it is determined that the target data has a primary key and the primary key is of text type, converting the primary key from text type data to numeric type data; Determine the group number of the target data according to the first group quantity, the primary key, and a preset hash algorithm; The target data is grouped according to the grouping number of the target data to obtain a first type of grouping.
4. The data processing method according to claim 3, wherein the step of converting the primary key from text type data to numerical type data comprises: The character number corresponding to the primary key is determined according to a preset text dictionary, and the primary key is replaced by the character number to convert the primary key from text type data to numerical type data.
5. The data processing method according to claim 1, wherein the step of adding a watermark to the target data of the first type of group according to the group binary number and the preset blank character corresponding to the first type of group to generate the first watermark data comprises: When it is determined that the group binary number corresponding to the first type of group is 1, a preset blank character is added to the target data of the first type of group; and when it is determined that the group binary number corresponding to the first type of group is 0, the preset blank character is not added to the target data of the first type of group, so as to generate the first watermark data.
6. The data processing method according to claim 2 or 3, wherein the step of adding a watermark to the target data of the first type of group according to the group binary number corresponding to the first type of group and the preset blank character to generate the first watermark data comprises: Determine, according to the number of the first groups and the group number of the target data, a hash value corresponding to the target data of the first type of group using a preset hash value calculation method; According to the group binary number corresponding to the first type of group and the preset blank character corresponding to the hash value, a watermark is added to the target data of the first type of group to generate first watermark data.
7. The data processing method according to claim 6, wherein the step of adding a watermark to the target data of the first type of group according to the group binary number corresponding to the first type of group and the preset blank character corresponding to the hash value to generate the first watermark data comprises: When it is determined that the group binary number corresponding to the first type of group is 1, the preset blank character corresponding to the hash value is added to the target data of the first type of group; and when it is determined that the group binary number corresponding to the first type of group is 0, the preset blank character corresponding to the hash value is not added to the target data of the first type of group, so as to generate the first watermark data.
8. The data processing method according to claim 1, after adding a watermark to the target data of the first type group and generating the first watermark data, further comprising: The first watermark data is sent to the data receiver.
9. The data processing method according to claim 8, after sending the first watermark data to the data receiver, further comprising: Acquire the first watermark data, and delete preset blank characters in the first watermark data using a preset function to obtain verification data; Grouping the verification data according to the first grouping quantity to obtain a second type of grouping; A verification watermark is generated according to a preset blank character corresponding to the verification data in the second type group, and the data recipient is determined according to the verification watermark.
10. The data processing method according to claim 1, after sending the second watermark data to the data receiver, further comprising: Acquire the second watermark data, and group the second watermark data according to the second group quantity to obtain a fourth type of group and a group number of the fourth type of group; A verification watermark is generated according to the group number of the fourth type of group, and the data recipient is determined according to the verification watermark.
11. The data processing method according to claim 10, wherein generating a verification watermark according to the group number of the fourth type of group comprises: Determining a target group from the fourth type of groups; When the group number of the target group is smaller than the group number of the previous group of the target group, the watermark information is recorded as 1, and when the group number of the target group is larger than the group number of the previous group of the target group, the watermark information is recorded as 0; A verification watermark is generated according to the watermark information corresponding to the fourth type of group.
12. A data processing method, comprising: Converting a user number of a data receiver of target data into a binary array, and determining the number of packets according to the length of the binary array, wherein the target data is the first watermark data generated in claim 1; Grouping the target data according to the number of groups to obtain target groups and group numbers of the target groups; According to the binary numbers in the binary array and the group number of the target group, the target data is watermarked to generate target watermark data, wherein the target watermark data is the second watermark data generated in claim 1; The target watermark data is sent to the data receiver.
13. The data processing method according to claim 12, after sending the target watermark data to the data receiver, further comprising: Acquire the target watermark data, and group the target watermark data according to the number of groups, to obtain the group numbers of the verification group and the fourth type group; A verification watermark is generated according to the group number of the verification group, and the data recipient is determined according to the verification watermark.
