Data desensitization processing method and system
By configuring the monitoring process in the database to receive commands and split encrypted sensitive data, the problem of sensitive data not being desensitized in the overall replication or backup of the database is solved, and data security is improved.
Patent Information
- Application Number
- CN202410755940.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-08-30
AI Technical Summary
During the entire database copy or backup process, existing technologies fail to effectively desensitize sensitive data, resulting in the risk of sensitive data being leaked.
Configure the monitoring process to receive commands from the database administrator, determine its permissions, and split sensitive data into multiple parts. Each part is encrypted with a different secret key, combined into desensitized data, and sent to the scheduled administrator to ensure that only multiple parts are Decryption is only possible when two administrators jointly hold the secret key.
It effectively reduces the possibility of sensitive data leakage and improves the security of data during copying or backup.
Smart Images

Figure CN118568772A
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and specifically, to a data desensitization processing method and system. Background Art
[0002] Data desensitization refers to the deformation of certain sensitive information through desensitization rules to achieve reliable protection of sensitive privacy data. In the case of customer security data or some commercial sensitive data, real data is transformed and provided for testing without violating system rules. For example, personal information such as ID card number, mobile phone number, card number, customer number, etc. need to be desensitized.
[0003] Currently, data is basically stored in the database. Users generally access the database through the database client. After the database client sends a data acquisition request, the database server obtains the data from the data stored in the database after receiving the data acquisition request. If the acquired data is sensitive data, the database server will desensitize the data and then send the desensitized data to the database client.
[0004] From the above steps, we can see that after the database client sends the request, the data will be desensitized. However, if there is no operation by the database client, the data will not be desensitized. For example, the database administrator will back up the entire database. In this case, the data desensitization operation will not be performed, so sensitive data may be leaked. Summary of the invention
[0005] The embodiments of the present application provide a data desensitization processing method and system to at least solve the problem in the related art that sensitive data is not desensitized when the entire database is copied or backed up, thereby causing the possibility of sensitive data being leaked.
[0006] According to one aspect of the present application, a data desensitization processing method is provided, comprising: configuring a monitoring process, and receiving commands from a database administrator through the monitoring process, wherein the commands include commands for copying the entire database; after determining that the data obtained from the database by the command includes sensitive data, determining whether the database administrator has the authority to operate the sensitive data based on the authority of the database administrator; for sensitive data that cannot be operated by the authority, splitting the sensitive data into multiple parts, wherein each of the multiple parts is encrypted using a different secret key; combining the encrypted parts as desensitized data of the sensitive data, and sending the desensitized data and the non-sensitive data obtained by the command to the database administrator.
[0007] Furthermore, splitting the sensitive data that cannot be operated by the authority into multiple parts includes: obtaining an account pre-configured in the monitoring process, wherein the account is an account of a predetermined administrator, the authority of the predetermined administrator is higher than that of the database administrator, and there are multiple accounts; obtaining the number of the accounts; and splitting the sensitive data into fractions equal to the number.
[0008] Furthermore, encrypting each of the multiple parts using a different key includes: obtaining keys equal to the number from pre-configured keys, wherein each of the obtained keys is different; encrypting each part using one of the obtained keys, wherein the keys used for each part are different.
[0009] Furthermore, it also includes: sending the acquired secret keys to the predetermined administrators respectively, wherein the secret keys sent to each administrator are different, and one secret key is sent to each administrator.
[0010] According to another aspect of the present application, a data desensitization processing system is also provided, including: a receiving module, used to configure a monitoring process, and receive commands from a database administrator through the monitoring process, wherein the commands include commands for copying the entire database; a determination module, used to determine whether the database administrator has the authority to operate the sensitive data after determining that the data obtained from the database by the command includes sensitive data; a splitting module, used to split the sensitive data that cannot be operated by the authority into multiple parts, wherein each of the multiple parts is encrypted using a different secret key; a first sending module, used to combine the encrypted parts as desensitized data of the sensitive data, and send the desensitized data and the non-sensitive data obtained by the command to the database administrator.
[0011] Furthermore, the splitting module is used to: obtain an account pre-configured in the monitoring process, wherein the account is an account of a predetermined administrator, the authority of the predetermined administrator is higher than that of the database administrator, and there are multiple accounts; obtain the number of the accounts; and split the sensitive data into scores equal to the number.
[0012] Furthermore, the splitting module is used to: obtain keys of the same quantity as the pre-configured keys, wherein each of the obtained keys is different; and encrypt each part using one of the obtained keys, wherein the keys used for each part are different.
[0013] Furthermore, it also includes: a second sending module, which is used to send the acquired secret keys to the predetermined administrators respectively, wherein the secret keys sent to each administrator are different, and one secret key is sent to each administrator.
[0014] According to another aspect of the present application, a server is also provided, comprising a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the above-mentioned method steps.
[0015] According to another aspect of the present application, a readable storage medium is provided, on which computer instructions are stored, wherein the computer instructions implement the above method steps when executed by a processor.
[0016] In an embodiment of the present application, a configuration monitoring process is adopted, and commands from a database administrator are received through the monitoring process, wherein the commands include commands for copying the entire database; after determining that the data obtained from the database by the command includes sensitive data, whether the database administrator has the authority to operate the sensitive data is determined according to the authority of the database administrator; for sensitive data that cannot be operated by the authority, the sensitive data is split into multiple parts, wherein each of the multiple parts is encrypted using a different secret key; the encrypted parts are combined as desensitized data of the sensitive data, and the desensitized data and the non-sensitive data obtained by the command are sent to the database administrator. This application solves the problem in the related art that sensitive data is not desensitized when the entire database is copied or backed up, resulting in the possibility of leakage of sensitive data, thereby improving the security of sensitive data to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0018] Figure 1 This is a schematic diagram of a database architecture for data desensitization processing according to an embodiment of the present application;
[0019] Figure 2 It is a flow chart of a data desensitization processing method according to an embodiment of the present application. DETAILED DESCRIPTION
[0020] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0021] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0022] The overall concept of the following embodiments is as follows:
[0023] A monitoring process is run on the database server. All commands executed on the database server need to go through the monitoring process. The monitoring process is configured with the contact information of multiple managers. After the monitoring process detects the command to copy the database file, the data in the sensitive field is split into multiple segments according to the number of managers. For example, if there are 3 managers, the data is split into three segments, each of which is encrypted with a different password, and then the passwords are sent to the 3 managers respectively. In this way, the copied data can only be decrypted if all three managers hand over their passwords. This technical solution reduces the possibility of sensitive data leakage.
[0024] Figure 1 is a schematic diagram of a database architecture for data desensitization processing according to an embodiment of the present application. Figure 1 In the example, the database server is configured with a monitoring process, which is used to intercept the access request of the database client and the copy or replication command sent by the administrator to the data. When data desensitization is required, the monitoring process can perform desensitization processing by itself or send the data to the desensitization server for processing. The following is an explanation of the data desensitization system including the desensitization server.
[0025] When performing desensitization, the following data desensitization system can be used. The data desensitization system includes a desensitization server, a database server, and a reverse proxy server connected to the two. The reverse proxy server can be an Nginx server. The Nginx server is a high-performance lightweight HTTP and reverse proxy web server, and also provides IMAP / POP3 / SMTP services. The Nginx server has the characteristics of low system resource consumption, small memory usage, and strong concurrency. Therefore, in order to achieve query results without hysteresis and page delays, it plays a great role in the streaming acquisition of query results.
[0026] The reverse proxy server is a proxy server for data communication between the client device or data query user and the data desensitization system. The client device only needs to know the network address of the reverse proxy server to query and obtain the desensitized data. When the client device makes a query, it first needs to perform user authentication. Legitimate users can query data through the reverse proxy server. To this end, the client device will send an authentication request message to the reverse proxy server. Through the pre-configured reverse proxy server, all query authentication request messages are directly forwarded to the desensitization server for user authentication after legal verification. The desensitization server will include various components for authentication and desensitization processing, which are used to perform user authentication and data desensitization processing, such as a transceiver component for communication with the reverse proxy server, a routing component configured to communicate with the reverse proxy server, a certificate management component for managing certificates of various users and issuing certificates for ordinary users, a communication encryption component, a desensitization rule determination component, a data desensitization processing component, an original data cache component, a desensitized data cache component, and the like. In view of the fact that the present disclosure does not involve desensitization itself but involves the rapid communication and presentation of desensitized data and user authentication, the specific technical means of the data desensitization process will not be described in detail. How to desensitize and the content of the desensitization rules can adopt any existing rules applicable to the technical solution of the present disclosure.
[0027] As described above, the desensitizing server receives the authentication request message from the client device via the reverse server, and feeds back the corresponding identity authentication information and desensitizing rules to the client device via the reverse server. During the authentication process, the data needs to be encrypted to prevent the desensitizing rules from being intercepted by a third party. Specifically, the identity authentication information is a digital certificate containing an encrypted public key. The desensitizing rules are also encrypted, for example, the HTTPS protocol uses digital certificates, encryption algorithms, asymmetric keys and other technologies to complete Internet data transmission encryption and achieve Internet transmission security protection. AES: Advanced Encryption Standard and DES: Data Encryption Standard (Data Encryption Standard) can be used. The desensitizing server performs user identity authentication on the client device, and the user's desensitization rules and user data access rights can be determined during the identity authentication process. Therefore, the desensitizing server obtains the authentication request message sent from the client device via the reverse proxy server, and feeds back the corresponding identity authentication information and desensitization rules to the reverse proxy server based on the received legal authentication request message. This can provide the necessary desensitization rules for the subsequent desensitization process. Since the desensitization rules are determined during the user identity authentication process, the user needs to be authenticated during the login process. During the authentication process, user information needs to be transmitted to the desensitization server. The desensitization system queries the user's permissions and the corresponding desensitization rules based on the user information. These desensitization rules can be determined by the user of the desensitization system, or they can be obtained through mutual negotiation. When negotiating the desensitization rules, the data needs to be encrypted to prevent the communication data from being obtained and used by a third party. If the rules are fixed, they should be modified regularly to prevent the rules from being deciphered.
[0028] After identity authentication via the desensitizing server, the client device sends a data query request to the data desensitizing system or its reverse proxy server, thereby initiating a data request to the database server. After receiving the data query request, the reverse proxy server sends the user request data to the corresponding database server. The database server obtains the query conditions of the data request message sent from the client device via the reverse proxy server to perform data query, and feeds back the original data required by the client device to the reverse proxy server. These original data are data to be desensitized. Desensitization is required before the reverse proxy server forwards them to the client device. After obtaining the original data to be desensitized, the reverse proxy server parses the data, and after parsing the content, transmits the data to be desensitized to the desensitizing server. It should be pointed out that some original data may not contain sensitive data at all. For security reasons, the reverse proxy server still transmits the original data to the desensitizing server. At this time, since the original data does not contain sensitive data, the desensitizing server will basically not perform desensitization processing or the desensitization processing will be very fast. To this end, the input port of the reverse proxy server facing the database server is pre-routed and configured, so that the query result from the input port facing the database server The original data to be desensitized is directly routed to the output port facing the desensitizing server. The reverse proxy server includes the user's identity authentication information, such as the client device name, in the original data sent to the desensitizing server. The desensitizing server uses the corresponding desensitizing rules to perform desensitization processing on the received original data based on the identity information of the authenticated client device, generates desensitized data, and then sends the desensitized data back to the reverse proxy server. Data desensitization rules include the determination of sensitive data, the type of sensitive data, and the desensitization algorithm used for desensitization.
[0029] When performing the desensitization task, the data desensitization processing component in the desensitization server can, on the one hand, determine all possible sensitive data, and then determine the sensitive data that needs to be desensitized among all sensitive data based on the desensitization rules corresponding to the identity authentication information of the client device, and determine the sensitive data type of this sensitive information and the corresponding desensitization algorithm; on the other hand, it can also directly analyze the original data based on the desensitization rules corresponding to the identity authentication information of the client device in order to locate the sensitive data in the original data at one time, and determine the sensitive data type of this sensitive information and the corresponding desensitization algorithm. Finally, the pseudonymous data processing component generates replacement data for replacing the sensitive data based on the desensitization algorithm and replaces it. After receiving the desensitized data, the reverse proxy server sends it to the client device according to the database message requirements.
[0030] Various desensitizing algorithms can be used when performing desensitizing processing. For example, the following desensitizing algorithm can be used: This algorithm is a reversible desensitizing encryption algorithm of a specified length, which includes the following steps: A. Add file source; Add file source containing sensitive data to be processed; B. Add desensitizing task; Add desensitizing task to perform desensitizing and encryption processing on sensitive data; C. Configure reversible desensitizing encryption algorithm; Configure reversible desensitizing encryption algorithm for sensitive data to be processed to ensure that security, ease of use, and reversibility are met after sensitive data processing; D. Execute desensitizing task; Pull sensitive data to be processed from the file source and perform desensitizing and encryption processing on the data. The specific processing method is: first perform SM4 encryption on the data to ensure data security, then perform MD5 encryption on the data and intercept the specified number of bits of data to ensure data consistency and ease of use, and finally store the original data after SM4 encryption and the final processed data in a mapping table (the original data is sensitive data and cannot exist in the mapping table) to ensure that the encrypted data can be restored to the original data E. Data restoration. In this algorithm, a data to be restored is given, the data corresponding to this data is found from the mapping table, and the found data is decrypted by SM4 to obtain the original data.
[0031] Through the above steps, a reversible desensitization encryption algorithm of a specified length is provided. The algorithm will first perform SM4 encryption on sensitive data to ensure data security, then perform MD5 encryption on the data and intercept the data of a specified number of bits to ensure data consistency and ease of use, and finally store the original data after SM4 encryption and the final processed data in a mapping table to ensure that the encrypted data can be restored to the original data. In the above implementation, a data processed by a reversible desensitization encryption algorithm is given, and a brute force cracking attempt is made on the data. It is found that the data is difficult to crack, but the data can be restored to the original data after internal processing.
[0032] Of course, in addition to the above desensitization algorithms, other desensitization algorithms can also be used, which will not be described here one by one.
[0033] In this embodiment, a data desensitization processing method is provided. Figure 2 is a flow chart of a data desensitization processing method according to an embodiment of the present application, such as Figure 2 As shown below, Figure 2 The method steps involved are described.
[0034] Step S202: configure a monitoring process, and receive commands from a database administrator through the monitoring process, wherein the commands include commands for replicating the entire database.
[0035] Step S204: after determining that the data obtained from the database by the command includes sensitive data, determine whether the database administrator has the authority to operate the sensitive data according to the authority of the database administrator.
[0036] In an optional embodiment, the authority of the database administrator is obtained, and when the database administrator does not have the authority to operate sensitive data, the behavior of the database sending the command is recorded; after a predetermined period of time, the number of times the database administrator sends the command is counted, and the frequency of the database administrator sending the command is calculated, and when the frequency exceeds a first threshold, an alarm message is sent to the database administrator, when the frequency exceeds a second threshold, the authority of the database administrator is reduced, and when the frequency exceeds a third threshold, all operation permissions of the database management are stopped, wherein the first threshold is less than the second threshold, and the second threshold is less than the third threshold.
[0037] Step S206: For sensitive data that cannot be operated by the permission, split the sensitive data into multiple parts, wherein each of the multiple parts is encrypted using a different key.
[0038] Step S208, combining the encrypted parts as desensitized data of the sensitive data, and sending the desensitized data and the non-sensitive data obtained by the command to the database administrator. The desensitized data is used to replace the sensitive data in the database, and the database after the replacement data is backed up as a backup database.
[0039] As an optional implementation, after the sensitive data is split into multiple parts (the multiple is N) and each part is encrypted, each part is numbered according to its position in the sensitive data, wherein the first part of the sensitive data is numbered 1, the second part of the sensitive data is numbered 2, and so on. The Nth part of the sensitive data is numbered N, all odd numbers are squared and then subtracted by 1, all even numbers are multiplied by 2 and then added to 1, and the multiple parts are rearranged from small to large according to the calculated numbers, and the rearranged data are combined into the desensitized data.
[0040] After step S208, the desensitized data is used to replace the sensitive data in the database, and the database after the replacement data is backed up as a backup database; a data access request is received from a database client, wherein the data access request is used to access the sensitive data in the database, the time of receiving the data access request is obtained, and the time is converted into a timestamp, and the last bit of the timestamp is obtained. When the last bit of the data is an odd number, the sensitive data is obtained from the database and sent to the database client after desensitization processing. When the last bit of the data is an even number, the desensitized data is directly obtained from the backup database and sent to the database client. In this way, it can be ensured that the desensitized data obtained by the database client each time is different, which can effectively prevent the desensitized data from being cracked.
[0041] The above steps solve the problem in the related art that sensitive data may be leaked without desensitizing sensitive data when the entire database is copied or backed up, thereby improving the security of sensitive data to a certain extent.
[0042] Optionally, splitting the sensitive data that cannot be operated by the authority into multiple parts includes: obtaining an account pre-configured in the monitoring process, wherein the account is an account of a predetermined administrator, the predetermined administrator has higher authority than the database administrator, and there are multiple accounts; obtaining the number of the accounts; and splitting the sensitive data into fractions equal to the number.
[0043] Optionally, encrypting each of the multiple parts using a different key includes: obtaining the same number of keys as the number from pre-configured keys, wherein each of the obtained keys is different; encrypting each part using one of the obtained keys, wherein the key used for each part is different.
[0044] Optionally, the method further includes: sending the acquired secret keys to the predetermined administrators respectively, wherein the secret keys sent to each administrator are different, and one secret key is sent to each administrator.
[0045] In this embodiment, an electronic device is provided, including a memory and a processor. The memory stores a computer program, and the processor is configured to run the computer program to execute the method in the above embodiment.
[0046] The above program can be run in the processor, or it can also be stored in the memory (or computer-readable medium), which includes permanent and non-permanent, removable and non-removable media. Information storage can be achieved by any method or technology. Information can be computer-readable instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0047] These computer programs can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps of the functions specified in one or more blocks can be implemented by different modules corresponding to different steps.
[0048] Such a device or system is provided in this embodiment. The system is called a data desensitization processing system, including: a receiving module, which is used to configure a monitoring process and receive commands from a database administrator through the monitoring process, wherein the commands include commands for copying the entire database; a determination module, which is used to determine whether the database administrator has the authority to operate sensitive data after determining that the data obtained from the database by the command includes sensitive data; a splitting module, which is used to split the sensitive data that cannot be operated by the authority into multiple parts, wherein each of the multiple parts is encrypted using a different secret key; a first sending module, which is used to combine the encrypted parts as desensitized data of the sensitive data, and send the desensitized data and the non-sensitive data obtained by the command to the database administrator.
[0049] The system or device is used to implement the functions of the method in the above-mentioned embodiment. Each module in the system or device corresponds to each step in the method, which has been explained in the method and will not be repeated here.
[0050] Optionally, the splitting module is used to: obtain an account pre-configured in the monitoring process, wherein the account is an account of a predetermined administrator, the authority of the predetermined administrator is higher than that of the database administrator, and there are multiple accounts; obtain the number of the accounts; and split the sensitive data into scores equal to the number.
[0051] Optionally, the splitting module is used to: obtain keys of the same quantity as the said number from pre-configured keys, wherein each of the obtained keys is different; encrypt each part using one of the obtained keys, wherein the keys used for each part are different.
[0052] Optionally, it also includes: a second sending module, used to send the acquired secret keys to the predetermined administrators respectively, wherein the secret keys sent to each administrator are different, and one secret key is sent to each administrator.
[0053] The above embodiments solve the problem in the related art that sensitive data may be leaked without desensitizing sensitive data when the entire database is copied or backed up, thereby improving the security of sensitive data to a certain extent.
[0054] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A data desensitization processing method, characterized in that: include: configuring a monitoring process, and receiving commands from a database administrator through the monitoring process, wherein the commands include commands for replicating the entire database; After determining that the data obtained from the database by the command includes sensitive data, determining whether the database administrator has the authority to operate the sensitive data according to the authority of the database administrator; For sensitive data that cannot be operated by the permission, the sensitive data is split into multiple parts, wherein each of the multiple parts is encrypted using a different secret key; The encrypted parts are combined as desensitized data of the sensitive data, and the desensitized data and the non-sensitive data obtained by the command are sent to the database administrator.
2. The method according to claim 1, characterized in that The sensitive data that cannot be operated by the above permissions is divided into multiple parts, including: Obtaining an account pre-configured in the monitoring process, wherein the account is an account of a predetermined administrator, the authority of the predetermined administrator is higher than that of the database administrator, and there are multiple accounts; Obtaining the number of the account; The sensitive data is split into fractions equal to the quantity.
3. The method according to claim 2, characterized in that Encrypting each of the multiple parts using a different key includes: Obtaining the same number of keys as the number from pre-configured keys, wherein each of the obtained keys is different; Each part is encrypted using one of the obtained secret keys, wherein the secret key used for each part is different.
4. The method according to claim 3, characterized in that Also includes: The obtained secret keys are sent to the predetermined administrators respectively, wherein the secret keys sent to each administrator are different, and one secret key is sent to each administrator.
5. A data desensitization processing system, characterized in that: include: A receiving module, used for configuring a monitoring process and receiving commands from a database administrator through the monitoring process, wherein the commands include commands for replicating the entire database; A determination module, configured to determine, after determining that the data acquired from the database by the command includes sensitive data, whether the database administrator has the authority to operate the sensitive data according to the authority of the database administrator; A splitting module, used for splitting the sensitive data that cannot be operated by the permission into multiple parts, wherein each of the multiple parts is encrypted using a different secret key; The first sending module is used to combine the encrypted parts as desensitized data of the sensitive data, and send the desensitized data and the non-sensitive data obtained by the command to the database administrator.
6. The system according to claim 5, characterized in that The splitting module is used for: Obtaining an account pre-configured in the monitoring process, wherein the account is an account of a predetermined administrator, the authority of the predetermined administrator is higher than that of the database administrator, and there are multiple accounts; Obtaining the number of the account; The sensitive data is split into fractions equal to the quantity.
7. The system according to claim 6, characterized in that The splitting module is used for: Obtaining the same number of keys as the number from pre-configured keys, wherein each of the obtained keys is different; Each part is encrypted using one of the obtained secret keys, wherein the secret key used for each part is different.
8. The system according to claim 7, characterized in that Also includes: The second sending module is used to send the acquired secret keys to the predetermined administrators respectively, wherein the secret keys sent to each administrator are different, and one secret key is sent to each administrator.
9. A server comprising a memory and a processor; wherein: The memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method steps described in any one of claims 1 to 4.
10. A readable storage medium having computer instructions stored thereon, wherein: When the computer instructions are executed by a processor, the method steps described in any one of claims 1 to 4 are implemented.
