Data processing method and device, equipment, storage medium and product

By calculating the string corresponding to each row of data in the structured data set, and determining the desensitization strategy based on the string and watermark information, the embedding and extraction of watermark information is achieved, solving the problem of difficulty in implementation in the existing technology, and reducing It reduces algorithm complexity and enhances data privacy protection.

CN119357928AActive Publication Date: 2025-01-24CHINA MOBILE COMM LTD RES INST +1

Patent Information

Application Number
CN202411391134.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-24
Estimated Expiration
2044-09-30

AI Technical Summary

Technical Problem

In the prior art, the watermark algorithm for structured data has the problem of difficulty in implementing it, especially when recording parameters are not required.

Method used

By obtaining the data set and watermark information, calculate the string corresponding to each line of data, and determine the desensitization strategy of the desensitization field based on the string and watermark information to perform desensitization processing, thereby realizing the embedding and extraction of watermark information.

Benefits of technology

It solves the problem of implementing and extraction of watermark information without recording parameters, reducing the difficulty of implementation of the algorithm, and enhancing the privacy protection of data through desensitization processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357928A_ABST
    Figure CN119357928A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method. The method comprises the following steps: acquiring a first data set and watermark information; calculating a first character string corresponding to each row of data in the first data set; based on the first character string and the watermark information, determining a desensitization strategy of a to-be-desensitized first field in each row of data; and based on a desensitization strategy, desensitizing the data in the first field to obtain a desensitized second data set. The invention further discloses a data processing device, electronic equipment, a computer readable storage medium and a computer program product.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to but is not limited to the field of communications, and in particular to a data processing method, a data processing device, an electronic device, a computer-readable storage medium, and a computer program product. Background Art

[0002] Data has become the fifth largest production factor after land, labor, capital, and technology. Currently, Internet companies have a large amount of valuable data and need to circulate the data to generate greater value. However, after the data is released from the network, there may be problems such as data leakage and data resale. How to trace the source of such data has become a difficult problem. Digital watermark technology is a solution.

[0003] Digital watermarking is an information security technology that embeds watermark information into digital carriers (such as digital images, digital videos, and structured data) through certain rules and algorithms to achieve the purpose of confirming digital copyright owners and tracking data leakers. Structured data watermarking is one of them, which is mainly for structured data sets involved in various systems or platforms and with external publishing needs. Structured data sets can be carried in relational databases, Excel files, comma-separated values ​​(CSV) files, text format (TXT) files and other file formats, and generally have less redundant space for watermark embedding.

[0004] The watermarking of structured data mainly includes attribute modification, adding pseudo rows, adding pseudo columns, modifying the order of tuples, etc. to embed watermark information. When embedding, it is necessary to record parameters including grouping field, embedded field, number of groups, etc., that is, anchor field and field where watermark is inserted. When extracting, the same parameters are used to extract the correct watermark information. Obviously, the watermarking algorithm for structured data in the related art has at least the problem of difficulty in implementation. Summary of the invention

[0005] The embodiments of the present application provide a data processing method, a data processing device, an electronic device, a computer-readable storage medium, and a computer program product, and provide a method for embedding and extracting structured data watermarks based on a desensitization strategy.

[0006] The technical solution of this application is implemented as follows:

[0007] In a first aspect, an embodiment of the present application provides a data processing method, the method comprising:

[0008] Obtaining a first data set and watermark information;

[0009] Calculate a first character string corresponding to each row of data in the first data set;

[0010] Determine, based on the first character string and the watermark information, a desensitization strategy for the first field to be desensitized in each row of data;

[0011] Based on the desensitization strategy, the data in the first field is desensitized to obtain a desensitized second data set.

[0012] In a second aspect, an embodiment of the present application provides a data processing device, the information processing device comprising:

[0013] An acquisition module, used to acquire a first data set and watermark information;

[0014] A processing module, used for calculating a first character string corresponding to each row of data in the first data set;

[0015] The processing module is further used to determine a desensitization strategy for the first field to be desensitized in each row of data based on the first character string and the watermark information;

[0016] The processing module is further used to desensitize the data in the first field based on the desensitization strategy to obtain a desensitized second data set.

[0017] In a third aspect, an embodiment of the present application provides an electronic device, the electronic device comprising: a processor, a memory, and a communication bus;

[0018] A memory for storing executable instructions;

[0019] The processor is used to execute the executable instructions stored in the memory to implement the steps of the data processing method as described above.

[0020] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the data processing method as described above.

[0021] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the data processing method as described above.

[0022] Through the above technical solution, the watermark information is embedded in the data carrier, i.e., the first data set, without the need to input any parameters other than the watermark information, and therefore without the need to record the parameters, thus solving the problem that the algorithms in the related art are at least difficult to implement. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 Schematic diagram of the data processing method provided in the embodiment of the present application Figure 1;

[0024] Figure 2 Schematic diagram of the data processing method provided in the embodiment of the present application Figure 2 ;

[0025] Figure 3 Schematic diagram of the data processing method provided in the embodiment of the present application Figure 3 ;

[0026] Figure 4 Schematic diagram of the data processing method provided in the embodiment of the present application Figure 4 ;

[0027] Figure 5 A schematic block diagram of a data processing device provided in an embodiment of the present application;

[0028] Figure 6 A schematic structural diagram of an electronic device provided in an embodiment of the present application;

[0029] Figure 7 A schematic structural diagram of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0031] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0032] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0033] The embodiment of the present application provides a data processing method, which is applied to an electronic device, referring to Figure 1 As shown, the method comprises the following steps:

[0034] Step 101: Obtain a first data set and watermark information.

[0035] In the embodiment of the present application, the first data set may be a set of any number of data, which is not specifically limited in the present application. It should be noted that the first data set may be the entire data set or part of the data in the entire data set.

[0036] In the embodiment of the present application, the watermark information may be any type of identification information that can identify the owner of the data set, or selected by the owner of the data set, and the present application does not specifically limit this.

[0037] Step 102: Calculate a first character string corresponding to each row of data in the first data set.

[0038] In the embodiment of the present application, each row of data corresponds to a first character string; the first character string is a character string obtained by performing a certain transformation on the data in one field of each row of data.

[0039] It should be noted that when calculating the first character string corresponding to different rows of data, the selected fields for each row of data may be completely different or partially different, that is, the selected fields are not fixed but determined by calculation.

[0040] It should be noted that the field corresponding to the first string corresponding to each row of data is used as the anchor field, that is, the primary key is not used as the anchor field in this application, and the anchor field for each row of data is different. Therefore, the solution proposed in this application can resist primary key deletion attacks, and the watermark cannot be invalidated by deleting the primary key.

[0041] Step 103: Determine a desensitization strategy for the first field to be desensitized in each row of data based on the first character string and the watermark information.

[0042] It should be noted that the current demand for watermark technology is that a business platform needs to share multiple different types of data with third parties, among which the first field such as user identification, i.e., sensitive fields, needs to be desensitized. Therefore, a watermark is embedded in the first field in the data export process of the business platform to achieve desensitization of sensitive fields. Here, data desensitization refers to the deformation of certain sensitive information to achieve reliable protection of sensitive privacy data.

[0043] In the embodiment of the present application, the desensitization strategy represents the processing method of the data in the first field, such as replacement, masking, encryption, generalization, data segmentation, etc. For example, the masking method retains the first and last digits and replaces the middle part with asterisks; the replacement method fills some digits with random characters; the generalization method rounds the value, etc.

[0044] In an embodiment of the present application, the desensitization strategies corresponding to each row of data may be the same, partially the same, or completely different.

[0045] Step 104: Desensitize the data in the first field based on the desensitization strategy to obtain a desensitized second data set.

[0046] A data processing method is disclosed in an embodiment of the present application, and the method includes: obtaining a first data set and watermark information; calculating a first character string corresponding to each row of data in the first data set; determining a desensitization strategy for the first field to be desensitized in each row of data based on the first character string and the watermark information; desensitizing the data in the first field based on the desensitization strategy to obtain a desensitized second data set. In other words, the watermark information is embedded in the data carrier, i.e., the first data set, and no parameters other than the watermark information need to be input, so there is no need to record the parameters, which solves the problem that the algorithms in the related art are at least difficult to implement. At the same time, the present application does not use the primary key as the anchor field, and the anchor field for each row of data is different, so the watermark cannot be invalidated by deleting the primary key.

[0047] The embodiment of the present application provides a data processing method, which is applied to an electronic device, referring to Figure 2 As shown, the method comprises the following steps:

[0048] Step 201: Obtain a first data set and watermark information.

[0049] Step 202: Encrypt the data in the second field of each row of data in the first data set to obtain encrypted data.

[0050] In the embodiment of the present application, the second field is all fields except the first field.

[0051] In the embodiment of the present application, the electronic device uses the key information to calculate the data in the second field to obtain a value. The calculation method is not limited to the key-related hash operation message authentication code (Hash-based Message Authentication Code, HMAC) and stream cipher encryption.

[0052] It should be noted that the key information is introduced in this application, so that even if the calculation rules are understood, the sequence value cannot be calculated without the key, and the watermark information cannot be restored.

[0053] Step 203: sort each encrypted data to obtain sorted data.

[0054] Here, sorting each encrypted data refers to sorting the encrypted values ​​of the data in each second field.

[0055] Step 204: Determine that the data satisfying the first condition in the sorted data is a first character string.

[0056] The data satisfying the first condition includes data corresponding to the maximum value in the sorted data, or data corresponding to the minimum value in the sorted data.

[0057] Step 205: Determine the watermark encoding bit value corresponding to each line of data based on the first character string and the watermark information.

[0058] In some embodiments, step 205, determining the watermark encoding bit value corresponding to each line of data based on the first character string and the watermark information, can be implemented by the following steps:

[0059] Step A1, obtaining a preset remainder value; it should be noted that the preset remainder value is determined by the watermark encoding method and can be set to a fixed value (eg, 60, 100, 1000, etc.).

[0060] Step A2: Encode the watermark information to obtain a first encoding result; Here, the watermark information is encoded based on a watermark encoding method to obtain a first encoding result. Here, the watermark encoding method includes but is not limited to using hexadecimal encoding to form a byte stream, using the Chinese remainder theorem to form a fragment value, etc.

[0061] Step A3: modulo the first character string and the modulo value to obtain the sequence value corresponding to each row of data.

[0062] Step A4, fill the first coding result to obtain a second coding result; wherein the number of bits of the second coding result is the same as the number of bits of the remainder value.

[0063] Step A5: determining a watermark coding bit value based on the sequence value and the second coding result;

[0064] Here, the bit value corresponding to the i-th bit in the second encoding result is determined as the watermark encoding bit value; wherein i is equal to the sequence value and i is a positive integer.

[0065] Step 206: Determine a desensitization strategy for the first field based on the watermark encoding bit value.

[0066] In some embodiments, the electronic device first obtains first information; wherein the first information includes at least two desensitization strategies corresponding to the first field in the first data set; and based on the watermark encoding bit value, the desensitization strategy of the first field is matched from the first information.

[0067] It should be noted that the first information can be represented as a desensitization strategy watermark information table, which includes desensitization strategies and watermark coding bit values ​​corresponding to each desensitization strategy; that is, there is a mapping relationship between the watermark coding bit values ​​and the desensitization strategies.

[0068] Step 207: Desensitize the data in the first field based on the desensitization strategy to obtain a desensitized second data set.

[0069] This application generates a desensitization strategy watermark information table based on the desensitized field, then performs a specific transformation on each field of each row of data and sorts them, takes the modulus of the maximum / minimum field to obtain the sequence value of each row of data; based on the sequence value of each row of data, determines the corresponding watermark encoding sequence value; finally, based on the watermark information encoding sequence value, obtains the desensitization strategy and desensitizes the data.

[0070] It should be noted that, for the description of the same steps and the same contents in this embodiment as those in other embodiments, reference can be made to the description in other embodiments and will not be repeated here.

[0071] The embodiment of the present application provides a data processing method, which is applied to an electronic device, referring to Figure 3 As shown, the method comprises the following steps:

[0072] Step 301: Determine a sequence pair for each row of data in a second data set; wherein the sequence pair includes a sequence value corresponding to each row of data and a watermark encoding bit value corresponding to each row of data.

[0073] In some embodiments, step 301, determining the sequence pair of each row of data in the second data set, can be implemented by the following steps:

[0074] Step B1, determining a watermark encoding bit value in the sequence pair based on the content of the first field of each row of data in the second data set and a desensitization strategy for the first field of each row of data;

[0075] Step B2, calculating the second character string corresponding to each row of data in the second data set;

[0076] Here, the data in the second field of each row of data in the second data set is encrypted to obtain encrypted data; each encrypted data is sorted to obtain sorted data; and the data in the sorted data that meets the first condition is determined to be a second character string; wherein the data that meets the first condition includes data corresponding to the maximum value in the sorted data, or data corresponding to the minimum value in the sorted data.

[0077] Step B3: Determine the sequence value in the sequence pair based on the second character string.

[0078] Here, based on the second character string, determining the sequence value in the sequence pair can be achieved by the following steps: obtaining a preset modulus value; modulo the second character string and the modulus value to obtain the sequence value in the sequence pair.

[0079] Step 302: restore the watermark information based on the sequence pairs of each row of data.

[0080] In the embodiment of the present application, the extraction process corresponding to step 301 to step 302 is the reverse of the embedding process of step 201 to step 207, except that the order of the steps is slightly different; that is, for each row of data, the watermark coding sequence value of the row is obtained according to the desensitization rule of the desensitized field and the watermark information table of the desensitization strategy. Then, each field is sorted after a specific transformation, and the sequence value of each row of data is obtained by taking the modulus of the maximum / minimum field, and the sequence value and the watermark coding sequence value pair are recorded. The watermark coding information is obtained by statistics, and the watermark information is restored in combination with the watermark coding method.

[0081] It should be noted that for the same sequence value, the final watermark coding bit value (ie the watermark coding bit value with the most counts) is obtained by counting. All watermark coding bit values ​​are combined with the watermark coding method to restore the watermark information.

[0082] under, Figure 4 The following will describe an exemplary application of the watermark embedding technology of the present application in a practical application scenario; Figure 4 As shown:

[0083] Step 401: Generate a desensitization policy watermark information table based on the desensitization field.

[0084] It should be noted that the desensitization field refers to the field in the data set that needs to be desensitized. Different desensitization methods can be used according to the field type. Different methods can generate corresponding desensitization strategy watermark information tables. Each specific desensitization rule in the information table corresponds to a watermark code, and at least two desensitization rules are required. Each watermark code consists of 0 and 1, and the number of bits is determined by the total number of desensitization rules (take the nth power of 2 that is smaller than the total number, for example, if the total number is 3, take 1 bit; if the total number is 4, take 2 bits).

[0085] For example, the original data set is shown in Table 1, and the phone field is a desensitized field:

[0086] time phone msg_id …… rtt_id 20220227165941 8618215111380 178689490 …… 96001057 20220227165943 8618737231650 177105056 …… 92001002 20220227165942 8613750410005 177105088 …… 92005310 …… …… …… …… …… 20220227170142 8613663918995 177105028 …… 92001002

[0087] Table 1

[0088] For example, using the mask method, four desensitization rules can be generated, corresponding to the watermark codes of 00, 01, 10, and 11. The generated desensitization strategy watermark information Table 2 is as follows.

[0089] Desensitization rules Watermark encoding information Replace the 5th to 8th digits from the last digit with an asterisk 00 Replace the 6th to 9th digits from the last digit with an asterisk 01 Replace the 5th to 7th last digit with an asterisk 10 Replace the 6th to 8th last digit with an asterisk 11

[0090] Table 2

[0091] For example, for 8618215111380, the desensitization rule is used: replace the 5th to 8th last digits with asterisks, and the result is 86182****1380; the desensitization rule is used: replace the 6th to 9th last digits with asterisks, and the result is 8618****11380; the desensitization rule is used: replace the 5th to 7th last digits with asterisks, and the result is 861821***1380; the desensitization rule is used: replace the 6th to 8th last digits with asterisks, and the result is 86182***11380.

[0092] For example, using the replacement method to replace the middle 4 digits of the mobile phone number with random numbers, two desensitization rules can be generated, corresponding to the watermark codes of 0 and 1. The generated desensitization strategy watermark information table 3 is as follows.

[0093] Desensitization rules Watermark encoding information Take a random number larger than the last four digits 1 Take a random number smaller than the last four digits 0

[0094] Table 3

[0095] For example, for 8618215111380, the desensitization rule is used: take a random number larger than the last four digits, and get 8618252891380; the desensitization rule is used: take a random number smaller than the last four digits, and get 8618203751380.

[0096] Step 402: perform a specific transformation on each field of each row of data except the desensitized field and then sort them, and calculate the sequence value of each row of data and the corresponding watermark coding sequence value.

[0097] a) Specific transformation refers to using key information to calculate the field content and obtain a value. The calculation method is not limited to HMAC, stream cipher encryption, etc. The use of key information can make it impossible to calculate the sequence value without the key even if the calculation rules are understood, and thus the watermark information cannot be restored.

[0098] b) After sorting the values, select the minimum value (which can also be the maximum value), and obtain the sequence value after taking the remainder. The remainder value is determined by the watermark encoding method and is set to a fixed value (such as 60, 100, 1000, etc.). The encoding method includes but is not limited to using hexadecimal encoding to form a byte stream, using the Chinese remainder theorem to form a fragment value, etc.

[0099] c) According to the sequence value, the watermark coding sequence value corresponding to the watermark coding information is taken out.

[0100] A specific implementation method may be, for example, to calculate the first row of data in the above original data set, assuming that the calculation method uses HMAC and the key is "cmcc"; perform HMAC calculation on "20220227165941", "178689490", and "96001057" to obtain "2c23eeadb7757e68ca5aadca69edf17d", "b9fa024c4eab005ed6054971442456b5", and "a979e8482d4657ed6d0f1ac6b77c0537", sort them and take the minimum value as "2c23eeadb7757e68ca5aadca69edf17d".

[0101] Assume that the watermark information is "cmri0702", the watermark encoding method is to convert it into a binary byte stream "11000110110110101011100100110100100110000001101110011000000000000", corresponding to the random data replacement method, the remainder value is set to 100, and the byte stream is filled with "000000000000000000000000000000000000011000110110110101110010011010010011000000110111001100000000000". The remainder sequence value is "86", combined with the random data replacement method in step 401, the corresponding watermark encoding sequence value is "1".

[0102] Step 403: Obtain a desensitization strategy based on the watermark information encoding sequence value corresponding to the row of data, and desensitize the data.

[0103] The specific implementation method is, for example, based on the watermark code sequence value calculated in step 402 being "1", the desensitization strategy of the desensitization strategy watermark information table 3 in step 401 is "taking a random number larger than the last four digits"; that is, the first line of the original information:

[0104] 20220227165941 8618215111380 178689490……96001057

[0105] After desensitization, it is updated to: 20220227165941 8618252891380 178689490……96001057

[0106] The main steps of the watermark extraction scheme are:

[0107] Step C1: for each row of data, according to the desensitization rule of the desensitization field and in combination with the desensitization strategy watermark information table, obtain the watermark coding sequence value of the row.

[0108] Specific implementation method, for example, the row data after embedding watermark information is: 202202271659418618252891380 178689490……96001057

[0109] The desensitization rule used for the desensitized field content "8618252891380" is "take a random number larger than the last four digits", so the watermark coding sequence value is "1".

[0110] Step C2: perform a specific transformation on each field and then sort them, calculate the sequence value of each row of data, and record the sequence value and watermark coding sequence value pair.

[0111] a) Specific transformation refers to using key information to calculate the field content and obtain a value. The calculation method is not limited and can be consistent with that used during embedding.

[0112] b) After sorting the values, select the minimum value (or the maximum value, which is the same as when embedding), and take the remainder to get the sequence value. The remainder value is determined by the watermark encoding method. Since the watermark encoding method is not the focus of this solution, it will not be described in detail and can be kept consistent with the embedding method.

[0113] c) The sequence value and the watermark encoding sequence value obtained in B1 are combined into a sequence value pair and recorded.

[0114] The specific implementation method is to maintain the same calculation method as that during embedding, use HMAC, the key is "cmcc", the corresponding random data replacement method, and the remainder value is 100. For the row data after the watermark information is embedded in B1, HMAC calculation is performed on "20220227165941", "178689490", "96001057", etc., and "2c23eeadb7757e68ca5aadca69edf17d", "b9fa024c4eab005ed6054971442456b5", "a979e8482d4657ed6d0f1ac6b77c0537" is obtained. The minimum value is "2c23eeadb7757e68ca5aadca69edf17d". The remainder is obtained by taking the sequence value "86", and the sequence value and watermark coding sequence value pair are {86, 1}.

[0115] Step C3: Statistically obtain watermark encoding information, and restore the watermark information in combination with the watermark encoding method.

[0116] For the same sequence value, the final watermark coding sequence value (i.e. the watermark coding sequence value with the most counts) is obtained by counting. All watermark coding sequence values ​​are combined with the watermark coding method to restore the watermark information.

[0117] The embodiment of the present application provides a data processing device, which can be used to implement Figures 1 to 3 A data processing method provided by the corresponding embodiment, referring to Figure 5 As shown, the data processing device 500 includes:

[0118] An acquisition module 501 is used to acquire a first data set and watermark information;

[0119] Processing module 502, used to calculate a first string corresponding to each row of data in the first data set;

[0120] The processing module 502 is further used to determine a desensitization strategy for a first field to be desensitized in each row of data based on the first character string and the watermark information;

[0121] The processing module 502 is further configured to desensitize the data in the first field based on the desensitization strategy to obtain a desensitized second data set.

[0122] In other embodiments of the present application, the processing module 502 is used to determine a sequence pair for each row of data in the second data set; wherein the sequence pair includes a sequence value corresponding to each row of data and a watermark encoding bit value corresponding to each row of data;

[0123] The processing module 502 is used to restore the watermark information based on the sequence pair of each row of data.

[0124] In other embodiments of the present application, the processing module 502 is used to determine the watermark encoding bit value corresponding to each line of data based on the first character string and the watermark information;

[0125] The processing module 502 is further configured to determine a desensitization strategy for the first field based on the watermark coding bit value.

[0126] In other embodiments of the present application, the acquisition module 501 is used to acquire first information; wherein the first information includes at least two desensitization strategies corresponding to the first field in the first data set;

[0127] The processing module 502 is used to determine the desensitization strategy of the first field by matching the desensitization strategy of the first field from the first information based on the watermark coding bit value.

[0128] In other embodiments of the present application, the processing module 502 is used to encrypt the data in the second field of each row of data in the first data set to obtain encrypted data;

[0129] The processing module 502 is used to sort each encrypted data to obtain sorted data;

[0130] The processing module 502 is used to determine that the data satisfying the first condition in the sorted data is a first character string; wherein the data satisfying the first condition includes data corresponding to the maximum value in the sorted data, or data corresponding to the minimum value in the sorted data.

[0131] In other embodiments of the present application, the acquisition module 501 is used to obtain a preset remainder value;

[0132] The processing module 502 is used to encode the watermark information to obtain a first encoding result;

[0133] Processing module 502, used to modulo the first character string and the modulo value to obtain a sequence value corresponding to each row of data;

[0134] Processing module 502, used to fill the first encoding result to obtain a second encoding result; wherein the number of bits of the second encoding result is the same as the number of bits of the remainder value;

[0135] The processing module 502 is used to determine the watermark coding bit value based on the sequence value and the second coding result.

[0136] In other embodiments of the present application, the processing module 502 is used to determine the watermark encoding bit value in the sequence pair based on the content of the first field of each row of data in the second data set and the desensitization strategy of the first field of each row of data;

[0137] Processing module 502, used to calculate a second string corresponding to each row of data in the second data set;

[0138] The processing module 502 is configured to determine a sequence value in the sequence pair based on the second character string.

[0139] In other embodiments of the present application, the processing module 502 is used to encrypt the data in the second field of each row of data in the second data set to obtain encrypted data;

[0140] The processing module 502 is used to sort each encrypted data to obtain sorted data;

[0141] The processing module 502 is used to determine that the data satisfying the first condition in the sorted data is a second character string; wherein the data satisfying the first condition includes data corresponding to the maximum value in the sorted data, or data corresponding to the minimum value in the sorted data.

[0142] In other embodiments of the present application, the acquisition module 501 is used to obtain a preset remainder value;

[0143] Processing module 502, used to take the remainder of the second string and the remainder value to obtain the sequence value in the sequence pair

[0144] In other embodiments of the present application, the processing module 502 is used to determine that the bit value corresponding to the i-th bit in the second encoding result is the watermark encoding bit value; wherein i is equal to the sequence value, and i is a positive integer.

[0145] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0146] It should be noted that in the embodiment of the present application, if the above-mentioned data processing method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions for a terminal device to execute all or part of the methods of each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.

[0147] Figure 6 600 is a schematic structural diagram of an electronic device 600 provided in an embodiment of the present application. The communication device may be a data processing device. Figure 6 The electronic device 600 shown includes a first processor 610, and the first processor 610 can call and run a computer program from a memory to implement the method in the embodiment of the present application.

[0148] Alternatively, if Figure 6 As shown, the electronic device 600 may further include a first memory 620. The first processor 610 may call and run a computer program from the first memory 620 to implement the method in the embodiment of the present application.

[0149] The first memory 620 may be a separate device independent of the first processor 610 , or may be integrated into the first processor 610 .

[0150] Alternatively, if Figure 6 As shown, the electronic device 600 may further include a transceiver 630, and the first processor 610 may control the transceiver 630 to communicate with other devices, specifically, may send information or data to other devices, or receive information or data sent by other devices.

[0151] The transceiver 630 may include a transmitter and a receiver. The transceiver 630 may further include an antenna, and the number of the antennas may be one or more.

[0152] Optionally, the electronic device 600 may specifically be a data processing device of an embodiment of the present application, and the electronic device 600 may implement the corresponding processes implemented by the data processing device in each method of the embodiment of the present application, which will not be described in detail here for the sake of brevity.

[0153] Figure 7 It is a schematic structural diagram of the chip of an embodiment of the present application. Figure 7 The chip 700 shown includes a second processor 710, which can call and run a computer program from a memory to implement the method in the embodiment of the present application.

[0154] Alternatively, if Figure 7 As shown, the chip 700 may further include a second memory 720. The second processor 710 may call and run a computer program from the second memory 720 to implement the method in the embodiment of the present application.

[0155] The second memory 720 may be a separate device independent of the second processor 710 , or may be integrated into the second processor 710 .

[0156] Optionally, the chip 700 may further include an input interface 730. The second processor 710 may control the input interface 730 to communicate with other devices or chips, and specifically, may obtain information or data sent by other devices or chips.

[0157] Optionally, the chip 700 may further include an output interface 740. The second processor 710 may control the output interface 740 to communicate with other devices or chips, and specifically, may output information or data to other devices or chips.

[0158] Optionally, the chip can be applied to the data processing device / electronic device in the embodiments of the present application, and the chip can implement the corresponding processes implemented by the data processing device / electronic device in each method of the embodiments of the present application. For the sake of brevity, they will not be repeated here.

[0159] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0160] It should be understood that the processor of the embodiment of the present application may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor are combined and performed. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, and other mature storage media in the art. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0161] As an embodiment, the processor may include one or more general-purpose central processing units (CPUs). Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. The processor here may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer execution instructions).

[0162] It can be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a ROM, a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electrically erasable programmable read-only memory (Electrically EPROM, EEPROM) or a flash memory. The volatile memory can be a random access memory (Random Access Memory, RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus random access memory (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0163] It should be understood that the above-mentioned memory is exemplary but not restrictive. For example, the memory in the embodiments of the present application may also be static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (synch link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM), etc. That is to say, the memory in the embodiments of the present application is intended to include but not limited to these and any other suitable types of memory.

[0164] An embodiment of the present application also provides a computer-readable storage medium for storing a computer program.

[0165] The computer-readable storage medium can be applied to the data processing device / electronic device in the embodiments of the present application, and the computer program enables the computer to execute the corresponding processes implemented by the data processing device / electronic device in the various methods of the embodiments of the present application. For the sake of brevity, they will not be repeated here.

[0166] The embodiment of the present application also provides a computer program product, including a computer program, which can be executed by a processor of the electronic device 600 to complete the steps of any of the aforementioned methods.

[0167] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0168] The computer program product includes one or more computer instructions. When loading and executing the computer program instructions on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instruction can be stored in a computer-readable storage medium, or transmitted from a computer-readable storage medium to another computer-readable storage medium. For example, the computer instruction can be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server, or data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server, a data center, etc. that includes one or more available media integration. Available media can be magnetic media, (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., solid-state hard disk (SSD)), etc.

[0169] The data processing method, data processing device, electronic device, computer-readable storage medium and computer program product provided in the embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

[0170] It should be understood that the "one embodiment" or "an embodiment" or "an embodiment of the present application" or "the aforementioned embodiment" or "some implementations" or "some embodiments" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" or "an embodiment of the present application" or "the aforementioned embodiment" or "some implementations" or "some embodiments" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.

[0171] Unless otherwise specified, the data processing device / electronic device performs any step in the embodiments of the present application, and the processor of the data processing device / electronic device may perform the step. Unless otherwise specified, the embodiments of the present application do not limit the order in which the data processing device / electronic device performs the following steps. In addition, the methods used to process data in different embodiments may be the same method or different methods.

[0172] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0173] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0174] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0175] The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0176] The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0177] The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0178] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, magnetic disks or optical disks.

[0179] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer storage medium. Based on such an understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0180] As used in the embodiments of the present application and the appended claims, the singular forms "a," "an," "said," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0181] It should be noted that in each embodiment involved in the present application, all steps may be executed or part of the steps may be executed as long as a complete technical solution can be formed.

[0182] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A data processing method, characterized in that: The method comprises: Obtaining a first data set and watermark information; Calculate a first character string corresponding to each row of data in the first data set; Determine, based on the first character string and the watermark information, a desensitization strategy for the first field to be desensitized in each row of data; Based on the desensitization strategy, the data in the first field is desensitized to obtain a desensitized second data set.

2. The method according to claim 1, characterized in that The method further comprises: Determine a sequence pair for each row of data in the second data set; wherein the sequence pair includes a sequence value corresponding to each row of data and a watermark encoding bit value corresponding to each row of data; The watermark information is restored based on the sequence pairs of each row of data.

3. The method according to claim 1, characterized in that The determining, based on the first character string and the watermark information, a desensitization strategy for the first field to be desensitized in each row of data includes: Determine, based on the first character string and the watermark information, a watermark encoding bit value corresponding to each line of data; Based on the watermark encoding bit value, a desensitization strategy for the first field is determined.

4. The method according to claim 3, characterized in that The determining, based on the watermark coding bit value, a desensitization strategy for the first field includes: Acquire first information; wherein the first information includes at least two desensitization strategies corresponding to the first field in the first data set; Based on the watermark encoding bit value, a desensitization strategy for the first field is matched from the first information.

5. The method according to claim 1, characterized in that The calculating a first character string corresponding to each row of data in the first data set includes: Encrypting the data in the second field of each row of data in the first data set to obtain encrypted data; Sorting each encrypted data to obtain sorted data; Determine that data in the sorted data that meets a first condition is the first character string; wherein the data that meets the first condition includes data corresponding to a maximum value in the sorted data, or data corresponding to a minimum value in the sorted data.

6. The method according to claim 3, characterized in that The determining, based on the first character string and the watermark information, a watermark encoding bit value corresponding to each line of data includes: Get the preset remainder value; Encoding the watermark information to obtain a first encoding result; Modulo the first character string and the modulo value to obtain a sequence value corresponding to each row of data; Filling the first encoding result to obtain a second encoding result; wherein the number of bits of the second encoding result is the same as the number of bits of the remainder value; The watermark coding bit value is determined based on the sequence value and the second encoding result.

7. The method according to claim 2, characterized in that The determining of the sequence pair of each row of data in the second data set comprises: Determining a watermark encoding bit value in the sequence pair based on the content of the first field of each row of data in the second data set and a desensitization strategy for the first field of each row of data; Calculate a second character string corresponding to each row of data in the second data set; Based on the second character string, a sequence value in the sequence pair is determined.

8. The method according to claim 7, characterized in that The calculating the second character string corresponding to each row of data in the second data set includes: Encrypting the data in the second field of each row of data in the second data set to obtain encrypted data; Sorting each encrypted data to obtain sorted data; Determine that the data in the sorted data that meets the first condition is the second character string; wherein the data that meets the first condition includes data corresponding to the maximum value in the sorted data, or data corresponding to the minimum value in the sorted data.

9. The method according to claim 8, characterized in that The determining, based on the second character string, a sequence value in the sequence pair comprises: Get the preset remainder value; The second character string and the remainder value are modulo each other to obtain a sequence value in the sequence pair.

10. The method according to claim 6, characterized in that The determining the watermark coding bit value based on the sequence value and the second coding result includes: Determine that the bit value corresponding to the i-th bit in the second encoding result is the watermark encoding bit value; wherein, i is equal to the sequence value, and i is a positive integer.

11. A data processing device, characterized in that: The data processing device comprises: An acquisition module, used to acquire a first data set and watermark information; A processing module, used for calculating a first character string corresponding to each row of data in the first data set; The processing module is further used to determine a desensitization strategy for the first field to be desensitized in each row of data based on the first character string and the watermark information; The processing module is further used to desensitize the data in the first field based on the desensitization strategy to obtain a desensitized second data set.

12. An electronic device, characterized in that: The electronic device comprises: A memory for storing executable instructions; A processor, configured to implement the data processing method according to any one of claims 1 to 10 when executing the executable instructions stored in the memory.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the data processing method according to any one of claims 1 to 10.

14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the data processing method according to any one of claims 1 to 10 is implemented.

Citation Information

Patent Citations

  • Watermark tracing method for identity card data desensitization

    CN111651736A

  • Watermark embedding method, watermark reading method and watermark system based on desensitized data

    CN111831982A

  • Sensitive data desensitization method and device based on cloud service and medium

    CN116318991A

  • Watermark processing method and device and storage medium

    CN117911227A

  • Protection method and system for preventing file tampering based on adaptive security mechanism

    CN118551416A

Cited By

  • Database watermark processing method and device, storage medium and readable storage medium

    CN120974465A