Data encryption storage method, device, computer equipment and storage medium

By performing security level analysis and multi-layer encryption processing on key data, combined with irreversible encrypted user data to generate query fields, the problem of low security in traditional data storage is solved and the security of data storage is significantly improved.

CN112613051BActive Publication Date: 2024-11-12KINGDEE SOFTWARE(CHINA) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011549783.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-24
Publication Date
2024-11-12
Estimated Expiration
2040-12-24

AI Technical Summary

Technical Problem

Traditional data storage methods have shortcomings in security. The data itself is not encrypted and is easily stolen. Single-layer encryption keys are also easily acquired by hackers in the database, resulting in low data security.

Method used

By performing security level requirements analysis of the key data to be stored, matching the multi-layer encryption scheme, multi-layer encryption processing is performed on the data, and the obfuscated key is stored in the database. User data is irreversibly encrypted to generate association query fields, and key-value pairs are used. Associated storage is performed in form.

Benefits of technology

Improves the security of data storage, reduces the risk of real encryption keys being stolen, and enhances data query and storage security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112613051B_ABST
    Figure CN112613051B_ABST
Patent Text Reader

Abstract

The present application relates to a data encryption storage method, device, computer equipment and storage medium. The method includes: obtaining key data to be stored and corresponding user data; performing security level requirement analysis on the key data; matching the encryption scheme corresponding to the required security level for the key data; if it is a multi-layer encryption scheme, the key data is encrypted in each layer of the multi-layer encryption scheme in turn; wherein, in the encryption process of each layer, the obfuscation key corresponding to the layer is obtained from the database, the encryption key is parsed from the obfuscation key, and the data to be encrypted is encrypted according to the encryption key; the user data is irreversibly encrypted to obtain an associated query field; the key query field and the encrypted data after multi-layer encryption are associated and stored in the form of key-value pairs. The use of this method can improve the security of data storage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to computer technology and secure storage technology, and in particular to a data encryption storage method, device, computer equipment and storage medium. Background Art

[0002] With the continuous development of computer technology and Internet technology, information storage has gradually reduced paper storage, and more electronic storage is used. For example, data is stored in a database, and later, users can access the database through the network to easily obtain the stored data. From the perspective of data security, electronic storage of data often involves security encryption issues.

[0003] In traditional methods, most scenarios do not involve encrypted storage of the data itself, but rather key verification from the data access portal. For example, when a user logs in to access data through an account, he needs to enter his account and password for security verification. In this case, since the data itself is not encrypted, it is easy for hackers to steal the data if they directly attack the database. In addition, in some minority scenarios, although the data itself is encrypted and stored, it is only stored after a single layer of reversible encryption using a simple encryption key. In this case, the encryption key is stored in the database, and hackers can obtain the encryption key by intercepting the database, which can easily lead to data theft.

[0004] Obviously, traditional methods all have the problem of relatively low security. Therefore, it is necessary to propose corresponding solutions to the problem of relatively low security of traditional methods. Summary of the invention

[0005] Based on this, it is necessary to provide a data encryption storage method, device, computer equipment and storage medium that can improve security in response to the above technical problems.

[0006] A data encryption storage method, the method comprising:

[0007] Acquire key data to be stored and corresponding user data; the user data is identity characterization data of a user who has access rights to the key data;

[0008] Conducting security level requirement analysis on the key data;

[0009] Matching an encryption scheme corresponding to the required security level for the key data;

[0010] If it is a multi-layer encryption scheme, the key data is encrypted in each layer of the multi-layer encryption scheme in turn; wherein, in the encryption process of each layer, the obfuscation key corresponding to the layer is obtained from the database, the encryption key is parsed from the obfuscation key, and the data to be encrypted is encrypted according to the encryption key;

[0011] Irreversibly encrypting the user data to obtain an associated query field;

[0012] The key query fields and the encrypted data after multi-layer encryption are associated and stored in the form of key-value pairs.

[0013] In one embodiment, the security level requirement analysis of the key data includes:

[0014] Obtaining data attribute information corresponding to the key data;

[0015] Acquire object attribute information of an object related to the key data;

[0016] The security level that the key data needs to have is predicted based on the data attribute information and the object attribute information.

[0017] In one embodiment, the data attribute information includes at least one of the business type corresponding to the key data and the importance of the key data; the object attribute information includes at least one of the attribute information of the user to which the key data belongs and the attribute information of the object that performs the storage operation on the key data;

[0018] The predicting the security level corresponding to the key data according to the data attribute information and the object attribute information includes:

[0019] The security level required for storing the critical data is predicted based on at least one of the business type, importance, attribute information of the user to which the data belongs, and attribute information of the object on which the storage operation is performed.

[0020] In one embodiment, the security level requirement analysis of the key data includes:

[0021] Obtaining description information of the key data;

[0022] According to the description information, identifying the target business type corresponding to the key data;

[0023] According to the pre-set business security storage rules, obtain the security level that matches the target business type.

[0024] In one embodiment, the security level requirement analysis of the key data further includes:

[0025] If the target service type does not exist in the service security storage rule, then

[0026] Acquire the business type recorded in the business security storage rule, and perform correlation analysis between the target business type and the recorded business type;

[0027] The security level of the target service type is determined according to the security level corresponding to the service type of the record whose correlation with the target service type satisfies the strong correlation condition.

[0028] In one embodiment, matching the key data with an encryption scheme corresponding to the required security level includes:

[0029] Obtaining a correspondence between a pre-stored security level and an encryption scheme from a database;

[0030] According to the corresponding relationship, an encryption scheme corresponding to the predicted security level required for the key data is found.

[0031] In one embodiment, the multi-layer encryption scheme includes a system key encryption level, a management key encryption level, and a user key encryption level;

[0032] In the encryption process at each level, the obfuscation key corresponding to the level is obtained from the database, the encryption key is parsed from the obfuscation key, and the data to be encrypted is encrypting according to the encryption key, including:

[0033] Obtaining a system obfuscation key corresponding to the system key encryption level from a database, parsing a system key from the system obfuscation key, and encrypting the critical data according to the system key;

[0034] Obtaining a management obfuscation key corresponding to the management key encryption level from a database, parsing a management key from the management obfuscation key, and encrypting data encrypted by the system key encryption level according to the management key;

[0035] A user obfuscation key corresponding to the user key encryption level is obtained from a database, the user key is parsed from the user obfuscation key, and the data encrypted by the management key encryption level is encrypteed according to the user key to obtain final encrypted data.

[0036] A data encryption storage device, the device comprising:

[0037] The security level analysis module is used to obtain the key data to be stored and the corresponding user data; the user data is the identity characterization data of the user who has access rights to the key data; and to perform security level requirement analysis on the key data;

[0038] An encryption scheme matching module, used to match an encryption scheme corresponding to a required security level for the key data;

[0039] an encryption module, for, if a multi-layer encryption scheme is used, encrypting the key data in each layer of the multi-layer encryption scheme in turn; wherein, in the encryption process of each layer, obtaining an obfuscation key corresponding to the layer from a database, parsing an encryption key from the obfuscation key, and encrypting the data to be encrypted according to the encryption key; and irreversibly encrypting the user data to obtain an associated query field;

[0040] The storage module is used to associate and store key query fields and multi-layer encrypted encrypted data in the form of key-value pairs.

[0041] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps in the data encryption storage method described in each embodiment of the present application.

[0042] A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the processor executes the steps in the data encryption storage method described in each embodiment of the present application.

[0043] The above-mentioned data encryption storage method, device, computer equipment and storage medium can provide a more accurate encryption scheme for key data by analyzing the security level requirements of the encrypted data to be stored. The obfuscated keys are stored in the database, which can reduce the risk of the real encryption keys being stolen. For key data with high security level requirements, the obfuscated keys can be stored after multi-layer encryption, thereby improving the security of data storage. In addition, by irreversibly encrypting user data to generate key query fields, it is equivalent to encrypting from the query perspective of the data and encrypting the data itself. This greatly improves the security of data storage. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 An application environment diagram of a data encryption storage method in one embodiment;

[0045] Figure 2 A schematic diagram of a flow chart of a data encryption storage method in one embodiment;

[0046] Figure 3A schematic diagram of multi-layer encryption steps in one embodiment;

[0047] Figure 4 A schematic diagram of the principle of data encryption storage in one embodiment;

[0048] Figure 5 A block diagram of a data encryption storage device in one embodiment;

[0049] Figure 6 A block diagram of a data encryption storage device in one embodiment;

[0050] Figure 7 FIG. 1 is a block diagram of a computer device in one embodiment. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0052] The data encryption storage method provided in this application can be applied to Figure 1 In the application environment shown in the figure, the terminal 102 communicates with the server 104 through the network. A client runs in the terminal 102. The terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The server 104 can be implemented as an independent server or a server cluster consisting of multiple servers.

[0053] Specifically, the person performing the data storage operation can perform the data storage operation in the terminal 102 to store the key data to be stored securely. The terminal 102 can send the key data to be stored to the server 104. The server 104 can obtain the key data to be stored, and obtain the user data corresponding to the key data. The server 104 can perform a security level requirement analysis on the key data; match the encryption scheme corresponding to the required security level for the key data. If it is a multi-layer encryption scheme, the server 104 can perform multi-layer encryption on the key data in turn through each layer in the multi-layer encryption scheme; wherein, in the encryption process of each layer, the obfuscation key corresponding to the layer is obtained from the database, the encryption key is parsed from the obfuscation key, and the data to be encrypted is encrypted according to the encryption key. The server 104 can irreversibly encrypt the user data to obtain the associated query field, and associate the key query field with the encrypted data after the multi-layer encryption in the form of a key-value pair.

[0054] In one embodiment, Figure 2 As shown, a data encryption storage method is provided for application in Figure 1Taking the server 104 in the example as an example, the following steps are included:

[0055] Step 202: Acquire key data and corresponding user data to be stored.

[0056] Among them, key data is substantial business data. User data is the identity characterization data of the user who has access rights to key data, that is, it is used to characterize the user who has access rights to key data. It can be understood that the user is the user who has access rights to the encrypted and stored key data.

[0057] For example, in the salary data storage scenario, the specific salary data is substantive business data, that is, key data. Then, user data is used to represent users who have access to query the salary data.

[0058] Specifically, a person performing a data storage operation can perform the data storage operation in a terminal to input key data to be stored, and send the key data to a server.

[0059] In one embodiment, the person may also send the user data corresponding to the key data to the server. In another embodiment, the person may only send the identification of the user who has access rights to the key data to the server, and the server itself searches the user data of the user from the database according to the identification of the user. There is no limitation on this. The person may be a user who has access rights to the encrypted and stored key data, or a staff member who only performs data storage operations but does not have access rights to the encrypted and stored key data.

[0060] In one embodiment, the user who has access rights to the encrypted and stored key data may include at least one of the user to whom the key data belongs and the object that performs storage operations on the key data.

[0061] For example, taking the salary data storage scenario as an example, the staff member who performs the data storage operation may be a person engaged in salary management, and the user represented by the user data may be the employee to whom the salary data belongs, that is, the employee who receives the salary. Then, person A who is engaged in salary management performs a storage operation to encrypt and store employee B's salary data. At the same time, person A can send the user data that can represent employee B's identity to the server, so that the server can use the methods in the embodiments of the present application to irreversibly encrypt employee B's user data and perform multi-layer encryption on employee B's salary data, and then store them in the form of key-value pairs. Subsequently, employee B can use his user data to access his own salary data, while other employees cannot access employee B's salary data. In addition, person A may or may not have the authority to access employee B's salary data, and there is no limitation on this.

[0062] Step 204: Perform security level requirement analysis on key data.

[0063] Among them, security level requirement analysis is the process of analyzing the security level required when key data is stored. It can be understood that the higher the security level, the less likely the key data is to be stolen, and vice versa, the lower the security level, the easier it is for the key data to be stolen.

[0064] In one embodiment, the key data itself carries a tag of the required security level, and the server can obtain the carried security level tag to learn the security level required when the key data is stored.

[0065] In another embodiment, the server may obtain data related to the critical data and analyze the data to predict the security level required when the critical data is stored.

[0066] In one embodiment, the server can obtain at least one of the following data: description information of the key data, data attribute information corresponding to the key data, and object attribute information of objects related to the key data. Based on the obtained data, the server can predict the security level required when the key data is stored.

[0067] Step 206, matching the key data with an encryption scheme corresponding to the required security level.

[0068] It can be understood that the security level is positively correlated with the encryption level of the encryption scheme. That is, the higher the security level, the higher the encryption level of the encryption scheme, and vice versa, the lower the security level, the lower the encryption level of the encryption scheme. By analyzing the security level requirements of the encrypted data to be stored, a more accurate encryption scheme can be provided for key data. For key data with high security level requirements, multi-layer encryption can be performed to improve data storage security. For key data with low security level requirements, the encryption level can be reduced as much as possible while meeting security requirements, thereby avoiding unnecessary consumption of system resources.

[0069] In one embodiment, step 206 is to match the key data with an encryption scheme corresponding to the required security level, including: obtaining the pre-stored correspondence between the security level and the encryption scheme from the database; and searching for the encryption scheme corresponding to the security level required for the predicted key data based on the correspondence.

[0070] Specifically, the database pre-stores the corresponding relationship between the security level and the encryption scheme. The server can obtain the corresponding relationship from the database, and search for the encryption scheme corresponding to the security level required for the predicted key data according to the corresponding relationship.

[0071] It can be understood that the encryption scheme matched to the key data can be a single-layer encryption scheme or a multi-layer encryption scheme. If it is a single-layer encryption scheme, the key data can be directly encrypted in a single layer according to the single-layer encryption scheme. In one embodiment, when the key data is encrypted in a single layer, the corresponding obfuscation key can be obtained from the database, the encryption key can be parsed from the obfuscation key, and the data to be encrypted can be encrypted according to the encryption key. If it is a multi-layer encryption scheme, step 208 is executed.

[0072] Step 208, if it is a multi-layer encryption scheme, the key data will be encrypted in each layer of the multi-layer encryption scheme in turn; wherein, in the encryption process of each layer, the obfuscation key corresponding to the layer is obtained from the database, the encryption key is parsed from the obfuscation key, and the data to be encrypted is encrypted according to the encryption key.

[0073] Among them, the encryption key is the original key that performs substantial encryption. The obfuscation key is a random key obtained by disassembling and reassembling the original encryption key. It can be understood that the various parts of the original encryption key after disassembly are scattered and embedded in the obfuscation key. Even if the obfuscation key is obtained by a hacker, the original encryption key cannot be identified from it. Therefore, storing the obfuscation key in the database is equivalent to storing the encryption key in an obfuscated manner, which improves security.

[0074] It can be understood that in the process of sequentially encrypting the key data at each level in the multi-layer encryption scheme, the data obtained after encryption at each level is the data to be encrypted at the next level. It can be understood that the key data is the data to be encrypted at the first level. That is, the key data is first encrypted at the first level, and then the encrypted data is encrypted at the second level, and the encrypted data at the second level is encrypted at the third level, and so on, and is encrypted at each level in the multi-layer encryption scheme in turn to achieve multi-layer encryption.

[0075] It can be understood that each level has a corresponding different encryption key, and therefore also has a corresponding different obfuscation key.

[0076] Among them, in the encryption process of each level, the server will obtain the obfuscation key corresponding to the level from the database. Then, the encryption key is parsed from the obfuscation key. The server can encrypt the data to be encrypted at this level according to the parsed encryption key. It can be understood that for the first level, the data to be encrypted is the original key data. For the second level, the data to be encrypted is the data obtained after the key data is encrypted at the first level. For the third level, the data to be encrypted is the data obtained after the key data is encrypted at the second level. And so on, which will not be elaborated.

[0077] In one embodiment, before step 202, the method further includes the step of generating an obfuscation key, specifically including: segmenting and disassembling the encryption key to obtain multiple fields, sequentially calculating the corresponding insertion position of each field in the preset two-dimensional array, disassembling each field into the calculated corresponding insertion position, until all fields are inserted into the two-dimensional array, obtaining the obfuscation key, and storing the obfuscation key in the database. It can be understood that when used later, the encryption key can be parsed from the obfuscation key for encryption, but the obfuscation key cannot be used if obtained by a hacker.

[0078] For ease of understanding, let's take an example. For example, the encryption key is a 6-digit password. Suppose it is divided into 3 segments, then the three segments are inserted into the two-dimensional array to obtain the obfuscated key.

[0079] Step 210: irreversibly encrypt the user data to obtain the associated query field.

[0080] It can be understood that different encryption algorithms can be used to encrypt the data to be encrypted for different levels.

[0081] The associated query field is a field that is associated with the encrypted and stored key data, and thus can be used to query the encrypted and stored key data.

[0082] Specifically, the server may also use an irreversible encryption algorithm to irreversibly encrypt the user data to obtain the associated query field.

[0083] It can be understood that the characteristic of an irreversible encryption algorithm is that no secret key is required during the encryption process. After the plain text is input, the system directly processes it into ciphertext through the encryption algorithm. This encrypted data cannot be decrypted. Only by re-entering the plain text and processing it again through the same irreversible encryption algorithm, obtaining the same encrypted ciphertext and being re-recognized by the system, can it be truly decrypted.

[0084] In one embodiment, the server may use at least one irreversible encryption algorithm such as MD5 (Message-Digest Algorithm 5) and SHA2 (Secure Hash Algorithm 2) to irreversibly encrypt the user data to obtain the associated query field.

[0085] It can be understood that the associated query field encrypted by an irreversible algorithm does not have semantic information itself. Therefore, even if it is obtained by a hacker, the key data stored in encrypted form cannot be found due to the lack of semantic information, thereby improving security.

[0086] Step 212: The key query field and the encrypted data after multi-layer encryption are stored in association with each other in the form of key-value pairs.

[0087] Specifically, the server may associate and store the associated query field and the encrypted data obtained after multiple layers of encryption in the form of a key-value pair, that is, the associated query field is used as a key and the encrypted data obtained after multiple layers of encryption is used as a value, thereby associating and storing the key-value pair.

[0088] In one embodiment, the server can associate and store the associated query field and the encrypted data obtained after multiple layers of encryption in a separately designated database in the form of a key-value pair. The separately designated database refers to a database that stores encrypted data separately. That is, the encrypted data and other ordinary data are stored in separate databases, which not only improves security, but also improves the convenience of searching.

[0089] It can be understood that subsequently, if the user himself wants to find the key data after encrypted storage, he can input the user data on the front end, and the server will use an irreversible encryption algorithm to irreversibly encrypt the user data, and then use the associated query field obtained by the irreversible encryption as the key to find the value corresponding to the key in the stored key-value pair, that is, to find the corresponding encrypted stored key data (that is, encrypted data after multiple layers of encryption).

[0090] Because the key query fields without semantic information are equivalent to garbled codes, hackers do not know what the key query fields are used for after obtaining them. Moreover, due to irreversible encryption, it is impossible to reverse the semantic information before encryption. Therefore, hackers cannot query the corresponding encrypted and stored key data, and must combine the semantic information of the front-end user data. It is difficult to obtain the user data input by the front-end, so based on the irreversibility, the data storage security is effectively improved.

[0091] In addition, the encrypted data queried based on the key query fields is also encrypted in multiple layers, and the server uses the obfuscation key stored in the database to parse the encryption key for encryption. The method of parsing the encryption key from the obfuscation key is written in the code, and hackers cannot know it. They can only intercept the obfuscation key from the database. However, even if hackers obtain the obfuscation key, they cannot decrypt the encrypted and stored data, which greatly improves security.

[0092] In addition, by irreversibly encrypting user data to generate key query fields and using obfuscation keys to perform multi-layer encryption on key data, it is equivalent to encrypting from the perspective of data query and encrypting the data itself, which greatly improves the security of data storage.

[0093] The above-mentioned data encryption storage method can provide a more accurate encryption scheme for key data by analyzing the security level requirements of the encrypted data to be stored. The obfuscated keys are stored in the database, which can reduce the risk of the real encryption keys being stolen. For key data with high security requirements, the obfuscated keys can be stored after multi-layer encryption, thereby improving the security of data storage. In addition, by irreversibly encrypting user data to generate key query fields, it is equivalent to encrypting from the query perspective of the data and encrypting the data itself, which greatly improves the security of data storage.

[0094] In one embodiment, step 204 performs security level requirement analysis on key data, including: obtaining data attribute information corresponding to the key data; obtaining object attribute information of objects related to the key data; and predicting the security level required for the key data based on the data attribute information and the object attribute information.

[0095] Among them, data attribute information refers to the attribute information of key data at the data level. Objects related to key data refer to objects that have a direct or indirect relationship with key data. Object attribute information refers to the attribute information of objects related to key data.

[0096] Specifically, the server can obtain data attribute information corresponding to the key data. The server can also determine objects related to the key data, and then obtain object attribute information of these related objects. The server can predict the security level required for the key data based on the obtained data attribute information and object attribute information.

[0097] In one embodiment, the server may pre-train a security level prediction model using a machine learning algorithm. The server may input the acquired data attribute information and object attribute information into the pre-trained security level prediction model to predict the security level that the key data needs to have.

[0098] In other embodiments, the server may also pre-set a mapping relationship between data attribute information and security scores, and a mapping relationship between object attribute information and security scores, and according to the mapping relationship, find a first security score corresponding to the acquired data attribute information, and a second security score corresponding to the object attribute information, and determine the security level required for the key data according to the first security score and the second security score. For example, the server may perform a weighted sum or directly add the first security score and the second security score to obtain the security level required for the key data.

[0099] In one embodiment, the data attribute information includes at least one of a business type corresponding to the key data and a degree of importance of the key data.

[0100] Among them, the business type corresponding to the key data refers to the type of business that generates the key data. For example, the type of business that generates salary data belongs to salary business. For another example, the type of business that generates transfer transaction data belongs to e-commerce. The importance of key data and the security level of key data have a certain degree of positive correlation. That is, the higher the importance, the higher the security level, and vice versa, the lower the importance, the lower the security level. For example, for the two key data of salary data and job responsibilities, the importance of salary data is higher than that of job responsibilities, then the security level of salary data will be higher than that of job responsibilities.

[0101] In one embodiment, the object related to the key data may include at least one of the user to which the key data belongs and the object that performs storage operation on the key data. Therefore, the object attribute information may include at least one of the attribute information of the user to which the key data belongs and the attribute information of the object that performs storage operation on the key data.

[0102] In one embodiment, the attribute information of the user to whom the key data belongs may include at least one of the user's job grade and the department to which the user belongs, etc. The attribute information of the object performing the storage operation on the key data may include at least one of the job grade of the object performing the storage operation and the authority possessed by the object, etc.

[0103] In one embodiment, the security level corresponding to the key data is predicted based on the data attribute information and the object attribute information, including: predicting the security level required for the key data to be stored based on at least one of the business type, importance, attribute information of the user to which it belongs, and attribute information of the object performing the storage operation.

[0104] In one embodiment, the server may use sample data to train a security level prediction model in advance. The server may input at least one of the business type, importance, attribute information of the user to which the service belongs, and attribute information of the object to be stored into the pre-trained security level prediction model to predict the security level that the key data needs to have.

[0105] In other embodiments, the server may also pre-set a mapping relationship between at least one of the business type, importance, attribute information of the user to which the server belongs, and attribute information of the object to be stored and the security score, and then, according to the mapping relationship, find the corresponding security scores, and obtain the security level required for the key data according to the found security scores. For example, the found security scores are weighted summed or directly added to determine the security level required for the key data.

[0106] In the above embodiment, the security level required for key data is predicted from the data attribute dimension and the object attribute dimension, thereby improving the accuracy of determining the security level.

[0107] In one embodiment, security level requirement analysis is performed on key data, including: obtaining description information of the key data; identifying the target business type corresponding to the key data based on the description information; and obtaining a security level matching the target business type based on a preset business security storage rule.

[0108] Among them, the description information of key data is information that describes and introduces the key data. The target business type is the business type corresponding to the identified key data. The business security storage rules are used to describe the security storage specifications required for data of each business type. Therefore, the business security storage rules can reflect the security level that each business type of data needs to have when it is stored.

[0109] Specifically, the server can obtain the description information of the key data from the database, and identify the target business type corresponding to the key data according to the description information. The server can parse the pre-set business security storage rules to determine the security level corresponding to each business type, and then select the security level that matches the target business type.

[0110] In one embodiment, the server may perform semantic analysis on the description information, identify the semantics of the description information, and determine the target business type corresponding to the key data according to the semantic identification result. For example, the key data may be semantically analyzed to identify that it is data related to salary or wages, and then the corresponding target business type may be identified as salary business.

[0111] In one embodiment, the description information of the key data may also include the target service type corresponding to the key data. The server may identify the field representing the service type from the description information to extract the target service type from the description information.

[0112] In the above embodiment, the target business type corresponding to the key data is identified according to the description information, and the security level matching the target business type is obtained according to the pre-set business security storage rules, so that the corresponding security level can be identified conveniently and accurately.

[0113] In one embodiment, the security level requirement analysis for key data also includes: if the target business type does not exist in the business security storage rules, obtaining the business type recorded in the business security storage rules, and performing a correlation analysis between the target business type and the recorded business type; determining the security level of the target business type based on the security level corresponding to the recorded business type that satisfies the strong correlation condition with the target business type.

[0114] Among them, the strong correlation condition refers to a condition that represents a strong correlation, for example, the correlation reaches more than 98%.

[0115] It is understandable that in some scenarios, the target business type may not be recorded in the business security storage rules. For example, the target business type is a newly added business type and has not yet been updated in the business security storage rules.

[0116] Therefore, if the target business type does not exist in the business security storage rule, the server can parse the business security storage rule to obtain the business type recorded in the business security storage rule. The server can perform a correlation analysis between the target business type and the recorded business type to analyze the correlation between the target business type and the business type recorded in the business security storage rule. The server can determine, from the recorded business types, the recorded business type whose correlation with the target business type meets the strong correlation condition. Furthermore, the server can obtain the security level corresponding to the determined business type, and determine the security level of the target business type based on the obtained security level.

[0117] In the above embodiment, when the target business type does not exist in the business security storage rule, the corresponding security level matched by the key data can be determined based on the correlation analysis of the business type, which greatly improves the applicability and further improves the security of subsequent storage.

[0118] like Figure 3 As shown, in one embodiment, the multi-layer encryption scheme includes a system key encryption level, a management key encryption level, and a user key encryption level. In this embodiment, in the encryption process of each level, the obfuscation key corresponding to the level is obtained from the database, the encryption key is parsed from the obfuscation key, and the data to be encrypted is encrypted according to the encryption key (referred to as the multi-layer encryption step), including:

[0119] Step 302, obtain a system obfuscation key corresponding to the system key encryption level from a database, parse the system key from the system obfuscation key, and encrypt key data according to the system key.

[0120] Among them, the system key encryption level is a level that uses the system key for encryption. The management key encryption level is a level that uses the management key for encryption. The user key encryption level is a level that uses the user key for encryption. It can be understood that in the embodiment of the present application, multiple layers of encryption are performed sequentially through the system key encryption level, the management key encryption level, and the user key encryption level. It can be understood that in other embodiments, the encryption order of these three levels can also be changed, that is, the order of encryption of these three levels is not limited.

[0121] The system key is a key generated based on the unique data of the system. The system obfuscation key is a random string generated by obfuscating the system key.

[0122] In one embodiment, the system key may be a key generated according to a fixed value of the system. The fixed value of the system may include information such as a unique identification code of the system.

[0123] Specifically, the database stores a system obfuscation key. During the encryption process at the system key encryption level, the server can obtain the system obfuscation key corresponding to the system key encryption level from the database and parse the system key from the system obfuscation key. The server can encrypt key data based on the parsed system key.

[0124] In one embodiment, when generating a system obfuscation key, the server segments the system key into multiple fields, and calculates the insertion position of each field in the corresponding two-dimensional array according to the insertion algorithm, and then inserts the field into the two-dimensional array to obtain the system obfuscation key. Then, the server can calculate the corresponding insertion positions in the system obfuscation key according to the insertion algorithm, and extract fields from the calculated insertion positions in sequence, and combine the extracted fields to restore the system key.

[0125] Step 304, obtain the management obfuscation key corresponding to the management key encryption level from the database, parse the management key from the management obfuscation key, and encrypt the data encrypted by the system key encryption level according to the management key.

[0126] The management key is a key generated based on the information entered by the administrator for encryption.

[0127] Specifically, after using the system key to encrypt the key data, the server can obtain the management obfuscation key corresponding to the management key encryption level from the database, and parse the management key from the management obfuscation key. The server can re-encrypt the data encrypted by the system key according to the parsed management key.

[0128] In one embodiment, when generating a management obfuscation key, the server segments the management key into multiple fields, and calculates the insertion position of each field in the corresponding two-dimensional array according to the insertion algorithm, and then inserts the field into the two-dimensional array to obtain the management obfuscation key. Then, the server can calculate the corresponding insertion positions in the management obfuscation key according to the insertion algorithm, and extract fields from the calculated insertion positions in sequence, and combine the extracted fields to restore the management key.

[0129] Step 306, obtain the user obfuscation key corresponding to the user key encryption level from the database, parse the user key from the user obfuscation key, and encrypt the data encrypted by the management key encryption level according to the user key to obtain the final encrypted data.

[0130] Among them, the user key is a key generated based on the user's information.

[0131] In one embodiment, the user key is a key generated based on at least one user information such as the user's ID number, mobile phone number, and work number.

[0132] Specifically, after encryption using the management key, the server can obtain the user obfuscation key corresponding to the user key encryption level from the database, and parse the user key from the user obfuscation key. The server can re-encrypt the data encrypted by the management key according to the parsed user key, thereby obtaining the final encrypted data.

[0133] In one embodiment, when generating a user obfuscation key, the server segments the user key into multiple fields, and calculates the insertion position of each field in the corresponding two-dimensional array according to the insertion algorithm, and then inserts the field into the two-dimensional array to obtain the user obfuscation key. Then, the server can calculate the corresponding insertion positions in the user obfuscation key according to the insertion algorithm, and extract fields from the calculated insertion positions in sequence, and combine the extracted fields to restore the user key.

[0134] In the above embodiment, multi-layer encryption is performed by sequentially passing through the obfuscated keys in the system key encryption level, the management key encryption level and the user key encryption level, which greatly improves security.

[0135] Figure 4 The schematic diagram of the principle of data encryption storage in one embodiment. Figure 4 , analyze the security level requirements of the key data to be stored, and match the encryption scheme corresponding to the required security level for the key data. Figure 4 The matching encryption scheme is a multi-layer encryption scheme as an example for illustration.

[0136] Reference Figure 4 , when encrypting at the first level, the server can obtain the system obfuscation key 1 from the database, parse the system key therefrom, and then use the system key to encrypt the key data according to algorithm 1 to obtain encrypted data 1.

[0137] When encrypting at the second level, the server can obtain the management obfuscation key 2 from the database, parse the management key therefrom, and then use the management key to encrypt the encrypted data 1 according to the algorithm 2 to obtain the encrypted data 2.

[0138] When encrypting at the third level, the server can obtain the user obfuscation key 3 from the database, parse the user key therefrom, and then use the user key to encrypt the encrypted data 2 according to the algorithm 3 to obtain the encrypted data 3. The encrypted data 3 is the encrypted data that is finally stored.

[0139] The server may irreversibly encrypt the user data to obtain an associated query field, and use the associated field as a key (ie, key) and the encrypted data as a value to associate and store them in a separate database in a key-value pair manner.

[0140] It should be understood that, although each step in each flow chart of the present application is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each flow chart of the present application may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the steps or stages in other steps.

[0141] like Figure 5 As shown, in one embodiment, a data encryption storage device is characterized in that the device includes: a security level analysis module 502, an encryption scheme matching module 504, an encryption module 506, and a storage module 508, wherein:

[0142] The security level analysis module 502 is used to obtain the key data to be stored and the corresponding user data; the user data is the identity characterization data of the user who has access rights to the key data; and to perform security level requirement analysis on the key data.

[0143] The encryption scheme matching module 504 is used to match the encryption scheme corresponding to the required security level for the key data.

[0144] The encryption module 506 is used to, if it is a multi-layer encryption scheme, perform multi-layer encryption on the key data in turn through each layer in the multi-layer encryption scheme; wherein, in the encryption process of each layer, obtain the obfuscation key corresponding to the layer from the database, parse the encryption key from the obfuscation key, and encrypt the data to be encrypted according to the encryption key; and irreversibly encrypt the user data to obtain the associated query field.

[0145] The storage module 508 is used to associate and store the key query fields and the encrypted data after multi-layer encryption in the form of key-value pairs.

[0146] In one embodiment, the security level analysis module 502 is used to obtain data attribute information corresponding to the key data; obtain object attribute information of objects related to the key data; and predict the security level required for the key data based on the data attribute information and the object attribute information.

[0147] In one embodiment, the data attribute information includes at least one of the business type corresponding to the key data and the importance of the key data; the object attribute information includes at least one of the attribute information of the user to which the key data belongs and the attribute information of the object performing the storage operation on the key data; the security level analysis module 502 is also used to predict the security level required for the key data to be stored based on the business type, importance, attribute information of the user to which the key data belongs and at least one of the attribute information of the object performing the storage operation.

[0148] In one embodiment, the security level analysis module 502 is also used to obtain the description information of the key data; identify the target business type corresponding to the key data based on the description information; and obtain the security level matching the target business type based on the pre-set business security storage rules.

[0149] like Figure 6 As shown, in one embodiment, the security level analysis module 502 includes:

[0150] The correlation analysis module 502a is used to obtain the business type recorded in the business security storage rule if the target business type does not exist in the business security storage rule, and perform correlation analysis between the target business type and the recorded business type.

[0151] The security level determination module 502b is used to determine the security level of the target business type according to the security level corresponding to the business type of the record whose correlation with the target business type satisfies the strong correlation condition.

[0152] In one embodiment, the encryption scheme matching module 504 is further used to obtain the pre-stored correspondence between security levels and encryption schemes from a database; and search for an encryption scheme corresponding to the predicted security level required for the key data according to the correspondence.

[0153] In one embodiment, the multi-layer encryption scheme includes a system key encryption level, a management key encryption level, and a user key encryption level; the encryption module 506 is also used to obtain a system obfuscation key corresponding to the system key encryption level from a database, parse the system key from the system obfuscation key, and encrypt the critical data according to the system key; obtain a management obfuscation key corresponding to the management key encryption level from a database, parse the management key from the management obfuscation key, and encrypt the data encrypted by the system key encryption level according to the management key; obtain a user obfuscation key corresponding to the user key encryption level from a database, parse the user key from the user obfuscation key, and encrypt the data encrypted by the management key encryption level according to the user key to obtain the final encrypted data.

[0154] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store obfuscation keys, etc. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data encryption storage method is implemented.

[0155] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0156] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0157] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0158] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0159] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0160] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A data encryption storage method, characterized in that: The method comprises: Acquire key data to be stored and corresponding user data; the user data is identity characterization data of a user who has access rights to the key data; Conducting security level requirement analysis on the key data; Matching a multi-layer encryption scheme corresponding to the required security level for the key data; The key data is encrypted in multiple layers in the multi-layer encryption scheme in turn; wherein, in the encryption process of each layer, an obfuscation key corresponding to the layer is obtained from a database, an encryption key is parsed from the obfuscation key, and the data to be encrypted is encrypted according to the encryption key; the obfuscation key is a random key obtained by disassembling and reassembling the original encryption key; Irreversibly encrypting the user data to obtain an associated query field; The key query fields and the encrypted data after multi-layer encryption are stored in association with each other in the form of key-value pairs; The multi-layer encryption scheme includes a system key encryption level, a management key encryption level, and a user key encryption level; the system key used in the system key encryption level is a key generated based on the unique data of the system; the management key used in the management key encryption level is a key generated based on the information input by the administrator for encryption; the user key used in the user key encryption level is a key generated based on the user's information; In the encryption process at each level, the obfuscation key corresponding to the level is obtained from the database, the encryption key is parsed from the obfuscation key, and the data to be encrypted is encrypting according to the encryption key, including: Obtain the system obfuscation key corresponding to the system key encryption level from the database, parse the system key from the system obfuscation key, and encrypt the key data according to the system key; obtain the management obfuscation key corresponding to the management key encryption level from the database, parse the management key from the management obfuscation key, and encrypt the data encrypted by the system key encryption level according to the management key; obtain the user obfuscation key corresponding to the user key encryption level from the database, parse the user key from the user obfuscation key, and encrypt the data encrypted by the management key encryption level according to the user key to obtain the final encrypted data.

2. The method according to claim 1, characterized in that The security level requirement analysis of the key data includes: Obtaining data attribute information corresponding to the key data; Acquire object attribute information of an object related to the key data; The security level that the key data needs to have is predicted based on the data attribute information and the object attribute information.

3. The method according to claim 2, characterized in that The data attribute information includes at least one of the business type corresponding to the key data and the importance of the key data; the object attribute information includes at least one of the attribute information of the user to which the key data belongs and the attribute information of the object that performs the storage operation on the key data; The predicting the security level corresponding to the key data according to the data attribute information and the object attribute information includes: The security level required for storing the critical data is predicted based on at least one of the business type, importance, attribute information of the user to which the data belongs, and attribute information of the object on which the storage operation is performed.

4. The method according to claim 1, characterized in that: The security level requirement analysis of the key data includes: Obtaining description information of the key data; According to the description information, identifying the target business type corresponding to the key data; According to the pre-set business security storage rules, obtain the security level that matches the target business type.

5. The method according to claim 4, characterized in that The security level requirement analysis of the key data further includes: If the target service type does not exist in the service security storage rule, then Acquire the business type recorded in the business security storage rule, and perform correlation analysis between the target business type and the recorded business type; The security level of the target service type is determined according to the security level corresponding to the service type of the record whose correlation with the target service type satisfies the strong correlation condition.

6. The method according to claim 1, characterized in that Before acquiring the key data to be stored and the corresponding user data, the method further includes: The encryption key is segmented and disassembled to obtain multiple fields; Calculate the corresponding insertion position of each field in the preset two-dimensional array in sequence, and insert each field into the calculated corresponding insertion position until all fields are inserted into the two-dimensional array to obtain the obfuscation key; Store the obfuscation key in the database.

7. The method according to claim 1, characterized in that The step of matching the key data with an encryption scheme corresponding to the required security level includes: Obtaining a correspondence between a pre-stored security level and an encryption scheme from a database; According to the corresponding relationship, an encryption scheme corresponding to the predicted security level required for the key data is found.

8. A data encryption storage device, characterized in that: The device comprises: The security level analysis module is used to obtain the key data to be stored and the corresponding user data; the user data is the identity characterization data of the user who has access rights to the key data; and to perform security level requirement analysis on the key data; An encryption scheme matching module, used to match a multi-layer encryption scheme corresponding to a required security level for the key data; The encryption module is used to perform multi-layer encryption on the key data in turn through each layer of the multi-layer encryption scheme; wherein, in the encryption process of each layer, the obfuscation key corresponding to the layer is obtained from the database, the encryption key is parsed from the obfuscation key, and the data to be encrypted is encrypted according to the encryption key; the user data is irreversibly encrypted to obtain the associated query field; the obfuscation key is a random key obtained by disassembling and reorganizing the original encryption key; A storage module, used to associate and store key query fields and multi-layer encrypted encrypted data in the form of key-value pairs; The multi-layer encryption scheme includes a system key encryption level, a management key encryption level, and a user key encryption level; the system key used in the system key encryption level is a key generated based on the unique data of the system; the management key used in the management key encryption level is a key generated based on the information input by the administrator for encryption; the user key used in the user key encryption level is a key generated based on the user's information; The encryption module is further used for: Obtain the system obfuscation key corresponding to the system key encryption level from the database, parse the system key from the system obfuscation key, and encrypt the key data according to the system key; obtain the management obfuscation key corresponding to the management key encryption level from the database, parse the management key from the management obfuscation key, and encrypt the data encrypted by the system key encryption level according to the management key; obtain the user obfuscation key corresponding to the user key encryption level from the database, parse the user key from the user obfuscation key, and encrypt the data encrypted by the management key encryption level according to the user key to obtain the final encrypted data.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.