Data security processing method and encryption and decryption component

By introducing encryption and decryption components in the business system, using custom annotations and configuration information to encrypt and decrypt data, the code intrusion and maintenance complexity of data security processing in the existing technology is solved, and unified processing and flexibility of multi-systems are realized meet security requirements.

CN118916890APending Publication Date: 2024-11-08HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410977179.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

In the prior art, data security processing has strong code invasiveness and low fault tolerance in business systems, resulting in cumbersome development and maintenance and high cost, and requires a lot of adjustment of code logic when demand changes.

Method used

Provide a data security processing method and encryption and decryption component. By obtaining the application identifier and encryption and decryption configuration information of the target business system, reflecting with customized annotations of entity attributes, encrypting, decrypting, checking and desensing processing, realizing data security processing supports unified processing of multiple business systems.

Benefits of technology

It reduces the complexity and cost of development and maintenance, realizes data security processing of multiple business systems, avoids independent development and maintenance of each system, and does not require modification of code when requirements change.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916890A_ABST
    Figure CN118916890A_ABST
Patent Text Reader

Abstract

The invention discloses a data security processing method and an encryption and decryption component, and the method comprises the steps: obtaining current to-be-processed data and an application identifier of a target service system in response to a call request of any target service system; wherein the target service system is a system in butt joint with the encryption and decryption component; acquiring encryption and decryption configuration information corresponding to the application identifier of the target service system according to the application identifier of the target service system; the user-defined annotations of the entity attributes in the current to-be-processed data are reflected, so that the encryption and decryption configuration information is utilized, current processing operation is conducted on all the entity attributes, and current processed data are obtained; wherein the current processing operation is an operation corresponding to the current calling request, and comprises an input processing operation or an output processing operation; the input processing operation comprises encryption processing and verification processing; the output processing operation comprises decryption processing, desensitization processing and verification processing; and assembling the current processed data into a current entity object and feeding back the current entity object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data security technology, and in particular to a data security processing method and an encryption and decryption component. Background Art

[0002] Nowadays, the security of system, business data and personal information of the system is receiving more and more attention. At the same time, the requirements for confidentiality review and level awareness of software systems are gradually being improved, requiring that system data can be prevented from malicious tampering, prohibiting illegal increase of system user authority requirements, user and business sensitive data need to be encrypted for storage, and system display needs to desensitize user data, etc.

[0003] Therefore, for the data transmitted by the business system and the data to be read, it is usually necessary to perform security encryption processing on some or all of the data before storing or displaying it. Currently, the security processing of data mainly compiles the code logic of security processing in the code logic of the business system, so that the business system can process the data of the data type that needs to be securely processed according to the type of data by running this part of the code logic.

[0004] However, this method is highly invasive and has low fault tolerance, so each business system needs to be customized and developed and maintained separately, which is not only cumbersome but also relatively costly. Moreover, when changes are required, a large amount of code logic of each business system needs to be adjusted, which is very cumbersome. Summary of the invention

[0005] Based on the above-mentioned deficiencies of the prior art, the present application provides a data security processing method and an encryption and decryption component to solve the problem that the existing methods are too invasive and make development and maintenance too cumbersome.

[0006] In order to achieve the above objectives, this application provides the following technical solutions:

[0007] The first aspect of the present application provides a data security processing method, comprising:

[0008] Respond to a call request from any target business system, and obtain the current data to be processed and the application identifier of the target business system; wherein the target business system refers to the business system connected to the encryption and decryption component;

[0009] According to the application identifier of the target business system, obtaining encryption and decryption configuration information corresponding to the application identifier of the target business system;

[0010] By reflecting the custom annotations of the entity attributes in the current data to be processed, the encryption and decryption configuration information is used to perform the current processing operation on each of the entity attributes to obtain the current processed data; wherein the current processing operation is an operation corresponding to the current call request, including an input processing operation or an output processing operation; the input processing operation includes encryption processing and verification processing; the output processing operation includes decryption processing, desensitization processing and verification processing;

[0011] The currently processed data is used to assemble a current entity object, and the current entity object is fed back.

[0012] Optionally, in the above data security processing method, the current processing operation is an input processing operation, and the current processing operation is performed on each entity attribute in the current data to be processed by reflecting the custom annotation of the entity attribute in the current data to be processed, so as to utilize the encryption and decryption configuration information to obtain the current processed data, including:

[0013] Calculating the current data to be processed according to the encryption rule in the encryption configuration information to obtain a check code for the current data to be processed;

[0014] For each of the entity attributes in the current data to be processed, respectively, by reflecting the custom annotation of the entity attribute in the current data to be processed, so as to determine whether to encrypt the entity attribute based on the encryption configuration item in the encryption and decryption configuration information;

[0015] If it is determined that the entity attribute is to be encrypted, an encryption method corresponding to the entity attribute is determined from the encryption and decryption configuration information; wherein the encryption method is symmetric encryption or asymmetric encryption;

[0016] The entity attribute is encrypted using an encryption method corresponding to the entity attribute to obtain encrypted data of the entity attribute.

[0017] Optionally, in the above data security processing method, calculating the current data to be processed according to the encryption rule in the encryption configuration information to obtain a check code of the current data to be processed includes:

[0018] Extracting a plurality of entity attributes from the current data to be processed in sequence according to the configuration attributes in the encryption rule in the encryption configuration information;

[0019] Concatenate the entity attributes in the order in which they were extracted;

[0020] The concatenated entity attributes are calculated using the encryption algorithm configured in the encryption rule in the encryption configuration information to obtain a check code for the current data to be processed.

[0021] Optionally, in the above data security processing method, assembling the current entity object by using the currently processed data and feeding back the current entity object includes:

[0022] Overwriting the corresponding entity attribute in the current data to be processed with the encrypted data of the entity attribute;

[0023] The current data to be processed and the verification code of the current data to be processed are assembled into the current entity object, and the current entity object is fed back.

[0024] Optionally, in the above data security processing method, after calculating the current data to be processed according to the encryption rule in the encryption configuration information to obtain the verification code of the current data to be processed, it also includes:

[0025] If the current data to be processed includes a check code, comparing the check code in the current data to be processed with the check code of the current data to be processed to see whether they are consistent;

[0026] If the verification code in the current data to be processed is consistent with the verification code of the current data to be processed, the step of reflecting the custom annotation of the entity attribute in the current data to be processed is performed respectively for each entity attribute in the current data to be processed, so as to determine whether to encrypt the entity attribute based on the encryption configuration item in the encryption and decryption configuration information;

[0027] If the comparison shows that the verification code in the current data to be processed is inconsistent with the verification code of the current data to be processed, and the current data to be processed includes permission data, the operation is restricted according to the security level of the current operation.

[0028] Optionally, in the above data security processing method, the current processing operation is an output processing operation, and the current processing operation is performed on each entity attribute in the current data to be processed by reflecting the custom annotation of the entity attribute in the current data to be processed, so as to utilize the encryption and decryption configuration information to obtain the current processed data, including:

[0029] Calculating the current data to be processed according to the encryption rule in the encryption configuration information to obtain a check code for the current data to be processed;

[0030] For each of the entity attributes in the current data to be processed, respectively, by reflecting the custom annotation of the entity attribute in the current data to be processed, so as to determine whether to decrypt the entity attribute based on the encryption configuration item in the encryption and decryption configuration information;

[0031] If it is determined that the entity attribute is to be decrypted, determining whether there is a symmetric encryption annotation corresponding to the entity attribute;

[0032] If there is a symmetric encryption annotation corresponding to the entity attribute, decrypt the entity attribute using the decryption method corresponding to the symmetric encryption method in the encryption and decryption configuration information to obtain decrypted data of the entity attribute;

[0033] Using the decrypted data of the entity attribute to overwrite the corresponding entity attribute in the current data to be processed;

[0034] Determine whether there is a desensitizing annotation corresponding to each of the entity attributes;

[0035] If it is determined that there is a desensitizing annotation corresponding to the entity attribute, the entity attribute is desensitized using the desensitizing method corresponding to the entity attribute in the encryption and decryption configuration information.

[0036] Optionally, in the above data security processing method, assembling the current entity object by using the currently processed data and feeding back the current entity object includes:

[0037] Compare the currently calculated check code of the current data to be processed with the check code in the current data to be processed to see whether they are consistent;

[0038] If the verification code of the currently calculated data to be processed is consistent with the verification code in the currently processed data, the processed entity attributes and the currently calculated verification code of the currently processed data to be processed are assembled into the current entity object and fed back.

[0039] The second aspect of the present application provides an encryption and decryption component, including:

[0040] A data acquisition unit, used to respond to a call request from any target business system, and acquire the current data to be processed and the application identifier of the target business system; wherein the target business system refers to the business system connected to the encryption and decryption component;

[0041] A configuration information acquisition unit, configured to acquire encryption and decryption configuration information corresponding to the application identifier of the target business system according to the application identifier of the target business system;

[0042] A data processing unit, configured to reflect the custom annotations of the entity attributes in the current data to be processed, so as to utilize the encryption and decryption configuration information to perform current processing operations on each of the entity attributes to obtain current processed data; wherein the current processing operation is an operation corresponding to the current call request, including an input processing operation or an output processing operation; the input processing operation includes encryption processing and verification processing; the output processing operation includes decryption processing, desensitization processing and verification processing;

[0043] The assembling unit is used to assemble the current entity object by using the currently processed data and to feed back the current entity object.

[0044] Optionally, in the above encryption and decryption component, the current processing operation is an input processing operation, and the data processing unit includes:

[0045] A first check code calculation unit, configured to calculate the current data to be processed according to the encryption rule in the encryption configuration information to obtain a check code for the current data to be processed;

[0046] an encryption determination unit, configured to determine, for each of the entity attributes in the current data to be processed, whether to encrypt the entity attribute based on the encryption configuration item in the encryption and decryption configuration information by reflecting the custom annotation of the entity attribute in the current data to be processed;

[0047] an encryption method determining unit, configured to determine, when determining to encrypt the entity attribute, an encryption method corresponding to the entity attribute from the encryption and decryption configuration information; wherein the encryption method is symmetric encryption or asymmetric encryption;

[0048] The data encryption unit is used to encrypt the entity attribute by using the encryption method corresponding to the entity attribute to obtain encrypted data of the entity attribute.

[0049] Optionally, in the above encryption and decryption component, the first verification code calculation unit includes:

[0050] An extraction unit, configured to extract a plurality of entity attributes from the current data to be processed in sequence according to the configuration attributes in the encryption rule in the encryption configuration information;

[0051] A concatenation unit, used for concatenating the entity attributes in the order in which they are extracted;

[0052] The calculation unit is used to calculate the spliced ​​entity attributes using the encryption algorithm configured in the encryption rule in the encryption configuration information to obtain the verification code of the current data to be processed.

[0053] Optionally, in the above encryption and decryption component, the assembling unit includes:

[0054] A first covering unit, configured to cover the corresponding entity attribute in the current data to be processed with the encrypted data of the entity attribute;

[0055] The first assembling unit is used for assembling the current data to be processed and the verification code of the current data to be processed into the current entity object, and feeding back the current entity object.

[0056] Optionally, the above encryption and decryption components further include:

[0057] A first comparison unit, configured to compare whether the check code in the current data to be processed is consistent with the check code of the current data to be processed when the current data to be processed includes a check code;

[0058] If the verification code in the current data to be processed is compared to be consistent with the verification code of the current data to be processed, the step of reflecting the custom annotation of the entity attribute in the current data to be processed respectively for each entity attribute in the current data to be processed is performed to determine whether to encrypt the entity attribute based on the encryption configuration item in the encryption and decryption configuration information;

[0059] The restriction unit is used to restrict the operation according to the security level of the current operation when the verification code in the current data to be processed is found to be inconsistent with the verification code of the current data to be processed and the current data to be processed includes permission data.

[0060] Optionally, in the above encryption and decryption component, when the current processing operation is an output processing operation, the data processing unit includes:

[0061] A second check code calculation unit, configured to calculate the current data to be processed according to the encryption rule in the encryption configuration information to obtain a check code for the current data to be processed;

[0062] a decryption determination unit, configured to determine, for each of the entity attributes in the current data to be processed, whether to decrypt the entity attribute based on the encryption configuration item in the encryption and decryption configuration information by reflecting the custom annotation of the entity attribute in the current data to be processed;

[0063] a decryption mode determination unit, configured to determine whether there is a symmetric encryption annotation corresponding to the entity attribute when determining to decrypt the entity attribute;

[0064] a decryption unit, configured to decrypt the entity attribute by using a decryption method corresponding to the symmetric encryption method in the encryption and decryption configuration information to obtain decrypted data of the entity attribute when there is a symmetric encryption annotation corresponding to the entity attribute;

[0065] A second covering unit, configured to cover the corresponding entity attribute in the current data to be processed with the decrypted data of the entity attribute;

[0066] A desensitizing annotation determining unit, used to determine whether there is a desensitizing annotation corresponding to each of the entity attributes;

[0067] The desensitization processing unit is used to perform desensitization processing on the entity attribute by using the desensitization method corresponding to the entity attribute in the encryption and decryption configuration information when it is determined that there is a desensitization annotation corresponding to the entity attribute.

[0068] Optionally, in the above encryption and decryption component, the assembling unit includes:

[0069] A second comparison unit is used to compare whether the currently calculated verification code of the current data to be processed is consistent with the verification code in the current data to be processed;

[0070] The second assembly unit is used to assemble the processed entity attributes and the currently calculated verification code of the current data to be processed into the current entity object and feed back the verification code when the verification code of the current data to be processed is consistent with the verification code in the current data to be processed.

[0071] A data security processing method provided by an embodiment of the present application is applied to an encryption and decryption component, and multiple business systems are connected through the encryption and decryption component, and it is no longer just coupling one system. Specifically, when it is necessary to process the data, respond to the call request of any target business system, and obtain the current data to be processed and the application identification of the target business system. Among them, the target business system refers to the business system connected to the encryption and decryption component. Then, according to the application identification of the target business system, the encryption and decryption configuration information corresponding to the application identification of the target business system is obtained, and the custom annotation of the entity attribute in the current data to be processed is reflected to use the encryption and decryption configuration information to perform the current processing operation on each entity attribute respectively, and obtain the current processed data. Among them, the current processing operation is an operation corresponding to the current call request, including an input processing operation or an output processing operation. The input processing operation includes encryption processing and verification processing. The output processing operation includes decryption processing, desensitization processing and verification processing, so that the data can be encrypted and decrypted, integrity verified and desensitized, meeting the needs of various data security processing. Finally, the current processed data is assembled into the current entity object, and the current entity object is fed back. Thus, multiple business systems can be connected through encryption and decryption components to achieve data security processing of multiple business systems, without the need to develop and maintain each system separately, making development and maintenance more convenient. In addition, annotations can be added to the corresponding data and corresponding information can be configured according to the needs of the data to be processed, so that the current needs can be met. Therefore, when the needs change, there is no need to modify the code. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0073] Figure 1 A flowchart of a data security processing method provided in an embodiment of the present application;

[0074] Figure 2 A flowchart of a method for performing input processing operations on current data to be processed provided in an embodiment of the present application;

[0075] Figure 3 A flowchart of a method for calculating a check code provided in an embodiment of the present application;

[0076] Figure 4 A flowchart of a method for performing output processing operations on current data to be processed provided in an embodiment of the present application;

[0077] Figure 5 A schematic diagram of the architecture of an encryption and decryption component provided in an embodiment of the present application. DETAILED DESCRIPTION

[0078] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0079] In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device 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 device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0080] The present application embodiment provides a data security processing method, which can be specifically applied to encryption and decryption components. Figure 1 As shown, a data security processing method provided in an embodiment of the present application includes the following steps:

[0081] S101. Respond to a call request from any target business system to obtain current data to be processed and an application identifier of the target business system.

[0082] Among them, the target business system refers to the business system that is connected to the encryption and decryption component. Therefore, in the embodiment of the present application, the encryption and decryption component is an independent component, which can be connected to multiple business systems and is no longer coupled to a certain business system. Specifically, it can be introduced into the business system through SDK. Any business system that is connected to the encryption and decryption component can call the encryption and decryption component for data security processing when it needs to process data securely.

[0083] It should be noted that the data processing operation requested by the call request of the target business system can be specifically divided into input processing operation and output processing operation, that is, processing the data input to the target business system and processing the data to be output to the target business system. For example, when data needs to be stored, the encryption and decryption component is called to process the data to be stored in the target business system, and then the processed data is fed back to the database for storage. When data needs to be retrieved from the database, the target business system can call the encryption and decryption component to process the data retrieved from the database, and then output the processed data to the business system.

[0084] Therefore, when the operation corresponding to the call request is an input processing operation, the current data to be processed and the application identifier of the target business system can be obtained from the target business. When the operation corresponding to the call request is an output processing operation, the current data to be processed is obtained from the corresponding data source, such as the current data to be processed from the database, and its application identifier is obtained from the target business system.

[0085] It should also be noted that since different target business systems may have different requirements for data processing, in order to distinguish different target business systems and adopt corresponding methods to process the current data to be processed, it is necessary to obtain the application identifier of the target business system so as to perform targeted processing based on the application identifier.

[0086] Optionally, the application identifier of the target business system may be allocated to the target business system by the encryption and decryption system when the target business system is connected to the encryption and decryption component.

[0087] S102: Acquire encryption and decryption configuration information corresponding to the application identifier of the target business system according to the application identifier of the target business system.

[0088] Optionally, the encryption and decryption configuration information may include information such as application identification, security level, encryption and decryption type, encryption rules, etc.

[0089] S103 . By reflecting the custom annotations of the entity attributes in the current data to be processed, the encryption and decryption configuration information is used to perform the current processing operation on each entity attribute to obtain the current processed data.

[0090] It should be noted that different business systems have different requirements for the data to be processed, and the requirements will change. In order to process the data according to the encryption and decryption configuration information, multiple custom annotations are implemented in the encryption and decryption components in the embodiment of the present application. Each target business system can customize the entity attribute conditions according to the needs, so that when the entity attributes with the corresponding custom annotations are processed later, the custom annotations can be reflected to match the corresponding information in the encryption and decryption configuration information, and the entity attributes can be processed according to this information. If data security processing is not required, there is no need to add the corresponding custom annotations.

[0091] Optionally, the custom annotation for the current data to be processed may be for the entire current data to be processed, that is, by reflecting the custom annotation, the entity attributes to be encrypted and decrypted and the encryption and decryption methods, etc., are determined from the encryption and decryption configuration information. Of course, corresponding custom annotations may also be added for each entity attribute in the current data to be processed, so that each entity attribute is processed accordingly according to the custom annotation of each entity attribute.

[0092] Among them, the current processing operation is the operation corresponding to the current call request, which includes input processing operation or output processing operation. Among them, the input processing operation refers to the processing of the data input to the target business system, which specifically includes encryption processing and verification processing. Therefore, when the current processing operation is an input processing operation, it is necessary to perform encryption operations on each entity attribute, and it is also necessary to perform integrity verification processing, and the processed data is the current processed data. Similarly, the output processing operation refers to the processing of the data output to the target business system, which specifically includes decryption processing, desensitization processing and verification processing.

[0093] Optionally, in another embodiment of the present application, the current processing operation is an input processing operation, and a specific implementation of step S103 is as follows: Figure 2 As shown, including:

[0094] S201. Calculate the current data to be processed according to the encryption rules in the encryption configuration information to obtain a check code of the current data to be processed.

[0095] In order to facilitate the integrity check of the currently processed data being transmitted, and also to facilitate the subsequent reading of the currently processed data, an integrity check can be performed. Therefore, in an embodiment, the currently processed data is calculated by encryption and decryption using the encryption rules in the encryption configuration information to obtain a check code for the currently processed data, which can then be used to perform an integrity check.

[0096] Optionally, in another embodiment of the present application, a specific implementation of step S201 is as follows: Figure 3 As shown, including:

[0097] S301. Extract multiple entity attributes from the current data to be processed in sequence according to the configuration attributes in the encryption rule in the encryption configuration information.

[0098] It should be noted that in the embodiment of the present application, only part of the data to be processed is used to calculate the check code, and relatively important data is usually used for the check code. The rule in the encryption and decryption configuration information configures which attributes need to be calculated, so it is necessary to extract the corresponding attributes according to the configuration attributes in the encryption rule in the encryption configuration information. In addition, due to the different composition of the data, the calculated check codes are different, so the order of each attribute is also configured in the encryption rule, so it is necessary to extract each entity attribute in this order, so as to facilitate the splicing of each entity attribute in the order of extraction.

[0099] S302: Concatenate the attributes of each entity in the order in which they were extracted.

[0100] Since the computational check is performed on a whole, it is necessary to concatenate the attributes of each entity to form a whole.

[0101] S303: Calculate the attributes of the spliced ​​entities using the encryption algorithm configured in the encryption rule in the encryption configuration information to obtain a check code for the current data to be processed.

[0102] Optionally, the national encryption SM3 algorithm can be used to calculate the attributes of the spliced ​​entities to obtain the verification code of the current data to be processed.

[0103] Optionally, in order to ensure that the input current data to be processed has not been tampered with, in another embodiment of the present application, after executing step S201, the following may be further included:

[0104] If the current data to be processed includes a check code, the check code in the current data to be processed is compared with the check code of the current data to be processed to see whether they are consistent.

[0105] It should be noted that when the target business system needs to perform integrity check on the current data to be processed, it is necessary to add the checksum of the current data to be processed to its attributes. Therefore, if the current data to be processed includes a checksum, it means that there is a need to perform integrity check on the input current data to be processed, so compare the checksum in the current data to be processed with the checksum of the current data to be processed calculated to see if they are consistent.

[0106] If the verification code in the current data to be processed is compared to be consistent with the verification code of the current data to be processed, step S202 is executed.

[0107] If the verification code in the current data to be processed is compared to the verification code of the current data to be processed and is inconsistent, and the current data to be processed is permission data, the operation is restricted according to the security level of the current operation.

[0108] Since the current data to be processed includes permission data, it means that the user needs to use relevant permissions to perform operations, such as logging in, operating data, etc., so it is necessary to restrict the user to perform corresponding restricted operations. In the embodiment of the present application, each operation is graded, and different operations have different security levels, so it is necessary to determine the current operation according to the call request, thereby determining the security level of the current operation, and perform corresponding restricted operations according to the security level, such as prohibiting login, prohibiting operation, locking data, etc.

[0109] S202 . For each entity attribute in the current data to be processed, the user-defined annotation of the entity attribute in the current data to be processed is reflected to determine whether to encrypt the entity attribute based on the encryption configuration item in the encryption and decryption configuration information.

[0110] Specifically, for each entity attribute in the current data to be processed, by reflecting the custom annotation of the entity attribute in the current data to be processed, it can be determined whether the information for encrypting the entity attribute is configured based on the encryption configuration item in the encryption and decryption configuration information.

[0111] If it is determined that the entity attribute is to be encrypted, step S203 is executed. If it is determined that the entity attribute is not to be encrypted, no processing is required and the attribute can be directly used to assemble the data object.

[0112] S203: Determine the encryption method corresponding to the entity attribute from the encryption and decryption configuration information.

[0113] The encryption method is symmetric encryption or asymmetric encryption. Since different data have different importance, the encryption requirements are also different. Therefore, in the embodiment of the present application, the encryption of entity attributes can be configured to use symmetric encryption or asymmetric encryption according to the requirements.

[0114] Specifically, by reflecting the custom annotation, the encryption method corresponding to the entity attribute can be determined from the encryption and decryption configuration information. Optionally, the encryption method can also include an encryption algorithm. If it is symmetric encryption, it can include the specific symmetric encryption algorithm to be used, if it is asymmetric encryption.

[0115] S204: Encrypt the entity attribute using an encryption method corresponding to the entity attribute to obtain encrypted data of the entity attribute.

[0116] Optionally, if the encryption method is symmetric encryption, the national encryption SM4 algorithm can be called to encrypt the entity attribute to obtain the encrypted data of the entity attribute. If the encryption method is asymmetric encryption, the national encryption SM3 algorithm can be called to encrypt the entity attribute to obtain the encrypted data of the entity attribute.

[0117] Optionally, in another embodiment of the present application, when the current processing operation is an output processing operation, another specific implementation of step S103 is as follows: Figure 4 As shown, the following steps are included:

[0118] S401. Calculate the current data to be processed according to the encryption rules in the encryption configuration information to obtain a check code of the current data to be processed.

[0119] The specific implementation of step S401 may refer to Figure 3 The method shown will not be repeated here.

[0120] S402: for each entity attribute in the current data to be processed, reflect the custom annotation of the entity attribute in the current data to be processed, so as to determine whether to decrypt the entity attribute based on the encryption configuration item in the encryption and decryption configuration information.

[0121] Specifically, it may be determined whether to configure the entity attribute to be encrypted. If the entity attribute is configured to be encrypted, it means that it needs to be decrypted accordingly.

[0122] If it is determined to decrypt the entity attributes, step S403 is executed.

[0123] S403: Determine whether there is a symmetric encryption annotation corresponding to the entity attribute.

[0124] It should be noted that since the entity attributes can be encrypted using an asymmetric encryption algorithm or a symmetric encryption algorithm, and the asymmetric encryption algorithm cannot be directly decrypted, only the entity attributes encrypted using the symmetric encryption algorithm can be decrypted. The entity attributes storing the corresponding symmetric encryption annotations are the entity attributes that need to be encrypted using the symmetric encryption algorithm. Therefore, if there are symmetric encryption annotations corresponding to the entity attributes, step S404 is executed.

[0125] S404: Decrypt the entity attribute using the decryption method corresponding to the symmetric encryption method in the encryption and decryption configuration information to obtain decrypted data of the entity attribute.

[0126] Specifically, the specific symmetric encryption method can be determined through the symmetric encryption annotation corresponding to the entity attribute, and the decryption method corresponding to the symmetric encryption method can be used for decryption.

[0127] S405: Use the decrypted data of the entity attribute to overwrite the corresponding entity attribute in the current data to be processed.

[0128] Since the original entity attributes of the obtained decrypted data are no longer needed, they are used to overwrite the corresponding entity attributes in the current data to be processed.

[0129] S406: Determine whether there is a desensitizing annotation corresponding to each entity attribute.

[0130] It should be noted that not only the decrypted data may need to be desensitized, but other entity attributes may also need to be desensitized, so it is necessary to determine whether there are desensitizing annotations corresponding to each entity attribute.

[0131] If it is determined that there is a desensitizing annotation corresponding to the entity attribute, it means that it needs to be desensitized, so step S407 is executed at this time.

[0132] S407: Desensitize the entity attribute using the desensitization method corresponding to the entity attribute in the encryption and decryption configuration information.

[0133] Specifically, by reflecting the desensitizing annotation corresponding to the entity attribute, the entity attribute can be desensitized using the desensitizing method corresponding to the entity attribute in the encryption and decryption configuration information.

[0134] S104: Assemble the current entity object using the currently processed data, and feed back the current entity object.

[0135] Specifically, after encrypting and decrypting the current data to be processed, encrypted and decrypted data will be obtained, and there will also be a verification code obtained by the verification processing, as well as data that does not need to be processed. At this time, all of these data need to be fed back, so it is necessary to assemble all of these data as the current processed data to obtain the current entity object, and then feed back the current entity object.

[0136] Optionally, in another embodiment of the present application, when the current processing operation is an input processing operation, a specific implementation of the corresponding step S104 includes:

[0137] The encrypted data of the entity attributes overwrites the corresponding entity attributes in the current data to be processed, and the current data to be processed and the verification code of the current data to be processed are assembled into the current entity object, and the current entity object is fed back.

[0138] That is, in the embodiment of the present application, the verification code and the current data to be processed are combined into a current entity object and stored together in the database.

[0139] Optionally, in another embodiment of the present application, when the current processing operation is an output processing operation, another corresponding specific implementation of step S104 includes:

[0140] Compare the calculated checksum of the current data to be processed with the checksum in the current data to be processed to see if they are consistent.

[0141] If the check code of the currently calculated data to be processed is consistent with the check code in the currently processed data, the processed entity attributes and the check code of the currently calculated data to be processed are assembled into the current entity object and fed back.

[0142] A data security processing method provided by an embodiment of the present application is applied to an encryption and decryption component, and multiple business systems are connected through the encryption and decryption component, and it is no longer just coupling one system. Specifically, when it is necessary to process the data, respond to the call request of any target business system, and obtain the current data to be processed and the application identification of the target business system. Among them, the target business system refers to the business system connected to the encryption and decryption component. Then, according to the application identification of the target business system, the encryption and decryption configuration information corresponding to the application identification of the target business system is obtained, and the custom annotation of the entity attribute in the current data to be processed is reflected to use the encryption and decryption configuration information to perform the current processing operation on each entity attribute respectively, and obtain the current processed data. Among them, the current processing operation is an operation corresponding to the current call request, including an input processing operation or an output processing operation. The input processing operation includes encryption processing and verification processing. The output processing operation includes decryption processing, desensitization processing and verification processing, so that the data can be encrypted and decrypted, integrity verified and desensitized, meeting the needs of various data security processing. Finally, the current processed data is assembled into the current entity object, and the current entity object is fed back. Thus, multiple business systems can be connected through encryption and decryption components to achieve data security processing of multiple business systems, without the need to develop and maintain each system separately, making development and maintenance more convenient. In addition, annotations can be added to the corresponding data and corresponding information can be configured according to the needs of the data to be processed, so that the current needs can be met. Therefore, when the needs change, there is no need to modify the code.

[0143] Another embodiment of the present application provides an encryption and decryption component, such as Figure 5 As shown, including:

[0144] The data acquisition unit 501 is used to respond to a call request from any target business system and acquire the current data to be processed and the application identifier of the target business system.

[0145] The target business system refers to the business system that interfaces with the encryption and decryption components.

[0146] The configuration information acquisition unit 502 is used to acquire encryption and decryption configuration information corresponding to the application identifier of the target business system according to the application identifier of the target business system.

[0147] The data processing unit 503 is used to reflect the custom annotations of the entity attributes in the current data to be processed, so as to use the encryption and decryption configuration information to perform the current processing operation on each entity attribute respectively to obtain the current processed data.

[0148] The current processing operation is an operation corresponding to the current call request, including an input processing operation or an output processing operation. The input processing operation includes encryption processing and verification processing. The output processing operation includes decryption processing, desensitization processing and verification processing.

[0149] The assembling unit 504 is used to assemble the current entity object using the currently processed data and feed back the current entity object.

[0150] Optionally, in the encryption and decryption component provided in another embodiment of the present application, the current processing operation is an input processing operation, and the data processing unit performs the current processing operation on each entity attribute by reflecting the custom annotation of the entity attribute in the current data to be processed, so as to use the encryption and decryption configuration information to obtain the current processed data, which is used to:

[0151] According to the encryption rules in the encryption configuration information, the current data to be processed is calculated to obtain the verification code of the current data to be processed.

[0152] For each entity attribute in the current data to be processed, the custom annotation of the entity attribute in the current data to be processed is reflected to determine whether to encrypt the entity attribute based on the encryption configuration item in the encryption and decryption configuration information.

[0153] When it is determined that the entity attribute is to be encrypted, an encryption method corresponding to the entity attribute is determined from the encryption and decryption configuration information, wherein the encryption method is symmetric encryption or asymmetric encryption.

[0154] The entity attributes are encrypted using the encryption method corresponding to the entity attributes to obtain encrypted data of the entity attributes.

[0155] Optionally, in the encryption and decryption component provided in another embodiment of the present application, the first verification code calculation unit includes:

[0156] The extraction unit is used to extract multiple entity attributes from the current data to be processed in sequence according to the configuration attributes in the encryption rule in the encryption configuration information.

[0157] The concatenation unit is used to concatenate the attributes of each entity in the order in which they are extracted.

[0158] The calculation unit is used to calculate the spliced ​​entity attributes using the encryption algorithm configured in the encryption rule in the encryption configuration information to obtain the verification code of the current data to be processed.

[0159] Optionally, in the encryption and decryption component provided in another embodiment of the present application, the assembling unit includes:

[0160] The first covering unit is used to cover the corresponding entity attributes in the current data to be processed with the encrypted data of the entity attributes.

[0161] The first assembling unit is used for assembling the current data to be processed and the verification code of the current data to be processed into a current entity object, and feeding back the current entity object.

[0162] Optionally, in the encryption and decryption component provided in another embodiment of the present application, the following is further included:

[0163] The first comparison unit is used to compare whether the check code in the current data to be processed is consistent with the check code of the current data to be processed when the current data to be processed includes a check code.

[0164] Among them, if the comparison shows that the verification code in the current data to be processed is consistent with the verification code of the current data to be processed, then each entity attribute in the current data to be processed is executed separately, and the custom annotation of the entity attribute in the current data to be processed is reflected to determine whether to encrypt the entity attribute based on the encryption configuration item in the encryption and decryption configuration information.

[0165] The restriction unit is used to restrict the operation according to the security level of the current operation when the verification code in the current data to be processed is found to be inconsistent with the verification code of the current data to be processed and the current data to be processed includes permission data.

[0166] Optionally, in the encryption and decryption component provided in another embodiment of the present application, the current processing operation is an output processing operation, and the data processing unit performs the current processing operation on each entity attribute by reflecting the custom annotation of the entity attribute in the current data to be processed, so as to use the encryption and decryption configuration information to obtain the current processed data, which is used to:

[0167] According to the encryption rules in the encryption configuration information, the current data to be processed is calculated to obtain the verification code of the current data to be processed.

[0168] For each entity attribute in the current data to be processed, the custom annotation of the entity attribute in the current data to be processed is reflected to determine whether to decrypt the entity attribute based on the encryption configuration item in the encryption and decryption configuration information.

[0169] When it is determined that the entity attribute is to be decrypted, it is determined whether there is a symmetric encryption annotation corresponding to the entity attribute.

[0170] When there is a symmetric encryption annotation corresponding to the entity attribute, the entity attribute is decrypted using the decryption method corresponding to the symmetric encryption method in the encryption and decryption configuration information to obtain decrypted data of the entity attribute.

[0171] The decrypted data of the entity attributes is used to overwrite the corresponding entity attributes in the current data to be processed.

[0172] Determine whether there is a desensitizing annotation corresponding to each entity attribute.

[0173] When it is determined that there is a desensitizing annotation corresponding to the entity attribute, the entity attribute is desensitized using the desensitizing method corresponding to the entity attribute in the encryption and decryption configuration information.

[0174] Optionally, in the encryption and decryption component provided in another embodiment of the present application, the assembling unit includes:

[0175] The second comparison unit is used to compare whether the check code of the current data to be processed obtained by current calculation is consistent with the check code in the current data to be processed.

[0176] The second assembly unit is used to assemble each processed entity attribute and the currently calculated verification code of the current data to be processed into a current entity object and feed back the verification code when the verification code of the current data to be processed is consistent with the verification code in the current data to be processed.

[0177] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0178] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will cover the widest range consistent with the principles and novel features disclosed herein.

Claims

1. A data security processing method, characterized in that: include: Respond to a call request from any target business system, and obtain the current data to be processed and the application identifier of the target business system; wherein the target business system refers to the business system connected to the encryption and decryption component; According to the application identifier of the target business system, obtaining encryption and decryption configuration information corresponding to the application identifier of the target business system; By reflecting the custom annotations of the entity attributes in the current data to be processed, the encryption and decryption configuration information is used to perform the current processing operation on each of the entity attributes to obtain the current processed data; wherein the current processing operation is an operation corresponding to the current call request, including an input processing operation or an output processing operation; the input processing operation includes at least encryption processing and verification processing; the output processing operation includes decryption processing, desensitization processing and verification processing; The currently processed data is used to assemble a current entity object, and the current entity object is fed back.

2. The method according to claim 1, characterized in that The current processing operation is an input processing operation, and the current processing operation is performed on each entity attribute in the current data to be processed by reflecting the custom annotation of the entity attribute in the current data to be processed, so as to use the encryption and decryption configuration information to obtain the current processed data, including: Calculating the current data to be processed according to the encryption rule in the encryption configuration information to obtain a check code for the current data to be processed; For each of the entity attributes in the current data to be processed, respectively, by reflecting the custom annotation of the entity attribute in the current data to be processed, so as to determine whether to encrypt the entity attribute based on the encryption configuration item in the encryption and decryption configuration information; If it is determined that the entity attribute is to be encrypted, an encryption method corresponding to the entity attribute is determined from the encryption and decryption configuration information; wherein the encryption method is symmetric encryption or asymmetric encryption; The entity attribute is encrypted using an encryption method corresponding to the entity attribute to obtain encrypted data of the entity attribute.

3. The method according to claim 2, characterized in that The step of calculating the current data to be processed according to the encryption rule in the encryption configuration information to obtain a check code of the current data to be processed includes: Extracting a plurality of entity attributes from the current data to be processed in sequence according to the configuration attributes in the encryption rule in the encryption configuration information; Concatenate the entity attributes in the order in which they were extracted; The concatenated entity attributes are calculated using the encryption algorithm configured in the encryption rule in the encryption configuration information to obtain a check code for the current data to be processed.

4. The method according to claim 2, characterized in that: The step of assembling the current entity object by using the currently processed data and feeding back the current entity object comprises: Overwriting the corresponding entity attribute in the current data to be processed with the encrypted data of the entity attribute; The current data to be processed and the verification code of the current data to be processed are assembled into the current entity object, and the current entity object is fed back.

5. The method according to claim 2, characterized in that: After calculating the current data to be processed according to the encryption rule in the encryption configuration information to obtain the check code of the current data to be processed, the method further includes: If the current data to be processed includes a check code, comparing the check code in the current data to be processed with the check code of the current data to be processed to see whether they are consistent; If the verification code in the current data to be processed is consistent with the verification code of the current data to be processed, the step of reflecting the custom annotation of the entity attribute in the current data to be processed is performed respectively for each entity attribute in the current data to be processed, so as to determine whether to encrypt the entity attribute based on the encryption configuration item in the encryption and decryption configuration information; If the comparison shows that the verification code in the current data to be processed is inconsistent with the verification code of the current data to be processed, and the current data to be processed includes permission data, the operation is restricted according to the security level of the current operation.

6. The method according to claim 1, characterized in that The current processing operation is an output processing operation, which reflects the custom annotations of the entity attributes in the current data to be processed, and uses the encryption and decryption configuration information to perform the current processing operation on each entity attribute to obtain the current processed data, including: Calculating the current data to be processed according to the encryption rule in the encryption configuration information to obtain a check code for the current data to be processed; For each of the entity attributes in the current data to be processed, respectively, by reflecting the custom annotation of the entity attribute in the current data to be processed, so as to determine whether to decrypt the entity attribute based on the encryption configuration item in the encryption and decryption configuration information; If it is determined that the entity attribute is to be decrypted, determining whether there is a symmetric encryption annotation corresponding to the entity attribute; If there is a symmetric encryption annotation corresponding to the entity attribute, decrypt the entity attribute using the decryption method corresponding to the symmetric encryption method in the encryption and decryption configuration information to obtain decrypted data of the entity attribute; Using the decrypted data of the entity attribute to overwrite the corresponding entity attribute in the current data to be processed; Determine whether there is a desensitizing annotation corresponding to each of the entity attributes; If it is determined that there is a desensitizing annotation corresponding to the entity attribute, the entity attribute is desensitized using the desensitizing method corresponding to the entity attribute in the encryption and decryption configuration information.

7. The method according to claim 6, characterized in that The step of assembling the current entity object by using the currently processed data and feeding back the current entity object comprises: Compare the currently calculated check code of the current data to be processed with the check code in the current data to be processed to see whether they are consistent; If the verification code of the currently calculated data to be processed is consistent with the verification code in the currently processed data, the processed entity attributes and the currently calculated verification code of the currently processed data to be processed are assembled into the current entity object and fed back.

8. An encryption and decryption component, characterized in that: include: A data acquisition unit, used to respond to a call request from any target business system, and acquire the current data to be processed and the application identifier of the target business system; wherein the target business system refers to the business system connected to the encryption and decryption component; A configuration information acquisition unit, configured to acquire encryption and decryption configuration information corresponding to the application identifier of the target business system according to the application identifier of the target business system; A data processing unit, configured to reflect the custom annotations of the entity attributes in the current data to be processed, so as to utilize the encryption and decryption configuration information to perform current processing operations on each of the entity attributes to obtain current processed data; wherein the current processing operation is an operation corresponding to the current call request, including an input processing operation or an output processing operation; the input processing operation includes encryption processing and verification processing; the output processing operation includes decryption processing, desensitization processing and verification processing; The assembling unit is used to assemble the current entity object by using the currently processed data and to feed back the current entity object.

9. The encryption and decryption component according to claim 8, characterized in that: The current processing operation is an input processing operation. When the data processing unit performs the current processing operation on each entity attribute by reflecting the custom annotation of the entity attribute in the current data to be processed, using the encryption and decryption configuration information, and obtains the current processed data, it is used to: Calculating the current data to be processed according to the encryption rule in the encryption configuration information to obtain a check code for the current data to be processed; For each of the entity attributes in the current data to be processed, respectively, by reflecting the custom annotation of the entity attribute in the current data to be processed, so as to determine whether to encrypt the entity attribute based on the encryption configuration item in the encryption and decryption configuration information; When it is determined that the entity attribute is to be encrypted, an encryption method corresponding to the entity attribute is determined from the encryption and decryption configuration information; wherein the encryption method is symmetric encryption or asymmetric encryption; The entity attribute is encrypted using an encryption method corresponding to the entity attribute to obtain encrypted data of the entity attribute.

10. The encryption and decryption component according to claim 8, characterized in that: The current processing operation is an output processing operation. When the data processing unit performs the current processing operation on each entity attribute by reflecting the custom annotation of the entity attribute in the current data to be processed, using the encryption and decryption configuration information, and obtains the current processed data, it is used to: Calculating the current data to be processed according to the encryption rule in the encryption configuration information to obtain a check code for the current data to be processed; For each of the entity attributes in the current data to be processed, respectively, by reflecting the custom annotation of the entity attribute in the current data to be processed, so as to determine whether to decrypt the entity attribute based on the encryption configuration item in the encryption and decryption configuration information; When determining to decrypt the entity attribute, determining whether there is a symmetric encryption annotation corresponding to the entity attribute; When there is a symmetric encryption annotation corresponding to the entity attribute, decrypt the entity attribute using the decryption method corresponding to the symmetric encryption method in the encryption and decryption configuration information to obtain decrypted data of the entity attribute; Using the decrypted data of the entity attribute to overwrite the corresponding entity attribute in the current data to be processed; Determine whether there is a desensitizing annotation corresponding to each of the entity attributes; When it is determined that there is a desensitizing annotation corresponding to the entity attribute, the entity attribute is desensitized using the desensitizing method corresponding to the entity attribute in the encryption and decryption configuration information.

Citation Information

Patent Citations

  • Cross-domain identification analysis node data privacy protection and security sharing method and system

    CN113591119A

  • Interface data processing method and device, equipment and storage medium

    CN113642025A

  • Data processing method and device

    CN114091072A

  • Sensitive data processing method and device, electronic equipment and medium

    CN117034313A