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

By generating container instances in the container cloud platform, and desensitizing large-scale data in batches based on preset desensitization tasks and data structure information, it solves the problem of low efficiency in manual writing of SQL statements in traditional technology, and achieves efficient and safe data desensitization effect.

CN119691799AActive Publication Date: 2025-03-25BEIJING PACTERA JINXIN TECH LTD
View PDF 9 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In traditional technology, due to the sharp increase in the amount of data that needs to be desensitized, the efficiency of desensitization by manually writing SQL statements is low, making it difficult to efficiently handle large-scale data desensitization tasks.

Method used

The data structure information of the source database is determined by preset desensitization tasks, and the reading batch and target desensitization strategy of the data to be desensitized are determined based on the data structure information. A container instance is generated in the container cloud platform. The reading batch of desensitization data is desensitized based on the target desensitization strategy, and the desensitization target data is obtained and written to the target database.

Benefits of technology

It realizes efficient batch desensitization processing of large-scale data, improves the efficiency of data desensitization, ensures the confidentiality and integrity of data, and can quickly respond to desensitization needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119691799A_ABST
    Figure CN119691799A_ABST
Patent Text Reader

Abstract

The invention relates to a data desensitization method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the steps of determining data structure information of a source database according to a preset desensitization task, determining a reading batch of to-be-desensitized data and a target desensitization strategy according to the data structure information, and reading the to-be-desensitized data in the source database based on the reading batch; determining a container resource corresponding to the preset desensitization task in the container cloud platform, and generating a container instance according to the container resource; and performing desensitization processing on the to-be-desensitized data of each read batch in a 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. By adopting the method, the data desensitization efficiency can be improved.
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. In the process of synchronizing data from the production system to the test environment, sensitive information needs to be desensitized.

[0003] In traditional technology, to desensitize sensitive information, first, the operation and maintenance personnel identify and select the fields that need to be desensitized in the database (for example, ID number, mobile phone number, user name, etc.), and then write SQL (Structured Query Language) statements to modify the fields of sensitive information so that it retains a certain degree of identifiability while no longer directly exposing sensitive information for subsequent query 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, apparatus, computer equipment, computer-readable storage medium and computer program product to address the above technical issues.

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

[0007] 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;

[0008] 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;

[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 of the embodiments, determining the container resources corresponding to the preset desensitization task in the container cloud platform, and generating a container instance according to 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] Based on the container resources, multiple container instances corresponding to the preset desensitization tasks are generated.

[0013] In one of the embodiments, determining 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 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 tasks 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, so as to obtain desensitized target data corresponding to the data to be desensitized of 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 of a data table to which each of the target fields 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 of each of the read batches, including:

[0021] Determine the target desensitization policy corresponding to each of the container instances according to the target field corresponding to each of the container instances 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 to each container instance;

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

[0024] 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.

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

[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 a 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 connections with the source databases and obtain data structure information of the source databases;

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

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

[0033] 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;

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

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

[0036] In a second aspect, the present application also 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 in the source database based on the reading batch;

[0038] A container instance generation module, used to 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;

[0039] A desensitizing module is used to perform desensitizing processing on the data to be desensitized of 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 a target database.

[0040] In one of the embodiments, 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] Based on the container resources, multiple container instances corresponding to the preset desensitization tasks are generated.

[0042] In one of the embodiments, 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 of the target desensitization strategies;

[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 tasks in the container cloud platform are determined.

[0044] In one of the embodiments, 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, so as to obtain desensitized target data corresponding to the data to be desensitized of each of the read batches.

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

[0047] Determine the target desensitization policy corresponding to each of the container instances according to the target field corresponding to each of the container instances 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 to each container instance;

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

[0050] 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.

[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 desensitizing system database according to the source database included in the preset desensitizing task;

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

[0053] In one embodiment, the device 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, used 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 of the embodiments, the data reading module is specifically used to 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;

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

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

[0060] In a third aspect, the present application also provides a data desensitization system, the 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 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; 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 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;

[0066] 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;

[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 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;

[0070] 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;

[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, including a computer program, which implements the following steps when executed by a processor:

[0073] 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;

[0074] 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;

[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 container instances 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, the source database and the target database can be accurately determined, the desensitization operation can be flexibly scheduled, and large-scale data can be efficiently desensitized in batches, 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 rapid and accurate execution of the desensitization task. By desensitizing the data to be desensitized 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 drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0078] Figure 1 The following is a flow chart of a data desensitization method in one embodiment;

[0079] Figure 2 This is an architecture 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 A schematic diagram of a process of 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 of an example of a data desensitization method in one embodiment;

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

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

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

[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 a 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 may be a pre-set passive trigger process. For example, in response to a data reading operation of a target system, the server first initiates a preset desensitization task to desensitize the read data of the target system to prevent 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 desensitization task can be pre-set based on the data structure information contained in the database of the target system, and can include desensitization rules and desensitization 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 to read the data in the preset desensitization task, and the desensitization system database contains the connection information of the databases 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 according to the source database. Then, the server determines the target data content to be read corresponding to each reading batch according to 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, all source databases that need to read data are determined according to the target system corresponding to each reading request, and the target desensitization strategy and reading batch corresponding to each source database are determined, and then batch data reading is performed on each source database based on the reading batch corresponding to each source database, and finally the data to be desensitized corresponding to each source database is obtained.

[0094] Step 104: 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.

[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, based on the target desensitization strategy, desensitize the data to be desensitized in each read batch in the container instance of the container cloud platform 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 to ensure the security and isolation of desensitization processing with desensitized data. In the container instance, each target desensitization rule is applied to the data to be desensitized in each read batch, and the sensitive content of the desensitized data is desensitized to generate desensitized target data. Subsequently, the server writes the desensitized target data into the target database of the preset desensitization task to ensure that the data in the test environment can be used for functional testing and analysis without containing any real sensitive information.

[0098] In the above data desensitization method, through the combination of preset desensitization tasks and container cloud platform, the source database and target database can be accurately determined, desensitization operations can be flexibly scheduled, and large-scale data can be desensitized in batches efficiently, thereby achieving dual protection of data confidentiality and integrity. At the same time, with the help of the elastic resource management and isolation characteristics of the container cloud platform, it can quickly respond to desensitization needs and improve the efficiency of data desensitization processing.

[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 tasks in the container cloud platform.

[0101] In an embodiment of the present application, the resource requirement information of the preset target desensitization strategy and the configuration information of the container cloud platform are pre-stored in the desensitization system database of the server. For example, the container cloud platform includes platforms such as Kubernetes, and the platform environment, cluster construction, network configuration and storage configuration of different container cloud platforms are different. The server can determine the resource requirement information required for the current preset desensitization task according to 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 requirement information with the available container resource information, determines the container resources corresponding to the preset desensitization task according to 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 performance resources such as computing and storage, and generate multiple desensitizing task container instances, which significantly improves the desensitizing processing efficiency of large-scale data and ensures 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 the 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 strategy, determine the container resources corresponding to the preset desensitization tasks 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, determining the to-be-mass-desensitized data and the target mass-desensitization strategy corresponding to the read batches of each container instance.

[0113] In an embodiment of the present application, the server determines the read batch 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 batch and target desensitization strategy 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, the preset desensitization task is to perform desensitization processing on the data of the source database A. According to the data to be read and the fields corresponding to the source database A stored in the desensitization system database that need to be desensitized, it is determined that this preset desensitization task has 3 reading batches (including batch 1 "name", batch 2 "ID number" and batch 3 "telephone number"), 3 target desensitization strategies (strategy A1 desensitizes "name" by random replacement, strategy A2 desensitizes the last four digits of "ID number", and strategy A3 desensitizes the last four digits of "telephone number"), and 4 containers need to be run. The server determines to allocate 2 containers to strategy A1, 1 container to strategy A2, and 1 container to strategy A3 according to the complexity of the strategy. Then the server determines that the data to be desensitized corresponding to container instance 1 and container instance 2 is the data corresponding to the "name" field of batch 1, and container 3 and container 4 respectively process the data corresponding to the "ID number" field and the data corresponding to the "telephone number" field of batch 2, and the target desensitization strategy corresponding to container instance 1 and container instance 2 is strategy A1, and the target desensitization strategy corresponding to container 3 and container 4 is 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 in 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 included in the pre-set target desensitization strategy, and obtains the desensitized target data corresponding to the data to be desensitized in 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 batches 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, determining the target desensitization strategy 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 strategy.

[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 strategy corresponding to the container instance, desensitize the data to be desensitized of the target field corresponding to the container instance to obtain desensitized initial target data corresponding to the data to be desensitized of each target field.

[0122] Step 4044, 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.

[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 desensitizing task includes the identification information of the source database, and the desensitizing system database is pre-set with the identification information of each source database, the data structure information of each source database, the target desensitizing 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, 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 according to 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, replace the first name part with "*", or, reorganize with random names.

[0129] In the process of building the target desensitization strategy, users can access the desensitization system in the server through the terminal, or directly access the desensitization system in the server, and configure desensitization strategies and reading batches for different source databases in the visual interface provided by the desensitization system, so as to implement the desensitization strategies corresponding to each field information in different source databases and the setting of 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 the source database receives a data reading request, it first desensitizes the data to be desensitized in the 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. The required reading batches and target desensitization strategies can be accurately determined in the desensitization system database according to the source database specified in the preset desensitization task, 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 modes and database connection information.

[0135] In the embodiment of the present application, the desensitization 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, HBase, etc. The server can establish a connection with each source database in accordance with 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 SQL query, 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 according to 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, thereby 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 that the source database is MySQL or SQL Server, etc., 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 according to 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 the container instance, the server obtains the read batch and field information of the source database. Since the source database is read according to the field information, a query statement corresponding to each read batch is generated according to the field information corresponding to each read batch. Each read batch can correspond to one field or multiple fields. The query statement usually includes a SELECT statement, which is used to select data of a specific table and field from the source database.

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

[0146] In the embodiment of the present application, in the container instance, the server executes the query statement of each read batch, and reads the data to be desensitized from the source database in turn. When executing the query, the desensitization system obtains the data to be desensitized through the database interface (for example, 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 the preset batch size and the preset data block strategy, and 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 reconnection, 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. Accurate query statements are generated for each reading batch, thereby improving the efficiency and accuracy of data reading, serving as the basis for subsequent data desensitization processing and ensuring 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, management service data source configuration, container cloud platform configuration;

[0150] Step 802, managing 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 above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

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

[0155] In an exemplary embodiment, Fig. 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 according to the data structure information, and read the data to be desensitized in 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 according to the container resources;

[0158] The desensitizing module 903 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 the target database.

[0159] In one of the embodiments, the container instance generation module 902 is specifically used to determine the container resources corresponding to the preset desensitization tasks in the container cloud platform based on the target desensitization strategy 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 corresponding to the read batch of each container instance;

[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 of each read batch is obtained.

[0165] In one embodiment, the desensitization module 903 is specifically used 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 the desensitized target data corresponding to the data to be desensitized of each read batch, including:

[0166] Determine the target desensitization strategy 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 strategy;

[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 strategy corresponding to the container instance, desensitize the to-be-desensitized data of the target field corresponding to the container instance to obtain desensitized initial target data corresponding to the to-be-desensitized data of each target field;

[0169] 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 the 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, used to establish a connection with each source database and obtain data structure information of each source database according to a plurality of preset database connection modes and database connection information;

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

[0176] In one embodiment, the data reading module 901 is specifically used to 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 the database connection information;

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

[0178] According to the query statements corresponding to each reading batch, the data to be anonymized is read from the source database.

[0179] Each module in the above-mentioned data desensitization device can be implemented in whole or in part by software, hardware and their combination. 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 operations corresponding to 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. Fig.10 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store 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 Fig.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 those shown in the figure, or combine certain components, or have a different arrangement of components.

[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 according to the data structure information, and read the data to be desensitized in 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 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 of 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 the data relationship of the data table to which each target field belongs; when the processor executes the computer program, the following steps are also implemented:

[0196] Determine the target desensitization strategy 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 strategy;

[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 strategy corresponding to the container instance, desensitize the to-be-desensitized data of the target field corresponding to the container instance to obtain desensitized initial target data corresponding to the to-be-desensitized data of each target field;

[0199] 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 the 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 correspondence 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 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;

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

[0210] According to the query statements corresponding to each reading batch, the data to be anonymized is read from the source database.

[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] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present 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. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

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

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

Claims

1. A data desensitization method, characterized in that: The method comprises: 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; 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.

2. The method according to claim 1, characterized in that The determining, in the container cloud platform, 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; Based on the container resources, multiple container instances corresponding to the preset desensitization tasks are generated.

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 tasks in the container cloud platform are determined.

4. The method according to claim 1, characterized in that 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, the data to be desensitized is desensitized based on the target desensitization strategy corresponding to each of the container instances, so as to obtain desensitized target data corresponding to the data to be desensitized of each of the read batches.

5. The method according to claim 4, characterized in that 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 of the target fields 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 of each of the read batches, including: Determine the target desensitization policy corresponding to each of the container instances according to the target field corresponding to each of the container instances 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 to each container instance; Based on the target desensitization strategy corresponding to the container instance, desensitize the data to be desensitized of the target field corresponding to the container instance to obtain desensitized initial target data corresponding to the data to be desensitized of each target field; 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.

6. The method according to claim 1, characterized in that 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 a target desensitization strategy corresponding to the data to be desensitized based on the field information.

7. 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 data to be desensitized 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 connections with the source databases and obtain data structure information of the source databases; The configuration information and the corresponding relationship between each of the source databases and the data structure information are stored.

8. The method according to claim 1, characterized in that The reading the to-be-desensitized data in the source database based on the read batch includes: 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; For each read batch, generating a query statement corresponding to the read batch based on the target field included in the read batch; The data to be desensitized is read in the source database according to the query statements corresponding to each of the read batches.

9. 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 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; 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; The target database is used to write the target data.

10. 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 in the source database based on the reading batch; A container instance generation module, used to 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; A desensitizing module is used to perform desensitizing processing on the data to be desensitized of 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 a target database.

Citation Information

Patent Citations

  • Data desensitization method and device

    CN106778351A

  • Private data protection method and device of cloud platform, equipment and storage medium

    CN115481434A

  • Demonstration function page generation method and device, electronic equipment and storage medium

    CN115495781A

  • Sensitive information desensitization processing method and device, computer equipment and storage medium

    CN117094030A

  • Data opening-oriented high-performance personal information desensitization method and system

    CN117708883A