Data desensitization method, device, computer equipment, readable storage medium and program product

By generating container instances in the container cloud platform and processing data based on target policies, the problem of inefficient traditional manual writing of SQL statements is solved, and efficient data desensitization and privacy protection are achieved.

CN119691799BActive Publication Date: 2025-08-19BEIJING PACTERA JINXIN TECH LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411755034.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-08-19
Estimated Expiration
2044-12-02

AI Technical Summary

Technical Problem

Traditional manual writing of SQL statements is less efficient in data desensitization and cannot efficiently handle large-scale data desensitization needs.

Method used

By determining container resources in the container cloud platform, generating container instances, and processing desensitization data based on the target desensitization strategy, batch desensitization of data is achieved.

Benefits of technology

It improves the efficiency of data desensitization, ensures the confidentiality and integrity of data, can quickly respond to desensitization needs, and achieves data privacy protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119691799B_ABST
    Figure CN119691799B_ABST
Patent Text Reader

Abstract

The present application relates to a data desensitization method, device, computer equipment, computer-readable storage medium and computer program product. The method comprises: determining the data structure information of the source database according to a preset desensitization task, determining the reading batch and target desensitization strategy of the data to be desensitized according to the data structure information, and reading the data to be desensitized in the source database based on the reading batch; determining the container resources corresponding to the preset desensitization task in the container cloud platform, generating a container instance according to the container resources; desensitizing the data to be desensitized of each reading batch in the container instance of the container cloud platform based on the target desensitization strategy, obtaining the desensitized target data, and writing the target data into the target database. The use of this method can improve the efficiency of data desensitization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data desensitization, and in particular to a data desensitization method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] With the development of information technology, the rapid development of network and data transmission technology has greatly promoted the dissemination and sharing of information. When synchronizing data from production systems to test environments, sensitive information needs to be desensitized.

[0003] In traditional technology, to desensitize sensitive information, operations personnel first identify and select the fields that need to be desensitized (for example, ID numbers, mobile phone numbers, usernames, etc.) in the database. They then write SQL (Structured Query Language) statements to modify the sensitive information fields, so that while retaining a certain degree of identifiability, the sensitive information is no longer directly exposed for subsequent queries and analysis, while ensuring the security of sensitive data.

[0004] However, in current traditional technologies, the efficiency of desensitizing by manually writing SQL statements is low due to the rapid increase in the amount of data that needs to be desensitized. Summary of the Invention

[0005] Based on this, it is necessary to provide a data desensitization method, device, computer equipment, computer-readable storage medium and computer program product to address the above technical problems.

[0006] In a first aspect, the present application provides a data desensitization method, comprising:

[0007] Determine data structure information of a source database according to a preset desensitization task, determine a reading batch and a target desensitization strategy for the data to be desensitized according to the data structure information, and read the data to be desensitized from the source database based on the reading batch;

[0008] Determine the container resources corresponding to the preset desensitization task in the container cloud platform, and generate a container instance based on the container resources;

[0009] Based on the target desensitization strategy, the data to be desensitized of each read batch is desensitized in the container instance of the container cloud platform to obtain the desensitized target data, and the target data is written into the target database.

[0010] In one embodiment, determining the container resources corresponding to the preset desensitization task in the container cloud platform and generating a container instance based on the container resources includes:

[0011] Based on the target desensitization strategy and the configuration information of the container cloud platform, determine the container resources corresponding to the preset desensitization task in the container cloud platform;

[0012] Multiple container instances corresponding to the preset desensitization tasks are generated based on the container resources.

[0013] In one embodiment, determining the container resources corresponding to the preset desensitization task in the container cloud platform based on the target desensitization strategy and configuration information of the container cloud platform includes:

[0014] Obtaining task information corresponding to the target desensitization strategy; the task information includes the number of containers corresponding to each target desensitization strategy;

[0015] Based on the configuration information of the container cloud platform and the number of containers corresponding to the target desensitization strategy, the container resources corresponding to the preset desensitization task in the container cloud platform are determined.

[0016] In one embodiment, the desensitizing the data to be desensitized of each read batch in the container instance of the container cloud platform based on the target desensitization strategy to obtain the desensitized target data includes:

[0017] Determine the data to be desensitized and the target desensitization strategy corresponding to the read batch for each container instance;

[0018] In each of the container instances, the data to be desensitized is desensitized based on the target desensitization strategy corresponding to each of the container instances to obtain desensitized target data corresponding to the data to be desensitized in each of the read batches.

[0019] In one embodiment, each of the read batches corresponds to a target field in the data structure information of the source database; the data structure information includes a data relationship between data tables to which each target field belongs;

[0020] In each of the container instances, desensitizing the data to be desensitized based on the target desensitization strategy corresponding to each of the container instances to obtain desensitized target data corresponding to the data to be desensitized in each of the read batches, including:

[0021] Determine the target desensitization policy corresponding to each container instance according to the target field corresponding to each container instance and the correspondence between the target field and the target desensitization policy;

[0022] Extracting the to-be-mass-desensitized data corresponding to the target field of each container instance into each container instance;

[0023] Based on the target desensitization policy corresponding to the container instance, desensitize the data to be desensitized in the target field corresponding to the container instance to obtain desensitized initial target data corresponding to the data to be desensitized in each target field;

[0024] According to the data relationship between the data tables to which the target fields in the data structure information belong, the initial target data corresponding to the target fields in the data tables are reorganized to obtain reorganized target data.

[0025] In one embodiment, the data structure information includes field information; determining the data structure information of the source database according to the preset desensitization task, and determining the reading batch of the data to be desensitized and the target desensitization strategy according to the data structure information include:

[0026] According to the source database included in the preset desensitization task, determine the reading batch corresponding to the source database in the desensitization system database;

[0027] Determine the target desensitization strategy corresponding to the data to be desensitized based on the field information.

[0028] In one embodiment, before determining the data structure information of the source database according to the preset desensitization task and determining the reading batch of the data to be desensitized and the target desensitization strategy according to the data structure information, the method further includes:

[0029] Obtain the configuration information of the container cloud platform and the database connection information of each source database;

[0030] According to a plurality of preset database connection modes and the database connection information, respectively establish a connection with each of the source databases and obtain data structure information of each of the source databases;

[0031] The configuration information and the corresponding relationship between each source database and the data structure information are stored.

[0032] In one embodiment, reading the data to be desensitized in the source database based on the read batch includes:

[0033] Determining a target database connection mode according to the database type of the source database, and establishing a connection with the source database based on the target database connection mode and database connection information;

[0034] For each read batch, generating a query statement corresponding to the read batch based on the target fields included in the read batch;

[0035] The data to be desensitized is read from the source database according to the query statements corresponding to each of the read batches.

[0036] In a second aspect, the present application further provides a data desensitization device, comprising:

[0037] A data reading module is used to determine the data structure information of the source database according to a preset desensitization task, determine the reading batch and target desensitization strategy of the data to be desensitized according to the data structure information, and read the data to be desensitized from the source database based on the reading batch;

[0038] A container instance generation module is used to determine the container resources corresponding to the preset desensitization task in the container cloud platform and generate a container instance based on the container resources;

[0039] A desensitizing module is used to desensitize the data to be desensitized in each read batch in the container instance of the container cloud platform based on the target desensitizing strategy, obtain the desensitized target data, and write the target data into the target database.

[0040] In one embodiment, the container instance generation module is specifically used to determine the container resources corresponding to the preset desensitization task in the container cloud platform based on the target desensitization strategy and the configuration information of the container cloud platform;

[0041] Multiple container instances corresponding to the preset desensitization tasks are generated based on the container resources.

[0042] In one embodiment, the container instance generation module is specifically used to obtain task information corresponding to the target desensitization strategy; the task information includes the number of containers corresponding to each target desensitization strategy;

[0043] Based on the configuration information of the container cloud platform and the number of containers corresponding to the target desensitization strategy, the container resources corresponding to the preset desensitization task in the container cloud platform are determined.

[0044] In one embodiment, the desensitization module is specifically used to determine the data to be desensitized and the target desensitization strategy corresponding to the read batch for each container instance;

[0045] In each of the container instances, the data to be desensitized is desensitized based on the target desensitization strategy corresponding to each of the container instances to obtain desensitized target data corresponding to the data to be desensitized in each of the read batches.

[0046] In one embodiment, the desensitizing module is specifically configured to perform desensitization processing on the data to be desensitized in each container instance based on the target desensitization strategy corresponding to each container instance, and obtain desensitized target data corresponding to the data to be desensitized in each read batch, including:

[0047] Determine the target desensitization policy corresponding to each container instance according to the target field corresponding to each container instance and the correspondence between the target field and the target desensitization policy;

[0048] Extracting the to-be-mass-desensitized data corresponding to the target field of each container instance into each container instance;

[0049] Based on the target desensitization policy corresponding to the container instance, desensitize the data to be desensitized in the target field corresponding to the container instance to obtain desensitized initial target data corresponding to the data to be desensitized in each target field;

[0050] According to the data relationship between the data tables to which the target fields in the data structure information belong, the initial target data corresponding to the target fields in the data tables are reorganized to obtain reorganized target data.

[0051] In one embodiment, the data structure information includes field information; the data reading module is specifically used to determine the reading batch corresponding to the source database in the desensitization system database according to the source database included in the preset desensitization task;

[0052] Determine the target desensitization strategy corresponding to the data to be desensitized based on the field information.

[0053] In one embodiment, the apparatus further comprises:

[0054] The acquisition module is used to obtain the configuration information of the container cloud platform and the database connection information of each source database;

[0055] A connection module, configured to establish a connection with each of the source databases and obtain data structure information of each of the source databases according to a plurality of preset database connection modes and the database connection information;

[0056] The storage module is used to store the configuration information and the corresponding relationship between each source database and the data structure information.

[0057] In one embodiment, the data reading module is specifically configured to determine a target database connection mode according to a database type of the source database, and establish a connection with the source database based on the target database connection mode and database connection information;

[0058] For each read batch, generating a query statement corresponding to the read batch based on the target fields included in the read batch;

[0059] The data to be desensitized is read from the source database according to the query statements corresponding to each of the read batches.

[0060] In a third aspect, the present application further provides a data desensitization system, comprising:

[0061] The server is used to determine the data structure information of the source database according to the preset desensitization task, determine the reading batch and target desensitization strategy of the data to be desensitized according to the data structure information, and read the data to be desensitized from the source database based on the reading batch; determine the container resources corresponding to the preset desensitization task in the container cloud platform, and generate a container instance according to the container resources; perform desensitization processing on the data to be desensitized of each reading batch in the container instance of the container cloud platform based on the target desensitization strategy to obtain the desensitized target data, and write the target data into the target database;

[0062] A source database, used to read the data to be desensitized;

[0063] The target database is used to write the target data.

[0064] In a fourth aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0065] Determine data structure information of a source database according to a preset desensitization task, determine a reading batch and a target desensitization strategy for the data to be desensitized according to the data structure information, and read the data to be desensitized from the source database based on the reading batch;

[0066] Determine the container resources corresponding to the preset desensitization task in the container cloud platform, and generate a container instance based on the container resources;

[0067] Based on the target desensitization strategy, the data to be desensitized of each read batch is desensitized in the container instance of the container cloud platform to obtain the desensitized target data, and the target data is written into the target database.

[0068] In a fifth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0069] Determine data structure information of a source database according to a preset desensitization task, determine a reading batch and a target desensitization strategy for the data to be desensitized according to the data structure information, and read the data to be desensitized from the source database based on the reading batch;

[0070] Determine the container resources corresponding to the preset desensitization task in the container cloud platform, and generate a container instance based on the container resources;

[0071] Based on the target desensitization strategy, the data to be desensitized of each read batch is desensitized in the container instance of the container cloud platform to obtain the desensitized target data, and the target data is written into the target database.

[0072] In a sixth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the following steps:

[0073] Determine data structure information of a source database according to a preset desensitization task, determine a reading batch and a target desensitization strategy for the data to be desensitized according to the data structure information, and read the data to be desensitized from the source database based on the reading batch;

[0074] Determine the container resources corresponding to the preset desensitization task in the container cloud platform, and generate a container instance based on the container resources;

[0075] Based on the target desensitization strategy, the data to be desensitized of each read batch is desensitized in the container instance of the container cloud platform to obtain the desensitized target data, and the target data is written into the target database.

[0076] The above-mentioned data desensitization method, device, computer equipment, computer-readable storage medium and computer program product determine the data structure information of the source database according to the preset desensitization task, determine the reading batch and target desensitization strategy of the data to be desensitized according to the data structure information, and read the data to be desensitized in the source database based on the reading batch; determine the container resources corresponding to the preset desensitization task in the container cloud platform, and generate a container instance according to the container resources; desensitize the data to be desensitized of each reading batch in the container instance of the container cloud platform based on the target desensitization strategy, obtain the desensitized target data, and write the target data into the target database. Using this method, through the combination of the preset desensitization task and the container cloud platform, it is possible to accurately determine the source database and the target database, flexibly schedule the desensitization operation, and efficiently perform batch desensitization on large-scale data, thereby achieving dual protection of data confidentiality and integrity. At the same time, the container cloud platform can efficiently generate and manage multiple container instances based on the desensitization strategy and configuration information to ensure the fast and accurate execution of the desensitization task. By desensitizing the desensitized data based on the target desensitization strategy in each container instance and reorganizing the desensitized data according to the relationship between the target field and the data table, the desensitization task can be completed efficiently and accurately. With the elastic resource management and isolation characteristics of the container cloud platform, while ensuring data privacy protection, it can quickly respond to desensitization needs and improve the efficiency of data desensitization processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.

[0078] Figure 1 Schematic diagram of a data desensitization method in one embodiment;

[0079] Figure 2 This is an architectural diagram of a data desensitization system in one embodiment;

[0080] Figure 3 A schematic diagram of a process for generating a container instance in one embodiment;

[0081] Figure 4 This is a schematic diagram of a process for performing data desensitization based on a container instance in one embodiment;

[0082] Figure 5 A schematic diagram of a process for determining a target desensitization strategy for a source database in one embodiment;

[0083] Figure 6 A schematic diagram of a process for obtaining and storing configuration information and data structure information in one embodiment;

[0084] Figure 7 A schematic diagram of a process for reading data to be desensitized in one embodiment;

[0085] Figure 8 A flowchart illustrating an example of a data desensitization method in one embodiment;

[0086] Figure 9 is a structural block diagram of a data desensitization device in one embodiment;

[0087] Figure 10 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0088] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0089] In one embodiment, Figure 1As shown, a data desensitization method is provided. This embodiment uses the method applied to a server as an example. The server includes a container cloud platform that can perform resource configuration. It can be understood that the method can also be applied to the container cloud. In this embodiment, the method includes the following steps:

[0090] Step 102: determine the data structure information of the source database according to the preset desensitization task, determine the reading batch and target desensitization strategy of the data to be desensitized according to the data structure information, and read the data to be desensitized in the source database based on the reading batch.

[0091] In an embodiment of the present application, the preset desensitization task can be a pre-set passive trigger process. For example, in response to the data reading operation of the target system, the server first starts the preset desensitization task to desensitize the read data of the target system to prevent the leakage of sensitive data.

[0092] During the development of an enterprise's internal system, data needs to be synchronized from the production system to the test environment. At this time, the data used for testing needs to be read from the target system in the production environment. The preset masking task can be pre-set based on the data structure information contained in the database of the target system, and can include masking rules and masking fields that are personalized for the database of the target system, such as Figure 2 As shown, the desensitization management service has a corresponding desensitization system database, and the preset desensitization tasks corresponding to each target system are stored in the desensitization system database, for example, the data source information (source database) that needs to be desensitized, the desensitized table and desensitized field information and the desensitization rules for each field, and also includes the configuration information of each preset desensitization task, for example, the way the desensitization task runs (including running in a container and running outside a container), writing to a new library or writing to the source database, etc. In a specific embodiment, for the target system A, a desensitization task A1 for the target system A can be pre-set in the server, and the desensitization fields in the desensitization task A1 include "a", "b", and "c", and the desensitization rules a1, b1, and c1 corresponding to the desensitization fields "a", "b", and "c" respectively.

[0093] The server responds to the data reading operation of the target system, starts the preset desensitization task, and identifies the data that needs to be desensitized according to the preset desensitization task. Specifically, the server can determine the target system for reading data in the preset desensitization task, and the desensitization system database contains the connection information of the database of each target system. Therefore, the server determines the database corresponding to the target system as the source database, and determines the reading batch and target desensitization strategy for the target system based on the source database. Furthermore, the server determines the target data content to be read corresponding to each reading batch based on the reading batch of the target system, and reads in the source database according to the target data content of each reading batch, and finally obtains the data to be desensitized corresponding to the current preset desensitization task. Optionally, if the server receives data reading requests for multiple target systems at the same time, it determines all the source databases that need to read data according to the target system corresponding to each reading request, and determines the target desensitization strategy and reading batch corresponding to each source database, and then performs batch data reading on each source database based on the reading batch corresponding to each source database, and finally obtains the data to be desensitized corresponding to each source database.

[0094] Step 104: Determine the container resources corresponding to the preset desensitization task in the container cloud platform, and generate a container instance based on the container resources.

[0095] In an embodiment of the present application, when the server is scheduling the container cloud platform to generate a container instance, the server can determine the container resources of the source database for the current target system in the desensitization system database according to the preset desensitization task, and initialize the container in the container cloud platform according to the pre-configured container resources for the target system, that is, generate a container instance. Optionally, the server can also dynamically select the container resources corresponding to the preset desensitization task in the container cloud platform according to the target desensitization strategy for the source database of the current target system.

[0096] Step 106: Desensitize the data to be desensitized in each read batch in the container instance of the container cloud platform based on the target desensitization strategy to obtain the desensitized target data, and write the target data into the target database.

[0097] In the embodiment of the present application, the container instance runs independently in the newly created environment, ensuring the security and isolation of the desensitized data. In the container instance, each target desensitization rule is applied to each batch of data to be desensitized, desensitizing the sensitive content of the desensitized data to generate the desensitized target data. The server then writes the desensitized target data into the target database of the pre-set desensitization task, ensuring that the data in the test environment can be used for functional testing and analysis while not containing any real sensitive information.

[0098] The aforementioned data desensitization method, through the combination of pre-set desensitization tasks and the container cloud platform, can accurately determine the source and target databases, flexibly schedule desensitization operations, and efficiently perform desensitization processing on large amounts of data in batches, thereby ensuring both data confidentiality and integrity. Furthermore, the container cloud platform's flexible resource management and isolation features enable rapid response to desensitization requests, improving data desensitization efficiency.

[0099] In an exemplary embodiment, Figure 3 As shown, step 104 includes steps 302 to 304. Among them:

[0100] Step 302: Based on the target desensitization strategy and the configuration information of the container cloud platform, determine the container resources corresponding to the preset desensitization task in the container cloud platform.

[0101] In an embodiment of the present application, the server's desensitization system database pre-stores resource demand information of a preset target desensitization strategy, as well as configuration information of the container cloud platform. For example, the container cloud platform includes platforms such as Kubernetes, and different container cloud platforms have different platform environments, cluster construction, network configuration, and storage configuration methods. The server can determine the resource demand information required for the current preset desensitization task based on each target desensitization strategy to be processed, access the container cloud platform according to the configuration information of the container cloud platform, and obtain the current available container resource information and scheduling strategy from the configuration management system of the container cloud platform. The server matches the resource demand information with the available container resource information, determines the container resources corresponding to the preset desensitization task based on the matching results, and reserves resources on the container cloud platform according to the container resources, and allocates the reserved container resources to the target computing node or cluster according to the scheduling strategy.

[0102] Step 304: Generate multiple container instances corresponding to the preset desensitization tasks based on the container resources.

[0103] In an embodiment of the present application, the server initiates a container instance initialization request in the container cloud platform. The container instance initialization request includes container resources and specifies the required number of container instances based on the container resources to ensure that desensitization tasks of multiple read batches can be processed simultaneously.

[0104] The container cloud platform in the server determines the target image for desensitization processing based on the container instance initialization request, ensures that the container instance contains the configuration for executing the target desensitization policy, allocates resources to each container instance, and configures the instance configuration corresponding to the container instance, including environment variables, network settings, storage mounts, etc., thereby realizing the generation and startup of the container instance.

[0105] In an optional embodiment, after the container instance is started, the server records the unique identifier of each container instance (eg, container ID, instance number, etc.) for subsequent monitoring and management.

[0106] In this embodiment, by configuring and managing the running resources in the container cloud platform, in the scenario of large-scale data, it is possible to efficiently allocate and utilize computing, storage and other performance resources, and generate multiple desensitizing task container instances, which significantly improves the desensitizing processing efficiency of large-scale data, ensuring stable performance and fast response time under high load conditions, thereby improving the efficiency of data desensitization in large-scale data desensitization scenarios.

[0107] In an exemplary embodiment, step 302 includes:

[0108] Step 3021: Obtain task information corresponding to the target desensitization strategy.

[0109] The task information includes the number of containers corresponding to each target desensitization strategy.

[0110] Step 3022: Based on the configuration information of the container cloud platform and the number of containers corresponding to the target desensitization policy, determine the container resources corresponding to the preset desensitization task in the container cloud platform.

[0111] In an exemplary embodiment, Figure 4 As shown, step 106 includes steps 402 to 404. Among them:

[0112] Step 402: Determine the data to be desensitized and the target desensitization strategy for each container instance corresponding to the read batch.

[0113] In an embodiment of the present application, the server determines the read batches that each container instance should process based on the number of read batches and the number of container instances of the preset desensitization task, wherein the preset desensitization task includes the number of containers that need to be run, and the server can determine the number of containers corresponding to each target desensitization strategy based on the number of containers, and then determine the read batches and target desensitization strategies corresponding to each container instance. Specifically, the preset desensitization task includes multiple target desensitization strategies, and the server can allocate different numbers of containers to process each target desensitization strategy based on the complexity or data volume of each target desensitization strategy, and associate each target desensitization strategy with a corresponding number of container instances to ensure that each container instance can apply the correct target desensitization strategy when processing the data to be desensitized.

[0114] In a specific embodiment, a pre-set desensitization task is to desensitize data from source database A. Based on the data to be read and the fields requiring desensitization stored in the desensitization system database corresponding to source database A, this pre-set desensitization task is determined to have three read batches (Batch 1: "Name," Batch 2: "ID Number," and Batch 3: "Phone Number"), three target desensitization strategies (Strategy A1: Desensitizes "Name" with random replacement, Strategy A2: Desensitizes the last four digits of "ID Number," and Strategy A3: Desensitizes the last four digits of "Phone Number"), and four containers are required to run. Based on the complexity of the strategies, the server allocates two containers to Strategy A1, one container to Strategy A2, and one container to Strategy A3. The server then allocates container instances 1 and 2 to the data corresponding to the "Name" field in batch 1, while containers 3 and 4 process the data corresponding to the "ID Number" and "Phone Number" fields in batch 2, respectively. The target desensitization strategies for container instances 1 and 2 are Strategy A1, while those for containers 3 and 4 are Strategy A2 and Strategy A3, respectively.

[0115] Step 404 : In each container instance, the data to be desensitized is desensitized based on the target desensitization strategy corresponding to each container instance, and desensitized target data corresponding to the data to be desensitized of each read batch is obtained.

[0116] In an embodiment of the present application, the container instance of each read batch is used to execute the target desensitization strategy corresponding to the read batch for the data to be desensitized of the read batch. The server reads each target desensitization strategy in the desensitization system database. For example, the desensitization system database is pre-set with corresponding desensitization rules for fields such as mobile phone number, ID card, business license, name, company name, address, and email address. Multiple desensitization rules constitute a target desensitization rule. The server desensitizes the data to be desensitized according to each desensitization rule contained in the pre-set target desensitization strategy, and obtains the desensitized target data corresponding to the data to be desensitized of each read batch.

[0117] In this embodiment, by assigning a specific reading batch and desensitization strategy to each container instance, and performing batch data desensitization processing on the data to be desensitized in parallel in each container instance, the desensitization system can efficiently and accurately complete the desensitization task of large quantities of data, thereby improving the efficiency of data desensitization.

[0118] In an exemplary embodiment, each read batch corresponds to a target field in the data structure information of the source database; the data structure information includes the data relationship of the data table to which each target field belongs; step 404 includes:

[0119] Step 4041: Determine the target desensitization policy corresponding to each container instance based on the target field corresponding to each container instance and the correspondence between the target field and the target desensitization policy.

[0120] Step 4042: extract the data to be desensitized corresponding to the target field of each container instance to each container instance.

[0121] Step 4043 : Based on the target desensitization policy corresponding to the container instance, desensitize the data to be desensitized in the target field corresponding to the container instance to obtain desensitized initial target data corresponding to the data to be desensitized in each target field.

[0122] Step 4044 , based on the data relationship between the data tables to which the target fields in the data structure information belong, the initial target data corresponding to the target fields in the data tables are reorganized to obtain reorganized target data.

[0123] In an exemplary embodiment, Figure 5 As shown, the data structure information includes field information, and step 102 includes steps 502 to 504. Among them:

[0124] Step 502: According to the source database included in the preset desensitization task, determine the reading batch corresponding to the source database in the desensitization system database.

[0125] Among them, the preset desensitization task includes the identification information of the source database, and the desensitization system database is pre-set with the identification information of each source database, the data structure information of each source database, the target desensitization strategy and batch information corresponding to each source database.

[0126] In an embodiment of the present application, the server first obtains the identification information of the source database (for example, database name, IP address, port, etc.) from the preset desensitizing task, and queries the desensitizing system database for information on all read batches corresponding to the source database, including the batch identification and reading range (including table name, field name, data range, etc.).

[0127] Step 504: Determine the target desensitization strategy corresponding to the data to be desensitized based on the field information.

[0128] In an embodiment of the present application, the server queries the data structure information of the source database in the desensitization system database, and then determines the field information of all fields contained in the source database, wherein each field information corresponds to a pre-set desensitization strategy, and then, the server determines the target desensitization strategy corresponding to the source database based on the correspondence between the field information in the source database and the desensitization strategy. For example, the desensitization strategy is pre-set with desensitization strategies for mobile phone numbers, ID cards, business licenses, names, company names, addresses, and email addresses. For example, the desensitization strategy for mobile phone numbers can be to retain the first 3 digits and the last 4 digits, and replace the middle part with "*"; the desensitization strategy for ID card numbers can be to retain the first 6 digits and the last 4 digits, and replace the middle part with "*"; the desensitization strategy for names can be to retain the surname, and replace the first name part with "*", or, to reorganize with random names.

[0129] During the target desensitization strategy construction process, users can access the desensitization system on the server through a terminal or directly on the server. In the visual interface provided by the desensitization system, users can configure desensitization strategies and read batches for different source databases, implementing desensitization strategies corresponding to each field in different source databases and setting the field information that needs to be desensitized in each source database. The desensitization system saves the desensitization strategies and field information set by the user so that when a source database receives a data read request, it first desensitizes the data to be desensitized in that source database according to the target desensitization strategy corresponding to the source database.

[0130] In this embodiment, targeted reading batches and target desensitization strategies are pre-set for different source databases. According to the source database specified in the preset desensitization task, the required reading batches and target desensitization strategies can be accurately determined in the desensitization system database, providing precise guidance for subsequent desensitization processing, thereby ensuring the accuracy of the data desensitization process.

[0131] In an exemplary embodiment, Figure 6 As shown, before step 102, the method further includes steps 602 to 606. Among them:

[0132] Step 602: Obtain configuration information of the container cloud platform and database connection information of each source database.

[0133] In an embodiment of the present application, the user pre-stores the configuration information of the container cloud platform and the database connection information of each source database in the desensitizing system in the server, so that the server can establish a connection with the source database and the container cloud platform. Before performing data desensitization, the server must first start the container cloud platform and connect to the corresponding source database. The server then extracts the connection information of each source database and the configuration information of the container cloud platform from the desensitizing system database. The database connection information includes the database URL, port number, user name, password, database type (such as MySQL, Oracle, etc.) and SSL configuration, etc. The configuration information of the container cloud platform includes the API server address, authentication information (user name and password, API key), etc.

[0134] Step 604 : Establish connections with each source database and obtain data structure information of each source database according to a plurality of preset database connection methods and database connection information.

[0135] In an embodiment of the present application, the desensitizing system in the server is pre-configured with multiple preset database connection methods, which can be Meta information of JDBC (Java Database Connection), including Mysql, PotsgreSQL, Oracle, SQL Server, IBM DB2, SQLLite, MariaDB, H2, Sybase, Derby, and also includes NoSQL databases of JDBC-compatible programs such as Cassandra, MongoDB, and HBase. The server can establish a connection with each source database according to the database connection method that matches the type of the source database, and after successfully establishing the connection, the server obtains the data structure information of each source database by executing a database metadata query, such as an SQL query, a metadata API (Application Programming Interface) call, etc. The data structure information includes table structure, field definition, index information, data type, etc.

[0136] Step 606: Store the configuration information and the corresponding relationship between each source database and the data structure information.

[0137] In an embodiment of the present application, the server integrates the acquired container cloud platform configuration information, the database connection information of each source database, and the data structure information of each source database, and associates the above information with the representation of each source database, and stores it in a desensitizing system database.

[0138] In an exemplary embodiment, in the data desensitization system, the server first obtains the configuration information of the container cloud platform and the connection information of each source database, including the API server address, authentication information, and the database URL, port number, user name, password, etc. Then, the server establishes a connection with the source database (such as MySQL, Oracle), etc. according to the preset JDBC and other database connection methods, and obtains information such as table structure and field definition through database metadata query. Finally, the server associates the configuration information, connection information and data structure information with the identifier of the source database, and stores them uniformly in the desensitization system database for subsequent data desensitization operations. For example, when the server needs to desensitize a MySQL source database, it can quickly locate and connect to the source database based on the stored configuration and connection information, and obtain its corresponding read batch and target desensitization strategy.

[0139] In this embodiment, by storing the configuration information and the correspondence between each source database and data structure information in the desensitizing system server, the stored correspondence enables the desensitizing system to quickly retrieve and reference the configuration information and data structure information in subsequent desensitizing tasks, reducing the workload of repeated acquisition and parsing and improving system efficiency.

[0140] In an exemplary embodiment, Figure 7 As shown, step 102 includes steps 702 to 706. Among them:

[0141] Step 702: Determine the target database connection mode according to the database type of the source database, and establish a connection with the source database based on the target database connection mode and database connection information.

[0142] In an embodiment of the present application, the server first determines the database type of the source database, for example, determines whether the source database is MySQL or SQL Server, selects the corresponding database connection method according to the database type of the source database, and establishes a connection with the source database in the container instance based on the database connection information of the source database.

[0143] Step 704 : For each read batch, generate a query statement corresponding to the read batch based on the target fields included in the read batch.

[0144] In the embodiment of the present application, in a container instance, the server obtains read batches and field information from the source database. Since data is read from the source database based on field information, a query statement corresponding to each read batch is generated based on the field information corresponding to each read batch. Each read batch can correspond to one field or multiple fields. The query statement typically includes a SELECT statement, which is used to select data from specific tables and fields in the source database.

[0145] Step 706: Read the data to be desensitized from the source database according to the query statements corresponding to each reading batch.

[0146] In an embodiment of the present application, in a container instance, the server executes the query statement for each read batch, and sequentially reads the data to be desensitized from the source database. When executing the query, the desensitization system obtains the data to be desensitized through a database interface (e.g., JDBCResultSet, database client API, etc.). Optionally, the server can read the data to be desensitized in the query results one by one or in batches according to a preset batch size and a preset data partitioning strategy. If a database connection problem or query exception is encountered during the reading process, the server records the error information and performs recovery operations including reconnecting, retrying the query, etc.

[0147] In this embodiment, a suitable database connection method is selected according to the type of source database, and a connection is established to obtain the data to be desensitized. An accurate query statement is generated for each reading batch, which improves the efficiency and accuracy of data reading, serves as the basis for subsequent data desensitization processing, and ensures the accuracy of the overall data desensitization.

[0148] In a specific embodiment, an example of a data desensitization method is provided, such as Figure 8 As shown, including:

[0149] Step 801: Manage service data source configuration and container cloud platform configuration;

[0150] Step 802: Management service configuration desensitization task information;

[0151] Step 803: The desensitization management service schedules the container cloud platform to start the desensitization conversion service;

[0152] Step 804: The desensitization conversion service reads the configuration and runs the desensitization task.

[0153] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0154] Based on the same inventive concept, the embodiments of the present application also provide a data desensitization device for implementing the data desensitization method involved above. The implementation solution provided by the device is similar to the implementation solution described in the above method, so the specific limitations in the one or more data desensitization device embodiments provided below can be found in the above limitations on the data desensitization method, and will not be repeated here.

[0155] In an exemplary embodiment, Figure 9 As shown, a data desensitization device 900 is provided, including: a data reading module 901, a container instance generation module 902 and a desensitization module 903, wherein:

[0156] The data reading module 901 is used to determine the data structure information of the source database according to the preset desensitization task, determine the reading batch and target desensitization strategy of the data to be desensitized based on the data structure information, and read the data to be desensitized from the source database based on the reading batch;

[0157] The container instance generation module 902 is used to determine the container resources corresponding to the preset desensitization task in the container cloud platform and generate a container instance based on the container resources;

[0158] The desensitizing module 903 is used to perform desensitizing processing on the data to be desensitized in each read batch in the container instance of the container cloud platform based on the target desensitizing strategy, obtain the desensitized target data, and write the target data into the target database.

[0159] In one embodiment, the container instance generation module 902 is specifically configured to determine the container resources corresponding to the preset desensitization tasks in the container cloud platform based on the target desensitization policy and the configuration information of the container cloud platform;

[0160] Generate multiple container instances corresponding to preset desensitization tasks based on container resources.

[0161] In one embodiment, the container instance generation module 902 is specifically used to obtain task information corresponding to the target desensitization strategy; the task information includes the number of containers corresponding to each target desensitization strategy;

[0162] Based on the configuration information of the container cloud platform and the number of containers corresponding to the target desensitization strategy, determine the container resources corresponding to the preset desensitization tasks in the container cloud platform.

[0163] In one embodiment, the desensitization module 903 is specifically used to determine the data to be desensitized and the target desensitization strategy for each container instance corresponding to the read batch;

[0164] In each container instance, the data to be desensitized is desensitized based on the target desensitization strategy corresponding to each container instance, and the desensitized target data corresponding to the data to be desensitized in each read batch is obtained.

[0165] In one embodiment, the desensitization module 903 is specifically configured to perform desensitization processing on the data to be desensitized based on the target desensitization strategy corresponding to each container instance in each container instance, and obtain desensitized target data corresponding to the data to be desensitized in each read batch, including:

[0166] Determine the target desensitization policy corresponding to each container instance based on the target field corresponding to each container instance and the correspondence between the target field and the target desensitization policy;

[0167] Extract the data to be desensitized corresponding to the target field of each container instance to each container instance;

[0168] Based on the target desensitization policy corresponding to the container instance, desensitize the target field corresponding to the container instance to obtain the desensitized initial target data corresponding to the target field;

[0169] According to the data relationship of the data tables to which the target fields in the data structure information belong, the initial target data corresponding to the target fields in the data tables are reorganized to obtain reorganized target data.

[0170] In one embodiment, the data structure information includes field information; the data reading module 901 is specifically used to determine the reading batch corresponding to the source database in the desensitization system database according to the source database included in the preset desensitization task;

[0171] Determine the target desensitization strategy corresponding to the data to be desensitized based on the field information.

[0172] In one embodiment, the apparatus 900 further includes:

[0173] The acquisition module is used to obtain the configuration information of the container cloud platform and the database connection information of each source database;

[0174] A connection module is used to establish a connection with each source database and obtain data structure information of each source database according to multiple preset database connection methods and database connection information;

[0175] The storage module is used to store the configuration information and the corresponding relationship between each source database and data structure information.

[0176] In one embodiment, the data reading module 901 is specifically configured to determine a target database connection mode according to a database type of a source database, and establish a connection with the source database based on the target database connection mode and database connection information;

[0177] For each read batch, generate a query statement corresponding to the read batch based on the target fields contained in the read batch;

[0178] Read the data to be anonymized from the source database based on the query statements corresponding to each read batch.

[0179] Each module in the above-mentioned data desensitization device can be implemented in whole or in part through software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.

[0180] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 10 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store data structure information, desensitization strategies and reading batches. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data desensitization method is implemented.

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

[0182] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0183] Determine the data structure information of the source database according to the preset desensitization task, determine the reading batch and target desensitization strategy of the data to be desensitized based on the data structure information, and read the data to be desensitized from the source database based on the reading batch;

[0184] Determine the container resources corresponding to the preset desensitization tasks in the container cloud platform and generate container instances based on the container resources;

[0185] Based on the target desensitization strategy, the data to be desensitized in each read batch is desensitized in the container instance of the container cloud platform to obtain the desensitized target data, and the target data is written into the target database.

[0186] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0187] Based on the target desensitization strategy and the configuration information of the container cloud platform, determine the container resources corresponding to the preset desensitization tasks in the container cloud platform;

[0188] Generate multiple container instances corresponding to preset desensitization tasks based on container resources.

[0189] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0190] Obtain the task information corresponding to the target desensitization strategy; the task information includes the number of containers corresponding to each target desensitization strategy;

[0191] Based on the configuration information of the container cloud platform and the number of containers corresponding to the target desensitization strategy, determine the container resources corresponding to the preset desensitization tasks in the container cloud platform.

[0192] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0193] Determine the data to be desensitized and the target desensitization strategy for each container instance corresponding to the read batch;

[0194] In each container instance, the data to be desensitized is desensitized based on the target desensitization strategy corresponding to each container instance, and the desensitized target data corresponding to the data to be desensitized in each read batch is obtained.

[0195] In one embodiment, each read batch corresponds to a target field in the data structure information of the source database; the data structure information includes a data relationship between data tables to which each target field belongs; and when the processor executes the computer program, the processor further implements the following steps:

[0196] Determine the target desensitization policy corresponding to each container instance based on the target field corresponding to each container instance and the correspondence between the target field and the target desensitization policy;

[0197] Extract the data to be desensitized corresponding to the target field of each container instance to each container instance;

[0198] Based on the target desensitization policy corresponding to the container instance, desensitize the target field corresponding to the container instance to obtain the desensitized initial target data corresponding to the target field;

[0199] According to the data relationship of the data tables to which the target fields in the data structure information belong, the initial target data corresponding to the target fields in the data tables are reorganized to obtain reorganized target data.

[0200] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0201] According to the source database included in the preset desensitization task, determine the reading batch corresponding to the source database in the desensitization system database;

[0202] Determine the target desensitization strategy corresponding to the data to be desensitized based on the field information.

[0203] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0204] Obtain the configuration information of the container cloud platform and the database connection information of each source database;

[0205] According to multiple preset database connection methods and database connection information, establish connections with each source database and obtain data structure information of each source database;

[0206] The configuration information and the corresponding relationship between each source database and data structure information are stored.

[0207] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0208] Determine the target database connection method based on the source database type, and establish a connection with the source database based on the target database connection method and database connection information;

[0209] For each read batch, generate a query statement corresponding to the read batch based on the target fields contained in the read batch;

[0210] Read the data to be anonymized from the source database based on the query statements corresponding to each read batch.

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

[0212] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0213] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0214] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.

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

[0216] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A data desensitization method, characterized in that: The method comprises: Determine data structure information of a source database according to a preset desensitization task, determine a reading batch and a target desensitization strategy for the data to be desensitized according to the data structure information, and read the data to be desensitized from the source database based on the reading batch; Determine the container resources corresponding to the preset desensitization task in the container cloud platform, and generate a container instance based on the container resources; Performing desensitization processing on the data to be desensitized of each read batch in the container instance of the container cloud platform based on the target desensitization strategy to obtain desensitized target data, and writing the target data into a target database; The desensitizing the data to be desensitized of each read batch in the container instance of the container cloud platform based on the target desensitization strategy to obtain the desensitized target data includes: Determine the data to be desensitized and the target desensitization strategy corresponding to the read batch for each container instance; In each of the container instances, desensitizing the data to be desensitized based on the target desensitization strategy corresponding to each of the container instances, to obtain desensitized target data corresponding to the data to be desensitized in each of the read batches; Each of the read batches corresponds to a target field in the data structure information of the source database; the data structure information includes the data relationship of the data table to which each target field belongs; In each of the container instances, desensitizing the data to be desensitized based on the target desensitization strategy corresponding to each of the container instances to obtain desensitized target data corresponding to the data to be desensitized in each of the read batches, including: Determine the target desensitization policy corresponding to each container instance according to the target field corresponding to each container instance and the correspondence between the target field and the target desensitization policy; Extracting the to-be-mass-desensitized data corresponding to the target field of each container instance into each container instance; Based on the target desensitization policy corresponding to the container instance, desensitize the data to be desensitized in the target field corresponding to the container instance to obtain desensitized initial target data corresponding to the data to be desensitized in each target field; According to the data relationship between the data tables to which the target fields in the data structure information belong, the initial target data corresponding to the target fields in the data tables are reorganized to obtain reorganized target data.

2. The method according to claim 1, characterized in that The determining, in the container cloud platform, the container resources corresponding to the preset desensitization task, and generating a container instance according to the container resources includes: Based on the target desensitization strategy and the configuration information of the container cloud platform, determine the container resources corresponding to the preset desensitization task in the container cloud platform; Multiple container instances corresponding to the preset desensitization tasks are generated based on the container resources.

3. The method according to claim 2, characterized in that The determining, based on the target desensitization strategy and the configuration information of the container cloud platform, the container resources corresponding to the preset desensitization task in the container cloud platform includes: Obtaining task information corresponding to the target desensitization strategy; the task information includes the number of containers corresponding to each target desensitization strategy; Based on the configuration information of the container cloud platform and the number of containers corresponding to the target desensitization strategy, the container resources corresponding to the preset desensitization task in the container cloud platform are determined.

4. The method according to claim 1, wherein The data structure information includes field information; The step of determining the data structure information of the source database according to the preset desensitization task, and determining the reading batch and target desensitization strategy of the data to be desensitized according to the data structure information, includes: According to the source database included in the preset desensitization task, determine the reading batch corresponding to the source database in the desensitization system database; Determine the target desensitization strategy corresponding to the data to be desensitized based on the field information.

5. The method according to claim 1, characterized in that Before determining the data structure information of the source database according to the preset desensitization task and determining the reading batch of the to-be-desensitized data and the target desensitization strategy according to the data structure information, the method further includes: Obtain the configuration information of the container cloud platform and the database connection information of each source database; According to a plurality of preset database connection modes and the database connection information, respectively establish a connection with each of the source databases and obtain data structure information of each of the source databases; The configuration information and the corresponding relationship between each source database and the data structure information are stored.

6. The method according to claim 1, characterized in that The reading the to-be-mass-desensitized data in the source database based on the read batch includes: Determining a target database connection mode according to the database type of the source database, and establishing a connection with the source database based on the target database connection mode and database connection information; For each read batch, generating a query statement corresponding to the read batch based on the target fields included in the read batch; The data to be desensitized is read from the source database according to the query statements corresponding to each of the read batches.

7. A data desensitization system, characterized in that: The system comprises: The server is used to determine the data structure information of the source database according to the preset desensitization task, determine the reading batch and target desensitization strategy of the data to be desensitized according to the data structure information, and read the data to be desensitized from the source database based on the reading batch; determine the container resources corresponding to the preset desensitization task in the container cloud platform, and generate a container instance according to the container resources; perform desensitization processing on the data to be desensitized of each reading batch in the container instance of the container cloud platform based on the target desensitization strategy to obtain the desensitized target data, and write the target data into the target database; A source database, used to read the data to be desensitized; a target database, used for writing the target data; The desensitizing the data to be desensitized of each read batch in the container instance of the container cloud platform based on the target desensitization strategy to obtain the desensitized target data includes: Determine the data to be desensitized and the target desensitization strategy corresponding to the read batch for each container instance; In each of the container instances, desensitizing the data to be desensitized based on the target desensitization strategy corresponding to each of the container instances, to obtain desensitized target data corresponding to the data to be desensitized in each of the read batches; Each of the read batches corresponds to a target field in the data structure information of the source database; the data structure information includes the data relationship of the data table to which each target field belongs; In each of the container instances, desensitizing the data to be desensitized based on the target desensitization strategy corresponding to each of the container instances to obtain desensitized target data corresponding to the data to be desensitized in each of the read batches, including: Determine the target desensitization policy corresponding to each container instance according to the target field corresponding to each container instance and the correspondence between the target field and the target desensitization policy; Extracting the to-be-mass-desensitized data corresponding to the target field of each container instance into each container instance; Based on the target desensitization policy corresponding to the container instance, desensitize the data to be desensitized in the target field corresponding to the container instance to obtain desensitized initial target data corresponding to the data to be desensitized in each target field; According to the data relationship between the data tables to which the target fields in the data structure information belong, the initial target data corresponding to the target fields in the data tables are reorganized to obtain reorganized target data.

8. A data desensitization device, characterized in that: The device comprises: A data reading module is used to determine the data structure information of the source database according to a preset desensitization task, determine the reading batch and target desensitization strategy of the data to be desensitized according to the data structure information, and read the data to be desensitized from the source database based on the reading batch; A container instance generation module is used to determine the container resources corresponding to the preset desensitization task in the container cloud platform and generate a container instance based on the container resources; A desensitization module is used to perform desensitization processing on the data to be desensitized of each read batch in the container instance of the container cloud platform based on the target desensitization strategy, obtain the desensitized target data, and write the target data into a target database; The desensitization module is specifically used to determine the data to be desensitized and the target desensitization strategy corresponding to the read batch for each container instance; In each of the container instances, desensitizing the data to be desensitized based on the target desensitization strategy corresponding to each of the container instances, to obtain desensitized target data corresponding to the data to be desensitized in each of the read batches; Each of the read batches corresponds to a target field in the data structure information of the source database; the data structure information includes the data relationship of the data table to which each target field belongs; The desensitization module is specifically configured to determine the target desensitization policy corresponding to each container instance according to the target field corresponding to each container instance and the correspondence between the target field and the target desensitization policy; Extracting the to-be-mass-desensitized data corresponding to the target field of each container instance into each container instance; Based on the target desensitization policy corresponding to the container instance, desensitize the data to be desensitized in the target field corresponding to the container instance to obtain desensitized initial target data corresponding to the data to be desensitized in each target field; According to the data relationship between the data tables to which the target fields in the data structure information belong, the initial target data corresponding to the target fields in the data tables are reorganized to obtain reorganized target data.

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

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Data desensitization method and device

    CN106778351A

  • Static data desensitization method and device

    CN118278046A