Sensitive data management method, device and computer readable storage medium

By dispersing the storage address and data of sensitive data to plaintext libraries, key libraries and logical libraries, the problem of insufficient reliability of sensitive data in the existing technology is solved, and the triple protection of encryption, desensitization, and distributed storage is realized, improving the Reliability of sensitive data management.

CN118643522BActive Publication Date: 2024-11-19SHENZHEN SMARTCITY TECH DEV GRP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411118337.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-11-19
Estimated Expiration
2044-08-15

AI Technical Summary

Technical Problem

In the prior art, sensitive data is inadequate, and when a database fails or is attacked, it may lead to the loss or damage of all data ciphertexts, resulting in unavailability of data.

Method used

Encrypt the storage address and sensitive data through preset keys, generate storage address ciphertext and sensitive data ciphertext, and store them in plaintext libraries, key libraries and logical libraries. The abstract database is a logical library, plaintext library and key. library, realizes triple protection for encryption, desensitization, and distributed storage.

Benefits of technology

It effectively reduces the risk of data leakage. Even if a certain layer of data is leaked, it will not cause sensitive data exposure of the entire database, and improves the reliability of sensitive data management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118643522B_ABST
    Figure CN118643522B_ABST
Patent Text Reader

Abstract

The present invention discloses a sensitive data management method, device and computer-readable storage medium, belonging to the field of data security technology. The method comprises: when receiving data to be stored, determining the storage address corresponding to the sensitive data part in the data to be stored; encrypting the storage address and the sensitive data by a preset key to generate a storage address ciphertext and a sensitive data ciphertext; associating the sensitive data ciphertext with the storage address and saving it in a plaintext library, associating the preset key and the key identifier corresponding to the preset key and saving it in a key library, and associating the symbol ciphertext corresponding to the data to be stored, the key identifier and the storage address ciphertext and saving it in a logic library. The present invention aims to improve the reliability of sensitive data management through distributed storage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data security technology, and in particular to a sensitive data management method, device and computer-readable storage medium. Background Art

[0002] Sensitive data refers to data that may cause serious harm to individuals or organizations if leaked. For such sensitive data, appropriate security measures need to be taken to prevent unauthorized access, use, disclosure or modification.

[0003] In related technologies, sensitive data is usually encrypted and decrypted, specifically including: a key management module, used to generate keys; a data encryption module, used to encrypt original data according to the keys to obtain data ciphertext; a data signature module, used to sign the data ciphertext and transmit it to the local database node; the local database node performs signature authentication through a signature authentication module, and after the authentication is passed, the data is stored in the local database node.

[0004] However, the above solution is to store all data ciphertexts in one database. If the entire database fails or is attacked, all data ciphertexts may be lost or damaged, causing data unavailability, that is, insufficient reliability.

[0005] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention

[0006] The main purpose of the present invention is to provide a sensitive data management method, device and computer-readable storage medium, aiming to solve the technical problem of insufficient reliability.

[0007] To achieve the above object, the present invention provides a sensitive data management method, the sensitive data management method comprising the following steps:

[0008] When receiving the data to be stored, determining a storage address corresponding to a sensitive data portion in the data to be stored;

[0009] Encrypt the storage address and the sensitive data by using a preset key to generate a storage address ciphertext and a sensitive data ciphertext;

[0010] The sensitive data ciphertext and the storage address are associated and saved in the plaintext library, the preset key and the key identifier corresponding to the preset key are associated and saved in the key library, and the symbol ciphertext corresponding to the data to be stored, the key identifier and the storage address ciphertext are associated and saved in the logic library.

[0011] Optionally, before the steps of associating and saving the sensitive data ciphertext and the storage address in a plaintext library, associating and saving the preset key and the key identifier corresponding to the preset key in a key library, and associating and saving the symbol ciphertext corresponding to the data to be stored, the key identifier and the storage address ciphertext in a logic library, the steps include:

[0012] Selecting sensitive characters in the sensitive data one by one, and generating corresponding random characters through a random number generation algorithm;

[0013] The sensitive characters are replaced with the random characters, and combined with the non-sensitive data part in the data to be stored, to obtain the symbol ciphertext corresponding to the data to be stored.

[0014] Optionally, the step of encrypting the storage address and the sensitive data by using a preset key to generate a storage address ciphertext and a sensitive data ciphertext comprises:

[0015] According to a key expansion algorithm, the preset key is expanded into a round key;

[0016] An XOR operation is performed on the sensitive data, the storage address and the round key, and a preset number of iterative encryption operations are performed based on the XOR operation result to generate the storage address ciphertext and the sensitive data ciphertext.

[0017] Optionally, when receiving the data to be stored, the step of determining the storage address corresponding to the sensitive data portion in the data to be stored includes:

[0018] When receiving the data to be stored, classifying the data to be stored according to the sensitivity level, and filtering out the sensitive data part in the data to be stored according to the classification result;

[0019] Determine a storage address corresponding to the sensitive data portion.

[0020] Optionally, the step of classifying the data to be stored according to the sensitivity level and filtering out the sensitive data part in the data to be stored according to the classification result includes:

[0021] Determine the corresponding business requirements according to the business dimensions to which the data to be stored belongs;

[0022] According to the business requirements, the data to be stored is partitioned and a corresponding sensitivity coefficient is set for each partition;

[0023] The sensitivity of each partition is determined according to the data content of the data to be stored in each partition and the sensitivity coefficient, and the sensitive data part in the data to be stored is screened out according to the sensitivity.

[0024] To achieve the above object, the present invention provides a sensitive data management method, the sensitive data management method comprising the following steps:

[0025] When receiving the symbol ciphertext to be decrypted, reading the storage address ciphertext and the key identifier corresponding to the symbol ciphertext from the logic library;

[0026] Reading a preset key corresponding to the key identifier from a key library, and decrypting the storage address ciphertext by using the preset key to obtain the storage address;

[0027] The sensitive data ciphertext corresponding to the storage address is read from the key library, and the sensitive data ciphertext is decrypted according to the preset key to obtain the sensitive data.

[0028] Optionally, after the step of reading the sensitive data ciphertext corresponding to the storage address from the key library and decrypting the sensitive data ciphertext according to the preset key to obtain the sensitive data, the method further includes:

[0029] Determining the plaintext data in the symbolic ciphertext to be decrypted;

[0030] The plaintext data and the sensitive data are concatenated to obtain original data.

[0031] Optionally, before the step of reading the storage address ciphertext and the key identifier corresponding to the symbol ciphertext from the logic library when receiving the symbol ciphertext to be decrypted, the method further includes:

[0032] Upon receiving a decryption request from a user, determining the service role of the user;

[0033] If the business role is set with decryption authority, the step of reading the storage address ciphertext and the key identifier corresponding to the symbol ciphertext from the logic library when receiving the symbol ciphertext to be decrypted is performed.

[0034] In addition, to achieve the above-mentioned purpose, the present invention also provides a sensitive data management device, which includes: a memory, a processor, and a sensitive data management program stored in the memory and executable on the processor, and the sensitive data management program is configured to implement the steps of the sensitive data management method.

[0035] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which a sensitive data management program is stored, and when the sensitive data management program is executed by a processor, the steps of the sensitive data management method are implemented.

[0036] In a technical solution provided by the present invention, the sensitive data part of the data to be stored and the corresponding storage address are determined, and based on the preset key, the sensitive data ciphertext and the storage address ciphertext are obtained, and then the aforementioned data are dispersedly stored in the plaintext library, key library and logic library. This solution abstracts the database into a logic library, a plaintext library and a key library for storing different data. This layered storage can effectively reduce the risk of data leakage. Even if the data of a certain layer is leaked, it will not lead to the exposure of sensitive data of the entire database, thereby achieving the triple protection effect of encryption, desensitization and distributed storage, and effectively improving the reliability of sensitive data management. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 It is a top-level design diagram of the management side of sensitive data of the present invention;

[0038] Figure 2 A schematic diagram of a database of a sensitive data management method of the present invention;

[0039] Figure 3 It is a flowchart of a first embodiment of a method for managing sensitive data of the present invention;

[0040] Figure 4 This is a flow chart of step S12 in the first embodiment of the sensitive data management method of the present invention;

[0041] Figure 5 This is a flow chart before step S13 in the first embodiment of the sensitive data management method of the present invention;

[0042] Figure 6 It is a flowchart of a second embodiment of the sensitive data management method of the present invention;

[0043] Figure 7 This is a flow chart of step S21 in the second embodiment of the sensitive data management method of the present invention;

[0044] Figure 8 A schematic diagram of a flow chart of a third embodiment of a method for managing sensitive data of the present invention;

[0045] Fig. 9 This is a flow chart of the process after step S33 in the third embodiment of the sensitive data management method of the present invention;

[0046] Fig.10 It is a schematic diagram of the structure of a device for managing sensitive data of a hardware operating environment involved in an embodiment of the present invention.

[0047] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0048] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0049] Sensitive data refers to data that may cause serious harm to individuals or organizations if leaked. For such sensitive data, appropriate security measures need to be taken to prevent unauthorized access, use, disclosure or modification.

[0050] In related technologies, sensitive data is usually encrypted and decrypted, specifically including: a key management module, used to generate keys; a data encryption module, used to encrypt original data according to the keys to obtain data ciphertext; a data signature module, used to sign the data ciphertext and transmit it to the local database node; the local database node performs signature authentication through a signature authentication module, and after the authentication is passed, the data is stored in the local database node.

[0051] However, the above solution is to store all data ciphertexts in one database. If the entire database fails or is attacked, all data ciphertexts may be lost or damaged, causing data unavailability, that is, insufficient reliability.

[0052] There are two types of management methods for sensitive data:

[0053] Solution 1

[0054] The data is encrypted using a key to obtain data ciphertext. After signature processing, the data ciphertext is packaged into a data ciphertext package and transmitted to a database node. After the database node receives the transmitted data ciphertext package, it performs signature authentication. After the authentication is passed, the data is stored in the database node. Correspondingly, the decryption process also needs to use signature authentication to verify the decryption authority, decrypt the data through the data decryption module, generate plaintext, and transmit the decrypted plaintext to the user.

[0055] However, the above solution has the following defects:

[0056] 1. Reliability: All data ciphertexts are stored in one database. If the entire database fails or is attacked, all data ciphertexts may be lost or damaged, causing data unavailability, that is, insufficient reliability.

[0057] 2. Performance overhead: Since the above schemes require not only encryption operations but also additional steps such as signing and authentication, the time to process data and system overhead may increase. For example, encrypting a large data set may take a long time and may cause the system response time to slow down.

[0058] 3. Full ciphertext encryption: All original data is encrypted, and the final ciphertext data is composed of a long string of irregular numbers and characters, which will make the ciphertext data unrecognizable and unusable.

[0059] Solution 2

[0060] During encryption, in addition to fully encrypting the encrypted information to obtain the ciphertext, several disguised ciphertexts are also generated. The disguised confidential information can be used to disguise the information, so that even if someone maliciously cracks the password, they cannot directly obtain the real confidential information, thus ensuring the security of the real confidential information.

[0061] However, the above solution has the following defects:

[0062] 1. Performance overhead: Since the above scheme needs to generate additional disguised ciphertext, the performance of encryption operation may be reduced. At the same time, the decryption operation may require additional calculation to determine the real ciphertext, which may also cause the performance of decryption operation to be reduced.

[0063] 2. Complexity: The above scheme introduces additional disguised ciphertexts, which may increase the complexity of implementing and managing the scheme. At the same time, the number of ciphertexts and the complexity of disguises also need to be adjusted according to actual conditions, which increases the complexity of the scheme.

[0064] 3. Management cost: The above solution requires the management of multiple disguised ciphertexts, which may increase the management cost of keys and ciphertexts. If the number of disguised ciphertexts is large, additional storage and management resources may be required.

[0065] In order to better understand the above technical solution, exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0066] At the top-level design level, refer to Figure 1 This solution uses application code to connect to ShardingSphere-Proxy database middleware to achieve automatic data partitioning, i.e. distributed storage. Through ShardingSphere data partitioning, data stored in a single database is dispersedly stored in multiple databases or tables according to a certain business dimension. Data is randomly assigned to each library table, so theoretically, only when hackers steal all physical libraries under the three abstract libraries at the same time, it is possible to decrypt data according to code logic. This storage method can achieve high security and high reliability.

[0067] At the database level, the database is abstracted into three libraries, namely the logical library, the plaintext library, and the key library. The actual number of physical library tables can be adjusted according to project requirements, such as Figure 1, create 2 logical libraries, 2 plaintext libraries, and 2 key libraries, and each library includes 2 tables, a total of 6 libraries and 12 tables. In addition, create a log information library *1 to store log information for monitoring the interface calls of data encryption and decryption, including start_time (start time), end_time (end time), request_ip (request IP address), token_id (token, used to verify user identity and authorization), request_success (whether encryption and decryption are successful), table_name (data table name), table_comment (table Chinese description), data_source (data source), database_name (database name), schema name (mode, a database contains one or more modes, and the mode contains tables), column_name (field name), column_comment (field Chinese description), len(id_card_list) (encrypted and decrypted data volume), etc.

[0068] Reference Figure 1 and Figure 2 , the storage contents of various databases are as follows:

[0069] Logical library: ID1, i.e. key identifier, storage address ciphertext, symbol ciphertext, update time, creation time

[0070] Plain text library: ID2 is sensitive data identification, sensitive data ciphertext, storage address, update time, creation time

[0071] Keystore: ID1, key, update time, creation time

[0072] Log information library: various log information

[0073] The present invention provides a method for managing sensitive data. Figure 3 , Figure 3 It is a flowchart of a first embodiment of a sensitive data management method of the present invention.

[0074] In this embodiment, the sensitive data management method includes:

[0075] Step S11: upon receiving the data to be stored, determining a storage address corresponding to a sensitive data portion in the data to be stored;

[0076] This solution adopts a partial ciphertext encryption method, that is, when receiving the data to be stored, not all of the data to be stored will be encrypted, but only a part of it, that is, the sensitive data, will be encrypted.

[0077] For example, the data to be stored is an 18-digit digital string, where the 1st to 6th digits can be set as the address code, the 7th to 14th digits are the task information code, and the 15th to 18th digits are the sequence code and the check code. Then, the middle 7th to 14th digits can be set as the sensitive data part. For another example, the data to be stored is the user's name. It is known that in most cases, the first character is the surname and the following characters are the given name. Then, the second and subsequent characters can be set as the sensitive data part.

[0078] Optionally, when the data to be stored is received, the data to be stored may be classified, such as data A, data B, data C, data D, etc., which may be specifically performed by predefined data patterns, keyword matching, data formats, etc. Then, the sensitive data part is screened out from the data to be stored through specific screening rules associated with the current type. These rules may be customized according to the characteristics, content, format, etc. of the data, such as based on specific locations, keywords, regular expressions, machine learning algorithms, etc., which are not specifically limited in this embodiment.

[0079] Furthermore, a unique identifier ID2, i.e., a sensitive data identifier, is created for the sensitive data. On this basis, the storage address corresponding to the sensitive data portion is determined.

[0080] The sensitive data ciphertext corresponding to the known sensitive data should be stored in an abstract library such as the "plaintext library". It should be noted that the plaintext library here is an abstract library, that is, a nominally assumed database. There are real physical libraries under this type of abstract library. Each physical library can come from a single identical database server or multiple different database servers, that is, the database IP and port will change according to the specific storage location.

[0081] For example, in the storage phase, one is randomly selected from "ip1-ip5" as the database ip based on the algorithm, and then the data is stored in the database. The type of algorithm used can be selected based on ID2. Since ID2 is randomly generated, it can be considered that the algorithm also has randomness.

[0082] From the above content, we can see that the real database IP address is known only in the storage stage, and in the previous definition stage, it is impossible to determine where the database IP address is.

[0083] Based on this, during the definition phase, the format of the storage address is set to "database ip_port_database name_table name_ID2", where the specific contents of "database ip", "port", "database name" and "table name" cannot be determined for the time being.

[0084] Step S12: Encrypt the storage address and the sensitive data using a preset key to generate a storage address ciphertext and a sensitive data ciphertext;

[0085] Optionally, select a suitable encryption algorithm, such as SM4 (SM4 Encryption Algorithm, national commercial block cipher algorithm SM4), AES (Advanced Encryption Standard), DES (Data Encryption Standard), etc., to ensure that the selected algorithm can provide sufficient encryption strength to protect the confidentiality of the data; generate a preset key according to the selected encryption algorithm, and this key will be used to encrypt and decrypt storage addresses and sensitive data; use the preset key to encrypt the storage address of the sensitive data part to generate the storage address ciphertext, and use the preset key to encrypt the sensitive data to generate the sensitive data ciphertext.

[0086] In this solution, the same key is used to encrypt the storage address and sensitive data, that is, the same key is used for two encryptions. This setting can reduce the initialization and scheduling operations in the symmetric encryption algorithm, thereby improving the efficiency of encryption and decryption, reducing computing resources and time costs, that is, saving encryption and decryption resource overhead. This method is particularly effective in scenarios where a large amount of data needs to be encrypted, and can improve the overall performance and efficiency of the system.

[0087] Reference Figure 4 , step S12 comprises:

[0088] Step S121: expanding the preset key into a round key according to a key expansion algorithm;

[0089] Step S122: performing an XOR operation on the sensitive data, the storage address and the round key, and performing a preset number of iterative encryption operations based on the XOR operation result to generate the storage address ciphertext and the sensitive data ciphertext.

[0090] This solution uses the SM4 algorithm for encryption.

[0091] Optionally, a key expansion algorithm is used to expand the preset key into round keys. For example, the 128-bit preset key is divided into four 32-bit words, represented as K[0], K[1], K[2] and K[3], and then a series of nonlinear transformation, circular left shift and linear transformation operations are performed to generate 32 rounds of round keys W[0], W[1], ..., W

[31] . These round keys will be used for 32 rounds of encryption operations of the SM4 algorithm.

[0092] Furthermore, based on the round key, the sensitive data and storage address are encrypted respectively to obtain the corresponding sensitive data ciphertext and storage address ciphertext, thereby realizing the conversion from plaintext to ciphertext. The specific encryption process is as follows:

[0093] Initial round key addition: XOR the plaintext data with the first round subkey.

[0094] Multi-round encryption: 32 rounds of iterative encryption operations are performed, each round includes the following steps: a. S-box replacement, that is, the data is subjected to a nonlinear S-box replacement operation. b. Linear transformation, that is, a linear transformation is performed on the result of S-box replacement. c. Round key addition, that is, the result is XORed with the subkey of the corresponding round.

[0095] Final round key addition: After the last round of iterations, the result is added to the subkey of the last round for round key addition.

[0096] Obtain ciphertext: After 32 rounds of iterative encryption and the final round of key addition, the result is the encrypted ciphertext data.

[0097] Unlike AES, DES and other algorithms, the SM4 algorithm uses nonlinear S-box replacement, which makes the algorithm more resistant to attacks such as differential cryptanalysis and linear cryptanalysis. In addition, the round function of SM4 uses complex nonlinear transformations and linear transformations, which helps to enhance the security of the algorithm and make it more difficult to be attacked by various cryptanalysis attacks.

[0098] Step S13: The sensitive data ciphertext and the storage address are associated and saved in the plaintext library, the preset key and the key identifier corresponding to the preset key are associated and saved in the key library, and the symbolic ciphertext corresponding to the data to be stored, the key identifier and the storage address ciphertext are associated and saved in the logic library.

[0099] Alternatively, if Figure 2 As shown, the sensitive data ciphertext and storage address are associated and saved in the plaintext library. ID2, i.e., the sensitive data identifier, can also be stored, and the corresponding creation time and update time are determined; the preset key and the corresponding key identifier ID1 are associated and saved in the key library; the symbol ciphertext, key identifier ID1 and storage address ciphertext are associated and saved in the logic library.

[0100] Among them, the symbolic ciphertext is the ciphertext with symbols obtained by partial transformation based on the data to be stored. The symbolic ciphertext does not completely encrypt the data, but desensitizes the data to retain the availability and identifiability of the data. In this way, the specific content of the data can be hidden, while the structure and availability of the data can be retained, so that the data can still play its due role while ensuring data security.

[0101] For example, in the use scenarios of personnel and human resources systems, important personal information of job applicants is encrypted to prevent the leakage of personal sensitive information. When it is necessary to view personal information, operators with advanced permissions can decrypt the data, thereby achieving controllable and manageable data security.

[0102] For example, in the data development use scenario, the system is used to encrypt sensitive data during the access process from the source, which can mask sensitive information while retaining the availability and identifiability of the data. Therefore, the work of the data development role can run normally while ensuring data security and preventing important data leakage.

[0103] As for the generation of symbolic ciphertext, it can be implemented based on random number encryption, substitution encryption, stream encryption, etc. For example, in stream encryption, part of the plaintext is selected from the data to be stored, and then each character in the plaintext is XORed with a character in the key to generate the ciphertext. Different from the full ciphertext storage, this scheme only encrypts part of the plaintext data in the data to be stored, and the encrypted part is replaced by other symbols, so that the original length of the data to be stored can be retained, that is, the availability and identifiability of the data are retained.

[0104] After the above encryption process, data is not stored in plain text at the database level, which meets the relevant requirements of data security management. Using ciphertext as a pointer to the corresponding data has both concealment and increased security.

[0105] Optionally, refer to Figure 5 , before step S13, including:

[0106] Step S14: Select sensitive characters in the sensitive data one by one, and generate corresponding random characters through a random number generation algorithm;

[0107] Step S15: Replace the sensitive characters with the random characters, and combine with the non-sensitive data part in the data to be stored to obtain the symbol ciphertext corresponding to the data to be stored.

[0108] Optionally, start from the first sensitive character in the sensitive data, convert it into a corresponding random character and replace it, then jump to the next sensitive character until all sensitive characters are traversed. The specific steps are as follows:

[0109] Determine the range of random characters, such as random characters of English letters, i.e. lowercase letters a to z, and special characters such as @, #, ¥, %, &, *, etc.; determine the random number generation algorithm, which can be a pseudo-random number generation algorithm, such as the linear congruential method, or a true random number generation algorithm, such as a method based on physical phenomena; use the selected random number generation algorithm to generate random characters corresponding to the current sensitive characters; replace the current sensitive characters with random characters, which can be implemented using the replace() method of the string.

[0110] Furthermore, the portion replaced by random characters is integrated with the unchanged non-sensitive data portion of the data to be stored, so that the obtained symbolic ciphertext includes both the replaced random characters and the original non-sensitive data portion.

[0111] Exemplarily, the data to be stored is known to be "AAAAAA19920110CCCC", where the non-sensitive data includes the first 6 digits "AAAAAA" and the last 4 digits "CCCC", and the sensitive data is the 7th to 14th digits, i.e. "19920110". The first sensitive character "1" is selected, and the corresponding random character "*" is generated by the random number generation algorithm, and then replaced to obtain "*9920110", and so on, until all sensitive characters are traversed, and the result is "*#¥%#¥*@". Finally, combined with the non-sensitive data part of the data to be stored, i.e. the 1st to 6th digits "AAAAAA" and the 15th to 18th digits "CCCC", the symbolic ciphertext is "AAAAAA*#¥%#¥*@CCCC".

[0112] The random number encryption algorithm used in this scheme is a one-way encryption algorithm. By introducing random factors, the result of each encryption is different. This means that even if an attacker obtains the encrypted data, it is difficult to reversely deduce the original data, so it can better protect the security of the data.

[0113] It should be noted that the above step of determining the symbolic ciphertext corresponding to the data to be stored can be performed before distributed storage, that is, after the symbolic ciphertext is constructed, and then the data is written to the plaintext library, key library, and logic library. The order between the above steps does not constitute a limitation, and it is only necessary to complete the construction of the symbolic ciphertext before writing the symbolic ciphertext to the logic library. This embodiment does not make specific limitations.

[0114] In a technical solution provided in this embodiment, the sensitive data part of the data to be stored and the corresponding storage address are determined, and based on the preset key, the sensitive data ciphertext and the storage address ciphertext are obtained, and then the aforementioned data are dispersedly stored in the plaintext library, key library and logic library. This solution abstracts the database into a logic library, a plaintext library and a key library for storing different data. This layered storage can effectively reduce the risk of data leakage. Even if the data of a certain layer is leaked, it will not lead to the exposure of sensitive data of the entire database, thereby achieving the triple protection effect of encryption, desensitization and distributed storage, and effectively improving the reliability of sensitive data management.

[0115] Further, see Figure 6 , a second embodiment of the sensitive data management method of the present invention is proposed. Based on the above Figure 3In the embodiment shown, when receiving the data to be stored, the step of determining the storage address corresponding to the sensitive data portion in the data to be stored includes:

[0116] Step S21: when receiving the data to be stored, classifying the data to be stored according to the sensitivity level, and filtering out the sensitive data part in the data to be stored according to the classification result;

[0117] Step S22: Determine the storage address corresponding to the sensitive data portion.

[0118] It can be understood that the present solution only needs to encrypt a specific portion of the data to be stored, and the selection of this specific portion can be determined based on the sensitivity of the characters in the data to be stored.

[0119] Optionally, when receiving the data to be stored, the specific content, attributes, risks, etc. of the data to be stored are determined, and one or more dimensions are selected to classify the sensitivity of the details of the data to be stored. After obtaining the data parts with different sensitivity levels, they are sorted in order from high to low, and the most sensitive part is selected as the sensitive data to be encrypted.

[0120] Among them, screening based on specific content: when the data to be stored is comprehensive data, screening is performed based on the content relevance of various types of detailed data. For example, the data includes data A, data B, data C, etc., among which data A is the information that uniquely identifies a person's identity, which may lead to identity theft and fraud after leakage; data B is more sensitive information because it can be combined with other information for identity authentication and personal identification; data C is relatively less sensitive, but in some cases it may also be used for targeted attacks or privacy violations. Based on this, the sensitivity of data A, data B, and data C is set to high, medium, and low, respectively.

[0121] Among them, attribute-based screening is to determine the sensitivity of data based on its attribute characteristics, such as its length, format, frequency, etc. This method is suitable for large amounts of data and can quickly screen out sensitive data by setting certain rules and thresholds.

[0122] Among them, risk-based screening is to determine the sensitivity of data based on its risk level, such as the value, importance, confidentiality and other risk factors of the data. This method needs to formulate corresponding risk assessment standards and strategies in combination with specific business scenarios and data characteristics. For example, different parts of the data have different levels of sensitivity. Generally speaking, the front part of the data represents regional information, the middle part represents the date of birth, and the last part may be a sequence code and a checksum. In comparison, the date of birth can be used to infer an individual's age and life stage, which may directly affect the individual's privacy. Therefore, the middle part is more sensitive.

[0123] Optionally, refer to Figure 7 , step S21 comprises:

[0124] Step S211: determining corresponding business requirements according to the business dimension to which the data to be stored belongs;

[0125] It is understandable that when the data to be stored is comprehensive, it is necessary to consider the importance of each type of data to the business department, and then encrypt the highly important data.

[0126] Optionally, obtain the data source, data usage, data characteristics, etc. of the data to be stored, and select one or more dimensions to determine the business dimension to which the data to be stored belongs, including but not limited to business dimension A, business dimension B, business dimension C, business dimension D, etc.

[0127] For example, analyzing the source of the data, if the data is obtained from a map regional distribution system, then the data may belong to the regional statistical dimension; if the data is obtained from an asset statistical table, then the data may belong to the asset statistical dimension.

[0128] For example, feature analysis is performed on the data to be stored, and the meaning and purpose of the data are determined based on the keywords, fields, patterns, and other information of the overall text, thereby determining its belonging dimension. If the pattern of the overall text is "xx province xx city xx county", then it is determined that the data to be stored belongs to the regional statistical dimension.

[0129] Furthermore, the business requirements corresponding to the current business dimension are determined based on the mapping relationship between the preset business dimensions and business requirements. For example, the business requirements corresponding to the regional statistical dimension are to analyze the sales situation and trends in different regions and formulate regional sales strategies and resource allocation.

[0130] Step S212: partitioning the data to be stored according to the business requirements, and setting a corresponding sensitivity coefficient for each partition;

[0131] It is understandable that different business departments may have different data needs and processing methods. By partitioning and setting sensitivity coefficients, the data needs of different business departments can be better met and the data availability and security can be improved.

[0132] Optionally, determine the data type involved in the business needs, and based on this, partition the data to be stored. For example, "analyze sales conditions and trends in different regions, and formulate regional sales strategies and resource allocations." The aforementioned business needs involve information A, information B, and information C, so the data to be stored is divided into three partitions. The first partition is information A, including information 1, information 2, information 3, information 4, etc. The second partition is information B, including information 5, information 6, information 7, etc. The third partition is information C, including information 8, information 9, information 10, etc.

[0133] Furthermore, according to the importance of each partition to the business needs, a corresponding sensitivity coefficient is set for each partition. For example, information A involves both the user dimension and the merchant dimension, so information A is set to a high sensitivity coefficient, such as 0.6; information B does not involve sensitive personal information, so information B is set to a medium sensitivity coefficient, such as 0.3; as for information C, it has no significant effect on achieving business needs, so information C is set to a low sensitivity coefficient, such as 0.1.

[0134] Step S213: Determine the sensitivity of each partition according to the data content of the data to be stored in each partition and the sensitivity coefficient, and filter out the sensitive data part in the data to be stored according to the sensitivity.

[0135] It is understandable that the specific content of data can affect its sensitivity. For example, for the same information A, data containing highly sensitive information is obviously more sensitive than data containing only low-sensitivity information. Therefore, the actual sensitivity of the data may not be accurately assessed based on the sensitivity coefficient alone.

[0136] Optionally, a weight coefficient is determined for each partition based on the specific data content of each partition, and then multiplied by the sensitivity coefficient of the partition to comprehensively determine the sensitivity of each partition. Finally, sensitive data is screened out from the data to be stored based on the order of sensitivity.

[0137] By considering both data content and sensitivity, we can gain a more comprehensive understanding of the sensitivity and potential risks of the data, and thus more accurately assess the sensitivity of the data.

[0138] In a technical solution provided in this embodiment, the data to be stored is divided according to the sensitivity level, and the sensitive data part in the data to be stored is screened out based on the division results. This solution screens out sensitive data based on the sensitivity level, and can focus key resources and attention on data with higher sensitivity. It can more effectively configure security resources and control measures, and improve the efficiency and effectiveness of data security management.

[0139] The present invention provides a method for managing sensitive data. Figure 8 , Figure 8 It is a flowchart diagram of a third embodiment of a sensitive data management method of the present invention.

[0140] In this embodiment, the sensitive data management method includes:

[0141] Step S31: upon receiving the symbolic ciphertext to be decrypted, reading the storage address ciphertext and key identifier corresponding to the symbolic ciphertext from the logic library;

[0142] Optionally, in the encryption phase, the symbol ciphertext, storage address ciphertext and key identifier have been written into the logic library in an associated manner. Then in the decryption phase, when the symbol ciphertext to be decrypted is received, such as "AAAAAA*#¥%#¥*@CCCC", it is possible to directly query whether the symbol ciphertext exists in the logic library. If it exists, the key identifier ID1 and storage address ciphertext associated with the symbol ciphertext can be further read.

[0143] Step S32: reading a preset key corresponding to the key identifier from a key library, and decrypting the storage address ciphertext by using the preset key to obtain the storage address;

[0144] Optionally, in the encryption phase, the preset key and the key identifier corresponding to the preset key have been written into the key library. Then in the decryption phase, after reading the key identifier ID1 from the logic library, it is possible to directly query whether the key identifier ID1 exists in the key library. If it exists, the key associated with the key identifier ID1 can be further read. The key here can be generated based on algorithms such as SM4, AES, and DES, which are not specifically limited in this embodiment.

[0145] Furthermore, the storage address ciphertext is decrypted by using a preset key to obtain the storage address. Taking the SM4 algorithm as an example, the storage address ciphertext and the preset key are input into the SM4 decryption algorithm. After multiple rounds of iterations and complex calculations, each round involves substitution layers, permutation layers, linear transformations, and round key additions. In each round of iteration, the algorithm uses the decryption key to perform reverse calculations and ultimately generates the original storage address, such as "192.168.1.100_3306_plaintext library 1_plaintext table 1_12345".

[0146] Step S33: Read the sensitive data ciphertext corresponding to the storage address from the key library, and decrypt the sensitive data ciphertext according to the preset key to obtain the sensitive data.

[0147] Optionally, in the encryption phase, the sensitive data ciphertext and storage address have been written into the plaintext library in association. Then in the decryption phase, after the storage address is obtained through decryption, it is possible to query in the plaintext library whether the storage address exists. If so, the sensitive data ciphertext associated with the storage address can be further read.

[0148] Furthermore, the preset key is used to decrypt the sensitive data ciphertext to obtain sensitive data, such as 19920110.

[0149] In addition, refer to Fig. 9 , after step S33, further comprising:

[0150] Step S34: determining the plaintext data in the symbolic ciphertext to be decrypted;

[0151] Step S35: concatenate the plaintext data and the sensitive data to obtain original data.

[0152] It is understandable that the symbolic ciphertext does not completely encrypt the data, but rather desensitizes the data to retain its availability and identifiability. That is to say, in the entire symbolic ciphertext, there is still a part in plain text, such as "AAAAAA*#¥%#¥*@CCCC", where the 1st to 6th digits "AAAAAA" and the 15th to 18th digits "CCCC" are in plain text.

[0153] Optionally, characters that have been converted during the encryption phase are determined, and then data other than these characters are determined as plaintext data. Further, the plaintext data and sensitive data are concatenated to obtain the original data. For example, the plaintext data "AAAAAA" and "CCCC" and the decrypted sensitive data "19920110" are concatenated to obtain the complete "AAAAAA19920110CCCC".

[0154] Splicing the plaintext data with the decrypted sensitive data can ensure the integrity and consistency of the data, which can avoid data loss or damage, and can restore the original complete data, which helps to maintain the accuracy of the data. In addition, comparing the original data in the decryption stage with the data to be stored in the encryption stage can also verify the correctness of the encryption and decryption process and the consistency of the data.

[0155] In addition, when receiving a decryption request from a user, the user's business role, that is, the role the user plays in the system, is determined based on the user information carried in the decryption request. Business roles usually correspond to responsibilities or authority levels within an organization, such as "administrator", "ordinary user", "data processing personnel", etc. After determining the user's business role, the system needs to check whether the business role has permission to decrypt data. This usually involves access control lists or similar permission management mechanisms, which define the operations that each business role can perform, including decryption operations. If the business role to which the user belongs has decryption permission, the system can perform a decryption operation to decrypt the ciphertext data into plaintext data.

[0156] By verifying the user's identity and permissions, it can be ensured that only authorized users can perform decryption operations, thereby effectively protecting data security and preventing unauthorized users from obtaining sensitive data.

[0157] In a technical solution provided in this embodiment, the storage address ciphertext and key identifier are read from the logic library, and then the corresponding key is read from the key library, and then the storage address ciphertext is decrypted using the key to obtain the storage address, and then the sensitive data ciphertext corresponding to the storage address is read from the plaintext library, and the key is used to decrypt again to obtain the sensitive data. This solution abstracts the database into a logic library, a plaintext library, and a key library for storing different data. This layered storage can effectively reduce the risk of data leakage. Even if the data of a certain layer is leaked, it will not lead to the exposure of sensitive data of the entire database, thereby achieving the triple protection effect of encryption, desensitization, and distributed storage, and effectively improving the reliability of sensitive data management.

[0158] The following is a complete example of encryption and decryption logic:

[0159] Encryption process:

[0160] 1. Extract the 8-bit plaintext in the data and create a unique identifier ID2;

[0161] 2. Define the "address" of each data as "database ip_port_database name_table name_ID2";

[0162] 3. Use SM4 algorithm to encrypt the address and 8-bit plaintext;

[0163] 4. Store the 8-bit plaintext ciphertext and address plaintext in the plaintext library; store the key in the key library, store the address ciphertext in the logic library, and convert the plaintext in the data into symbolic ciphertext, that is, replace the 8-bit plaintext with random characters in the selected range, and store it in the logic library to create a unique identifier ID1.

[0164] Decryption process:

[0165] 1. The symbol ciphertext matches the address ciphertext, finds the key in the key library according to ID1, decrypts the address ciphertext, and obtains the address plaintext;

[0166] 2. Match the ciphertext of 8-bit plaintext in the plaintext library through the address plaintext;

[0167] 3. Use the key to decrypt the 8-bit plaintext ciphertext to obtain the 8-bit plaintext;

[0168] 4. Concatenate the first 6 bits, 8 bits of plain text, and the last 4 bits to get the original data.

[0169] Reference Fig.10 , Fig.10This is a schematic diagram of the structure of a management device for sensitive data of a hardware operating environment involved in an embodiment of the present invention.

[0170] like Fig.10 As shown, the sensitive data management device may include: a processor 1001, such as a core processor (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0171] Those skilled in the art will understand that Fig.10 The structure shown in the figure does not constitute a limitation on the sensitive data management device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0172] like Fig.10 As shown, the memory 1005 as a storage medium may include an operating system, a data storage module, a network communication module, a user interface module, and a sensitive data management program.

[0173] exist Fig.10 In the sensitive data management device shown, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the sensitive data management device of the present invention can be set in the sensitive data management device, and the sensitive data management device calls the sensitive data management program stored in the memory 1005 through the processor 1001, and executes the sensitive data management method provided by the embodiment of the present invention.

[0174] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in any embodiment of the above-mentioned sensitive data management method are implemented.

[0175] Since the embodiments of the computer-readable storage medium part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the computer-readable storage medium part, and will not be repeated here.

[0176] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or system including the element.

[0177] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0178] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0179] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for managing sensitive data, characterized in that: The sensitive data management method comprises the following steps: When receiving the data to be stored, classifying the data to be stored according to the sensitivity level, and filtering out the sensitive data part in the data to be stored according to the classification result; Determining a storage address corresponding to the sensitive data portion; According to the key expansion algorithm, the preset key is expanded into a round key; Performing an XOR operation on the sensitive data, the storage address and the round key, and performing a preset number of iterative encryption operations based on the XOR operation result to generate a storage address ciphertext and a sensitive data ciphertext; Selecting sensitive characters in the sensitive data one by one, and generating corresponding random characters through a random number generation algorithm; The sensitive characters are replaced with the random characters, and combined with the non-sensitive data part in the data to be stored, to obtain the symbol ciphertext corresponding to the data to be stored; The sensitive data ciphertext and the storage address are associated and saved in a plaintext library, the preset key and the key identifier corresponding to the preset key are associated and saved in a key library, and the symbol ciphertext corresponding to the data to be stored, the key identifier and the storage address ciphertext are associated and saved in a logic library, wherein the plaintext library is an abstract library and comes from multiple different database servers; The step of associating the sensitive data ciphertext with the storage address and saving it in a plaintext library comprises: Creating a sensitive data identifier for the sensitive data, determining to randomly select one from the multiple different database servers as a database according to an algorithm corresponding to the sensitive data identifier, and associating the sensitive data ciphertext with the storage address and saving it in the database; When receiving the symbol ciphertext to be decrypted, reading the storage address ciphertext and the key identifier corresponding to the symbol ciphertext from the logic library; Reading a preset key corresponding to the key identifier from a key library, and decrypting the storage address ciphertext by using the preset key to obtain the storage address; The sensitive data ciphertext corresponding to the storage address is read from the key library, and the sensitive data ciphertext is decrypted according to the preset key to obtain the sensitive data.

2. The sensitive data management method according to claim 1, characterized in that: The step of classifying the data to be stored according to the sensitivity level and filtering out the sensitive data part in the data to be stored according to the classification result includes: Determine the corresponding business requirements according to the business dimensions to which the data to be stored belongs; According to the business requirements, the data to be stored is partitioned and a corresponding sensitivity coefficient is set for each partition; The sensitivity of each partition is determined according to the data content of the data to be stored in each partition and the sensitivity coefficient, and the sensitive data part in the data to be stored is screened out according to the sensitivity.

3. The sensitive data management method according to claim 1, characterized in that: After the step of reading the sensitive data ciphertext corresponding to the storage address from the key library and decrypting the sensitive data ciphertext according to the preset key to obtain the sensitive data, the method further includes: Determining the plaintext data in the symbolic ciphertext to be decrypted; The plaintext data and the sensitive data are concatenated to obtain original data.

4. The sensitive data management method according to claim 1, characterized in that: Before the step of reading the storage address ciphertext and the key identifier corresponding to the symbol ciphertext from the logic library when receiving the symbol ciphertext to be decrypted, the method further includes: Upon receiving a decryption request from a user, determining the service role of the user; If the business role is set with decryption authority, the step of reading the storage address ciphertext and the key identifier corresponding to the symbol ciphertext from the logic library when receiving the symbol ciphertext to be decrypted is performed.

5. A sensitive data management device, characterized in that: The sensitive data management device includes: a memory, a processor, and a sensitive data management program stored in the memory and executable on the processor, wherein the sensitive data management program is configured to implement the steps of the sensitive data management method according to any one of claims 1 to 4.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a sensitive data management program, and when the sensitive data management program is executed by a processor, the steps of the sensitive data management method according to any one of claims 1 to 4 are implemented.