Classification model training method and apparatus

By generating and filtering negative samples based on positive sample training data, a multi-stage classification model is trained, which solves the problem of insufficient positive samples in privacy data identification and achieves efficient privacy data identification in complex scenarios.

CN115017994BActive Publication Date: 2026-04-07ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-13
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing technologies suffer from insufficient positive samples in privacy data identification scenarios, which significantly reduces the prediction performance of deep models. Furthermore, existing privacy data identification methods have poor accuracy when the sample format is inconsistent or metadata is missing.

Method used

By acquiring positive sample training data and generating initial negative samples using at least two data augmentation methods, a first classification model is trained. Then, target negative samples are selected to further train a second classification model, thereby improving the model's ability to identify privacy data in complex character structures and noisy scenarios.

Benefits of technology

In the case of only positive samples, high-quality negative sample training data is generated to improve the training effect of the classification model, enabling it to quickly and accurately identify privacy data in the data warehouse, especially performing well in complex character structures and noisy scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115017994B_ABST
    Figure CN115017994B_ABST
Patent Text Reader

Abstract

Embodiments of the present specification provide a classification model training method and device, wherein the method comprises obtaining positive sample training data, and performing data augmentation on the positive sample training data according to at least two data augmentation methods to obtain initial negative sample training data; training a first classification model according to the positive sample training data and the initial negative sample training data; obtaining target negative sample training data according to the at least two data augmentation methods, the initial negative sample training data, and the first classification model; and training a second classification model according to the positive sample training data and the target negative sample training data. Specifically, the method can train a corresponding classification model according to the positive sample training data and negative sample training data obtained through the data augmentation method, improve the training effect of the classification model, and enable the classification model to be applied to a privacy data identification scene subsequently, so that the classification model can quickly and accurately identify privacy data in a data warehouse.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments in this specification relate to the field of computer technology, and in particular to a classification model training method. Background Technology

[0002] With the development of information technology and the widespread use of mobile smart devices, people are constantly generating data, and large companies and institutions have collected and accumulated massive amounts of user data. Much of this data is private (such as ID numbers). In recent years, the impact and consequences of data breaches at major companies have been extremely serious, making data security a bottom line for businesses and institutions. Before undertaking any privacy protection work, the first crucial step is identifying which data is private. For large internet companies or institutions storing vast amounts of user data, identifying which fields are private from tens of thousands of data tables has become a challenging problem.

[0003] In existing technologies, privacy data identification is usually based on deep models. However, in privacy data identification scenarios, there are often only positive samples, which will undoubtedly greatly reduce the prediction effect of the deep models trained. Summary of the Invention

[0004] In view of this, embodiments of this specification provide a classification model training method. One or more embodiments of this specification also relate to a classification model training apparatus, a data processing method, a data processing apparatus, a computing device, a computer-readable storage medium, and a computer program, to address the technical deficiencies existing in the prior art.

[0005] According to a first aspect of the embodiments of this specification, a classification model training method is provided, comprising:

[0006] Obtain positive sample training data, and perform data augmentation on the positive sample training data according to at least two data augmentation methods to obtain initial negative sample training data, wherein the positive sample training data is user privacy data;

[0007] A first classification model is trained based on the positive sample training data and the initial negative sample training data.

[0008] Based on the at least two data augmentation methods, the initial negative sample training data, and the first classification model, target negative sample training data is obtained;

[0009] A second classification model is obtained by training the positive sample training data and the target negative sample training data.

[0010] According to a second aspect of the embodiments of this specification, a classification model training apparatus is provided, comprising:

[0011] The initial data acquisition module is configured to acquire positive sample training data and perform data augmentation on the positive sample training data according to at least two data augmentation methods to obtain initial negative sample training data, wherein the positive sample training data is user privacy data;

[0012] The first model training module is configured to train a first classification model based on the positive sample training data and the initial negative sample training data.

[0013] The target data acquisition module is configured to obtain target negative sample training data based on the at least two data augmentation methods, the initial negative sample training data, and the first classification model.

[0014] The second model training module is configured to train a second classification model based on the positive sample training data and the target negative sample training data.

[0015] According to a third aspect of the embodiments of this specification, a data processing method is provided, comprising:

[0016] Identify the data to be tested;

[0017] The data to be detected is input into the classification model to obtain the detection result of the data to be detected;

[0018] Based on the detection results, determine whether the data to be detected is the target data.

[0019] The classification model is a model trained using the classification model training method described above.

[0020] According to a fourth aspect of the embodiments of this specification, a data processing apparatus is provided, comprising:

[0021] The data determination module is configured to determine the data to be detected;

[0022] The result acquisition module is configured to input the data to be detected into a classification model to obtain the detection result of the data to be detected.

[0023] The data judgment module is configured to determine whether the data to be detected is target data based on the detection result.

[0024] The classification model is a model trained using the classification model training method described above.

[0025] According to a fifth aspect of the embodiments of this specification, a computing device is provided, comprising:

[0026] Memory and processor;

[0027] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, they implement the steps of the above-described classification model training method or data processing method.

[0028] According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores computer-executable instructions, which, when executed by a processor, implement the steps of the above-described classification model training method or data processing method.

[0029] According to a seventh aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the above-described classification model training method or data processing method.

[0030] One embodiment of this specification implements a classification model training method and apparatus. The classification model training method includes acquiring positive sample training data and performing data augmentation on the positive sample training data using at least two data augmentation methods to obtain initial negative sample training data, wherein the positive sample training data is user privacy data; training a first classification model based on the positive sample training data and the initial negative sample training data; obtaining target negative sample training data based on the at least two data augmentation methods, the initial negative sample training data, and the first classification model; and training a second classification model based on the positive sample training data and the target negative sample training data.

[0031] Specifically, this classification model training method can generate negative sample training data by combining at least two data augmentation methods when only positive sample training data exists. This allows the corresponding classification model to be trained based on the positive sample training data and the negative sample training data obtained through data augmentation methods, thereby improving the training effect of the classification model. This enables the classification model to quickly and accurately identify private data in the data warehouse when it is subsequently applied to privacy data identification scenarios. Attached Figure Description

[0032] Figure 1 This is a flowchart illustrating a classification model training method provided in one embodiment of this specification;

[0033] Figure 2 This is a flowchart illustrating the processing steps of a classification model training method provided in one embodiment of this specification.

[0034] Figure 3 This is a schematic diagram of a two-stage training method for a classification model processing method provided in one embodiment of this specification;

[0035] Figure 4 This is a schematic diagram of the structure of a classification model training device provided in one embodiment of this specification;

[0036] Figure 5 This is a flowchart illustrating a data processing method provided in one embodiment of this specification;

[0037] Figure 6 This is a specific classification diagram of a classification model in a data processing method provided in one embodiment of this specification;

[0038] Figure 7 This is a schematic diagram of the structure of a classification model training device provided in one embodiment of this specification;

[0039] Figure 8 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation

[0040] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.

[0041] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0042] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."

[0043] First, the terms and concepts used in one or more embodiments of this specification will be explained.

[0044] Personal Information refers to various information recorded electronically or otherwise that can, alone or in combination with other information, identify a specific natural person or reflect the activities of a specific natural person.

[0045] Personal sensitive information, also known as private data, refers to personal information that, if leaked, illegally provided, or misused, may endanger personal safety and property, and is highly likely to cause damage to personal reputation, mental and physical health, or discriminatory treatment.

[0046] Semi-supervised learning (SSL) is a learning method that combines supervised and unsupervised learning. It uses a large amount of unlabeled data, along with labeled data, to perform pattern recognition tasks. When using semi-supervised learning, it requires as few people as possible to perform the work, while still achieving relatively high accuracy.

[0047] Classification problems: Classification problems are generally considered to belong to supervised learning, that is, the goal of classification problems is to determine which known sample class a new sample belongs to based on certain features of known samples; classification problems can also be further divided into binary classification and multi-class classification problems based on the number of categories.

[0048] Positive sample and unlabeled learning: Positive sample and unlabeled learning (PU learning) is a research direction in semi-supervised learning, which refers to training a binary classifier with only positive samples and unlabeled data.

[0049] Privacy data includes, but is not limited to, basic personal information (personal name, date of birth, ethnicity, nationality, family relationship, address, personal phone number, email address, etc.), personal identification information (ID card, military officer's certificate, passport, driver's license, work permit, access card, social security card, residence permit, etc.), personal biometric information (personal genes, fingerprints, voiceprints, iris prints, palm prints, earlobes, irises, facial features, etc.), online identity information (system account, IP address, email address and related passwords, passphrases, password protection answers, user's personal digital certificate, etc.), personal health and physiological information (relevant records generated by personal illness and treatment, such as symptoms, hospitalization records, doctor's orders, test reports, surgical and anesthesia records, nursing records, medication records, drug and food allergy information, reproductive information, past medical history, diagnosis and treatment, family medical history, current medical history, infectious disease history, etc., as well as information related to personal health status, such as weight, height, lung capacity, etc.), and personal information. Educational work information (personal occupation, position, employer, education, degree, educational background, work experience, training records, transcripts, etc.), personal property information (bank account, authentication information (password), deposit information (including amount of funds, payment and receipt records, etc.), real estate information, credit records, credit information, transaction and consumption records, bank statements, etc., as well as virtual property information such as virtual currency, virtual transactions, and game redemption codes), personal communication information (communication records and content, SMS, MMS, emails, and data describing personal communications (usually called metadata), contact information (address book, friend list, group list, email address list, etc.), personal internet browsing records (referring to user operation records stored in logs, including website browsing records, software usage records, click records, etc.), and personal frequently used device information (referring to information including hardware serial number, device MAC address, software list, unique device identifier (such as IMEI / Android)). Information describing basic information about a person's frequently used devices, including ID / IDFA / OPENUDID / GUID, SIM card IMSI information, etc., personal location information (including whereabouts, precise location information, accommodation information, latitude and longitude, etc.), and other information (marital history, beliefs, undisclosed criminal records, etc.).

[0050] This specification provides a method for training a classification model. One or more embodiments of this specification also relate to a classification model training apparatus, a data processing method, a data processing device, a computing device, a computer-readable storage medium, and a computer program, which will be described in detail in the following embodiments.

[0051] Regarding the problem of privacy data recognition, the embodiments of this specification provide a privacy data recognition scheme based on multi-classification. By using a large number of pre-annotated privacy data types, a multi-classification model is learned using machine learning or deep learning algorithms. Then, for the data to be detected, through the multi-classification model, the category with the highest posterior probability is output as the data type of the data to be recognized. Another privacy data recognition scheme based on metadata information is also provided. By using a large number of annotated metadata information, a multi-classification model is learned using machine learning or deep learning algorithms. Then, the multi-classification model is used to predict the metadata of the data table or data column to be detected, and the category with the highest posterior probability is output as the data type of the data to be recognized. Another scheme for recognizing privacy data based on regular expressions is also provided. For example, for privacy data: mobile phone numbers can be represented by the regular expression "^1[3-9][0-9]{9}$", and any field that matches this regular expression is a mobile phone number field.

[0052] However, for the privacy data recognition scheme based on multi-classification, model training and classification are generally carried out based on the existing form of privacy data. That is, the form of privacy data needs to be consistent with the data form during training to obtain better results. For example, if the date of birth in the training data is saved in the form of "xxxx year xx month xx day", but the date of birth in the test data is saved in the form of "xxxx-xx-xx", then the model cannot obtain good results. And when it is necessary to increase the categories of privacy data, the entire model needs to be retrained, and the model scalability is poor. The privacy data recognition scheme based on metadata information requires the database to have relatively comprehensive metadata. For databases with missing metadata information, this technical scheme cannot be used for recognition. At the same time, there are also cases where the metadata information is inconsistent with the actual stored information, reducing the recognition accuracy of the scheme. The scheme for recognizing privacy data based on regular expressions generally uses regular expressions. Although the regular expression form is relatively simple, intuitive and easy to understand, its disadvantage is that it is only suitable for the case where the character structure of privacy data is relatively simple and the text length is relatively short, generally less than 20 characters, and it is applicable to strings composed of numbers and letters. It is not applicable to long text type strings, such as personal delivery addresses, voiceprints, faceprints, eye prints, etc.

[0053] Therefore, to further address the aforementioned technical problems, the second classification model obtained through the classification model training method provided in the embodiments of this specification can solve the problem of privacy data recognition in scenarios with only a small number of positive privacy information samples and complex character structures. The classification model in the classification model training method of the embodiments of this specification, by drawing on relevant models in the field of natural language processing, adopts a method based on positive samples and unlabeled learning. This allows the classification model to be trained using a small number of positive samples and unlabeled samples generated through data augmentation, which can then be used to automatically identify privacy data in the data warehouse. Furthermore, the classification model in the classification model training method of the embodiments of this specification has good recognition performance in scenarios where there is noise in the positive samples. Simultaneously, the embodiments of this specification also provide an interactive classification model training process, allowing users to further improve the performance of the classification model by providing data based on the feedback from the classification model.

[0054] Specifically, in the embodiments of this specification, a binary classification model is used as an example for detailed description.

[0055] Taking place name privacy data as an example, the training samples and their labels for the binary classification model are shown in Table 1.

[0056] Table 1

[0057] serial number Training samples Sample Labels Positive Sample 1 A village in a city in Province A 1 Positive Sample 2 A certain street in a certain district of City B 1 ... ... ... Negative Sample 1 Advertising recommendation algorithm 0 Negative Sample 2 Quick style generation 0 ... ... ...

[0058] In this context, label 1 indicates private data, and label 0 indicates non-private data.

[0059] In practical applications, the model takes a sample as input, passes it through an encoding layer (Embedding Layer) and a hidden layer (Hidden Layer), and outputs a probability vector. The first bit of this probability matrix represents the probability that the sample's label is 0, and the second bit represents the probability that the sample's label is 1. The two probability values ​​are added together to equal 1. When the model predicts that the probability of a sample's label being 1 is higher than the probability of the sample's label being 0, the model classifies the sample as a positive sample.

[0060] In addition, commonly used evaluation metrics for binary classification models include accuracy, recall, and precision, the specific formulas for which are as follows:

[0061]

[0062]

[0063]

[0064] Wherein, TP (True Positive) represents the number of positive samples predicted as positive, FP (False Positive) represents the number of negative samples predicted as positive, TN (True Negative) represents the number of negative samples predicted as negative, and FN (False Negative) represents the number of positive samples predicted as negative.

[0065] See Figure 1 , Figure 1 A flowchart of a classification model training method according to an embodiment of this specification is shown, which specifically includes the following steps.

[0066] Step 102: Obtain positive sample training data, and perform data augmentation on the positive sample training data according to at least two data augmentation methods to obtain initial negative sample training data.

[0067] The positive sample training data is user privacy data.

[0068] Specifically, the at least two data augmentation methods include a random data augmentation method, a data augmentation method generated from the same vocabulary, a random insertion data augmentation method, a random deletion data augmentation method, a rearrangement data augmentation method, a frequency-based data augmentation method, and / or a random cross-reference data augmentation method.

[0069] The random data augmentation method can be understood as randomly generating strings of length 3-50 from numbers, English words, and commonly used Chinese characters. These numbers, English words, and commonly used Chinese characters can be determined from publicly available online content or from a dictionary. The same dictionary-generated data augmentation method can be understood as statistically analyzing all characters appearing in the positive sample (distribution F1) and the sample length (distribution F2), uniformly sampling from distribution F2 to obtain the required negative sample length L, and uniformly sampling from distribution F1 to generate negative samples of length L. The random insertion data augmentation method can be understood as randomly sampling 2-5 consecutive characters from a given sample (such as a positive sample) and randomly inserting the string at a certain point in the positive sample. The random deletion data augmentation method can be understood as randomly selecting 2-5 consecutive characters from the positive sample. The following data augmentation methods can be categorized into several types: character deletion and rearrangement. Character rearrangement can be understood as randomly rearranging the characters in a given pair of samples. Frequency-based data augmentation involves statistically analyzing all characters appearing in the positive samples and their frequencies (distribution F1) and the sample length and its frequency (distribution F2). The required negative sample length L is obtained by sampling from distribution F2 based on its frequency, and a negative sample of length L is generated by sampling from distribution F1 based on its frequency. Random crossover data augmentation involves randomly selecting two positive samples, randomly extracting a portion of the string from the beginning of the first sample (i.e., the first few characters of the first sample), and randomly extracting a portion of the string from the end of the second sample (i.e., the last few characters of the second sample), then concatenating the two to generate a negative sample.

[0070] In addition, there are other data augmentation methods, such as randomly inserting / deleting Chinese characters, randomly inserting / deleting English letters and numbers, etc.

[0071] Taking positive sample data as user privacy data as an example, the acquisition of initial negative sample training data is explained in detail. Specifically, positive sample training data is acquired, and data augmentation is performed on the positive sample training data according to at least two data augmentation methods to obtain initial negative sample training data; this can be understood as acquiring user privacy data as positive sample data, performing data augmentation on the user privacy data according to at least two data augmentation methods, and obtaining initial negative sample training data corresponding to each data augmentation method.

[0072] Specifically, obtaining positive sample training data includes:

[0073] Obtain sample training data of a preset data type as positive sample training data; or

[0074] Obtain sample training data of a preset data type from the target database as positive sample training data.

[0075] The preset data type can be set according to the actual application. For example, the user can set the data of the ID number field as private data. Then, the embodiment of this specification can obtain the data of the ID number field as positive sample training data. At this time, in order to be more suitable for the use scenario of the subsequent classification model, positive sample training data of the preset data type can also be selected from the target database that matches the use scenario, so that the subsequent use of the classification model is more accurate.

[0076] Step 104: Train the first classification model based on the positive sample training data and the initial negative sample training data.

[0077] The first classification model and the second classification model described below can both be understood as binary classification models, and the Transformer model commonly used in natural language processing can be adopted; however, the first classification model and the second classification model are two different binary classification models.

[0078] Specifically, after determining the positive sample training data and the initial negative sample training data, a first classification model is trained based on the positive sample training data and the initial negative sample training data, so that the initial negative sample training data can be filtered according to the first classification model to obtain the target negative sample training data.

[0079] Step 106: Obtain target negative sample training data based on the at least two data augmentation methods, the initial negative sample training data, and the first classification model.

[0080] In practice, after obtaining the first classification model through training, the initial negative sample training data can be filtered based on the first classification model to obtain target negative sample training data, thereby increasing the accuracy of subsequent second classification model training.

[0081] In practical applications, there are two ways to select initial negative sample training data: one is to obtain target negative sample training data by selecting at least two data augmentation methods; the other is to obtain target negative sample training data by directly selecting initial negative sample training data.

[0082] Specifically, the method for obtaining target negative sample training data by selecting at least two data augmentation methods is as follows:

[0083] Obtaining target negative sample training data based on the at least two data augmentation methods, the initial negative sample training data, and the first classification model includes:

[0084] Determine the initial negative sample training data for each of the at least two data augmentation methods;

[0085] Input the initial negative sample training data corresponding to each of the data augmentation methods into the first classification model to obtain the prediction results of the initial negative sample training data corresponding to each of the data augmentation methods.

[0086] Based on the prediction results of the initial negative sample training data corresponding to each data augmentation method, the target negative sample training data is obtained.

[0087] This article will explain in detail using at least two data augmentation methods, including data augmentation method 1, data augmentation method 2, and data augmentation method 3, as examples:

[0088] First, determine the initial negative sample training data obtained through at least two data augmentation methods: data augmentation method 1, data augmentation method 2, and data augmentation method 3. Then, input each initial negative sample training data obtained through data augmentation method 1 into the first classification model to obtain the prediction result for each initial negative sample training data obtained through data augmentation method 1. Similarly, obtain the prediction results for each initial negative sample training data obtained through data augmentation method 2 and data augmentation method 3. Finally, determine the target negative sample training data based on the prediction results for each initial negative sample training data obtained through data augmentation method 1, data augmentation method 2, and data augmentation method 3.

[0089] In practical applications, each positive training data point will generate one negative training data point through a data augmentation method. Therefore, when there are multiple positive training data points, a single data augmentation method will generate multiple negative training data points. If a large number of non-real negative training data points are present in the multiple negative training data points generated by a particular data augmentation method, it indicates that the data augmentation method may not be suitable for generating negative training data. Conversely, if not, it indicates that the data augmentation method is suitable for generating negative training data. This screening of data augmentation methods helps determine the target negative training data. The specific implementation method is as follows:

[0090] The step of obtaining target negative sample training data based on the prediction results of the initial negative sample training data corresponding to each data augmentation method includes:

[0091] Based on the prediction results of the initial negative sample training data corresponding to each data augmentation method, a target data augmentation method is determined from the at least two data augmentation methods;

[0092] The positive sample training data is augmented using the target data augmentation method to obtain the target negative sample training data.

[0093] Specifically, since each data augmentation method has the same form but different data augmentation parameters (such as the number of characters selected), after determining the target data augmentation method from at least two methods based on the prediction results of the initial negative sample training data corresponding to each data augmentation method, the positive sample training data can be re-augmented using the target data augmentation method to obtain the target negative sample training data. In practical applications, since all positive sample training data were originally augmented based on each data augmentation method, after determining the target data augmentation method, the initial negative sample training data obtained by augmenting with the target data augmentation method can also be directly selected from the initial negative sample data and used as the target negative sample training data. Furthermore, since the samples generated by the data augmentation method have a certain degree of randomness, regenerating the target negative sample training data using the target data augmentation method can avoid the influence of some randomness on the performance of the first classification model.

[0094] Furthermore, after determining the prediction results of the initial negative sample training data corresponding to each data augmentation method, the target data augmentation method can be quickly selected from at least two data augmentation methods based on the proportion of negative samples predicted by the initial negative sample training data corresponding to each data augmentation method. The specific implementation method is as follows:

[0095] The step of determining the target data augmentation method from the at least two data augmentation methods based on the prediction results of the initial negative sample training data corresponding to each data augmentation method includes:

[0096] The prediction result of the initial negative sample training data corresponding to each data augmentation method is determined as the proportion of the first target prediction result;

[0097] If the ratio is greater than or equal to a preset ratio threshold, each data augmentation method is determined as the target data augmentation method.

[0098] The first target prediction result can be understood as the negative sample prediction result, that is, the initial negative sample training data can be determined to be a negative sample based on the prediction result; and the preset ratio threshold can also be set according to the actual application, which is not limited in this embodiment of the specification.

[0099] In practical applications, for N data augmentation methods, each data augmentation method generates K unlabeled samples in the first stage (the first classification model training stage), that is, a total of N×K unlabeled samples are used as initial negative samples (initial negative sample training data), and together with positive samples (i.e. positive sample training data), they are used for training the first classification model.

[0100] In the embodiments of this specification, the specific implementation of screening target data augmentation methods is as follows: The first classification model predicts the initial negative samples generated by each data augmentation method. If the proportion of samples judged as negative in a certain data augmentation method is higher than a threshold t (i.e., a preset proportion threshold), then the data augmentation method passes the screening, that is, the data augmentation method is determined to be the target data augmentation method. For example, for data augmentation method 1, if k1 out of the K negative samples it generates are judged as negative samples by the first classification model, then the pass rate of this data augmentation method is... if The data augmentation method then passed the screening. The set of target data augmentation methods that passed the screening can be represented as:

[0101]

[0102]

[0103] in, This represents the data augmentation method a. n The i-th generated sample, f(·) represents the prediction result of the first classification model, which is 0 (negative sample) or 1 (positive sample).

[0104] The selected target data augmentation methods (M, M≤N) will generate K samples from each method, for a total of M×K samples, which will be used as negative samples (target negative sample training data) and, together with the positive samples, for the subsequent training of the second classification model.

[0105] Furthermore, the specific implementation method for obtaining target negative sample training data by directly filtering the initial negative sample training data is as follows:

[0106] The step of obtaining target negative sample training data based on the prediction results of the initial negative sample training data corresponding to each data augmentation method includes:

[0107] Based on the prediction results of the initial negative sample training data corresponding to each data augmentation method, target negative sample training data is determined from the initial negative sample training data.

[0108] In practical applications, target negative sample training data can also be directly selected from the initial negative sample training data based on the prediction results of the initial negative sample training data corresponding to each data augmentation method, so as to save the time of acquiring target negative sample training data and improve the overall classification model training efficiency.

[0109] Specifically, the specific implementation method for determining the target negative sample training data from the initial negative sample training data based on the prediction results of the initial negative sample training data corresponding to each data augmentation method is as follows:

[0110] The step of determining the target negative sample training data from the initial negative sample training data based on the prediction results of the initial negative sample training data corresponding to each data augmentation method includes:

[0111] Determine the prediction result of the initial negative sample training data corresponding to each data augmentation method, and the initial negative sample training data that matches the prediction result of the second target;

[0112] The initial negative sample training data that matches the second target prediction result is deleted from the initial negative sample training data, and the remaining initial negative sample training data is used as the target negative sample training data.

[0113] The second target prediction result can be understood as the positive sample prediction result, that is, the prediction result of the initial negative sample data is a positive sample.

[0114] In practice, the prediction results of the initial negative sample data corresponding to each data augmentation method are determined. Then, the initial negative sample training data that matches the prediction result of the second target is selected from all the initial negative samples and deleted. The remaining initial negative sample training data (i.e., the initial negative sample training data whose prediction results match the prediction result of the first target) are used as the target negative sample data.

[0115] In the embodiments of this specification, in order to improve the screening efficiency of target negative sample data, the initial negative sample can be screened directly based on the prediction result of each initial negative sample. The initial negative sample training data with the prediction result being positive is deleted, and the remaining initial negative sample training data with the prediction result being negative is used as target negative sample training data to participate in the training of the second classification model.

[0116] Step 108: Train the second classification model based on the positive sample training data and the target negative sample training data.

[0117] Specifically, after determining the target negative sample training data, a second classification model can be trained based on the positive sample training data and the target negative sample training data.

[0118] The classification model training method provided in this specification can generate negative sample training data by combining at least two data augmentation methods when only positive sample training data exists. This allows the corresponding classification model to be trained based on the positive sample training data and the negative sample training data obtained through data augmentation methods, thereby improving the training effect of the classification model. This enables the classification model to quickly and accurately identify private data in the data warehouse when it is subsequently applied to privacy data identification scenarios.

[0119] In practice, to ensure the usability and classification accuracy of the secondary classification model, after training, its classification performance is evaluated using both positive and negative samples. Only after passing the evaluation is the model deployed online to guarantee a good user experience. The specific implementation method is as follows:

[0120] After obtaining the second classification model through training, the process also includes:

[0121] Obtain positive sample validation data, and perform data augmentation on the positive sample validation data according to the at least two data augmentation methods to obtain initial negative sample validation data;

[0122] Based on the at least two data augmentation methods, the initial negative sample validation data, and the first classification model, target negative sample validation data is obtained;

[0123] The second classification model is validated based on the positive sample validation data and the target negative sample validation data to obtain the validation results.

[0124] The method for obtaining positive sample validation data can be the same as that for positive sample training data, but the specific data content of positive sample validation data is different from that of positive sample training data.

[0125] After obtaining positive sample validation data, the positive sample validation data can be augmented using at least two data augmentation methods to obtain initial negative sample validation data; and target negative sample validation data can be obtained using at least two data augmentation methods, the initial negative sample validation data, and the first classification model. The determination of target negative sample validation data is the same as the specific implementation of target negative sample training data in the above embodiments, and will not be elaborated here.

[0126] After obtaining positive sample validation data and target negative sample validation data, the second classification model can be validated based on the positive sample validation data and target negative sample validation data, and the validation results can be obtained.

[0127] Specifically, validating the second classification model and obtaining the validation results can be understood as determining the accuracy, recall, and / or precision of the second classification model based on the prediction results of the second classification model for positive sample validation data and target negative sample validation data.

[0128] After obtaining the validation results of the second classification model, it can be accurately determined whether the second classification model can be deployed online. The specific implementation method is as follows:

[0129] After validating the second classification model and obtaining the validation result, the process further includes:

[0130] If the verification result does not meet the preset verification conditions, the model structure of the second classification model is adjusted according to the verification result, and the second classification model is trained and verified again according to the steps of the above classification model training method; and

[0131] If the verification result meets the preset verification conditions, the second classification model is sent to the target application.

[0132] The preset verification conditions can be set according to the actual application. For example, if the verification result is accuracy, the preset verification condition can be understood as the accuracy being greater than or equal to the preset accuracy threshold; if the verification result is recall, the preset verification condition can be understood as the recall being greater than or equal to the preset recall threshold, etc.

[0133] For ease of understanding, the following explanation will use the verification result as the accuracy rate, and the preset verification condition is that the accuracy rate is greater than or equal to the preset accuracy rate threshold.

[0134] Specifically, if the accuracy of the second classification model is less than a preset accuracy threshold, the model structure of the second classification model is adjusted based on this accuracy, and the second classification model continues to be trained and validated according to the steps of the classification model training method described above. Adjusting the model structure of the second classification model can be understood as adjusting the model size, the number of model parameters, and / or increasing the amount of positive sample data. If the accuracy of the second classification model is greater than or equal to the preset accuracy threshold, it indicates that the accuracy of the second classification model is high enough to be deployed online, and it can then be deployed to the target application for subsequent classification and identification of privacy data.

[0135] To avoid endless iterations and resource waste when the secondary classification model fails to meet preset validation conditions, alternative methods can be used to adjust the model once the number of model structure adjustments reaches a certain threshold. The specific implementation is as follows:

[0136] After continuing to train and verify the second classification model according to the above classification model training method, the method further includes:

[0137] If the verification result does not meet the preset verification conditions, and the number of times the model structure of the second classification model is adjusted is greater than or equal to the preset number threshold, the user sends specified positive sample training data and negative sample training data, and the second classification model continues to be trained and verified according to the steps of the above classification model training method.

[0138] The preset threshold number of times can be adjusted according to the actual application, such as setting it to 100 times or 200 times.

[0139] In practice, if the verification results of the second classification model still do not meet the preset verification conditions, and the cumulative number of adjustments to the model structure of the second classification model has exceeded or equaled the preset threshold, in order to avoid the waste of resources caused by infinite training, a training reminder can be sent to the user, and the user can be given specified positive sample training data and negative sample training data sent by the user according to the training reminder. Then, the second classification model can be trained based on the specified positive sample training data and negative sample training data.

[0140] In this embodiment, the evaluation of the second classification model's performance will be conducted on additional (different from the training) positive and negative samples. If the second classification model's performance meets a given release threshold, it will be deployed online, providing customers with the ability to scan and identify similar privacy information in the database. If the second classification model's performance fails to meet the release threshold, the model structure will be automatically adjusted, such as adjusting the model size, the number of model parameters, and increasing the amount of positive sample data. If the adjustment fails multiple times, the issue will be reported to the user. The user can restart the process by adding and specifying additional positive and / or negative samples. If only positive samples are specified, the user still needs to obtain the target negative sample training data using the method described in the previous embodiment, and then combine the negative samples with the positive samples to restart the process. If only negative samples are specified, the user can directly combine them with the previous positive samples to restart the process. If both positive and negative samples are specified, the user can directly restart the process.

[0141] The following is in conjunction with the appendix Figure 2 Taking the application of the classification model training method provided in this specification in the identification of privacy data in a database as an example, the classification model training method will be further explained. Among them, Figure 2 The flowchart of a classification model training method provided in one embodiment of this specification is shown, which specifically includes the following steps.

[0142] Step 202: User specifies data.

[0143] Specifically, user execution data can be understood as users specifying private data (a column or rows of data in the database) as subsequent positive samples in the database.

[0144] Step 204: Process begins.

[0145] Specifically, the start of the process can be understood as the start of model training.

[0146] Step 206: Sampling.

[0147] Specifically, sampling can be understood as taking a portion of the specified private data as a positive sample.

[0148] Step 208: Data Augmentation.

[0149] Specifically, data augmentation can be understood as augmenting each positive sample using various data augmentation methods.

[0150] Step 210: Generate unlabeled samples.

[0151] Specifically, unlabeled sample generation can be understood as using data augmentation methods to generate some unlabeled samples based on positive samples.

[0152] Step 212: Model 1 training.

[0153] Model 1 can be understood as the first classification model mentioned above.

[0154] Specifically, Model 1 training can be understood as using unlabeled samples as negative samples and training Model 1 together with positive samples to obtain Model 1.

[0155] Step 214: Filter the generation method.

[0156] Specifically, the filtering generation method can be understood as using Model 1 to filter data augmentation methods and remove those that may negatively impact the model's performance.

[0157] Step 216: Generate negative samples.

[0158] Specifically, generating negative samples can be understood as using filtered data augmentation methods to generate negative samples.

[0159] Step 218: Model 2 training.

[0160] Specifically, Model 2 training can be understood as using negative samples generated by the selected data augmentation methods, along with positive samples, for training Model 2.

[0161] Step 220: Obtain test data.

[0162] Specifically, obtaining test data can be understood as obtaining positive and negative samples different from those used during training as test data for Model 2.

[0163] Step 222: Model evaluation.

[0164] Specifically, model evaluation can be understood as the evaluation of the effect of model 2 being carried out on additional (different from the training) positive and negative samples. Based on the test data, it is determined whether the effect of model 2 passes a certain manually given release threshold. If yes, then step 224 is executed; otherwise, step 226 is executed.

[0165] Step 224: Feedback User Model 2 goes live.

[0166] Specifically, when the performance of Model 2 meets a manually set release threshold, Model 2 will be launched online, meaning it will be provided to customers for scanning and identifying similar privacy information in the database.

[0167] Step 226: Sampling / Model Adjustment.

[0168] Specifically, if the performance of Model 2 fails to meet the release threshold, the model structure will be automatically adjusted, mainly by adjusting the model size, the number of model parameters, and increasing the amount of positive sample data; if it still fails after multiple adjustments, step 228 will be executed.

[0169] Step 228: Feedback to users.

[0170] Specifically, if the problem still fails after multiple adjustments, the issue will be reported to the user, who can restart the process by adding additional positive or negative samples.

[0171] Step 230: The user executes additional data.

[0172] Specifically, when a user performs additional data processing, it can be understood as the user continuing to execute the aforementioned model training process.

[0173] Combination Figure 2 As can be seen, the classification model training method provided in the embodiments of this specification specifically includes a two-stage training process: the first stage is the training of model 1 and the selection of data augmentation methods, and the second stage is the training of model 2 and the evaluation of its performance.

[0174] See Figure 3 , Figure 3 This diagram illustrates a two-stage training schematic of a classification model processing method provided in one embodiment of this specification.

[0175] Figure 3 The process includes two stages. In the first stage, positive samples are identified. Then, data augmentation methods (data augmentation method 1-N) are used to generate some unlabeled samples based on the positive samples. These unlabeled samples are used as negative samples and, together with the positive samples, are used to train model 1 to obtain model 1. Then, model 1 is used to screen the data augmentation methods and remove some data augmentation methods that are likely to have a negative impact on the model's performance.

[0176] In the second phase, negative samples are generated using the data augmentation methods selected in the first phase. These negative samples, along with the positive samples, are used to train Model 2. The performance of Model 2 is evaluated using additional (different from the training) positive and negative samples. When Model 2's performance meets a manually defined release threshold, it is deployed online, providing it to clients for scanning and identifying similar privacy information in databases. If Model 2's performance does not meet the release threshold, the model structure is automatically adjusted, primarily by changing the model size, the number of model parameters, and increasing the amount of positive sample data. If the adjustment fails multiple times, the issue is reported to the user, who can restart the process by adding specified additional positive or negative samples.

[0177] The classification model training method provided in the embodiments of this specification proposes a privacy data identification scheme based on positive samples and unlabeled learning. This is a semi-supervised deep learning privacy data identification technique, which is well-suited for scenarios where users only specify positive samples, without affecting the training of the classification model. Furthermore, the classification model training method provided in the embodiments of this specification uses a deep learning model, making it suitable for privacy data scenarios with complex data formats or character sets, where it is difficult to explicitly parse the patterns and characteristics of privacy data using regular expressions or other rules. Simultaneously, this scheme provides an interactive model training process, allowing users to further provide data based on the model's feedback to improve model performance, ensuring model effectiveness and enhancing the user experience.

[0178] Corresponding to the above method embodiments, this specification also provides embodiments of a classification model training device. Figure 4 A schematic diagram of a classification model training device according to one embodiment of this specification is shown. Figure 4 As shown, the device includes:

[0179] The initial data acquisition module 402 is configured to acquire positive sample training data and perform data augmentation on the positive sample training data according to at least two data augmentation methods to obtain initial negative sample training data, wherein the positive sample training data is user privacy data;

[0180] The first model training module 404 is configured to train a first classification model based on the positive sample training data and the initial negative sample training data.

[0181] The target data acquisition module 406 is configured to obtain target negative sample training data based on the at least two data augmentation methods, the initial negative sample training data, and the first classification model.

[0182] The second model training module 408 is configured to train a second classification model based on the positive sample training data and the target negative sample training data.

[0183] Optionally, the target data acquisition module 406 is further configured to:

[0184] Determine the initial negative sample training data for each of the at least two data augmentation methods;

[0185] Input the initial negative sample training data corresponding to each of the data augmentation methods into the first classification model to obtain the prediction results of the initial negative sample training data corresponding to each of the data augmentation methods.

[0186] Based on the prediction results of the initial negative sample training data corresponding to each data augmentation method, the target negative sample training data is obtained.

[0187] Optionally, the target data acquisition module 406 is further configured to:

[0188] Based on the prediction results of the initial negative sample training data corresponding to each data augmentation method, a target data augmentation method is determined from the at least two data augmentation methods;

[0189] The positive sample training data is augmented using the target data augmentation method to obtain the target negative sample training data.

[0190] Optionally, the target data acquisition module 406 is further configured to:

[0191] The prediction result of the initial negative sample training data corresponding to each data augmentation method is determined as the proportion of the first target prediction result;

[0192] If the ratio is greater than or equal to a preset ratio threshold, each data augmentation method is determined as the target data augmentation method.

[0193] Optionally, the target data acquisition module 406 is further configured to:

[0194] Based on the prediction results of the initial negative sample training data corresponding to each data augmentation method, target negative sample training data is determined from the initial negative sample training data.

[0195] Optionally, the target data acquisition module 406 is further configured to:

[0196] Determine the prediction result of the initial negative sample training data corresponding to each data augmentation method, and the initial negative sample training data that matches the prediction result of the second target;

[0197] The initial negative sample training data that matches the second target prediction result is deleted from the initial negative sample training data, and the remaining initial negative sample training data is used as the target negative sample training data.

[0198] Optionally, the initial data acquisition module 402 is further configured to:

[0199] Obtain sample training data of a preset data type as positive sample training data; or

[0200] Obtain sample training data of a preset data type from the target database as positive sample training data.

[0201] Optionally, the device further includes:

[0202] The model validation module is configured as follows:

[0203] Obtain positive sample validation data, and perform data augmentation on the positive sample validation data according to the at least two data augmentation methods to obtain initial negative sample validation data;

[0204] Based on the at least two data augmentation methods, the initial negative sample validation data, and the first classification model, target negative sample validation data is obtained;

[0205] The second classification model is validated based on the positive sample validation data and the target negative sample validation data to obtain the validation results.

[0206] Optionally, the device further includes:

[0207] The model iteration module is configured as follows:

[0208] If the verification result does not meet the preset verification conditions, the model structure of the second classification model is adjusted according to the verification result, and the second classification model is trained and verified again according to the steps of the above classification model training method; and

[0209] If the verification result meets the preset verification conditions, the second classification model is sent to the target application.

[0210] Optionally, the device further includes:

[0211] The third model training module is configured as follows:

[0212] If the verification result does not meet the preset verification conditions, and the number of times the model structure of the second classification model is adjusted is greater than or equal to the preset number threshold, the specified positive sample training data and negative sample training data sent by the user are received, and the second classification model is trained based on the specified positive sample training data and negative sample training data.

[0213] Optionally, the at least two data augmentation methods include a random data augmentation method, a data augmentation method generated from the same vocabulary, a random data augmentation method, a random data insertion method, a random data deletion method, a data augmentation method rearrangement method, a data augmentation method generated by frequency, and / or a random cross-data augmentation method.

[0214] The classification model training method provided in this specification can generate negative sample training data by combining at least two data augmentation methods when only positive sample training data exists. This allows the corresponding classification model to be trained based on the positive sample training data and the negative sample training data obtained through data augmentation methods, thereby improving the training effect of the classification model. This enables the classification model to quickly and accurately identify private data in the data warehouse when it is subsequently applied to privacy data identification scenarios.

[0215] The above is a schematic scheme of a classification model training device according to this embodiment. It should be noted that the technical solution of this classification model training device and the technical solution of the classification model training method described above belong to the same concept. For details not described in detail in the technical solution of the classification model training device, please refer to the description of the technical solution of the classification model training method described above.

[0216] See Figure 5 , Figure 5 A flowchart of a data processing method provided in one embodiment of this specification is shown, which specifically includes the following steps.

[0217] Step 502: Determine the data to be tested.

[0218] The data to be detected can be understood as the data in a row or column that needs to be checked to determine whether it contains private information. In current practical applications, it can also be understood as the data in a cell, such as an address.

[0219] Step 504: Input the data to be detected into the classification model to obtain the detection result of the data to be detected.

[0220] Specifically, by inputting the data to be detected into the classification model, the detection result of the data can be obtained. The detection result is either 1 or 0, where 1 indicates that the data to be detected is private data and 0 indicates that the data to be detected is not private data.

[0221] See Figure 6 , Figure 6 This document illustrates a specific classification diagram of a classification model in a data processing method provided in one embodiment of this specification.

[0222] Taking the input data to be detected as: a street in a certain district of city a.

[0223] Input the data to be detected, such as a street in a certain district of city A, into the classification model. After passing through the encoding layer (Embedding), hidden layer (Transformer (Self-Attention)), and output layer (Sigmoid classification function) of the classification model, the prediction result of the data to be detected is obtained, such as label 1 (i.e., positive sample). Among them, the Transformer of the hidden layer can be replaced by structures such as LSTM (Long Short-Term Memory Artificial Neural Network) and RNN (Recurrent Neural Network).

[0224] Step 506: Determine whether the data to be detected is the target data based on the detection results.

[0225] The classification model is a model trained using the classification model training method described above.

[0226] Specifically, when the target data is private data, determining whether the data to be detected is the target data based on the detection results can be understood as determining whether the data to be detected is private data based on the prediction results.

[0227] Furthermore, when the data to be detected consists of a column or a row, determining whether a particular column or row of data is private data can be done based on the detection results of each data point in that row or column using a classification model, thus ensuring the accuracy of the detection results. The specific implementation method is as follows:

[0228] The step of inputting the data to be detected into the classification model to obtain the detection result of the data to be detected includes:

[0229] When the data to be detected includes multiple sub-data to be detected, each sub-data to be detected is input into the classification model to obtain the detection result of each sub-data to be detected;

[0230] Accordingly, determining whether the data to be detected is target data based on the detection result includes:

[0231] Based on the detection results of each sub-data to be detected, determine the proportion of detection results that are the first target detection results;

[0232] If the ratio is greater than or equal to a preset ratio threshold, the data to be detected is determined to be the target data; or

[0233] If the ratio is less than the preset ratio threshold, it is determined that the data to be detected is not the target data.

[0234] In this context, the first target detection result can be understood as a negative sample; when the data to be detected is a row or column of data, each sub-data to be detected can be understood as the data in each cell of a row or column.

[0235] Specifically, based on the detection results of each sub-data to be detected, the proportion of negative samples is determined; if the proportion is greater than or equal to a preset proportion threshold, the data to be detected can be determined to be private data; otherwise, the data to be detected is determined to be non-private data.

[0236] The data processing method provided in the embodiments of this specification is applied to massive data scenarios. Using this pre-trained classification model, it is possible to quickly determine whether a certain field in a table in a database is specified private data; or it is possible to quickly and accurately determine whether a certain row or column in a table in a database is private data, etc.

[0237] Corresponding to the above method embodiments, this specification also provides data processing apparatus embodiments. Figure 7 A schematic diagram of the structure of a data processing apparatus according to one embodiment of this specification is shown. Figure 7 As shown, the device includes:

[0238] The data determination module 702 is configured to determine the data to be detected;

[0239] The result acquisition module 704 is configured to input the data to be detected into a classification model to obtain the detection result of the data to be detected.

[0240] The data judgment module 706 is configured to determine whether the data to be detected is target data based on the detection result.

[0241] The classification model is a model trained using the classification model training method described above.

[0242] The data processing method provided in the embodiments of this specification is applied to massive data scenarios. Using this pre-trained classification model, it is possible to quickly determine whether a certain field in a table in a database is specified private data; or it is possible to quickly and accurately determine whether a certain row or column in a table in a database is private data, etc.

[0243] The above is an illustrative scheme of a data processing apparatus according to this embodiment. It should be noted that the technical solution of this data processing apparatus and the technical solution of the data processing method described above belong to the same concept. For details not described in detail in the technical solution of the data processing apparatus, please refer to the description of the technical solution of the data processing method described above.

[0244] Figure 8 A structural block diagram of a computing device 800 according to one embodiment of this specification is shown. The components of the computing device 800 include, but are not limited to, a memory 810 and a processor 820. The processor 820 is connected to the memory 810 via a bus 830, and a database 850 is used to store data.

[0245] The computing device 800 also includes an access device 840, which enables the computing device 800 to communicate via one or more networks 860. Examples of these networks include a Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 840 may include one or more of any type of wired or wireless network interface (e.g., a Network Interface Card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) interface, a Wi-MAX interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.

[0246] In one embodiment of this specification, the above-described components of the computing device 800 and Figure 8 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 8 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0247] The computing device 800 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or PCs. The computing device 800 can also be a mobile or stationary server.

[0248] The processor 820 is used to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the above-mentioned classification model training method and data processing method.

[0249] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device belongs to the same concept as the technical solutions of the classification model training method and data processing method described above. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solutions of the classification model training method and data processing method described above.

[0250] An embodiment of this specification also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the above-described classification model training method and data processing method.

[0251] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium belongs to the same concept as the technical solutions of the classification model training method and data processing method described above. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solutions of the classification model training method and data processing method described above.

[0252] An embodiment of this specification also provides a computer program, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the above-described classification model training method and data processing method.

[0253] The above is an illustrative scheme of a computer program according to this embodiment. It should be noted that the technical solution of this computer program belongs to the same concept as the technical solutions of the classification model training method and data processing method described above. For details not described in detail in the technical solution of the computer program, please refer to the description of the technical solutions of the classification model training method and data processing method described above.

[0254] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0255] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added to or subtracted according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.

[0256] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.

[0257] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0258] The preferred embodiments disclosed above are merely illustrative of this specification. Optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. A classification model training method applied to a privacy data identification scenario, the method comprising: Obtain positive sample training data, and perform data augmentation on the positive sample training data according to at least two data augmentation methods to obtain initial negative sample training data, wherein the positive sample training data is user privacy data; A first classification model is trained based on the positive sample training data and the initial negative sample training data. Obtaining target negative sample training data based on the at least two data augmentation methods, the initial negative sample training data, and the first classification model includes: determining the initial negative sample training data corresponding to each of the at least two data augmentation methods; inputting the initial negative sample training data corresponding to each augmentation method into the first classification model to obtain the prediction result of the initial negative sample training data corresponding to each data augmentation method; and obtaining the target negative sample training data based on the prediction result of the initial negative sample training data corresponding to each data augmentation method. A second classification model is obtained by training the positive sample training data and the target negative sample training data.

2. The classification model training method according to claim 1, wherein obtaining the target negative sample training data based on the prediction results of the initial negative sample training data corresponding to each data augmentation method includes: Based on the prediction results of the initial negative sample training data corresponding to each data augmentation method, a target data augmentation method is determined from the at least two data augmentation methods; The positive sample training data is augmented using the target data augmentation method to obtain the target negative sample training data.

3. The classification model training method according to claim 2, wherein determining the target data augmentation method from the at least two data augmentation methods based on the prediction results of the initial negative sample training data corresponding to each data augmentation method includes: The prediction result of the initial negative sample training data corresponding to each data augmentation method is determined as the proportion of the first target prediction result; If the ratio is greater than or equal to a preset ratio threshold, each data augmentation method is determined as the target data augmentation method.

4. The classification model training method according to claim 1, wherein obtaining the target negative sample training data based on the prediction results of the initial negative sample training data corresponding to each data augmentation method includes: Based on the prediction results of the initial negative sample training data corresponding to each data augmentation method, target negative sample training data is determined from the initial negative sample training data.

5. The classification model training method according to claim 4, wherein determining the target negative sample training data from the initial negative sample training data based on the prediction results of the initial negative sample training data corresponding to each data augmentation method comprises: Determine the prediction result of the initial negative sample training data corresponding to each data augmentation method, and the initial negative sample training data that matches the prediction result of the second target; The initial negative sample training data that matches the second target prediction result is deleted from the initial negative sample training data, and the remaining initial negative sample training data is used as the target negative sample training data.

6. The classification model training method according to claim 1, wherein obtaining positive sample training data includes: Obtain sample training data of a preset data type as positive sample training data; or Obtain sample training data of a preset data type from the target database as positive sample training data.

7. The classification model training method according to claim 1, further comprising, after obtaining the second classification model through training: Obtain positive sample validation data, and perform data augmentation on the positive sample validation data according to the at least two data augmentation methods to obtain initial negative sample validation data; Based on the at least two data augmentation methods, the initial negative sample validation data, and the first classification model, target negative sample validation data is obtained; The second classification model is validated based on the positive sample validation data and the target negative sample validation data to obtain the validation results.

8. The classification model training method according to claim 7, after verifying the second classification model and obtaining the verification result, further includes: If the verification result does not meet the preset verification conditions, the model structure of the second classification model is adjusted according to the verification result, and the second classification model is trained and verified according to the steps of the above classification model training method. as well as If the verification result meets the preset verification conditions, the second classification model is sent to the target application.

9. The classification model training method according to claim 8, further comprising, after continuing to train and verify the second classification model according to the steps of the above classification model training method: If the verification result does not meet the preset verification conditions, and the number of times the model structure of the second classification model is adjusted is greater than or equal to the preset number threshold, the specified positive sample training data and negative sample training data sent by the user are received, and the second classification model is trained based on the specified positive sample training data and negative sample training data.

10. The classification model training method according to any one of claims 1-9, wherein the at least two data augmentation methods include a random data augmentation method, a data augmentation method generated from the same vocabulary, a random data augmentation method, a random data insertion method, a random data deletion method, a data augmentation method rearrangement method, a data augmentation method generated by frequency, and / or a random crossover data augmentation method.

11. A classification model training device, applied to a privacy data identification scenario, the device comprising: The initial data acquisition module is configured to acquire positive sample training data and perform data augmentation on the positive sample training data according to at least two data augmentation methods to obtain initial negative sample training data, wherein the positive sample training data is user privacy data; The first model training module is configured to train a first classification model based on the positive sample training data and the initial negative sample training data. The target data acquisition module is configured to obtain target negative sample training data based on the at least two data augmentation methods, the initial negative sample training data, and the first classification model. The target data acquisition module is further configured to: determine the initial negative sample training data corresponding to each of the at least two data augmentation methods; input the initial negative sample training data corresponding to each augmentation method into the first classification model to obtain the prediction result of the initial negative sample training data corresponding to each data augmentation method; and obtain the target negative sample training data based on the prediction result of the initial negative sample training data corresponding to each data augmentation method. The second model training module is configured to train a second classification model based on the positive sample training data and the target negative sample training data.

12. A data processing method, comprising: Identify the data to be tested; The data to be detected is input into the classification model to obtain the detection result of the data to be detected; Based on the detection results, determine whether the data to be detected is the target data. The classification model is a model trained using any one of the classification model training methods of claims 1-10.

13. The data processing method according to claim 12, wherein inputting the data to be detected into a classification model to obtain the detection result of the data to be detected includes: When the data to be detected includes multiple sub-data to be detected, each sub-data to be detected is input into the classification model to obtain the detection result of each sub-data to be detected; Accordingly, determining whether the data to be detected is target data based on the detection result includes: Based on the detection results of each sub-data to be detected, determine the proportion of detection results that are the first target detection results; If the ratio is greater than or equal to a preset ratio threshold, the data to be detected is determined to be the target data; or If the ratio is less than the preset ratio threshold, it is determined that the data to be detected is not the target data.