Distributed application cluster and data desensitization method
Through the combination of distributed application clusters and batch processing frameworks, message queues and concurrent threads are used to process large-scale data desensitization, which solves the problem of low data desensitization efficiency in the existing technology and achieves efficient concurrent processing.
Patent Information
- Application Number
- CN202011051942.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-29
- Publication Date
- 2024-10-15
- Estimated Expiration
- Not applicable · inactive patent
Smart Images

Figure CN112131027B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a distributed application cluster and a data desensitization method. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the invention recited in the claims. No admission is made that the description herein is prior art by inclusion in this section.
[0003] For some business systems, their business data is highly sensitive and confidential, and needs to be desensitized when used or tested. For example, financial transaction systems, face recognition systems, or fingerprint recognition systems. However, for systems with huge data volumes or huge business volumes, desensitization takes a long time, and the concurrency capability and efficiency of data desensitization are poor.
[0004] Therefore, the existing data desensitization has the problem of low desensitization processing efficiency. Summary of the invention
[0005] An embodiment of the present invention provides a distributed application cluster for improving the efficiency of data desensitization. The data desensitization system includes:
[0006] A first application terminal and a plurality of second application terminals;
[0007] The first application terminal is used to write the table name of each data table to be desensitized into the message queue;
[0008] The second application terminal is used for remote partitioning based on the batch processing framework, and monitors the table name of each data table to be desensitized in the message queue;
[0009] The second application terminal is further used to divide the data of the to-be-desensitized data table into multiple data blocks based on the local partition of the batch processing framework according to the data volume of the to-be-desensitized data table corresponding to the table name of the to-be-desensitized data table monitored;
[0010] The second application terminal is further used to perform desensitization processing on multiple data blocks of the data table to be desensitized using multiple concurrent threads according to the pre-configured data desensitization rules, and determine the desensitization result of the data table to be desensitized;
[0011] The second application terminal is specifically used to perform desensitization processing on multiple data blocks of the data table to be desensitized according to pre-configured data desensitization rules using multiple concurrent threads, determine the desensitization result of each data block of the data table to be desensitized, merge the desensitization results of each data block of the data table to be desensitized, and determine the desensitization result of the data table to be desensitized.
[0012] The embodiment of the present invention further provides a data desensitization method to improve the efficiency of data desensitization. The data desensitization method includes:
[0013] The first application terminal writes the table name of each data table to be desensitized into the message queue;
[0014] Multiple second application terminals monitor the table name of each data table to be desensitized in the message queue based on remote partitioning of the batch processing framework;
[0015] Each second application terminal divides the data in the data table to be desensitized into multiple data blocks based on the local partition of the batch processing framework according to the data volume of the data table to be desensitized corresponding to the table name of the data table to be desensitized monitored;
[0016] Each second application terminal performs desensitization processing on multiple data blocks of the data table to be desensitized using multiple concurrent threads according to the pre-configured data desensitization rules, and determines the desensitization result of the data table to be desensitized;
[0017] Each second application terminal performs desensitization processing on multiple data blocks of the data table to be desensitized using multiple concurrent threads according to the pre-configured data desensitization rules, and determines the desensitization result of the data table to be desensitized, including:
[0018] Each second application terminal performs desensitization processing on multiple data blocks of the data table to be desensitized using multiple concurrent threads according to the pre-configured data desensitization rules, and determines the desensitization result of each data block of the data table to be desensitized;
[0019] Each second application terminal merges the desensitization results of each data block of the data table to be desensitized to determine the desensitization result of the data table to be desensitized.
[0020] An embodiment of the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned data desensitization method when executing the computer program.
[0021] An embodiment of the present invention also provides a computer-readable storage medium, which stores a computer program for executing the above-mentioned data desensitization method.
[0022] In an embodiment of the present invention, multiple second application terminals in a distributed application cluster monitor the table name of each data table to be desensitized in a message queue based on the remote partitioning of a batch processing framework, thereby improving the processing efficiency of data desensitization; at the same time, each second application terminal divides the data of the data table to be desensitized into multiple data blocks based on the local partitioning of the batch processing framework according to the data volume of the data table to be desensitized corresponding to the table name of the data table to be desensitized, and uses multiple concurrent threads to perform desensitization on the multiple data blocks of the data table to be desensitized, thereby improving the concurrent processing efficiency of the second application terminals. That is, an embodiment of the present invention proposes a scalable distributed application cluster that combines remote distribution and local distribution to perform data desensitization, thereby improving the efficiency of data desensitization both horizontally and vertically. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0024] Figure 1 A schematic diagram of the structure of a distributed application cluster provided by an embodiment of the present invention;
[0025] Figure 2 A flowchart of the data desensitization method provided in the embodiment of the present invention;
[0026] Figure 3 Another implementation flow chart of the data desensitization method provided in an embodiment of the present invention;
[0027] Figure 4 A flowchart for implementing step 203 in the data desensitization method provided in an embodiment of the present invention;
[0028] Figure 5 A flowchart for implementing step 204 in the data desensitization method provided in an embodiment of the present invention;
[0029] Figure 6 A flowchart for implementing step 501 in the data desensitization method provided in an embodiment of the present invention;
[0030] Figure 7 A partial implementation flow chart of another data desensitization method provided by an embodiment of the present invention;
[0031] Figure 8 A schematic diagram of the structure of a distributed application server cluster provided by an embodiment of the present invention;
[0032] Fig. 9A schematic diagram of the structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0033] To make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0034] Figure 1 The structure of the distributed application cluster provided by the embodiment of the present invention is shown. For the convenience of description, only the part related to the embodiment of the present invention is shown, which is described in detail as follows:
[0035] like Figure 1 As shown, a distributed application cluster includes:
[0036] A first application terminal 101 and a plurality of second application terminals 102;
[0037] The first application terminal 101 is used to write the table name of each data table to be desensitized into the message queue;
[0038] The second application terminal 102 is used for remote partitioning based on the batch processing framework, and monitors the table name of each data table to be desensitized in the message queue;
[0039] The second application terminal 102 is further used to divide the data of the to-be-desensitized data table into multiple data blocks based on the local partition of the batch processing framework according to the data volume of the to-be-desensitized data table corresponding to the table name of the to-be-desensitized data table monitored;
[0040] The second application terminal 102 is further used to perform desensitization processing on multiple data blocks of the data table to be desensitized using multiple concurrent threads according to pre-configured data desensitization rules, and determine the desensitization result of the data table to be desensitized.
[0041] In an embodiment of the present invention, the distributed application cluster includes a first application terminal 101 and multiple second application terminals 102, which are used to implement the data desensitization method. The first application terminal 101 and multiple second application terminals 102 can all be application servers, the distributed application cluster is a distributed application server cluster, and the number of second application terminals 102 can be infinitely expanded in theory, that is, the efficiency of data desensitization processing can be improved by expanding the number of second application terminals 102.
[0042] Specifically, when performing data desensitization, the first application terminal 101 writes the table name of the data table to be desensitized into the message queue. The multiple second application terminals 102 serve as distributed nodes of the distributed application cluster, and based on the remote partitioning of the batch processing framework, concurrently monitor the table name of each data table to be desensitized in the message queue. That is, multiple second application terminals 102 jointly consume messages in the message queue to realize the concurrent processing capability of the distributed application cluster. At the same time, the concurrent capability of the distributed application cluster can be improved by expanding the number of second application terminals 102.
[0043] After monitoring the table name of the data table to be desensitized, the second application terminal 102 determines the corresponding data table to be desensitized, and then divides the data of the data table to be desensitized into multiple data blocks based on the local partitioning of the batch processing framework according to the data amount of the data table, and then performs parallel desensitization processing on the multiple data blocks of the data table to be desensitized using multiple concurrent threads according to the pre-configured data desensitization rules to determine the desensitization result of the data table to be desensitized.
[0044] Among them, the second application terminal 102 uses multiple concurrent threads to desensitize multiple data blocks of the data table to be desensitized based on the local partition of the batch processing framework, thereby improving the parallel data desensitization processing efficiency of a single distributed node (second application terminal 102) in the distributed application cluster.
[0045] Among them, the batch processing framework includes the Spring Batch batch processing framework. Those skilled in the art can understand that the batch processing framework can also be other batch processing frameworks with remote partitioning and local partitioning functions in addition to the above-mentioned Spring Batch batch processing framework, and the embodiments of the present invention do not impose any special restrictions on this.
[0046] Among them, the remote partitioning of the Spring Batch batch processing framework in the embodiment of the present invention refers to distributing the messages in the message queue to multiple distributed nodes (second application terminal 102) in the distributed application cluster for concurrent execution, that is, multiple distributed nodes (second application terminal 102) concurrently monitor the messages in the message queue; the local partitioning of the SpringBatch batch processing framework in the embodiment of the present invention refers to a single distributed node (second application terminal 102) in the distributed application cluster executing data desensitization processing in parallel by multiple threads at the same time.
[0047] The detailed process of data de-duplication implemented by the distributed application cluster is described in detail in the following method embodiment, which will not be described in detail here.
[0048] In an embodiment of the present invention, multiple second application terminals 102 in a distributed application cluster concurrently monitor the table name of each data table to be desensitized in a message queue based on remote partitioning of a batch processing framework, thereby improving the processing efficiency of data desensitization; at the same time, each second application terminal 102 divides the data of the data table to be desensitized into multiple data blocks based on the local partitioning of the batch processing framework according to the data volume of the data table to be desensitized corresponding to the table name of the data table to be desensitized monitored, and uses multiple concurrent threads to perform concurrent desensitization processing on the multiple data blocks of the data table to be desensitized, thereby improving the concurrent processing efficiency of the second application terminal 102. That is, an embodiment of the present invention proposes a scalable distributed application cluster that combines remote distribution and local distribution to perform data desensitization, thereby improving the efficiency of data desensitization both horizontally and vertically.
[0049] Figure 2 The implementation process of the data desensitization method provided by the embodiment of the present invention is shown. For the convenience of description, only the part related to the embodiment of the present invention is shown, which is described in detail as follows:
[0050] like Figure 2 As shown, the data desensitization method is applied to a distributed application cluster including a first application terminal 101 and multiple second application terminals 102. The data desensitization method includes:
[0051] Step 201, the first application terminal 101 writes the table name of each data table to be desensitized into a message queue;
[0052] Step 202, multiple second application terminals 102 monitor the table name of each data table to be desensitized in the message queue based on remote partitioning of the batch processing framework;
[0053] Step 203: each second application terminal 102 divides the data of the data table to be desensitized into multiple data blocks according to the data volume of the data table to be desensitized corresponding to the table name of the data table to be desensitized monitored, based on the local partition of the batch processing framework;
[0054] Step 204 : Each second application terminal 102 performs desensitization processing on multiple data blocks of the data table to be desensitized using multiple concurrent threads according to the pre-configured data desensitization rule, and determines the desensitization result of the data table to be desensitized.
[0055] The data desensitization method provided in the embodiment of the present invention is applied to the data desensitization process of the distributed application cluster described in the above embodiment, and the embodiment of the present invention will not be described in detail.
[0056] In an embodiment of the present invention, multiple second application terminals 102 in a distributed application cluster monitor the table name of each data table to be desensitized in a message queue based on the remote partitioning of a batch processing framework, thereby improving the processing efficiency of data desensitization; at the same time, each second application terminal 102 divides the data of the data table to be desensitized into multiple data blocks based on the local partitioning of the batch processing framework according to the data volume of the data table to be desensitized corresponding to the table name of the data table to be desensitized, and uses multiple concurrent threads to perform desensitization on the multiple data blocks of the data table to be desensitized, thereby improving the concurrent processing efficiency of the second application terminal 102. That is, an embodiment of the present invention proposes a scalable distributed application cluster that combines remote distribution and local distribution to perform data desensitization, thereby improving the efficiency of data desensitization both horizontally and vertically.
[0057] Figure 3 Another implementation process of the data desensitization method provided by an embodiment of the present invention is shown. For ease of description, only the part related to the embodiment of the present invention is shown, which is described in detail as follows:
[0058] In one embodiment of the present invention, in order to improve the efficiency of determining the data table to be desensitized, Figure 3 As shown, based on the above method steps, the data desensitization method also includes:
[0059] Step 301, the first application terminal 101 caches the table name of the data table into a table name list;
[0060] Step 302: The first application terminal 101 determines the table name of the database table containing the desensitization identifier in the table name list as the table name of the data table to be desensitized.
[0061] Among them, before writing the table name of the data table to be desensitized into the message queue, first determine the scope of the data table to be desensitized. Specifically, the first application terminal 101 caches the table names of all data tables into a table name list, and then determines the table name of the database table containing the desensitization identifier in the table name list as the table name of the data table to be desensitized. For example, if the desensitization identifier is Y, the data table containing the desensitization identifier Y is used as the data table to be desensitized.
[0062] In addition, the first application terminal 101 can first determine the database table containing the desensitization mark, and then configure the table name of the database table containing the desensitization mark into a table name parameter table, and the table name parameter table contains the table names of all data tables to be desensitized. At this time, when the first application terminal 101 writes the table name of the data table to be desensitized into the message queue, it directly caches the table name parameter table, and then writes the data table to be desensitized contained in the table name parameter table into the message queue, which can further improve the efficiency of determining the data table to be desensitized.
[0063] In an embodiment of the present invention, the first application terminal 101 caches the table name of the data table into a table name list, and the first application terminal 101 determines the table name of the database table containing the desensitizing identifier in the table name list as the table name of the data table to be desensitized. By determining the table name of the data table to be desensitized by caching the table name list, the efficiency of determining the data table to be desensitized can be improved.
[0064] Figure 4 The implementation process of step 203 in the data desensitization method provided in an embodiment of the present invention is shown. For ease of description, only the part related to the embodiment of the present invention is shown, which is described in detail as follows:
[0065] In one embodiment of the present invention, in order to improve the parallel data desensitization efficiency of the second application terminal 102, as Figure 4 As shown, in step 203, each second application terminal 102 divides the data of the data table to be desensitized into multiple data blocks based on the local partition of the batch processing framework according to the data amount of the data table to be desensitized corresponding to the table name of the data table to be desensitized, including:
[0066] Step 401, each second application terminal 102 determines the corresponding data table to be desensitized from the database table set according to the table name of the data table to be desensitized monitored;
[0067] In step 402, each second application terminal 102 divides the data in the data table to be desensitized into multiple data blocks based on the local partitioning of the batch processing framework according to the pre-configured concurrency and the data volume of the data table to be desensitized.
[0068] When determining the data table to be desensitized corresponding to the table name of the data table to be desensitized, it can be determined from the database table set. The database table set contains all database tables, and the data table to be desensitized corresponding to the table name of the data table to be desensitized can be determined from the database table set through the table name of the data table to be desensitized. After determining the data table to be desensitized, the second application terminal 102 divides the data of the data table to be desensitized into multiple data blocks based on the local partition of the batch processing framework according to the data volume of the data table to be desensitized and the pre-configured concurrency.
[0069] The preconfigured concurrency (of the second application terminal 102) is the preconfigured concurrency capability of the second application terminal 102, corresponding to the concurrent threads of the second application terminal 102. The concurrency of each second application terminal 102 can be configured, and the concurrency of different second application terminals 102 can be the same or different.
[0070] In an embodiment of the present invention, the second application terminal 102 determines the corresponding data table to be desensitized from the database table set, and blocks the data in the data table to be desensitized based on the local partitioning of the batch processing framework, which can improve the parallel data desensitization efficiency of the second application terminal 102.
[0071] Figure 5 The implementation process of step 204 in the data desensitization method provided in an embodiment of the present invention is shown. For ease of description, only the part related to the embodiment of the present invention is shown, which is described in detail as follows:
[0072] In one embodiment of the present invention, in order to improve the parallel data desensitization efficiency of the second application terminal 102, as Figure 5 As shown, in step 204, each second application terminal 102 performs desensitization processing on multiple data blocks of the data table to be desensitized using multiple concurrent threads according to the pre-configured data desensitization rules, and determines the desensitization result of the data table to be desensitized, including:
[0073] Step 501: Each second application terminal 102 performs desensitization processing on multiple data blocks of the data table to be desensitized using multiple concurrent threads according to the pre-configured data desensitization rules, and determines the desensitization result of each data block of the data table to be desensitized;
[0074] In step 502, each second application terminal 102 merges the desensitization results of each data block in the data table to be desensitized, and determines the desensitization result of the data table to be desensitized.
[0075] Specifically, when performing data desensitization, the second application terminal 102 uses multiple concurrent threads to perform desensitization on multiple data blocks of the data table to be desensitized according to the pre-configured data desensitization rules, thereby determining the desensitization result of each data block of the data table to be desensitized, and then merging the desensitization result of each data block of the data table to be desensitized to obtain the desensitization result of the data table to be desensitized.
[0076] Among them, the pre-configured data desensitization rules are pre-configured data desensitization rules corresponding to different data information categories, for example, the data desensitization rule of replacement desensitization is adopted for customer name information, and all customer name information is uniformly replaced with Jack. For another example, the data desensitization rule of offset desensitization is adopted for the last 4 of the customer number. It can be understood by those skilled in the art that the data desensitization rules corresponding to the data information category may also include data desensitization rules corresponding to other data information categories in addition to the data desensitization rules corresponding to the above-mentioned data information categories, and the embodiment of the present invention does not impose any special restrictions on this.
[0077] In the embodiment of the present invention, the second application terminal 102 uses multiple concurrent threads to perform desensitization processing on multiple data blocks of the data table to be desensitized, which can improve the parallel data desensitization efficiency of the second application terminal 102.
[0078] Figure 6 The implementation process of step 501 in the data desensitization method provided in an embodiment of the present invention is shown. For ease of description, only the part related to the embodiment of the present invention is shown, which is described in detail as follows:
[0079] In one embodiment of the present invention, in order to improve the flexibility of data desensitization rule configuration, Figure 6 As shown, in step 501, each second application terminal 102 performs desensitization processing on multiple data blocks of the data table to be desensitized using multiple concurrent threads according to the pre-configured data desensitization rules, and determines the desensitization result of each data block of the data table to be desensitized, including:
[0080] Step 601, each thread of each second application terminal 102 determines a data desensitization rule corresponding to each different data information category from pre-configured data desensitization rules according to the data information category of each data in the data block;
[0081] Step 602 , each thread of each second application terminal 102 performs desensitization processing on each data according to the data desensitization rule corresponding to each different data information category in the data block, and determines the desensitization result of each data block in the data table to be desensitized.
[0082] Specifically, when determining the data desensitization rules corresponding to different data information categories in the data table to be desensitized, first determine the data information category of each data in the data block, and then determine the data desensitization rules corresponding to different data information categories from the pre-configured data desensitization rules, and then each thread desensitizes each data according to the data desensitization rules corresponding to each different data information category in the data block. The data information category refers to different data information categories, such as different information categories such as customer number, ID number, account and customer name information. Among them, the pre-configured data desensitization rules can be included in a data desensitization rule set, and the data desensitization rule set contains data desensitization rules corresponding to all data information categories.
[0083] In an embodiment of the present invention, data desensitization rules corresponding to different data information categories are pre-configured, and each thread can improve the flexibility of data desensitization rule configuration according to the data information category of each data in the data block.
[0084] Figure 7 The following is a partial implementation flow of another data desensitization method provided by an embodiment of the present invention. For ease of description, only the part related to the embodiment of the present invention is shown, which is described in detail as follows:
[0085] In one embodiment of the present invention, in order to improve the flexibility of configuring concurrency or data desensitization rules, as shown in FIG. Figure 7 As shown, based on the above method steps, the data desensitization method also includes:
[0086] Step 701, configuring the concurrency of each second application terminal 102 according to the received concurrency configuration instruction; and / or
[0087] Step 702: configure data desensitization rules corresponding to different data information categories according to the received desensitization rule configuration instruction.
[0088] When configuring the concurrency of the second application terminal 102 and / or the data desensitization rules corresponding to different data information categories, the configuration can be performed through a visual interface. For example, when a concurrency configuration instruction is received in the visual interface, the concurrency of each second application terminal 102 is configured separately; when a desensitization rule configuration instruction is received in the visual interface, the data desensitization rules corresponding to different data information categories are configured. In addition, the configured concurrency of the second application terminal 102 and the data desensitization rules corresponding to different data information categories can also be modified according to the received configuration modification instruction. For example, add or delete data desensitization rules corresponding to different data information categories, or adjust data desensitization rules corresponding to different data information categories, etc.
[0089] In an embodiment of the present invention, the concurrency of each second application terminal 102 is configured according to the received concurrency configuration instruction, and the data desensitization rules corresponding to different data information categories are configured according to the received desensitization rule configuration instruction, which can improve the flexibility of configuring concurrency or data desensitization rules.
[0090] Figure 8 The structure of the distributed application server cluster provided by the embodiment of the present invention is shown. For the convenience of explanation, only the part related to the embodiment of the present invention is shown, which is described in detail as follows:
[0091] like Figure 8 As shown, a distributed application server cluster includes:
[0092] Application server 0, application server 1, application server 2, application server 3...application server n, and the data tables to be anonymized include Table1, Table2, Table3...TableN.
[0093] Specifically, when performing data desensitization, in the remote distribution processing part, based on the remote partitioning of the Spring Batch batch processing framework, application server 0 writes the table name of each data table to be desensitized Table1, Table2, Table3...TableN into the message queue, and application server 1, application server 2, application server 3...application server n share the table name of each data table to be desensitized in the listening message queue based on the remote partitioning of the SpringBatch batch processing framework.
[0094] In the local distribution processing part, based on the local partitioning of the Spring Batch batch processing framework, application server 1 listens to Table1, the data table to be desensitized, application server 2 listens to Table2, the data table to be desensitized, application server 3 listens to Table3,...application server n listens to TableN, the data table to be desensitized. Different application servers use multiple concurrent threads to perform block desensitization processing on the monitored data tables to be desensitized.
[0095] Taking the case where application server 1 monitors data table Table1 to be desensitized as an example, application server 1 determines the data amount of data table Table1 to be desensitized according to the table name of the monitored data table Table1, and then application server 1 divides the data table Table1 to be desensitized into blocks according to the data amount of data table Table1 and the concurrency S of the pre-configured application server 1 to obtain data block 1, data block 2...data block m, and then application server 1 uses S concurrent threads to perform desensitization on data block 1, data block 2...data block m respectively to obtain the desensitization results of data block 1, data block 2...data block m, and finally merges the desensitization results of data block 1, data block 2...data block m to obtain the desensitization result of data table Table1 to be desensitized.
[0096] The data desensitization process of application server 2 for the desensitized data table Table2, the data desensitization process of application server 3 for the desensitized data table Table3, and the data desensitization process of application server n for the desensitized data table TableN are similar to the data desensitization process of application server 1 for the desensitized data table Table1, and will not be described in detail here.
[0097] Fig. 9 The structure of the computer device provided by the embodiment of the present invention is shown. For the convenience of description, only the part related to the embodiment of the present invention is shown, which is described in detail as follows:
[0098] like Fig. 9 As shown, the computer device includes a memory 902, a processor 901, and a computer program stored in the memory 902 and executable on the processor 901. When the processor 901 executes the computer program, the above-mentioned data desensitization method is implemented.
[0099] An embodiment of the present invention also provides a computer-readable storage medium, which stores a computer program for executing the above-mentioned data desensitization method.
[0100] To summarize, in the embodiment of the present invention, multiple second application terminals 102 in the distributed application cluster monitor the table name of each data table to be desensitized in the message queue based on the remote partitioning of the batch processing framework, thereby improving the processing efficiency of data desensitization; at the same time, each second application terminal 102 divides the data of the data table to be desensitized into multiple data blocks based on the local partitioning of the batch processing framework according to the data volume of the data table to be desensitized corresponding to the table name of the data table to be desensitized, and uses multiple concurrent threads to perform desensitization on the multiple data blocks of the data table to be desensitized, thereby improving the concurrent processing efficiency of the second application terminal 102. That is, the embodiment of the present invention proposes a scalable distributed application cluster that combines remote distribution and local distribution to perform data desensitization, thereby improving the efficiency of data desensitization both horizontally and vertically.
[0101] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0102] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0103] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0104] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0105] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A distributed application cluster, characterized in that: include: A first application terminal and a plurality of second application terminals; The first application terminal is used to write the table name of each data table to be desensitized into the message queue; The second application terminal is used for remote partitioning based on the batch processing framework, and monitors the table name of each data table to be desensitized in the message queue; The second application terminal is further used to divide the data of the to-be-desensitized data table into multiple data blocks based on the local partition of the batch processing framework according to the data volume of the to-be-desensitized data table corresponding to the table name of the to-be-desensitized data table monitored; The second application terminal is further used to perform desensitization processing on multiple data blocks of the data table to be desensitized using multiple concurrent threads according to the pre-configured data desensitization rules, and determine the desensitization result of the data table to be desensitized; The second application terminal is specifically used to perform desensitization processing on multiple data blocks of the data table to be desensitized using multiple concurrent threads according to the pre-configured data desensitization rules, determine the desensitization result of each data block of the data table to be desensitized, merge the desensitization results of each data block of the data table to be desensitized, and determine the desensitization result of the data table to be desensitized; The second application terminal is specifically used for: each second application terminal determines the corresponding data table to be desensitized from the database table set according to the table name of the data table to be desensitized monitored; each second application terminal divides the data of the data table to be desensitized into multiple data blocks based on the local partition of the batch processing framework according to the pre-configured concurrency and the data volume of the data table to be desensitized; The second application terminal is specifically used for: each thread of each second application terminal determines the data desensitization rule corresponding to each different data information category from pre-configured data desensitization rules according to the data information category of each data in the data block; each thread of each second application terminal desensitizes each data according to the data desensitization rule corresponding to each different data information category in the data block, and determines the desensitization result of each data block in the data table to be desensitized.
2. A data desensitization method, characterized in that: Applied in the distributed application cluster as claimed in claim 1, comprising: The first application terminal writes the table name of each data table to be desensitized into the message queue; Multiple second application terminals monitor the table name of each data table to be desensitized in the message queue based on remote partitioning of the batch processing framework; Each second application terminal divides the data in the data table to be desensitized into multiple data blocks based on the local partition of the batch processing framework according to the data volume of the data table to be desensitized corresponding to the table name of the data table to be desensitized monitored; Each second application terminal performs desensitization processing on multiple data blocks of the data table to be desensitized using multiple concurrent threads according to the pre-configured data desensitization rules, and determines the desensitization result of the data table to be desensitized; Each second application terminal performs desensitization processing on multiple data blocks of the data table to be desensitized using multiple concurrent threads according to the pre-configured data desensitization rules, and determines the desensitization result of the data table to be desensitized, including: Each second application terminal performs desensitization processing on multiple data blocks of the data table to be desensitized using multiple concurrent threads according to the pre-configured data desensitization rules, and determines the desensitization result of each data block of the data table to be desensitized; Each second application terminal combines the desensitization results of each data block of the data table to be desensitized to determine the desensitization result of the data table to be desensitized; Each second application terminal divides the data of the data table to be desensitized into multiple data blocks according to the data volume of the data table to be desensitized corresponding to the table name of the data table to be desensitized monitored, based on the local partition of the batch processing framework, including: each second application terminal determines the corresponding data table to be desensitized from the database table set according to the table name of the data table to be desensitized monitored; each second application terminal divides the data of the data table to be desensitized into multiple data blocks according to the pre-configured concurrency and the data volume of the data table to be desensitized, based on the local partition of the batch processing framework; Each second application terminal performs desensitization processing on multiple data blocks of the data table to be desensitized according to the pre-configured data desensitization rules and utilizes multiple concurrent threads to determine the desensitization results of each data block in the data table to be desensitized, including: each thread of each second application terminal determines the data desensitization rules corresponding to each different data information category from the pre-configured data desensitization rules according to the data information category of each data in the data block; each thread of each second application terminal performs desensitization processing on each data according to the data desensitization rules corresponding to each different data information category in the data block, and determines the desensitization results of each data block in the data table to be desensitized.
3. The data desensitization method according to claim 2, characterized in that: Also includes: The first application terminal caches the table name of the data table into a table name list; The first application terminal determines the table name of the database table containing the desensitization identifier in the table name list as the table name of the data table to be desensitized.
4. The data desensitization method according to claim 2, characterized in that: Also includes: The concurrency of each second application terminal is configured according to the received concurrency configuration instruction.
5. The data desensitization method according to claim 2, characterized in that: Also includes: Configure data desensitization rules corresponding to different data information categories according to the received desensitization rule configuration instructions.
6. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the data desensitization method according to any one of claims 2 to 5 is implemented.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program for executing the data desensitization method according to any one of claims 2 to 5.
Citation Information
Patent Citations
Information desensitization method, device and system
CN108664812A
Mass data desensitization method based on ORACLE database
CN111125769A
Data desensitization device based on distributed cluster
CN111291403A
Cloud platform-based service data processing method and device
WO2017036336A1
