Sensitive data labeling method and device based on multiple models and storage medium

Sensitive data is labeled by using a multi-model fusion approach. By utilizing the results and feature vectors of multiple label classification models, the problem of insufficient labeling accuracy of a single model is solved, and higher labeling accuracy is achieved.

CN118709223BActive Publication Date: 2025-11-18SHANGHAI GUAN AN INFORMATION TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410818753.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2025-11-18
Estimated Expiration
2044-06-24

AI Technical Summary

Technical Problem

When using a single trained model to label sensitive data in existing technologies, it is difficult to guarantee labeling accuracy, especially when the sample dataset is limited.

Method used

At least two label classification models are used to classify the sensitive data. The final label is determined by combining the label classification results of each model and the feature vector output by the fully connected layer.

Benefits of technology

It improved the labeling accuracy of sensitive data and enhanced the accuracy and reliability of labeling through multi-model fusion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118709223B_ABST
    Figure CN118709223B_ABST
Patent Text Reader

Abstract

The application discloses a sensitive data labeling method and device based on multiple models and a storage medium. It relates to the technical field of data security, and the method comprises the following steps: obtaining sensitive data to be labeled; using at least two label classification models to label and classify the sensitive data, and obtaining label classification results corresponding to the at least two label classification models respectively; determining a first label corresponding to the sensitive data based on the label classification results corresponding to the at least two label classification models respectively; simultaneously determining a second label corresponding to the sensitive data according to feature vectors output by full connection layers of the at least two label classification models respectively; and labeling the sensitive data based on the first label and the second label. The application can improve the labeling accuracy of sensitive data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data security technology, and in particular to a method, apparatus and storage medium for sensitive data annotation based on multiple models. Background Technology

[0002] In today's digital age, data security has become an indispensable and crucial issue for enterprises and organizations. With the continuous expansion of data volume and the diversification of data types, the classification and labeling of sensitive data has become increasingly critical. The leakage of sensitive data can lead to serious legal liabilities, reputational damage, and financial losses. Faced with massive amounts of data, how to quickly and accurately label sensitive data is a pressing technical problem that needs to be solved.

[0003] Currently, a single trained model is typically used to label sensitive data. However, for specific domains and tasks, the number of sample datasets is often limited. When the sample dataset is limited, this method of labeling sensitive data using a single trained model is difficult to guarantee the labeling accuracy of sensitive data. Summary of the Invention

[0004] In view of this, this application provides a method, apparatus and storage medium for sensitive data annotation based on multiple models, which mainly improves the annotation accuracy of sensitive data.

[0005] According to a first aspect of this application, a sensitive data annotation method based on multiple models is provided, the method comprising:

[0006] Obtain the sensitive data to be labeled;

[0007] The sensitive data is classified using at least two label classification models to obtain the label classification results corresponding to the at least two label classification models respectively.

[0008] Based on the label classification results corresponding to the at least two label classification models, determine the first label corresponding to the sensitive data;

[0009] Simultaneously, based on the feature vectors output by the fully connected layers of the at least two label classification models, the second label corresponding to the sensitive data is determined;

[0010] The sensitive data is labeled based on the first label and the second label.

[0011] According to a second aspect of this application, a multi-model-based sensitive data annotation apparatus is provided, the apparatus comprising:

[0012] The acquisition unit is used to acquire sensitive data to be labeled;

[0013] A classification unit is used to classify the sensitive data using at least two label classification models, and to obtain the label classification results corresponding to the at least two label classification models respectively.

[0014] The first determining unit is used to determine the first label corresponding to the sensitive data based on the label classification results corresponding to the at least two label classification models respectively;

[0015] The second determining unit is used to simultaneously determine the second label corresponding to the sensitive data based on the feature vectors output by the fully connected layers of the at least two label classification models.

[0016] The annotation unit is used to annotate the sensitive data based on the first label and the second label.

[0017] According to a third aspect of this application, a storage medium is provided that stores a computer program thereon, which, when executed by a processor, implements the above-described multi-model-based sensitive data annotation method.

[0018] According to a fourth aspect of this application, an electronic device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor executes the program to implement the above-described multi-model-based sensitive data annotation method.

[0019] By employing the above technical solution, this application provides a method, apparatus, and storage medium for sensitive data annotation based on multiple models. First, sensitive data is classified using at least two label classification models to obtain label classification results corresponding to each of the at least two models. Then, based on the label classification results of the at least two models, a first label corresponding to the sensitive data is determined. Simultaneously, based on the feature vectors output by the fully connected layers of each of the at least two label classification models, a second label corresponding to the sensitive data is determined. Finally, the sensitive data is annotated based on the first and second labels. Therefore, this invention improves the annotation accuracy of sensitive data by using at least two label classification models to classify sensitive data and combining the label classification results of the at least two models. Furthermore, this invention fully considers the influence of the feature vectors output by the fully connected layers of each of the at least two label classification models on the labeling results, thereby further improving the annotation accuracy of sensitive data.

[0020] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0021] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0022] Figure 1 The illustration shows a flowchart of a sensitive data annotation method based on multiple models provided in an embodiment of this application;

[0023] Figure 2 This illustration shows a flowchart of another sensitive data annotation method based on multiple models provided in an embodiment of this application;

[0024] Figure 3 A schematic diagram of a sensitive data annotation device based on multiple models provided in an embodiment of this application is shown.

[0025] Figure 4 This paper presents a schematic diagram of another sensitive data annotation device based on multiple models provided in an embodiment of this application. Detailed Implementation

[0026] The present application will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the embodiments of the present application can be combined with each other.

[0027] The current method of using a single training model to label sensitive data is difficult to guarantee the accuracy of the labeling of sensitive data.

[0028] To address the aforementioned problems, embodiments of the present invention provide a sensitive data annotation method based on multiple models, such as... Figure 1 As shown, the method includes:

[0029] Step 101: Obtain the sensitive data to be labeled.

[0030] The sensitive data to be labeled includes personal identification information, financial data, and medical records.

[0031] This invention is primarily applicable to scenarios involving the automatic annotation of sensitive data. The executing entity of this invention is a device or equipment capable of automatically annotating sensitive data, which can specifically be located on a server side.

[0032] In this embodiment of the invention, sensitive data to be labeled can be obtained from a database.

[0033] Step 102: Use at least two label classification models to classify the sensitive data, and obtain the label classification results corresponding to the at least two label classification models respectively.

[0034] At least two of the label classification models can be convolutional neural networks (CNNs), which include an input layer, embedding layer, convolutional layer, pooling layer, fully connected layer, and output layer. Different training sets are used for training the different label classification models. There must be at least two label classification models. The label categories involved in the classification results include personal information, financial data, medical data, business secrets, and government secrets, etc.

[0035] For example, sensitive data to be labeled is input into five different convolutional neural network models for label classification. The first three convolutional neural network models output the label classification result as financial data, the fourth convolutional neural network model outputs the label classification result as medical data, and the fifth convolutional neural network model outputs the label classification result as business secrets.

[0036] Step 103: Based on the label classification results corresponding to the at least two label classification models, determine the first label corresponding to the sensitive data.

[0037] In an embodiment of the present invention, when determining the first label corresponding to sensitive data based on the label classification results corresponding to at least two label classification models, step 103 specifically includes: based on the label classification results corresponding to the at least two label classification models, counting the number of times each label involved in the sensitive data is counted; based on the number of times each label is counted, determining the highest number of times and its corresponding label; and based on the label corresponding to the highest number of times, determining the first label.

[0038] When specifically determining the first label, if there is only one label corresponding to the highest number of occurrences, then the label corresponding to the highest number of occurrences is directly determined as the first label.

[0039] For example, the first three convolutional neural network models output the label classification result of financial data, the fourth convolutional neural network model outputs the label classification result of medical data, and the fifth convolutional neural network outputs the label classification result of business secrets. As a result, financial data appears the most frequently, so financial data is directly identified as the first label.

[0040] Furthermore, if there are at least two types of labels corresponding to the highest frequency, then other label classification models besides the at least two label classification models are used to classify the sensitive data to obtain the label classification results corresponding to the other label classification models; the first label is determined based on the label classification results corresponding to the other label classification models and the label classification results corresponding to the at least two label classification models respectively.

[0041] Specifically, the original sensitive dataset is obtained, and a portion of sample data is randomly extracted from the original sensitive dataset without replacement to obtain a training set. Repeating the above process, multiple training sets can be obtained. It should be noted that the sensitive data in the original sensitive dataset has no duplicate data, and different sensitive data have different identifiers. By querying the data identifiers in the training sets, it can be ensured that the sample duplication rate between any two training sets is lower than a preset duplication rate. The preset duplication rate can be set according to actual business needs.

[0042] Then, multiple label classification models are trained using multiple training sets. Next, some label classification models (at least two) are selected from the multiple label classification models to perform label classification on the sensitive data. For example, q label classification models are trained, and q-1 label classification models are selected to perform label classification on the sensitive data, resulting in the label classification results corresponding to the q-1 label classification models.

[0043] After determining the label classification results, the frequency of each label involved in the sensitive data is counted based on the label classification results. If the label corresponding to the highest frequency exists in at least two ways, the remaining label classification models are used to classify the sensitive data. In order to determine the first label corresponding to the sensitive data to be labeled by referring to the label classification results of other label classification models.

[0044] For example, train q label classification models. First, select q-1 label classification models to classify the sensitive data, and obtain the label classification results corresponding to the q-1 label classification models respectively. Based on the label classification results, determine that the label with the highest frequency is financial data and medical data. In order to determine whether the first label is financial data or medical data, use the last label classification model that has not been used before to classify the sensitive data. Finally, based on the label classification results corresponding to these q label classification models, select the label with the highest frequency as the first label.

[0045] Step 104: Simultaneously, determine the second label corresponding to the sensitive data based on the feature vectors output by the fully connected layers of the at least two label classification models.

[0046] In this embodiment of the invention, the fully connected layer in the label classification model outputs a feature vector. After being mapped by the softmax function, this feature vector yields the probability values ​​of the sensitive data to be labeled belonging to different labels. There is a situation where the probability value corresponding to a feature component at a certain position is not the highest, but the probability value corresponding to that feature component is relatively high in each label classification model. In this case, to ensure the labeling accuracy of the sensitive data, it is necessary to further consider the feature vectors output by the fully connected layers in each label classification model.

[0047] For the above process, step 104 specifically includes: superimposing the feature vectors output by the fully connected layers of the at least two label classification models to obtain a superimposed feature vector; and determining the second label based on the superimposed feature vector.

[0048] When superimposing the feature vectors output by the fully connected layer, the feature vectors output by the fully connected layers of the at least two label classification models are added together and then averaged to obtain the superimposed feature vector.

[0049] When determining the second label, the label corresponding to the maximum probability value is determined based on the superimposed feature vector. If there is only one label corresponding to the maximum probability value, the label corresponding to the maximum probability value is directly determined as the second label. If there are at least two labels corresponding to the maximum probability value, the sensitive data is labeled using other label classification models besides the at least two label classification models, and the feature vectors output by the fully connected layers of the other label classification models are obtained. The second label is determined based on the feature vectors output by the fully connected layers of the other label classification models.

[0050] Specifically, after the superimposed feature vectors are processed by the softmax layer, the probability values ​​of the sensitive data to be labeled belonging to different labels are obtained. Based on the probability values ​​of the sensitive data belonging to different labels, the label corresponding to the maximum probability value can be determined.

[0051] For example, when training q label classification models, q-1 label classification models are first selected to classify the sensitive data, resulting in feature vectors output by the fully connected layers of these q-1 models. These feature vectors are then superimposed to obtain a final feature vector. Based on this final feature vector, the label corresponding to the highest probability value can be determined. If the label corresponding to the highest probability value only involves financial data, then financial data is directly identified as the second label. If the label corresponding to the highest probability value involves both financial and medical data, then the last label classification model that was not previously used is used to classify the sensitive data. Finally, the feature vectors output by the fully connected layers of these q label classification models are superimposed to determine the second label.

[0052] Step 105: Based on the first tag and the second tag, label the sensitive data.

[0053] In this embodiment of the invention, after determining the first label and the second label, to ensure the labeling accuracy of sensitive data, it is necessary to comprehensively consider the first label and the second label when labeling the sensitive data. Specifically, step 105 includes: if the first label and the second label are the same label, then label the sensitive data according to the same label; if the first label and the second label are not the same label, then use a label classification model other than the at least two label classification models to classify the sensitive data, obtaining the label classification results corresponding to the other label classification models; and label the sensitive data according to the label classification results corresponding to the other label classification models and the label classification results corresponding to the at least two label classification models.

[0054] For example, if both the first and second labels are financial data, the sensitive data is directly labeled as financial data; if the second label is financial data and the third label is medical data, the sensitive data is labeled by combining the label classification results of all label classification models. For example, the sensitive data is labeled by combining the label classification results of q label classification models and selecting the lowest and highest label.

[0055] This invention provides a multi-model-based sensitive data annotation method. By utilizing at least two label classification models to classify sensitive data and combining the label classification results of the at least two models, the sensitive data is labeled, thereby improving the annotation accuracy of sensitive data. Furthermore, this invention fully considers the impact of the feature vectors output by the fully connected layers of the at least two label classification models on the labeling results when annotating sensitive data, thus further improving the annotation accuracy of sensitive data.

[0056] Furthermore, as a refinement and extension of the specific implementation methods of the above embodiments, and to fully illustrate the implementation methods of this embodiment, this embodiment also provides another sensitive data annotation method based on multiple models, such as... Figure 2 As shown, the method includes:

[0057] Step 201: Obtain the sensitive data to be labeled.

[0058] In this embodiment of the invention, sensitive data to be labeled can be obtained from a database.

[0059] Step 202: Extract the embedding vectors of the sensitive data using at least two embedding vector extraction models.

[0060] Each of the at least two embedding vector extraction models corresponds to a label classification model. Specifically, the embedding vector extraction model can be a BERT model, and the label classification model can be a neural network model containing pooling layers, fully connected layers, and a softmax function.

[0061] In addition to directly using convolutional neural networks to perform label classification on sensitive data, embodiments of the present invention can also first use the BERT model to extract the embedding vectors of sensitive data, and then perform a label classification task based on the embedding vectors.

[0062] In this embodiment of the invention, the sensitive data to be labeled is input into at least two BERT models for embedding vector extraction, resulting in at least two embedding vectors corresponding to the sensitive data. The at least two BERT models are fine-tuned using different training sets.

[0063] Step 203: Input at least two embedding vectors corresponding to the sensitive data into the corresponding label classification models for label classification, and obtain the label classification results corresponding to the at least two label classification models respectively.

[0064] In this embodiment of the invention, after obtaining at least two embedding vectors corresponding to the sensitive data, these two embedding vectors are respectively input into the corresponding pooling layer and fully connected layer for processing to obtain at least two label classification results. The pooling layer reduces the dimensionality of the embedding vectors, specifically using max pooling or average pooling. Pooling not only reduces the complexity of the embedding vectors but also extracts key features of the sensitive data. The pooled result serves as the input to the fully connected layer, which typically employs a multi-layer fully connected network composed of neurons. This layer classifies the input labels and outputs the probability values ​​of the sensitive data belonging to different labels.

[0065] To ensure the accuracy of the annotation results and reduce the computational load during the classification process, this embodiment of the invention can pre-screen the embedding vectors. Only embedding vectors that meet the conditions will be input into the pooling layer and the fully connected layer for subsequent classification tasks.

[0066] For this process, the method includes: extracting target embedding vectors of the sensitive data using a preset embedding vector extraction model, wherein the number of samples in the training set of the preset embedding vector extraction model is greater than the number of samples in the training sets of the at least two embedding vector extraction models; calculating the distance between the at least two embedding vectors and the target embedding vector; selecting embedding vectors from the at least two embedding vectors whose distance is less than a preset distance, and determining the target label classification model corresponding to the embedding vectors whose distance is less than the preset distance.

[0067] The preset embedding vector extraction model can also be a BERT model. The training set for the preset embedding vector extraction model is the original sensitive dataset, and the training sets of at least two embedding vector extraction models contain only a portion of the data from the original sensitive dataset. In addition, the preset distance can be set according to actual business needs.

[0068] Specifically, since the training set of the preset embedding vector extraction model has relatively complete sample data, the embedding vectors extracted using the preset embedding vector extraction model are relatively accurate. Therefore, they can be used as target embedding vectors for reference in the embedding vectors output by at least two embedding vector extraction models. When calculating the distance between at least two embedding vectors and the target embedding vector, the Euclidean distance can be used.

[0069] Furthermore, the embedding vectors with a distance less than a preset distance are input into the target label classification model for label classification to obtain the label classification result corresponding to the target label classification model.

[0070] For example, if there are 5 BERT models, each followed by a corresponding pooling layer and a fully connected layer, by calculating the Euclidean distance between the embedding vectors output by these 5 BERT models and the target embedding vector, it is found that only the first three BERT models have a distance less than the preset distance between their output embedding vectors and the target embedding vector. Therefore, the pooling layer and fully connected layer following the first three BERT models are used as the target label classification model.

[0071] Step 204: Based on the label classification results corresponding to the at least two label classification models, determine the first label corresponding to the sensitive data.

[0072] In this embodiment of the invention, the number of each tag involved in the sensitive data can be counted based on the tag classification results corresponding to each target tag classification model, thereby determining the first tag.

[0073] Step 205: Simultaneously, determine the second label corresponding to the sensitive data based on the feature vectors output by the fully connected layers of the at least two label classification models.

[0074] In this embodiment of the invention, the feature vectors output by the fully connected layer of each target label classification model are obtained, and the feature vectors are superimposed to obtain the superimposed feature vector. After the superimposed feature vector is mapped by the softmax function, the probability values ​​of the sensitive data belonging to different labels can be obtained, thereby determining the second label corresponding to the sensitive data.

[0075] Step 206: Based on the first tag and the second tag, label the sensitive data.

[0076] In this embodiment of the invention, if the first label and the second label are the same label, the sensitive data is labeled according to the same label; if the first label and the second label are not the same label, the sensitive data is labeled using other label classification models besides the at least two label classification models to obtain the label classification results corresponding to the other label classification models; the sensitive data is labeled according to the label classification results corresponding to the other label classification models and the label classification results corresponding to the target label classification model.

[0077] For example, consider six BERT models, each followed by a pooling layer and a fully connected layer. First, the first five BERT models are used to extract embedding vectors from the sensitive data. The Euclidean distance between the embedding vectors output by these five BERT models and the target embedding vector is calculated. Assuming that based on this Euclidean distance, only the first three BERT models have embedding vectors whose distances to the target embedding vector are less than a preset distance, the pooling and fully connected layers following these first three BERT models are used as the target label classification models. The first label determined by these three target label classification models is financial data, and the second label is medical data. To determine whether the sensitive data belongs to financial data or medical data, the last BERT model and its corresponding pooling and fully connected layers can be used to classify the sensitive data. Finally, based on the label classification results of the first three BERT models and the last BERT model, the label corresponding to the highest frequency is counted, and the sensitive data is labeled based on this label.

[0078] This invention provides another sensitive data annotation method based on multiple models. By utilizing at least two label classification models to classify sensitive data and combining the label classification results of the at least two models, the sensitive data is labeled, thereby improving the annotation accuracy of sensitive data. Furthermore, this invention fully considers the impact of the feature vectors output by the fully connected layers of the at least two label classification models on the labeling results when annotating sensitive data, thus further improving the annotation accuracy of sensitive data.

[0079] Furthermore, as Figure 1 and Figure 2 The specific implementation of the method shown in this embodiment provides a sensitive data annotation device based on multiple models, such as... Figure 3 As shown, the device includes: an acquisition unit 31, a classification unit 32, a first determination unit 33, a second determination unit 34, and a labeling unit 35.

[0080] The acquisition unit 31 can be used to acquire sensitive data to be labeled.

[0081] The classification unit 32 can be used to classify the sensitive data using at least two label classification models to obtain the label classification results corresponding to the at least two label classification models respectively.

[0082] The first determining unit 33 can be used to determine the first label corresponding to the sensitive data based on the label classification results corresponding to the at least two label classification models respectively.

[0083] The second determining unit 34 can be used to simultaneously determine the second label corresponding to the sensitive data based on the feature vectors output by the fully connected layers of the at least two label classification models.

[0084] The labeling unit 35 can be used to label the sensitive data based on the first label and the second label.

[0085] In some embodiments, the classification unit 32, such as Figure 4 As shown, it includes: extraction module 321 and classification module 322.

[0086] The extraction module 321 can be used to extract the embedding vectors of the sensitive data using at least two embedding vector extraction models, wherein each of the at least two embedding vector extraction models corresponds to a label classification model.

[0087] The classification module 322 can be used to input at least two embedding vectors corresponding to the sensitive data into the corresponding label classification model for label classification, and obtain the label classification results corresponding to the at least two label classification models respectively.

[0088] In some embodiments, the classification unit 32 further includes a calculation module 323 and a filtering module 324.

[0089] The extraction module 321 can also be used to extract the target embedding vector of the sensitive data using a preset embedding vector extraction model, wherein the number of samples in the training set of the preset embedding vector extraction model is greater than the number of samples in the training sets of the at least two embedding vector extraction models.

[0090] The calculation module 323 can be used to calculate the distance between the at least two embedding vectors and the target embedding vector respectively.

[0091] The filtering module 324 can be used to filter out the embedding vectors whose distance is less than a preset distance from the at least two embedding vectors, and determine the target label classification model corresponding to the embedding vector whose distance is less than the preset distance.

[0092] The classification module 322 can be specifically used to input the embedding vector with a distance less than a preset distance into the target label classification model for label classification, so as to obtain the label classification result corresponding to the target label classification model.

[0093] In some embodiments, the first determining unit 33 includes a statistics module 331 and a first determining module 332.

[0094] The statistics module 331 can be used to count the number of times each label involved in the sensitive data is based on the label classification results corresponding to the at least two label classification models.

[0095] The first determining module 332 can be used to determine the highest number of times and its corresponding label based on the number of times each label has been used.

[0096] The first determining module 332 can also be used to determine the first tag based on the tag corresponding to the highest number of times.

[0097] In some embodiments, the first determining module 332 may be specifically used to determine the label corresponding to the highest frequency as the first label if there is only one label corresponding to the highest frequency; if there are at least two labels corresponding to the highest frequency, the sensitive data is labeled using other label classification models besides the at least two label classification models to obtain the label classification results corresponding to the other label classification models; and the first label is determined based on the label classification results corresponding to the other label classification models and the label classification results corresponding to the at least two label classification models respectively.

[0098] In some embodiments, the second determining unit 34 includes: a superposition module 341 and a second determining module 342.

[0099] The superposition module 341 can be used to superimpose the feature vectors output by the fully connected layers of the at least two label classification models to obtain the superimposed feature vector.

[0100] The second determining module 342 can be used to determine the second label based on the superimposed feature vector.

[0101] In some embodiments, the overlay module 341 may be specifically used to add the feature vectors output by the fully connected layers of the at least two label classification models and then take the average to obtain the overlay feature vector.

[0102] In some embodiments, the second determining module 342 may be specifically used to determine the label corresponding to the maximum probability value based on the superimposed feature vector; if there is only one label corresponding to the maximum probability value, then the label corresponding to the maximum probability value is directly determined as the second label; if there are at least two labels corresponding to the maximum probability value, then other label classification models besides the at least two label classification models are used to classify the sensitive data, and the feature vectors output by the fully connected layers of the other label classification models are obtained; the second label is determined according to the feature vectors output by the fully connected layers of the other label classification models.

[0103] In some embodiments, the annotation unit 35 may be specifically used to annotate the sensitive data according to the same label if the first label and the second label are the same label; if the first label and the second label are not the same label, to use other label classification models besides the at least two label classification models to classify the sensitive data and obtain the label classification results corresponding to the other label classification models; and to annotate the sensitive data according to the label classification results corresponding to the other label classification models and the label classification results corresponding to the at least two label classification models respectively.

[0104] It should be noted that other corresponding descriptions of the functional units involved in the multi-model-based sensitive data annotation device provided in this embodiment can be found in [reference]. Figure 1 and Figure 2 The corresponding descriptions in [the document] will not be repeated here.

[0105] Based on the above, Figure 1 and Figure 2 Accordingly, this embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the above-described method. Figure 1 and Figure 2 The method for labeling sensitive data based on multiple models is shown.

[0106] Based on this understanding, the technical solution of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as CD-ROM, USB flash drive, mobile hard drive, etc.) and includes several instructions to cause an electronic device (such as a personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of this application.

[0107] Based on the above, Figure 1 and Figure 2 The method shown, and Figure 3 and Figure 4To achieve the above objectives, the present application also provides an electronic device, specifically a personal computer, tablet computer, server, or other network device, as shown in the virtual device embodiment. This device includes a storage medium and a processor; the storage medium stores a computer program; the processor executes the computer program to achieve the above-described objectives. Figure 1 and Figure 2 The method for labeling sensitive data based on multiple models is shown.

[0108] Optionally, the aforementioned physical devices may also include a user interface, a network interface, a camera, radio frequency (RF) circuitry, sensors, audio circuitry, a Wi-Fi module, etc. The user interface may include a display screen, input units such as a keyboard, etc., and optional user interfaces may also include USB interfaces, card reader interfaces, etc. The network interface may optionally include standard wired interfaces, wireless interfaces (such as Wi-Fi interfaces), etc.

[0109] Those skilled in the art will understand that the physical device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or combine certain components, or have different component arrangements.

[0110] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the aforementioned physical device, supporting the operation of information processing programs and other software and / or programs. The network communication module is used to enable communication between the various components within the storage medium, as well as communication with other hardware and software in the information processing physical device.

[0111] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platform, or it can be implemented by hardware.

[0112] This invention improves the labeling accuracy of sensitive data by utilizing at least two label classification models to classify sensitive data and combining the label classification results of the at least two models. Furthermore, when labeling sensitive data, this invention fully considers the impact of the feature vectors output by the fully connected layers of the at least two label classification models on the labeling results, thereby further improving the labeling accuracy of sensitive data.

[0113] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing this application. Those skilled in the art will understand that the modules in the apparatus of the embodiment can be distributed within the apparatus of the embodiment as described, or can be modified to be located in one or more apparatuses different from this embodiment. The modules of the above-described embodiment can be combined into one module, or further divided into multiple sub-modules.

[0114] The serial numbers in this application are for descriptive purposes only and do not represent the superiority or inferiority of any particular implementation scenario. The above disclosures are merely a few specific implementation scenarios of this application; however, this application is not limited thereto, and any variations conceived by those skilled in the art should fall within the protection scope of this application.

Claims

1. A sensitive data annotation method based on multiple models, characterized in that, include: Obtain the sensitive data to be labeled; The sensitive data is classified using at least two label classification models to obtain the label classification results corresponding to the at least two label classification models respectively. Based on the label classification results corresponding to the at least two label classification models, determine the first label corresponding to the sensitive data; Simultaneously, based on the feature vectors output by the fully connected layers of the at least two label classification models, the second label corresponding to the sensitive data is determined; The sensitive data is labeled based on the first label and the second label; Specifically, determining the first label corresponding to the sensitive data based on the label classification results corresponding to the at least two label classification models includes: Based on the label classification results corresponding to the at least two label classification models, the number of times each label involved in the sensitive data is counted. Based on the frequency of each label, determine the highest frequency and its corresponding label; The first label is determined based on the label corresponding to the highest number of occurrences; Determine the first label based on the label corresponding to the highest frequency, including: If there is only one label corresponding to the highest frequency, then the label corresponding to the highest frequency is directly determined as the first label; If there are at least two types of labels corresponding to the highest frequency, then other label classification models besides the at least two label classification models are used to classify the sensitive data to obtain the label classification results corresponding to the other label classification models; The first label is determined based on the label classification results corresponding to the other label classification models and the label classification results corresponding to the at least two label classification models.

2. The method according to claim 1, characterized in that, The step of classifying the sensitive data using at least two label classification models to obtain the label classification results corresponding to the at least two label classification models includes: The at least two embedding vector extraction models are used to extract the embedding vectors of the sensitive data, wherein each of the at least two embedding vector extraction models corresponds to a label classification model; The at least two embedding vectors corresponding to the sensitive data are input into the corresponding label classification models for label classification, and the label classification results corresponding to the at least two label classification models are obtained respectively.

3. The method according to claim 2, characterized in that, Before inputting at least two embedding vectors corresponding to the sensitive data into the corresponding label classification models for label classification to obtain the label classification results corresponding to the at least two label classification models respectively, the method further includes: The target embedding vector of the sensitive data is extracted using a preset embedding vector extraction model, wherein the number of samples in the training set of the preset embedding vector extraction model is greater than the number of samples in the training sets of the at least two embedding vector extraction models. Calculate the distances between the at least two embedding vectors and the target embedding vector, respectively; Filter out the embedding vectors whose distance is less than a preset distance from the at least two embedding vectors, and determine the target label classification model corresponding to the embedding vectors whose distance is less than the preset distance; At least two embedding vectors corresponding to the sensitive data are input into the corresponding label classification models for label classification, and the label classification results corresponding to the at least two label classification models are obtained respectively, including: The embedding vectors with a distance less than a preset distance are input into the target label classification model for label classification, and the label classification result corresponding to the target label classification model is obtained.

4. The method according to claim 1, characterized in that, Based on the feature vectors output by the fully connected layers of the at least two label classification models, determine the second label corresponding to the sensitive data, including: The feature vectors output by the fully connected layers of the at least two label classification models are superimposed to obtain the superimposed feature vector. Based on the superimposed feature vector, determine the second label; and / or Based on the first tag and the second tag, the sensitive data is labeled, including: If the first tag and the second tag are the same tag, then the sensitive data is labeled according to the same tag; If the first label and the second label are not the same label, then other label classification models besides the at least two label classification models are used to classify the sensitive data to obtain the label classification results corresponding to the other label classification models; The sensitive data is labeled based on the label classification results corresponding to the other label classification models and the label classification results corresponding to the at least two label classification models respectively.

5. The method according to claim 4, characterized in that, The feature vectors output by the fully connected layers of the at least two label classification models are superimposed to obtain the superimposed feature vector, which includes: The feature vectors output by the fully connected layers of the at least two label classification models are summed and averaged to obtain the superimposed feature vector; and / or Determining the second label based on the superimposed feature vector includes: Based on the superimposed feature vector, determine the label corresponding to the maximum probability value; If there is only one label corresponding to the maximum probability value, then the label corresponding to the maximum probability value is directly determined as the second label; If there are at least two labels corresponding to the maximum probability value, then other label classification models besides the at least two label classification models are used to classify the sensitive data, and the feature vectors output by the fully connected layers of the other label classification models are obtained. The second label is determined based on the feature vector output by the fully connected layer of the other label classification model.

6. A sensitive data annotation device based on multiple models, characterized in that, include: The acquisition unit is used to acquire sensitive data to be labeled; A classification unit is used to classify the sensitive data using at least two label classification models, and to obtain the label classification results corresponding to the at least two label classification models respectively. The first determining unit is used to determine the first label corresponding to the sensitive data based on the label classification results corresponding to the at least two label classification models respectively; The second determining unit is used to simultaneously determine the second label corresponding to the sensitive data based on the feature vectors output by the fully connected layers of the at least two label classification models. A labeling unit is used to label the sensitive data based on the first label and the second label; The first determining unit includes: a statistics module and a first determining module; The statistics module is used to count the number of times each label involved in the sensitive data is based on the label classification results corresponding to the at least two label classification models respectively. The first determining module is used to determine the highest number of occurrences and its corresponding tag based on the number of occurrences of each tag; The first determining module is further configured to determine the first tag based on the tag corresponding to the highest number of times; The first determining module is specifically used to determine the label corresponding to the highest frequency as the first label if there is only one label corresponding to the highest frequency; if there are at least two labels corresponding to the highest frequency, the sensitive data is labeled using other label classification models besides the at least two label classification models to obtain the label classification results corresponding to the other label classification models; and the first label is determined based on the label classification results corresponding to the other label classification models and the label classification results corresponding to the at least two label classification models respectively.

7. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 5.

8. An electronic device comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Data labeling method and device, electronic equipment and storage medium

    CN113159133A

  • Data classification method and device and storage medium

    CN113868497A