Information desensitization conversion processing method, device, computer equipment and storage medium
Through the pre-configured section function, the request and return data are intercepted, and the keys in the annotation field and the keys in the key pool are decrypted and encrypted, which solves the problem of low efficiency in information desensitization processing in the prior art, and achieves fast and accurate data The overall efficiency is improved.
Patent Information
- Application Number
- CN202111560878.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-20
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2041-12-20
AI Technical Summary
The existing information desensitization processing method is less efficient when the requested and returned business-sensitive information is nested deeply, resulting in cumbersome traversal and low processing efficiency.
The preconfigured section function intercepts the requested parameters and return data, and use the desensitization annotation and desensitization annotation fields to quickly obtain the pending fields, and decrypt and encrypt the keys in the key pool to achieve the acquisition and return of plain text fields. .
It improves the efficiency of information desensitization conversion processing, realizes accurate and fast acquisition of fields to be processed, and reduces the coupling degree of business logic. Developers can realize data desensitization processing and plaintext fields without perception.
Smart Images

Figure CN114239026B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information security technology, and in particular to an information desensitization conversion processing method, device, computer equipment and storage medium. Background Art
[0002] Sensitive information related to data security is not suitable to be displayed directly in plain text on the client. It should be returned to the client after being desensitized by the server. The task request initiated by the client carries desensitized data, which needs to be converted into plain text information on the server before processing the task request to avoid the leakage of sensitive information. However, the commonly used information desensitization conversion process is cumbersome to traverse when the business sensitive information of the request and return is deeply nested, and the efficiency of information desensitization conversion is low. Summary of the invention
[0003] In view of this, the embodiments of the present application provide an information desensitization conversion processing method, apparatus, computer equipment and storage medium to solve the problem of low efficiency of information desensitization conversion processing.
[0004] In a first aspect, an embodiment of the present application provides an information desensitization conversion processing method, the method comprising:
[0005] Intercepting request input parameter data through a preconfigured aspect function, wherein the request input parameter data includes encrypted data and a first key digest, and the request input parameter data is carried by the task request sent by the client;
[0006] Traverse the annotated fields containing the desensitized annotation in the request input parameter data to obtain the first field to be processed;
[0007] Obtaining a decryption key from a key pool according to the first key digest, and using the decryption key to decrypt the encrypted data to obtain a plaintext field;
[0008] Execute the task request according to the plaintext field;
[0009] After the task request is executed, the request return data is intercepted through the preconfigured aspect function;
[0010] Traversing the comment fields containing the desensitized annotations in the request return data to obtain the second field to be processed;
[0011] Selecting an encryption key from the key pool to encrypt the second to-be-processed field to obtain a ciphertext field;
[0012] The ciphertext field and the second key digest are returned to the client, wherein the second key digest is calculated by the encryption key through a digest algorithm.
[0013] According to the above aspects and any possible implementation manner, an implementation manner is further provided, wherein the preconfigured aspect function is configured to implement the following steps:
[0014] Determine the notification object of the aspect;
[0015] Determine an entry point according to the notification object of the slice, wherein the entry point is a node for intercepting the notification object of the slice;
[0016] Create weaving information;
[0017] The weaving information is woven into the business module where the notification object of the aspect is located according to the entry point.
[0018] According to the above aspect and any possible implementation manner, an implementation manner is further provided, wherein determining the entry point according to the notification object of the aspect includes:
[0019] Determine the target transmission data;
[0020] Testing the transmission path of the target transmission data in the notification object of the slice;
[0021] If the transmission paths of the target transmission data all pass through a preset target path, the entry point is determined before the method of the target path is executed.
[0022] According to the above aspect and any possible implementation manner, an implementation manner is further provided, wherein obtaining a decryption key from a key pool according to the first key digest includes:
[0023] Calculating summary information of the keys in the key pool using a preset summary algorithm, wherein the keys with the earliest generation time in the key pool are preferentially calculated;
[0024] After each digest to be compared is calculated using the digest algorithm, character string matching is performed between the digest to be compared and the first key digest;
[0025] If the string matching result of the digest to be compared is the same as that of the first key digest, the key corresponding to the digest to be compared with the same string matching result is used as the decryption key, and the digest algorithm stops calculating the summary information of the key in the key pool.
[0026] According to the above aspects and any possible implementation manner, an implementation manner is further provided, wherein an encryption key is selected from the key pool to encrypt the second to-be-processed field to obtain a ciphertext field, including:
[0027] Determine the desensitization type according to the annotation field of the desensitization annotation;
[0028] According to the desensitization type, a key of the same desensitization type is obtained by screening from the key pool;
[0029] Obtaining a processing timestamp of the second field to be processed;
[0030] According to the processing timestamp of the second field to be processed and in accordance with a preset time range, an encryption key is randomly selected from the keys of the same desensitizing type, and the second field to be processed is encrypted using the encryption key to obtain the ciphertext field.
[0031] In a second aspect, an embodiment of the present application provides an information desensitization conversion processing device, the device comprising:
[0032] A first interception module is used to intercept request input parameter data through a preconfigured aspect function, wherein the request input parameter data includes encrypted data and a first key digest, and the request input parameter data is carried by the task request sent by the client;
[0033] A first acquisition module is used to traverse the annotated fields containing desensitization annotations in the request input parameter data to obtain a first field to be processed;
[0034] A second acquisition module, configured to acquire a decryption key from a key pool according to the first key digest, and use the decryption key to decrypt the encrypted data to obtain a plaintext field;
[0035] A task request execution module, used for executing the task request according to the plain text field;
[0036] A second interception module is used to intercept the request return data through the preconfigured aspect function after the task request is executed;
[0037] A third acquisition module is used to traverse the annotation fields containing the desensitized annotations in the request return data to obtain the second field to be processed;
[0038] A fourth acquisition module, configured to select an encryption key from the key pool to encrypt the second to-be-processed field to obtain a ciphertext field;
[0039] The returning module is used to return the ciphertext field and the second key digest to the client, wherein the second key digest is calculated by the encryption key through a digest algorithm.
[0040] Furthermore, the preconfigured slice function is configured to:
[0041] Determine the notification object of the aspect;
[0042] Determine an entry point according to the notification object of the slice, wherein the entry point is a node for intercepting the notification object of the slice;
[0043] Create weaving information;
[0044] The weaving information is woven into the business module where the notification object of the aspect is located according to the entry point.
[0045] Furthermore, the preconfigured slice function is further configured to:
[0046] Determine the target transmission data;
[0047] Testing the transmission path of the target transmission data in the notification object of the slice;
[0048] If the transmission paths of the target transmission data all pass through a preset target path, the entry point is determined before the method of the target path is executed.
[0049] Furthermore, the second acquisition module is specifically used for:
[0050] Calculating summary information of the keys in the key pool using a preset summary algorithm, wherein the keys with the earliest generation time in the key pool are preferentially calculated;
[0051] After each digest to be compared is calculated using the digest algorithm, character string matching is performed between the digest to be compared and the first key digest;
[0052] If the string matching result of the digest to be compared is the same as that of the first key digest, the key corresponding to the digest to be compared with the same string matching result is used as the decryption key, and the digest algorithm stops calculating the summary information of the key in the key pool.
[0053] Furthermore, the fourth acquisition module is specifically used for:
[0054] Determine the desensitization type according to the annotation field of the desensitization annotation;
[0055] According to the desensitization type, a key of the same desensitization type is obtained by screening from the key pool;
[0056] Obtaining a processing timestamp of the second field to be processed;
[0057] According to the processing timestamp of the second field to be processed and in accordance with a preset time range, an encryption key is randomly selected from the keys of the same desensitizing type, and the second field to be processed is encrypted using the encryption key to obtain the ciphertext field.
[0058] In a third aspect, an embodiment of the present application provides a computer device comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein the processor executes the steps of the information desensitizing and conversion processing method described in the first aspect when executing the computer-readable instructions.
[0059] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores computer-readable instructions. When the computer-readable instructions are executed by a processor, the steps of the information desensitization and conversion processing method described in the first aspect are implemented.
[0060] In an embodiment of the present application, first, in the stage of processing task requests, the server intercepts the request input parameter data through the pre-configured aspect function, and can automatically intercept the request input parameter data containing encrypted data based on the business level; then, the annotation field containing the desensitization annotation is traversed in the request input parameter data to obtain the first field to be processed, and the data that needs to be desensitized can be quickly determined from the intercepted request input parameter data, and the decryption key is obtained according to the first key summary, and the plaintext field is obtained using the decryption key, and then the task request is executed according to the plaintext field. The stage of processing task requests uses the aspect function to insert the interception function into the business logic that was originally executed in a fixed manner, so that the key request input parameter data can be intercepted based on the business level. Similarly, in the stage of requesting return data, the pre-configured aspect function is also used to intercept the request return data, and the annotation field containing the desensitization annotation is traversed to obtain the second field to be processed, and then an encryption key is selected from the key pool to encrypt the second field to be processed to obtain the ciphertext field; and the ciphertext field and the second key summary are returned to the client. In this application, the aspect function is used to decouple complex business logic, and the interception function of request input parameter data and request return data is interwoven between the modules of business implementation. Developers can realize data desensitization conversion and acquisition of plaintext fields in an imperceptible way. Compared with the situation where business sensitive information is deeply nested, this application can accurately and quickly acquire the first field to be processed and the second field to be processed, which can improve the efficiency of information desensitization conversion processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0062] Figure 1 It is a flow chart of an information desensitization conversion processing method in an embodiment of the present application;
[0063] Figure 2 It is a principle block diagram of a device corresponding one-to-one to the information desensitization conversion processing method in the embodiment of the present application;
[0064] Figure 3 It is a schematic diagram of a computer device in an embodiment of the present application. DETAILED DESCRIPTION
[0065] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0066] It should be clear that 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 the field without creative work are within the scope of protection of the present application.
[0067] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0068] It should be understood that the term "and / or" used in this article is only a description of the same field of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0069] It should be understood that, although the terms first, second, third, etc. may be used to describe preset ranges, etc. in the embodiments of the present application, these preset ranges should not be limited to these terms. These terms are only used to distinguish preset ranges from each other. For example, without departing from the scope of the embodiments of the present application, the first preset range may also be referred to as the second preset range, and similarly, the second preset range may also be referred to as the first preset range.
[0070] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0071] Figure 11 is a flowchart of an information desensitization conversion processing method in an embodiment of the present application. The information desensitization conversion processing method can be applied to a scenario where a client sends a task request containing sensitive information to a server. The information desensitization conversion processing method can be implemented on the server. Figure 1 As shown, the information desensitization conversion processing method includes the following steps:
[0072] S10: intercepting the request input parameter data through the preconfigured aspect function, wherein the request input parameter data includes the encrypted data and the first key digest, and the request input parameter data is carried by the task request sent by the client.
[0073] Among them, the aspect function is implemented in an aspect-oriented programming manner, and unified maintenance of program functions can be achieved through pre-compilation and runtime dynamic proxy. Specifically, the aspect function can isolate various parts of the business logic, thereby reducing the coupling between the various parts of the business logic and improving the reusability of the program. In the embodiment of the present application, according to the interactive logic of data transmission between the client and the server, the aspect function of implementing method interception can be configured before the method (implementation function) of the data that needs to be desensitized and desensitized, and the key method part in the business logic can be accurately located.
[0074] Among them, the request input parameter data is the data related to the method input parameter transmitted in the task request sent by the client. Generally speaking, the request input parameter data is desensitized on the client, and when the server receives the request input parameter data, it needs to desensitize it to obtain the plaintext field and then complete the interaction logic with the client and return the data required by the client.
[0075] The encrypted data refers to the data after desensitization processing. The first key digest is used to find the encryption key for decrypting the encrypted data, and the digest algorithm for obtaining the first key digest can be agreed upon by the client and the server.
[0076] In one embodiment, the aspect function is used to intercept the request input parameter data in the originally fixed modular business logic to achieve decoupling of the business logic, and the request input parameter data that the developer is concerned about can be directly operated, which effectively improves the processing efficiency of the request input parameter data. Understandably, when the business sensitive information of the request and return is deeply nested, it will be cumbersome to traverse, and the developer needs to write highly logical desensitization processing execution code, which is labor-intensive and error-prone. The aspect function adopted in this proposal can be woven into the business logic efficiently and easily, and the developer only needs to write a very small amount of weaving code to implement information desensitization conversion processing.
[0077] S20: Traverse the annotated fields containing the desensitizing annotation in the request input parameter data to obtain the first field to be processed.
[0078] In one embodiment, the present application can use the annotation field of the desensitizing annotation to traverse the request input parameter data to perform the desensitization operation on the encrypted data. It should be noted that the annotation field containing the desensitizing annotation, in addition to facilitating traversal, can also trigger the interception of the aspect method, realize business decoupling, and realize the monitoring of the transmitted data between business modules.
[0079] S30: The first key digest obtains a decryption key from the key pool, and uses the decryption key to decrypt the encrypted data to obtain a plaintext field.
[0080] In one embodiment, the first key digest is calculated from the encryption key in the key pool by a digest algorithm, and the decryption key corresponding to the encrypted data can be uniquely determined according to the unidirectionality of the digest algorithm. The encryption key and the decryption key can be implemented based on a symmetric encryption and decryption method, that is, the encryption key and the decryption key are the same.
[0081] S40: Plain text field execution task request.
[0082] In one embodiment, before returning data to the client, the server needs to obtain the plaintext field based on the request input data and then perform the next execution logic.
[0083] S50: After the task request is executed, the request return data is intercepted through the pre-configured aspect function.
[0084] In one embodiment, the server requires the data to be in plain text, while the client requires the data to be in desensitized form. Therefore, before the request returns the data, desensitization processing needs to be performed first, so that the data displayed on the client can be presented in a desensitized state.
[0085] S60: Traverse the annotated fields containing the desensitized annotations in the request return data to obtain the second field to be processed.
[0086] Similarly, the second field to be processed can be obtained by traversing the annotation field containing the desensitizing annotation. It can be understood that the desensitizing annotation is different from the desensitizing annotation, but the desensitization and desensitization methods of the two should correspond.
[0087] S70: Select an encryption key from the key pool to encrypt the second field to be processed to obtain a ciphertext field.
[0088] In one embodiment, an encryption key can be randomly selected from a key pool to encrypt a ciphertext field. It can be understood that when the client initiates the next task request, the ciphertext field can be used as new request input data, that is, the ciphertext field is used as the key data for completing the logical interaction with the server this time.
[0089] S80: Return the ciphertext field and the second key digest to the client, where the second key digest is calculated using the encryption key through a digest algorithm.
[0090] It can be understood that, in addition to the ciphertext field, the second key digest should be returned to the client at the same time, considering that the ciphertext field may be used as request input parameter data.
[0091] In an embodiment of the present application, first, in the stage of processing task requests, the server intercepts the request input parameter data through the pre-configured aspect function, and can automatically intercept the request input parameter data containing encrypted data based on the business level; then, the annotation field containing the desensitization annotation is traversed in the request input parameter data to obtain the first field to be processed, and the data that needs to be desensitized can be quickly determined from the intercepted request input parameter data, and the decryption key is obtained according to the first key summary, and the plaintext field is obtained using the decryption key, and then the task request is executed according to the plaintext field. The stage of processing task requests uses the aspect function to insert the interception function into the business logic that was originally executed in a fixed manner, so that the key request input parameter data can be intercepted based on the business level. Similarly, in the stage of requesting return data, the pre-configured aspect function is also used to intercept the request return data, and the annotation field containing the desensitization annotation is traversed to obtain the second field to be processed, and then an encryption key is selected from the key pool to encrypt the second field to be processed to obtain the ciphertext field; and the ciphertext field and the second key summary are returned to the client. In this application, the aspect function is used to decouple complex business logic, and the interception function of request input parameter data and request return data is interwoven between the modules of business implementation. Developers can realize data desensitization conversion and acquisition of plaintext fields in an imperceptible way. Compared with the situation where business sensitive information is deeply nested, this application can accurately and quickly acquire the first field to be processed and the second field to be processed, which can improve the efficiency of information desensitization conversion processing.
[0092] Furthermore, the pre-configured slice functions are configured to implement the following steps:
[0093] S11: Determine the notification object of the aspect.
[0094] Among them, the notification object of the aspect can be a method class involving the sending or receiving of sensitive information (such as request input data, request return data, etc.), and the notification object of the aspect can be understood as a specific method in the method class. The step of determining the notification object of the aspect can locate the specific method involved in the execution of sensitive information in the business logic, and the notification object of the aspect can be determined by querying the relevant sensitive information according to actual needs.
[0095] S12: Determine an entry point according to the notification object of the slice, wherein the entry point is a node for intercepting the notification object of the slice.
[0096] The entry point is a key node for determining information weaving in the aspect method. In one embodiment, the entry point may specifically be a node for executing an interception operation. It is understandable that, in the context of fixed business logic, an entry point suitable for weaving information can be obtained based on the logical analysis of the notification object of the aspect without destroying the original business logic.
[0097] S13: Create weaving information.
[0098] Among them, the weaving information refers to the method woven into the original fixed business module for realizing a specific function. In the embodiment of the present application, the weaving information can specifically be a method for intercepting request input parameter data and request return data.
[0099] In one embodiment, for the desensitization conversion processing of sensitive information, woven information may be used to monitor and intercept execution operations related to sensitive information, so as to achieve automatic desensitization conversion processing of sensitive information during business execution.
[0100] S14: Weaving the weaving information into the business module where the notification object of the aspect is located according to the entry point.
[0101] It can be understood that the business module where the notification object of the aspect is located executes a mature and complete business function logic. After the application weaves the weaving information, it can intercept sensitive information and complete the desensitization conversion processing of sensitive information under the premise of realizing the original business.
[0102] Furthermore, in step S12, that is, in determining the entry point according to the notification object of the section, the following steps are also included:
[0103] S121: Determine target transmission data.
[0104] In this application, the target transmission data specifically refers to data that needs to be desensitized or desensitized, that is, sensitive information. It is understandable that some data displayed on the client needs to be desensitized, and the server needs plain text fields when executing the task request sent by the client. Therefore, it is necessary to perform desensitization or desensitization operations on the target transmission data during the transmission process.
[0105] S122: Testing the transmission path of the target transmission data in the notification object of the aspect.
[0106] In one embodiment, the possible transmission paths of the target transmission data may be determined by comprehensively covering all execution logics of the notification object of the aspect, so as to ensure that the target transmission data does not bypass the necessary execution logic.
[0107] S123: If the transmission paths of the target transmission data all pass through the preset target path, then determine the entry point before the method of the target path is executed.
[0108] In one embodiment, the entry point can be cut in before the method (the specific method involved in the execution of sensitive information in the business logic) to ensure that the target transmission data will be intercepted and returned to the business process of logical interaction after the desensitization or desensitization operation is completed according to the woven information. In this way, developers can realize the desensitization conversion processing of data and the acquisition of plain text information in an imperceptible way.
[0109] Further, in step S30, i.e. obtaining a decryption key from a key pool according to the first key digest, the following steps are specifically included:
[0110] S31: using a preset digest algorithm to calculate digest information of keys in the key pool, wherein the keys with the earliest generation time in the key pool are calculated first.
[0111] Among them, the keys in the key pool in the embodiment of the present application can be dynamically changed. When a new encryption / decryption key is generated, the earliest generated encryption / decryption key can be deleted. Of course, when setting, it is ensured that the earliest generated encryption / decryption key exists for a longer time than the effective processing time of the first field to be processed.
[0112] It is understandable that when desensitizing sensitive information, the most recently generated key is used for encryption first, that is, the desensitized data is processed using an earlier key. Accordingly, when calculating the summary information corresponding to the decryption key, the summary calculation of the earliest or earlier key in the key pool can be prioritized and then field matching can be performed, so that the decryption key can be obtained more quickly. Furthermore, this key pool setting can also allow the key to be updated in a timely manner, which can prevent key leakage.
[0113] S32: After each digest to be compared is calculated using the digest algorithm, a character string match is performed between the digest to be compared and the first key digest.
[0114] S33: If the string matching result of the digest to be compared is the same as the first key digest, the key corresponding to the digest to be compared with the same string matching result is used as the decryption key, and the digest algorithm stops calculating the digest information of the key in the key pool.
[0115] It can be understood that the digest to be compared is obtained based on a key generated earlier. When a digest to be compared having the same character string as the first key digest is matched, subsequent digests to be compared may not be generated, which can save memory resources.
[0116] Further, in step S70, an encryption key is selected from the key pool to encrypt the second field to be processed to obtain a ciphertext field, which specifically includes the following steps:
[0117] S71: Determine the desensitization type according to the annotation field of the desensitization annotation.
[0118] S72: According to the desensitization type, a key of the same desensitization type is obtained from the key pool.
[0119] In one embodiment, desensitization can be performed in a variety of ways, one way corresponding to a desensitization type. The encryption methods corresponding to the desensitization types are also differentiated accordingly, so keys of the same type can be quickly screened in the key pool according to the desensitization type.
[0120] S73: Obtain the processing timestamp of the second field to be processed.
[0121] S74: According to the processing timestamp of the second field to be processed and in accordance with a preset time range, an encryption key is randomly selected from keys of the same desensitizing type, and the second field to be processed is encrypting with the encryption key to obtain a ciphertext field.
[0122] In one embodiment, the encryption key can be randomly selected, but it must be within a certain time range to ensure that the encryption key still exists in the key pool when the data processed by the encryption key needs to be desensitized. Specifically, a newly generated encryption key that has not been used can be used as a desensitization encryption option.
[0123] In the embodiments of the present application, the selection of encryption keys is particular. First, there may be multiple ways to desensitize and desensitize, so there are multiple desensitization types, so that the keys can be distinguished according to the desensitization type, and the efficiency of calculating the key summary during encryption and decryption will be higher. The key is set with a mechanism for automatic deletion of keys on a regular basis. For the case where premature key encryption either requires a large storage cost or the encrypted data does not have a corresponding decryption key, the encryption key can be selected according to a preset time range area. The dynamic design of the key pool in this application effectively liberates the problem of long-term resource occupation of the key pair storage space while ensuring data security.
[0124] In an embodiment of the present application, first, in the stage of processing task requests, the server intercepts the request input parameter data through the pre-configured aspect function, and can automatically intercept the request input parameter data containing encrypted data based on the business level; then, the annotation field containing the desensitization annotation is traversed in the request input parameter data to obtain the first field to be processed, and the data that needs to be desensitized can be quickly determined from the intercepted request input parameter data, and the decryption key is obtained according to the first key summary, and the plaintext field is obtained using the decryption key, and then the task request is executed according to the plaintext field. The stage of processing task requests uses the aspect function to insert the interception function into the business logic that was originally executed in a fixed manner, so that the key request input parameter data can be intercepted based on the business level. Similarly, in the stage of requesting return data, the pre-configured aspect function is also used to intercept the request return data, and the annotation field containing the desensitization annotation is traversed to obtain the second field to be processed, and then an encryption key is selected from the key pool to encrypt the second field to be processed to obtain the ciphertext field; and the ciphertext field and the second key summary are returned to the client. In this application, the aspect function is used to decouple complex business logic, and the interception function of request input parameter data and request return data is interwoven between the modules of business implementation. Developers can realize data desensitization conversion and acquisition of plaintext fields in an imperceptible way. Compared with the situation where business sensitive information is deeply nested, this application can accurately and quickly acquire the first field to be processed and the second field to be processed, which can improve the efficiency of information desensitization conversion processing.
[0125] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0126] Figure 2 This is a principle block diagram of a device corresponding to the information desensitization conversion processing method in the embodiment of the present application. Figure 2 As shown, the information desensitizing conversion processing device includes a first interception module 10, a first acquisition module 20, a second acquisition module 30, a task request execution module 40, a second interception module 50, a third acquisition module 60, a fourth acquisition module 70 and a return module 80.
[0127] The first interception module 10 is used to intercept the request input parameter data through the preconfigured aspect function, wherein the request input parameter data includes encrypted data and a first key digest, and the request input parameter data is carried by the task request sent by the client.
[0128] The first acquisition module 20 is used to traverse the annotated fields containing desensitization annotations in the request input parameter data to obtain the first field to be processed.
[0129] The second acquisition module 30 is used to acquire a decryption key from the key pool according to the first key digest, and use the decryption key to decrypt the encrypted data to obtain a plaintext field.
[0130] The task request execution module 40 is used to execute the task request according to the plain text field.
[0131] The second interception module 50 is used to intercept the request return data through the pre-configured aspect function after the task request is executed.
[0132] The third acquisition module 60 is used to traverse the annotated fields containing the desensitized annotations in the request return data to acquire the second field to be processed.
[0133] The fourth acquisition module 70 is used to select an encryption key from the key pool to encrypt the second field to be processed to obtain a ciphertext field.
[0134] The return module 80 is used to return the ciphertext field and the second key digest to the client, wherein the second key digest is calculated by the encryption key through a digest algorithm.
[0135] Optionally, pre-configured aspect functions are configured for:
[0136] Determine the notification object of the aspect;
[0137] Determine the entry point according to the notification object of the slice, where the entry point is the node that intercepts the notification object of the slice;
[0138] Create weaving information;
[0139] The woven information is woven into the business module where the notification object of the aspect is located according to the entry point.
[0140] Optionally, the preconfigured aspect functions are also configured to:
[0141] Determine the target transmission data;
[0142] Test the transmission path of the target transmission data in the notification object of the aspect;
[0143] If the transmission paths of the target transmission data all pass through the preset target path, the entry point is determined before the method of the target path is executed.
[0144] Optionally, the second acquisition module is specifically used for:
[0145] The preset digest algorithm is used to calculate the digest information of the keys in the key pool, wherein the key generated earliest in the key pool is calculated first;
[0146] After each digest algorithm is used to calculate a digest to be compared, a character string match is performed between the digest to be compared and the first key digest;
[0147] If the string matching result of the digest to be compared is the same as the first key digest, the key corresponding to the digest to be compared with the same string matching result is used as the decryption key, and the digest algorithm stops calculating the digest information of the key in the key pool.
[0148] Optionally, the fourth acquisition module is specifically used to:
[0149] Determine the desensitization type based on the annotation field of the desensitization annotation;
[0150] According to the desensitization type, a key of the same desensitization type is obtained from the key pool;
[0151] Get the processing timestamp of the second field to be processed;
[0152] According to the processing timestamp of the second field to be processed and in accordance with a preset time range, an encryption key is randomly selected from keys of the same desensitizing type, and the second field to be processed is encrypted using the encryption key to obtain a ciphertext field.
[0153] In an embodiment of the present application, first, in the stage of processing task requests, the server intercepts the request input parameter data through the pre-configured aspect function, and can automatically intercept the request input parameter data containing encrypted data based on the business level; then, the annotation field containing the desensitization annotation is traversed in the request input parameter data to obtain the first field to be processed, and the data that needs to be desensitized can be quickly determined from the intercepted request input parameter data, and the decryption key is obtained according to the first key summary, and the plaintext field is obtained using the decryption key, and then the task request is executed according to the plaintext field. The stage of processing task requests uses the aspect function to insert the interception function into the business logic that was originally executed in a fixed manner, so that the key request input parameter data can be intercepted based on the business level. Similarly, in the stage of requesting return data, the pre-configured aspect function is also used to intercept the request return data, and the annotation field containing the desensitization annotation is traversed to obtain the second field to be processed, and then an encryption key is selected from the key pool to encrypt the second field to be processed to obtain the ciphertext field; and the ciphertext field and the second key summary are returned to the client. In this application, the aspect function is used to decouple complex business logic, and the interception function of request input parameter data and request return data is interwoven between the modules of business implementation. Developers can realize data desensitization conversion and acquisition of plaintext fields in an imperceptible way. Compared with the situation where business sensitive information is deeply nested, this application can accurately and quickly acquire the first field to be processed and the second field to be processed, which can improve the efficiency of information desensitization conversion processing.
[0154] Figure 3 It is a schematic diagram of a computer device in an embodiment of the present application.
[0155] like Figure 3 As shown, the computer device 110 includes a processor 111, a memory 112, and a computer-readable instruction 113 stored in the memory 112 and executable on the processor 111. When the processor 111 executes the computer-readable instruction 113, each step of the information desensitization conversion processing method is implemented.
[0156] Exemplarily, the computer readable instructions 113 may be divided into one or more modules / units, one or more modules / units are stored in the memory 112, and are executed by the processor 111 to complete the present application. One or more modules / units may be a series of computer readable instruction segments capable of completing a specific function, and the instruction segments are used to describe the execution process of the computer readable instructions 113 in the computer device 110.
[0157] The computer device 110 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The computer device may include, but is not limited to, a processor 111 and a memory 112. Those skilled in the art will appreciate that Figure 3 This is only an example of the computer device 110 and does not constitute a limitation of the computer device 110. The computer device 110 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the computer device may also include input and output devices, network access devices, buses, etc.
[0158] The processor 111 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0159] The memory 112 may be an internal storage unit of the computer device 110, such as a hard disk or memory of the computer device 110. The memory 112 may also be an external storage device of the computer device 110, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 110. Further, the memory 112 may also include both an internal storage unit of the computer device 110 and an external storage device. The memory 112 is used to store computer-readable instructions and other programs and data required by the computer device. The memory 112 may also be used to temporarily store data that has been output or is to be output.
[0160] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0161] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0162] In the embodiments of the present application, the server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.
[0163] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0164] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0165] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through computer-readable instructions. The computer-readable instructions can be stored in a computer-readable storage medium, and the computer-readable instructions can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer-readable instructions include computer-readable instruction codes, and the computer-readable instruction codes can be in source code form, object code form, executable files or some intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer-readable instruction code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practices in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practices, computer-readable media does not include electrical carrier signals and telecommunication signals.
[0166] The present application also provides a computer-readable storage medium, which stores computer-readable instructions, and the computer-readable instructions implement the information desensitization conversion processing method when executed by a processor.
[0167] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for desensitizing and converting information, characterized in that: include: Intercepting request input parameter data through a preconfigured aspect function, wherein the request input parameter data includes encrypted data and a first key digest, and the request input parameter data is carried by a task request sent by a client; the preconfigured aspect function is configured to implement the following steps: determining a notification object of the aspect, determining an entry point according to the notification object of the aspect, wherein the entry point is a node for intercepting the notification object of the aspect, creating weaving information, and weaving the weaving information into a business module where the notification object of the aspect is located according to the entry point; Traverse the annotated fields containing the desensitized annotation in the request input parameter data to obtain the first field to be processed; Obtaining a decryption key from a key pool according to the first key digest, and using the decryption key to decrypt the encrypted data to obtain a plaintext field; Execute the task request according to the plaintext field; After the task request is executed, the request return data is intercepted through the preconfigured aspect function; Traversing the comment fields containing the desensitized annotations in the request return data to obtain the second field to be processed; Determine the desensitization type according to the annotation field of the desensitization annotation; According to the desensitization type, a key of the same desensitization type is obtained by screening from the key pool; Obtaining a processing timestamp of the second field to be processed; According to the processing timestamp of the second field to be processed, according to a preset time range, randomly select an encryption key from the keys of the same desensitization type, and use the encryption key to encrypt the second field to be processed to obtain a ciphertext field; The ciphertext field and the second key digest are returned to the client, wherein the second key digest is calculated by the encryption key through a digest algorithm.
2. The method according to claim 1, characterized in that: The determining the entry point according to the notification object of the section includes: Determine the target transmission data; Testing the transmission path of the target transmission data in the notification object of the slice; If the transmission paths of the target transmission data all pass through a preset target path, the entry point is determined before the method of the target path is executed.
3. The method according to claim 1, characterized in that The obtaining a decryption key from a key pool according to the first key digest includes: Calculating summary information of the keys in the key pool using a preset summary algorithm, wherein the keys with the earliest generation time in the key pool are preferentially calculated; After each digest to be compared is calculated using the digest algorithm, character string matching is performed between the digest to be compared and the first key digest; If the string matching result of the digest to be compared is the same as that of the first key digest, the key corresponding to the digest to be compared with the same string matching result is used as the decryption key, and the digest algorithm stops calculating the summary information of the key in the key pool.
4. An information desensitization conversion processing device, characterized in that: include: A first interception module is used to intercept request input parameter data through a preconfigured aspect function, wherein the request input parameter data includes encrypted data and a first key digest, and the request input parameter data is carried by a task request sent by a client, and the preconfigured aspect function is configured to: determine a notification object of the aspect, determine an entry point according to the notification object of the aspect, wherein the entry point is a node for intercepting the notification object of the aspect, create weaving information, and weave the weaving information into a business module where the notification object of the aspect is located according to the entry point; A first acquisition module is used to traverse the annotated fields containing desensitization annotations in the request input parameter data to obtain a first field to be processed; A second acquisition module, configured to acquire a decryption key from a key pool according to the first key digest, and use the decryption key to decrypt the encrypted data to obtain a plaintext field; A task request execution module, used for executing the task request according to the plain text field; A second interception module is used to intercept the request return data through the preconfigured aspect function after the task request is executed; A third acquisition module is used to traverse the annotation fields containing the desensitized annotations in the request return data to obtain the second field to be processed; The fourth acquisition module is used to determine the desensitization type according to the annotation field of the desensitization annotation; screen the key of the same desensitization type from the key pool according to the desensitization type; obtain the processing timestamp of the second field to be processed; according to the processing timestamp of the second field to be processed, according to a preset time range area, randomly select an encryption key from the keys of the same desensitization type, and use the encryption key to encrypt the second field to be processed to obtain a ciphertext field; The returning module is used to return the ciphertext field and the second key digest to the client, wherein the second key digest is calculated by the encryption key through a digest algorithm.
5. The device according to claim 4, characterized in that The preconfigured slice functionality is further configured to: Determine the target transmission data; Testing the transmission path of the target transmission data in the notification object of the slice; If the transmission paths of the target transmission data all pass through a preset target path, the entry point is determined before the method of the target path is executed.
6. A computer device comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, characterized in that: When the processor executes the computer-readable instructions, the steps of the information desensitization conversion processing method as described in any one of claims 1-3 are performed.
7. A computer-readable storage medium storing computer-readable instructions, characterized in that: When the computer-readable instructions are executed by a processor, the steps of the information desensitization conversion processing method as described in any one of claims 1 to 3 are implemented.
