Method for quickly acquiring desensitization identifier and related device
By pre-establishing the desensitization label set and using task information query, the problems of desensitization accuracy and standard consistency in traditional data desensitization methods are solved, and rapid and accurate acquisition of desensitization labels is achieved, improving data security and coordination Regularity.
Patent Information
- Application Number
- CN202411743544.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-30
- Publication Date
- 2025-02-21
AI Technical Summary
Traditional data desensitization methods are difficult to ensure the accuracy and consistency of standards in different application systems, and manual labeling methods cannot guarantee the accuracy, safety and compliance of test data.
By pre-establishing the desensitization identification set corresponding to the data tables under each system, module and database, including module number, physical table name and desensitization identification, use task information to obtain the module number and physical table name, query the desensitization identification set to obtain Corresponding desensitization mark.
It realizes rapid and accurate acquisition of desensitization marks, improves the security and compliance of test data, reduces labeling costs, and improves the efficiency of test data supply.
Smart Images

Figure CN119493808A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of databases, and in particular to a method for quickly acquiring desensitized identification and a related device. Background Art
[0002] As the work of test data desensitization deepens, the problems faced by the business logic of traditional data desensitization become more complicated. The accuracy and standard consistency of desensitization of different application systems have become a technical bottleneck affecting test data desensitization. At the same time, there are many scenarios in various management systems where desensitization labels need to be obtained. At this time, if traditional manual labeling methods are relied upon, the accuracy, security and compliance of test data cannot be guaranteed. Therefore, how to quickly obtain accurate desensitization labels has become a technical problem that people in this field need to solve urgently. Summary of the invention
[0003] In view of the above problems, the present invention provides a method and related device for quickly obtaining desensitized identification, which overcomes the above problems or at least partially solves the above problems.
[0004] In a first aspect, a method for quickly obtaining a desensitization mark comprises:
[0005] According to each data table under each system, each module and each database, a corresponding desensitized identification set is pre-established, wherein the desensitized identification set includes multiple desensitized identification data, and the desensitized identification data at least includes a module number, a physical table name and a corresponding desensitized identification;
[0006] When there is a desensitization task, obtain the module number and physical table name corresponding to the desensitization task;
[0007] According to the module number and physical table name corresponding to the desensitizing task, the corresponding desensitizing identifier is obtained from the desensitizing identifier set.
[0008] Optionally, in some optional implementations, the corresponding desensitization identification set is pre-established according to each system, each module, and each data table under each database, including:
[0009] Taking data tables as units, for each data table under each system, each module and each database, the keywords of the field names of each data table are preliminarily marked according to pre-established empirical rules;
[0010] Each data table after preliminary annotation is identified using a pre-trained annotation model, and desensitized identification data corresponding to the data in each data table is established, thereby obtaining the desensitized identification set.
[0011] Optionally, in certain optional implementations, the desensitization identification includes: desensitization type, desensitization method and desensitization approval time;
[0012] The method further comprises:
[0013] When the structure of any of the data tables changes, the desensitization approval time of the desensitization mark corresponding to the changed content is set to empty, wherein the desensitization mark data with the desensitization approval time set to empty is unavailable;
[0014] After the user has reviewed and approved the changed content, the desensitizing approval time of the desensitizing mark corresponding to the changed content is set to the corresponding timestamp, wherein the desensitizing mark with the desensitizing approval time set to the corresponding timestamp is available.
[0015] Optionally, in some optional implementations, querying and obtaining a corresponding desensitizing identifier from the desensitizing identifier set according to the module number and the physical table name corresponding to the desensitizing task includes:
[0016] According to the module number and physical table name corresponding to the desensitization task, map to the corresponding module;
[0017] The field information of the corresponding physical table is obtained from the module, and based on the field information, the corresponding desensitized identifier is queried from the desensitized identifier set to obtain the corresponding desensitized identifier.
[0018] In a second aspect, a device for quickly acquiring a desensitized identifier includes: an identifier set establishment unit, a task information acquisition unit, and a desensitized identifier query unit;
[0019] The identification set establishment unit is used to pre-establish a corresponding desensitized identification set according to each system, each module and each data table under each database, wherein the desensitized identification set includes multiple desensitized identification data, and the desensitized identification data at least includes a module number, a physical table name and a corresponding desensitized identification;
[0020] The task information obtaining unit is used to obtain the module number and physical table name corresponding to the desensitization task when there is a desensitization task;
[0021] The desensitizing identifier query unit is used to query and obtain the corresponding desensitizing identifier from the desensitizing identifier set according to the module number and physical table name corresponding to the desensitizing task.
[0022] Optionally, in certain optional implementations, the identification set establishing unit includes: an initial annotation subunit and a model annotation subunit;
[0023] The initial marking subunit is used to perform preliminary marking of keywords of field names of each data table based on data tables, for each system, each module and each database, according to pre-established empirical rules;
[0024] The model annotation subunit is used to identify each data table after preliminary annotation using a pre-trained annotation model, and establish desensitized identification data corresponding to the data in each data table, thereby obtaining the desensitized identification set.
[0025] Optionally, in certain optional implementations, the desensitization identification includes: desensitization type, desensitization method and desensitization approval time;
[0026] The device further comprises: an unavailable identification unit and an available identification unit;
[0027] The unavailable identification unit is used to set the desensitization approval time of the desensitization identification corresponding to the changed content to empty when the structure of any of the data tables changes, wherein the desensitization identification data with the desensitization approval time set to empty is unavailable;
[0028] The identification available unit is used to set the desensitizing approval time of the desensitizing identification corresponding to the changed content to the corresponding timestamp after the user has reviewed and approved the changed content, wherein the desensitizing identification with the desensitizing approval time set to the corresponding timestamp is available.
[0029] Optionally, in certain optional implementations, the desensitized identification query unit includes: a module mapping subunit and an identification query subunit;
[0030] The module mapping subunit is used to map to the corresponding module according to the module number and physical table name corresponding to the desensitization task;
[0031] The identifier query subunit is used to obtain field information of the corresponding physical table from the module, and query the desensitized identifier set based on the field information to obtain the corresponding desensitized identifier.
[0032] In a third aspect, a computer-readable storage medium stores a program thereon, and when the program is executed by a processor, the method for quickly obtaining a desensitized identifier as described in any one of the above items is implemented.
[0033] In a fourth aspect, an electronic device comprises at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; and the processor is used to call program instructions in the memory to execute any one of the methods for quickly obtaining desensitized identification described above.
[0034] By means of the above technical scheme, a method and related device for quickly obtaining desensitized identification provided by the present invention can pre-establish a corresponding desensitized identification set according to each system, each module and each data table under each database, wherein the desensitized identification set includes multiple desensitized identification data, and the desensitized identification data at least includes a module number, a physical table name and a corresponding desensitized identification; when there is a desensitization task, obtain the module number and the physical table name corresponding to the desensitization task; according to the module number and the physical table name corresponding to the desensitization task, query the desensitized identification set to obtain the corresponding desensitized identification. It can be seen from this that the present invention can pre-establish a compliant and available desensitized identification set. When there is a desensitization task, a simple query can be made based on parameters such as the module number and the physical table name to obtain the corresponding desensitized identification, which is efficient and has high availability.
[0035] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0037] Figure 1 A flow chart showing a first method for quickly obtaining a desensitization mark provided by the present invention is shown;
[0038] Figure 2 A flow chart showing a second method for quickly obtaining a desensitization mark provided by the present invention;
[0039] Figure 3 A flowchart of a third method for quickly obtaining a desensitization mark provided by the present invention is shown;
[0040] Figure 4 A flowchart of a fourth method for quickly obtaining a desensitization mark provided by the present invention is shown;
[0041] Figure 5 A schematic diagram of the structure of a device for quickly acquiring a desensitization mark provided by the present invention is shown;
[0042] Figure 6 A structural schematic diagram of an electronic device provided by the present invention is shown. DETAILED DESCRIPTION
[0043] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.
[0044] like Figure 1 As shown, the present invention provides a method for quickly obtaining a desensitized identifier, including: S100, S200 and S300;
[0045] S100, pre-establishing a corresponding desensitizing identification set according to each system, each module and each data table under each database, wherein the desensitizing identification set includes a plurality of desensitizing identification data, and the desensitizing identification data includes at least a module number, a physical table name and a corresponding desensitizing identification;
[0046] Optionally, the data tables may come from different places, including different systems and different modules, and may also be stored in different databases. Therefore, the present invention can use a unified data management system as a carrier and a data table as a unit to carry out the labeling of desensitized identifiers of various data tables under different systems, different modules, and different databases in a fine-grained and refined manner, establish effective labeling assets (i.e., desensitized identifier sets), and achieve the effect of one-time labeling and long-term use. It should be noted that the physical table mentioned in the present invention can be understood as a data table, which is represented as the same thing.
[0047] Data desensitization is a technical measure for data protection. It mainly reduces the sensitivity of data by editing it so that it can be used for specific purposes and achieve an appropriate balance between data integrity, confidentiality and availability. Desensitization labels generally refer to labels such as the sensitive type and processing method of data items that need to be desensitized.
[0048] For example, Figure 2 As shown, in some optional embodiments, the S100 includes: S110 and S120;
[0049] S110, taking data tables as units, for each system, each module and each database, preliminary marking of keywords of field names of each data table is performed according to pre-established empirical rules;
[0050] Optionally, the empirical rules mentioned in the present invention can be understood as: based on the experience feedback from the labelers of the desensitizing labels, the corresponding labeling rules are established based on the keywords of various field names, and the corresponding desensitizing labels, that is, the empirical rules that can be executed in the system are obtained, and the present invention does not impose any restrictions on this.
[0051] S120, using a pre-trained annotation model to identify each data table after preliminary annotation, and establish desensitized identification data corresponding to the data in each data table, thereby obtaining the desensitized identification set.
[0052] Optionally, the labeling of the desensitized identification of the present invention no longer relies solely on manual labeling, but adopts a combination of "fuzzy matching + intelligent scanning". First, according to empirical rules, preliminary labeling is performed based on the keywords of the field name, and then professional model training and sensitive information discovery mechanism are used to perform secondary labeling based on the specific content of the data table, which fully guarantees the quality of the desensitized identification set, and the present invention does not limit this.
[0053] Optionally, in certain optional implementations, the desensitization identification includes: desensitization type, desensitization method and desensitization approval time;
[0054] The method further comprises: step 1.1 and step 1.2;
[0055] Step 1.1, when the structure of any of the data tables changes, the desensitization approval time of the desensitization mark corresponding to the changed content is set to empty, wherein the desensitization mark data with the desensitization approval time set to empty is unavailable;
[0056] Step 1.2: After the user has reviewed and approved the changed content, the desensitizing approval time of the desensitizing mark corresponding to the changed content is set to the corresponding timestamp, wherein the desensitizing mark with the desensitizing approval time set to the corresponding timestamp is available.
[0057] Optionally, when the source data structure (i.e., the structure of the data table that originally established the desensitized identification set) or the desensitized identification specification (some rules for establishing desensitized identification) changes, it often leads to confusion in the mapping relationship of the data items, that is, confusion in the desensitized identification corresponding to the data table. Therefore, the present invention adds a timestamp protection strategy, specifically:
[0058] When users add information based on the source data table, the changed content will not be stamped with a time stamp (for example, the "Desensitized Approval Time" in Table 1, where Table 1 can be understood as the structure of a desensitized identification data). Users need to initiate an application, and the time stamp can only be added after review by the designated agency.
[0059] When certain information in the source data table is modified, it also needs to be reviewed before its table structure can continue to be used, preventing the omission of desensitizing labels due to changes in the source data table.
[0060] The data management system can only provide feedback to the demander after it detects the timestamp, effectively safeguarding the desensitized identification hierarchy and architecture in the scenario of data set changes and ensuring the availability of desensitized identification.
[0061] Table 1
[0062]
[0063] S200. When there is a desensitization task, obtain the module number and physical table name corresponding to the desensitization task;
[0064] S300. According to the module number and physical table name corresponding to the desensitization task, obtain the corresponding desensitization identifier from the desensitization identifier set.
[0065] For example, Figure 3 As shown, in some optional embodiments, the S300 includes: S310 and S320;
[0066] S310, mapping to the corresponding module according to the module number and physical table name corresponding to the desensitization task;
[0067] S320. Obtain field information of the corresponding physical table from the module, and query the desensitizing identifier set based on the field information to obtain a corresponding desensitizing identifier.
[0068] Optionally, the desensitization task is generally based on the data table, that is, the data of the entire data table is desensitized and then marked with a desensitization mark. Therefore, when it is necessary to initiate a desensitization task, the demander of the present invention only needs to submit the module number and physical table name in the table list (of course, the system name and database name can also be provided according to actual needs), without the need to compile the detailed contents of the table list and its field list, and without the need to check the criteria for determining sensitive information item by item with the auditor.
[0069] Optionally, the execution subject of the present invention can map to the corresponding system or corresponding module according to the parsing result of the table list (i.e., module number and physical table name), obtain field information and automatically assign desensitization identification (sensitive type and desensitization method, etc.), and finally complete the feedback in the form of a file. Later, the present invention can use the desensitization identification file in conjunction with the prepared desensitization algorithm to complete the desensitization task.
[0070] Optionally, the present invention can be adapted to a variety of database types, generate customized desensitization tasks based on different data sources, and ultimately generate highly available desensitized data, but the present invention is not limited to this.
[0071] Optionally, in order to further clarify the solution of the present invention, the present invention provides the following Figure 4 The flowchart shown in the figure compares the flowchart of the traditional method, which embodies the following beneficial effects of the present invention:
[0072] 1. This invention builds a desensitized identification set for test data for the first time, carries out labeling work for more than a hundred systems and modules, and builds a desensitized identification set that can be used for a long time. Compared with traditional labeling methods, it improves the accuracy and reliability of test data desensitization identification.
[0073] 2. The present invention implements a method for quickly obtaining desensitization marks based on table lists. Users only need to provide table list information without manually marking desensitization labels, and can quickly obtain desensitization marks and carry out desensitization work. This not only ensures the security of test data, but also saves the marking cost of test data managers and improves the efficiency of test data supply.
[0074] like Figure 5 As shown, the present invention provides a device for quickly acquiring a desensitized identifier, comprising: an identifier set establishing unit 100, a task information obtaining unit 200 and a desensitized identifier query unit 300;
[0075] The identification set establishment unit 100 is used to pre-establish a corresponding desensitized identification set according to each system, each module and each data table under each database, wherein the desensitized identification set includes a plurality of desensitized identification data, and the desensitized identification data includes at least a module number, a physical table name and a corresponding desensitized identification;
[0076] The task information obtaining unit 200 is used to obtain the module number and physical table name corresponding to the desensitization task when there is a desensitization task;
[0077] The desensitizing identifier query unit 300 is used to query and obtain the corresponding desensitizing identifier from the desensitizing identifier set according to the module number and physical table name corresponding to the desensitizing task.
[0078] Optionally, in some optional implementations, the identification set establishing unit 100 includes: an initial annotation subunit and a model annotation subunit;
[0079] The initial marking subunit is used to perform preliminary marking of keywords of field names of each data table based on data tables, for each system, each module and each database, according to pre-established empirical rules;
[0080] The model annotation subunit is used to identify each data table after preliminary annotation using a pre-trained annotation model, and establish desensitized identification data corresponding to the data in each data table, thereby obtaining the desensitized identification set.
[0081] Optionally, in certain optional implementations, the desensitization identification includes: desensitization type, desensitization method and desensitization approval time;
[0082] The device further comprises: an unavailable identification unit and an available identification unit;
[0083] The unavailable identification unit is used to set the desensitization approval time of the desensitization identification corresponding to the changed content to empty when the structure of any of the data tables changes, wherein the desensitization identification data with the desensitization approval time set to empty is unavailable;
[0084] The identification available unit is used to set the desensitizing approval time of the desensitizing identification corresponding to the changed content to the corresponding timestamp after the user has reviewed and approved the changed content, wherein the desensitizing identification with the desensitizing approval time set to the corresponding timestamp is available.
[0085] Optionally, in some optional implementations, the desensitized identification query unit 300 includes: a module mapping subunit and an identification query subunit;
[0086] The module mapping subunit is used to map to the corresponding module according to the module number and physical table name corresponding to the desensitization task;
[0087] The identifier query subunit is used to obtain field information of the corresponding physical table from the module, and query the desensitized identifier set based on the field information to obtain the corresponding desensitized identifier.
[0088] The present invention provides a computer-readable storage medium having a program stored thereon, and when the program is executed by a processor, the method for quickly obtaining a desensitized identification as described in any one of the above items is implemented.
[0089] like Figure 6 As shown, the present invention provides an electronic device 70, which includes at least one processor 701, and at least one memory 702 and a bus 703 connected to the processor 701; wherein the processor 701 and the memory 702 communicate with each other through the bus 703; the processor 701 is used to call the program instructions in the memory 702 to execute any of the above-mentioned methods for quickly obtaining desensitized identification.
[0090] In the present invention, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0091] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0092] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined in the present invention may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown in the present invention, but will conform to the widest scope consistent with the principles and novel features disclosed in the present invention.
[0093] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A method for quickly obtaining a desensitized identifier, characterized in that: include: According to each data table under each system, each module and each database, a corresponding desensitized identification set is pre-established, wherein the desensitized identification set includes multiple desensitized identification data, and the desensitized identification data at least includes a module number, a physical table name and a corresponding desensitized identification; When there is a desensitization task, obtain the module number and physical table name corresponding to the desensitization task; According to the module number and physical table name corresponding to the desensitizing task, the corresponding desensitizing identifier is obtained from the desensitizing identifier set.
2. The method according to claim 1, characterized in that According to each system, each module and each data table under each database, a corresponding desensitization identification set is pre-established, including: Taking data tables as units, for each data table under each system, each module and each database, the keywords of the field names of each data table are preliminarily marked according to pre-established empirical rules; Each data table after preliminary annotation is identified using a pre-trained annotation model, and desensitized identification data corresponding to the data in each data table is established, thereby obtaining the desensitized identification set.
3. The method according to claim 1, characterized in that The desensitization mark includes: desensitization type, desensitization method and desensitization approval time; The method further comprises: When the structure of any of the data tables changes, the desensitization approval time of the desensitization mark corresponding to the changed content is set to empty, wherein the desensitization mark data with the desensitization approval time set to empty is unavailable; After the user has reviewed and approved the changed content, the desensitizing approval time of the desensitizing mark corresponding to the changed content is set to the corresponding timestamp, wherein the desensitizing mark with the desensitizing approval time set to the corresponding timestamp is available.
4. The method according to claim 1, characterized in that The step of obtaining a corresponding desensitization identifier from the desensitization identifier set according to the module number and the physical table name corresponding to the desensitization task includes: According to the module number and physical table name corresponding to the desensitization task, map to the corresponding module; The field information of the corresponding physical table is obtained from the module, and based on the field information, the corresponding desensitized identifier is queried from the desensitized identifier set to obtain the corresponding desensitized identifier.
5. A device for quickly obtaining a desensitization mark, characterized in that: include: An identification set establishing unit, a task information obtaining unit and a desensitized identification query unit; The identification set establishment unit is used to pre-establish a corresponding desensitized identification set according to each system, each module and each data table under each database, wherein the desensitized identification set includes multiple desensitized identification data, and the desensitized identification data at least includes a module number, a physical table name and a corresponding desensitized identification; The task information obtaining unit is used to obtain the module number and physical table name corresponding to the desensitization task when there is a desensitization task; The desensitizing identifier query unit is used to query and obtain the corresponding desensitizing identifier from the desensitizing identifier set according to the module number and physical table name corresponding to the desensitizing task.
6. The device according to claim 5, characterized in that The identification set establishment unit includes: an initial annotation subunit and a model annotation subunit; The initial marking subunit is used to perform preliminary marking of keywords of field names of each data table based on data tables, for each system, each module and each database, according to pre-established empirical rules; The model annotation subunit is used to identify each data table after preliminary annotation using a pre-trained annotation model, and establish desensitized identification data corresponding to the data in each data table, thereby obtaining the desensitized identification set.
7. The device according to claim 5, characterized in that The desensitization mark includes: desensitization type, desensitization method and desensitization approval time; The device further comprises: an unavailable identification unit and an available identification unit; The unavailable identification unit is used to set the desensitization approval time of the desensitization identification corresponding to the changed content to empty when the structure of any of the data tables changes, wherein the desensitization identification data with the desensitization approval time set to empty is unavailable; The identification available unit is used to set the desensitizing approval time of the desensitizing identification corresponding to the changed content to the corresponding timestamp after the user has reviewed and approved the changed content, wherein the desensitizing identification with the desensitizing approval time set to the corresponding timestamp is available.
8. The device according to claim 5, characterized in that The desensitized identification query unit includes: a module mapping subunit and an identification query subunit; The module mapping subunit is used to map to the corresponding module according to the module number and physical table name corresponding to the desensitization task; The identifier query subunit is used to obtain field information of the corresponding physical table from the module, and query the desensitized identifier set based on the field information to obtain the corresponding desensitized identifier.
9. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by the processor, the method for quickly obtaining a desensitized identifier as described in any one of claims 1 to 4 is implemented.
10. An electronic device, characterized in that: The electronic device includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; the processor is used to call program instructions in the memory to execute the method for quickly obtaining desensitized identification as described in any one of claims 1 to 4.