Data processing method, device and equipment

By selecting high-value data from label-free data sets for calibration, the problem of high human resources and time consumption in the existing technology is solved, and efficient training of high-performance machine learning models is achieved.

CN114298153BActive Publication Date: 2025-08-26HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111452418.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-01
Publication Date
2025-08-26
Estimated Expiration
2041-12-01

AI Technical Summary

Technical Problem

In the prior art, in order to improve the performance of the machine learning model, a large amount of labeled data is required, which consumes a lot of human resources and time.

Method used

By entering the labelless data into the initial model, obtaining the feature vector and uncertainty, selecting high-value labelless data based on the feature distribution and distance value for calibration, reducing the amount of labelless data and improving model performance.

Benefits of technology

Under the limited annotation amount, high-information-free data is selected for calibration, and a machine learning model with better performance is trained to save human resources and time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114298153B_ABST
    Figure CN114298153B_ABST
Patent Text Reader

Abstract

The present application provides a data processing method, apparatus, and device, including: inputting each labeled data into an initial model to obtain a first eigenvector corresponding to each labeled data, and determining a characteristic distribution based on the first eigenvector corresponding to each labeled data; inputting unlabeled data into the initial model to obtain a second eigenvector corresponding to the unlabeled data; determining the uncertainty corresponding to the unlabeled data; determining the distance value between the second eigenvector and the first eigenvector corresponding to each labeled data based on the uncertainty and characteristic distribution corresponding to the unlabeled data; determining a target distance value corresponding to the unlabeled data based on the distance value between the second eigenvector and each first eigenvector; selecting data to be calibrated from the unlabeled data set based on the target distance value, and performing data calibration on the data to be calibrated. Through the technical solution of the present application, the calibration operation of a large amount of data is reduced, saving human resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a data processing method, device and equipment. Background Art

[0002] Machine learning is a path to artificial intelligence and a multidisciplinary field, encompassing probability theory, statistics, approximation theory, convex analysis, and algorithmic complexity theory. It studies how computers can simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning focuses on algorithm design, enabling computers to automatically learn patterns from data and use these patterns to make predictions about unknown data. Machine learning has found a wide range of applications, including deep learning, data mining, computer vision, natural language processing, biometrics, search engines, medical diagnostics, speech recognition, and handwriting recognition.

[0003] In order to use machine learning to implement artificial intelligence processing, a training data set can be constructed. The training data set includes a large amount of labeled data (such as image data, that is, images with calibrated frames and calibrated categories). A machine learning model is trained based on the training data set, such as a machine learning model with target detection function. The machine learning model can be used to perform target detection on the data to be detected. For example, the target frame in the data to be detected can be detected, and the target category can be identified, such as vehicle category, animal category, electronic product category, etc.

[0004] To improve the performance of machine learning models, a large amount of labeled data is required. The more labeled data there is, the better the performance of the trained machine learning model. However, obtaining a large amount of labeled data requires labeling a large amount of data, which consumes a lot of human resources and a lot of time. Summary of the Invention

[0005] The present application provides a data processing method, the method comprising:

[0006] Inputting each labeled data in the labeled data set into the initial model to obtain a first eigenvector corresponding to each labeled data, and determining a feature distribution based on the first eigenvector corresponding to each labeled data;

[0007] For each unlabeled data in the unlabeled data set, input the unlabeled data into the initial model to obtain a second eigenvector corresponding to the unlabeled data; and determine the uncertainty corresponding to the unlabeled data;

[0008] Determine the distance value between the second eigenvector and the first eigenvector corresponding to each labeled data based on the uncertainty corresponding to the unlabeled data and the characteristic distribution; determine the target distance value corresponding to the unlabeled data based on the distance value between the second eigenvector and each first eigenvector;

[0009] Based on the target distance value corresponding to each unlabeled data in the unlabeled data set, data to be calibrated is selected from the unlabeled data set, and data calibration is performed on the data to be calibrated.

[0010] The present application provides a data processing device, comprising:

[0011] An acquisition module is configured to input each labeled data in the labeled data set into the initial model to obtain a first eigenvector corresponding to each labeled data, and determine a feature distribution based on the first eigenvector corresponding to each labeled data; for each unlabeled data in the unlabeled data set, input the unlabeled data into the initial model to obtain a second eigenvector corresponding to the unlabeled data; and determine the uncertainty corresponding to the unlabeled data;

[0012] a determination module, configured to determine a distance value between the second eigenvector and each first eigenvector corresponding to each labeled data based on the uncertainty corresponding to the unlabeled data and the characteristic distribution; and determine a target distance value corresponding to the unlabeled data based on the distance value between the second eigenvector and each first eigenvector;

[0013] The calibration module is used to select data to be calibrated from the unlabeled data set based on the target distance value corresponding to each unlabeled data in the unlabeled data set, and perform data calibration on the data to be calibrated.

[0014] The present application provides a data processing device, comprising: a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the data processing method disclosed in the above example of the present application.

[0015] It can be seen from the above technical solutions that in the embodiment of the present application, some unlabeled data can be selected from a large amount of unlabeled data for data calibration, thereby avoiding calibration of a large amount of unlabeled data, reducing calibration operations for a large amount of data, saving human resources, and reducing calibration time. By making calibration value judgments on a large amount of unlabeled data, high-value unlabeled data can be selected from a large amount of unlabeled data for calibration. Each unlabeled data to be calibrated has a high amount of information, and ensures that the information overlaps as little as possible, ultimately achieving a model with better performance under limited annotation volume, that is, training a high-quality model with better model performance. Based on the feature distribution corresponding to the labeled data and the uncertainty corresponding to the unlabeled data, the data to be calibrated can be selected from the unlabeled data set, thereby taking into account the uncertainty of a single sample and the diversity between samples, and using the manifold prior of the labeled data distribution to characterize the distribution differences of the unlabeled data. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments of the present application or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings of the embodiments of the present application.

[0017] Figure 1 It is a flowchart of a data processing method in one embodiment of the present application;

[0018] Figure 2 It is a flowchart of a data processing method in one embodiment of the present application;

[0019] Figure 3 This is a schematic diagram of processing labeled data in one embodiment of the present application;

[0020] Figure 4 This is a schematic diagram of processing unlabeled data in one embodiment of the present application;

[0021] Figure 5 and Figure 6 is a schematic diagram of determining a distance value in one embodiment of the present application;

[0022] Figure 7 This is a structural diagram of a data processing device in one embodiment of the present application;

[0023] Figure 8 It is a hardware structure diagram of a data processing device in one embodiment of the present application. DETAILED DESCRIPTION

[0024] The terms used in the embodiments of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The singular forms "a," "the," and "the" used in this application and claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to any or all possible combinations of one or more associated listed items.

[0025] It should be understood that although the terms first, second, third, etc. may be used to describe various information in the embodiments of the present application, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" used may also be interpreted as "at the time of" or "when" or "in response to determining".

[0026] In the embodiment of the present application, a data processing method is proposed. Figure 1 As shown, the method may include:

[0027] Step 101: Input each labeled data in the labeled data set into the initial model to obtain the first eigenvector corresponding to each labeled data (for the convenience of distinction, the eigenvector corresponding to the labeled data is recorded as the first eigenvector), and determine the feature distribution based on the first eigenvector corresponding to each labeled data.

[0028] Exemplarily, after inputting each labeled data in the labeled data set into the initial model, the predicted category corresponding to each labeled data can also be obtained, that is, the predicted category and the first eigenvector corresponding to the labeled data can be obtained. Based on this, determining the feature distribution based on the first eigenvector corresponding to each labeled data may include but is not limited to: for each target category supported by the initial model, determining all labeled data matching the target category based on the predicted category corresponding to each labeled data, and determining the feature distribution corresponding to the target category based on the first eigenvector corresponding to all labeled data matching the target category.

[0029] Exemplarily, determining the feature distribution corresponding to the target category based on the first feature vectors corresponding to all labeled data matching the target category may include, but is not limited to: determining a mean feature vector corresponding to the target category based on the first feature vectors corresponding to all labeled data matching the target category, and determining a variance feature vector corresponding to the target category based on the difference between each first feature vector and the mean feature vector. Determining the feature distribution corresponding to the target category based on the variance feature vector.

[0030] Step 102: For each unlabeled data in the unlabeled data set, input the unlabeled data into the initial model to obtain the second eigenvector corresponding to the unlabeled data (for the convenience of distinction, the eigenvector corresponding to the unlabeled data is recorded as the second eigenvector); determine the uncertainty corresponding to the unlabeled data.

[0031] Exemplarily, determining the uncertainty corresponding to the unlabeled data may include, but is not limited to: inputting the unlabeled data into T candidate models respectively to obtain probability vectors output by the T candidate models; wherein the T candidate models all support C categories (i.e., support the same C categories), and the probability vector may include C probability values ​​corresponding to the C categories, and T and C are both positive integers. For each category, the average probability value corresponding to the category is determined based on the probability values ​​corresponding to the category in the T probability vectors, and the overall prediction value is determined based on the average probability values ​​corresponding to the C categories; for each candidate model, the local prediction value corresponding to the candidate model is determined based on the probability vector output by the candidate model. The uncertainty corresponding to the unlabeled data is determined based on the overall prediction value and the local prediction value corresponding to each candidate model.

[0032] Step 103: determine the distance value between the second eigenvector and the first eigenvector corresponding to each labeled data based on the uncertainty corresponding to the unlabeled data and the characteristic distribution; determine the target distance value corresponding to the unlabeled data based on the distance value between the second eigenvector and each first eigenvector.

[0033] Exemplarily, determining the distance value between the second eigenvector and the first eigenvector corresponding to each labeled data based on the uncertainty corresponding to the unlabeled data and the feature distribution may include but is not limited to: determining the distance value between the second eigenvector and the first eigenvector corresponding to the labeled data based on the uncertainty corresponding to the unlabeled data and the feature distribution corresponding to the target category corresponding to the labeled data.

[0034] Exemplarily, determining the distance value between the second eigenvector and the first eigenvector corresponding to the labeled data based on the uncertainty corresponding to the unlabeled data and the characteristic distribution corresponding to the target category corresponding to the labeled data may include, but is not limited to: determining the difference between the second eigenvector and the first eigenvector; determining the distribution difference between the difference and the characteristic distribution; determining a weighting coefficient corresponding to the distribution difference based on the uncertainty, and determining the distance value between the second eigenvector and the first eigenvector based on the distribution difference and the weighting coefficient. The greater the uncertainty, the greater the weighting coefficient and the greater the distance value; the greater the distribution difference, the greater the distance value.

[0035] Exemplarily, determining the target distance value corresponding to the unlabeled data based on the distance value between the second eigenvector and each first eigenvector may include but is not limited to: selecting the minimum distance value from the distance values ​​between the second eigenvector and each first eigenvector, and determining the target distance value corresponding to the unlabeled data based on the minimum distance value, such as using the minimum distance value as the target distance value.

[0036] Step 104 : Based on the target distance value corresponding to each unlabeled data in the unlabeled data set, select the data to be calibrated from the unlabeled data set, and perform data calibration on the data to be calibrated.

[0037] Exemplarily, based on the target distance value corresponding to each unlabeled data in the unlabeled data set, selecting the data to be calibrated from the unlabeled data set may include but is not limited to: sorting all the unlabeled data based on the target distance value corresponding to each unlabeled data, and based on the sorting result, selecting P unlabeled data with large target distance values ​​from the unlabeled data set as the data to be calibrated, where P is a positive integer.

[0038] Exemplarily, after the data to be calibrated is calibrated, the data to be calibrated can be updated to the labeled data in the labeled dataset; on this basis, the initial model is trained based on the labeled dataset to obtain a trained model. If the model training end condition is met, the trained model is determined as the target model and the target model is output; wherein the target model is used to process the data to be processed. If the model training end condition is not met, the trained model is updated to the initial model, and the process returns to executing the operation of inputting each labeled data in the labeled dataset into the initial model (i.e., step 101).

[0039] It can be seen from the above technical solutions that in the embodiment of the present application, some unlabeled data can be selected from a large amount of unlabeled data for data calibration, thereby avoiding calibration of a large amount of unlabeled data, reducing calibration operations for a large amount of data, saving human resources, and reducing calibration time. By making calibration value judgments on a large amount of unlabeled data, high-value unlabeled data can be selected from a large amount of unlabeled data for calibration. Each unlabeled data to be calibrated has a high amount of information, and ensures that the information overlaps as little as possible, ultimately achieving a model with better performance under limited annotation volume, that is, training a high-quality model with better model performance. Based on the feature distribution corresponding to the labeled data and the uncertainty corresponding to the unlabeled data, the data to be calibrated can be selected from the unlabeled data set, thereby taking into account the uncertainty of a single sample and the diversity between samples, and using the manifold prior of the labeled data distribution to characterize the distribution differences of the unlabeled data.

[0040] The following describes the data processing method of the embodiment of the present application in combination with specific application scenarios.

[0041] This embodiment of the application proposes a data processing method that, through active learning (AL), can automatically select valuable unlabeled data from an unlabeled dataset for calibration. With a limited number of calibrations, a machine learning model with the best possible performance is trained. The machine learning model of this embodiment can be an image classification model or an image detection model, without limitation. Figure 2 FIG. 1 is a flow chart of a data processing method according to an embodiment of the present application, which may include:

[0042] Step 201: Obtain an initial model, a labeled dataset, and an unlabeled dataset.

[0043] Exemplarily, the initial model can be a model that needs to be trained. The initial model can be a model for implementing an image classification function or a model for implementing an image detection function, and there is no restriction on the function of the initial model. The initial model can be a machine learning model, such as a deep learning model, a neural network model, etc., and there is no restriction on the type of the initial model. For the convenience of description, taking the initial model as a neural network model as an example, the initial model can include multiple network layers, which can include but are not limited to convolutional layers, pooling layers, excitation layers, and fully connected layers, etc., and there is no restriction on the network structure of the initial model.

[0044] The initial model can be a model obtained by training a configured model using a labeled dataset, or it can be a baseline model. There is no restriction on the source of the initial model.

[0045] Exemplarily, a labeled dataset can be a set of multiple labeled data, that is, a labeled dataset can include multiple labeled data (such as image data), and the labeled data is data with a calibrated box (such as the rectangular box where the target object is located) and a calibrated category (such as the category of the target object).

[0046] Exemplarily, an unlabeled dataset can be a collection of multiple unlabeled data, that is, an unlabeled dataset can include multiple unlabeled data (such as image data). The unlabeled data does not have calibration information such as calibration boxes and calibration categories. The unlabeled data needs to be calibrated before it can participate in model training.

[0047] Step 202: For each labeled data in the labeled data set, input the labeled data into the initial model to obtain a first feature vector and a predicted category corresponding to the labeled data.

[0048] For example, after the labeled data is input into the initial model, the initial model can process the labeled data to obtain a probability vector corresponding to the labeled data. Assuming that the initial model supports C categories, the probability vector includes C probability values ​​corresponding to the C categories, where C is a positive integer. Based on the C probability values, the category corresponding to the maximum probability value can be used as the predicted category for the labeled data.

[0049] For example, assuming that the initial model supports category 1, category 2, and category 3, the probability vector includes 3 probability values, such as [0.8, 0.15, 0.05], and category 1 corresponding to the maximum probability value of 0.8 is used as the predicted category.

[0050] Exemplarily, the initial model may include multiple network layers, which may include but are not limited to convolutional layers, pooling layers, excitation layers, and fully connected layers. After the labeled data is input into the initial model, the vector output by any network layer can be used as the first eigenvector. For example, the vector output by the second-to-last network layer (i.e., the second-to-last of all network layers) is used as the first eigenvector, or the vector output by the third-to-last network layer is used as the first eigenvector, and so on. For another example, the vector output by the last convolutional layer (i.e., the last of all convolutional layers) is used as the first eigenvector, or the vector output by the second-to-last convolutional layer is used as the first eigenvector, and so on.

[0051] In summary, for each labeled data in the labeled data set, after the labeled data is input into the initial model, the first eigenvector and predicted category corresponding to the labeled data can be obtained.

[0052] Step 203: Determine the feature distribution based on the first feature vector corresponding to each labeled data.

[0053] For example, see Figure 3 As shown, each labeled data in the labeled data set is input into the initial model to obtain the first eigenvector and predicted category corresponding to each labeled data. Based on the first eigenvector and predicted category corresponding to each labeled data, the feature distribution can be obtained, that is, the feature distribution of each target category is obtained. The feature distribution can be used as a manifold prior. The manifold is a shape fold of a low-degree-of-freedom representation in a high-dimensional space, which can be understood as a nonlinear shape prior of the feature distribution.

[0054] In one possible implementation, the following steps may be used to determine the feature distribution (manifold prior):

[0055] Step 2031: For each target category supported by the initial model, determine all labeled data that match the target category based on the predicted category corresponding to each labeled data in the labeled dataset.

[0056] Assume that the initial model supports category 1, category 2 and category 3, that is, category 1, category 2 and category 3 are used as target categories. For each labeled data in the labeled dataset, if the predicted category corresponding to the labeled data is category 1, then the labeled data is regarded as the labeled data matching category 1. If the predicted category corresponding to the labeled data is category 2, then the labeled data is regarded as the labeled data matching category 2. If the predicted category corresponding to the labeled data is category 3, then the labeled data is regarded as the labeled data matching category 3.

[0057] After performing the above processing on each labeled data, all labeled data matching category 1, all labeled data matching category 2, and all labeled data matching category 3 can be obtained.

[0058] Step 2032: For each target category supported by the initial model, determine the mean feature vector corresponding to the target category based on the first feature vectors corresponding to all labeled data matching the target category.

[0059] For example, assuming that all labeled data matching the target category are T labeled data, the following formula (1) can be used to determine the mean feature vector corresponding to the target category. It should be noted that when determining the mean feature vector corresponding to category 1, the target category is category 1, and the labeled data is the labeled data matching category 1. When determining the mean feature vector corresponding to category 2, the target category is category 2, and the labeled data is the labeled data matching category 2. When determining the mean feature vector corresponding to category 3, the target category is category 3, and the labeled data is the labeled data matching category 3.

[0060]

[0061] In formula (1), T is used to represent the total number of labeled data matching the target category, M is used to represent the mean feature vector corresponding to the target category, and Y t It is used to represent the first eigenvector corresponding to the t-th labeled data. The value range of t can be 1-T. Y1 represents the first eigenvector corresponding to the first labeled data. And so on. T Represents the first eigenvector corresponding to the T-th labeled data.

[0062] Step 2033: Determine the variance eigenvector corresponding to the target category based on the difference between the first eigenvector corresponding to each labeled data matching the target category and the mean eigenvector.

[0063] For example, the variance eigenvector corresponding to the target category can be determined using formula (2). When determining the variance eigenvector corresponding to category 1, the target category is category 1, the mean eigenvector is the mean eigenvector corresponding to category 1, the labeled data is the labeled data that matches category 1, and so on.

[0064]

[0065] In formula (2), D is used to represent the total number of feature space dimensions. For example, assuming that the first feature vector / mean feature vector has eigenvalues ​​of 100 feature space dimensions, then D can be 100, and d is used to represent the eigenvalue of the dth feature space dimension in the first feature vector / mean feature vector. The value range of d can be 1-D. t (d) It is used to represent the eigenvalue of the dth feature space dimension in the first eigenvector corresponding to the tth labeled data, M (d) Used to represent the eigenvalue of the d-th feature space dimension in the mean eigenvector, σ d Used to represent the variance value of the d-th feature space dimension in the variance eigenvector.

[0066] In summary, based on the eigenvalue of the first feature space dimension in the first eigenvector corresponding to each labeled data (the value of t is 1-T in sequence) and the eigenvalue of the first feature space dimension in the mean eigenvector, the variance value of the first feature space dimension in the variance eigenvector is obtained. Similarly, based on the eigenvalue of the Dth feature space dimension in the first eigenvector corresponding to each labeled data and the eigenvalue of the Dth feature space dimension in the mean eigenvector, the variance value of the Dth feature space dimension in the variance eigenvector is obtained. Based on the variance values ​​of all feature space dimensions (variance values ​​of the 1st-Dth feature space dimensions), the variance eigenvector can be obtained, that is, the variance eigenvector includes the variance values ​​of all feature space dimensions.

[0067] Step 2034: Determine a feature distribution corresponding to the target category based on the variance eigenvector corresponding to the target category. This feature distribution may also be called a variance distribution and may serve as a manifold prior. For example, the feature distribution corresponding to the target category may be the variance eigenvector, i.e., the feature distribution includes variance values ​​for the 1st feature space dimension, ..., variance values ​​for the Dth feature space dimension.

[0068] To sum up, we can get the feature distribution corresponding to each target category. For example, assuming that the initial model supports category 1, category 2, and category 3, we can get the feature distribution corresponding to category 1, the feature distribution corresponding to category 2, and the feature distribution corresponding to category 3.

[0069] Step 204: For each unlabeled data in the unlabeled data set, input the unlabeled data into the initial model to obtain a second eigenvector corresponding to the unlabeled data.

[0070] For example, the initial model may include multiple network layers. After the unlabeled data is input into the initial model, the vector output by any network layer may be used as the second eigenvector. For example, the vector output by the second-to-last network layer may be used as the second eigenvector, or the vector output by the third-to-last network layer may be used as the second eigenvector, and so on. For another example, the vector output by the last convolutional layer may be used as the second eigenvector, or the vector output by the second-to-last convolutional layer may be used as the second eigenvector, and so on.

[0071] For example, in step 202, after the labeled data is input to the initial model, the vector output by the last convolutional layer is used as the first eigenvector. In step 204, after the unlabeled data is input to the initial model, the vector output by the last convolutional layer is used as the second eigenvector.

[0072] In summary, for each unlabeled data in the unlabeled data set, after the unlabeled data is input into the initial model, the second eigenvector corresponding to the unlabeled data can be obtained.

[0073] Step 205: For each unlabeled data in the unlabeled data set, determine the uncertainty corresponding to the unlabeled data.

[0074] For example, see Figure 4 As shown, each unlabeled data in the unlabeled data set is input into the initial model to obtain the second eigenvector corresponding to each unlabeled data, and the uncertainty corresponding to each unlabeled data is determined. Based on the second eigenvector and uncertainty corresponding to each unlabeled data, valuable unlabeled data can be selected from a large amount of unlabeled data in the unlabeled data set for calibration.

[0075] For example, by assigning an uncertainty score to each unlabeled data point in the unlabeled dataset, this score serves as a weighting factor in the sampling process. The greater the uncertainty of an unlabeled data point, the greater the probability that it will be selected, ensuring that the overall information content of the selected unlabeled data is sufficiently rich. The uncertainty score quantifies the reliability of the model's understanding of the sample (i.e., the unlabeled data). Unlabeled data with high uncertainty indicates that the model still lacks information for learning.

[0076] In one possible implementation, the uncertainty can be determined using the following steps:

[0077] Step 2051: For each unlabeled data in the unlabeled data set, the unlabeled data is input into T candidate models respectively to obtain probability vectors output by the T candidate models; wherein the T candidate models all support C categories, and the probability vector may include C probability values ​​corresponding to the C categories.

[0078] For example, we can construct T candidate models. These T candidate models can be T candidate models with different structures, that is, each candidate model has a different structure. Alternatively, these T candidate models can be the training results of the same model randomly initialized T times. Alternatively, these T candidate models can be the parameter states of a certain model at T different times during a complete training process. Of course, the above is just an example of T candidate models, and there is no limit to the number of T candidate models; it can be any T candidate models.

[0079] For example, for each unlabeled data in the unlabeled dataset, the unlabeled data can be input to the tth (t=1, 2, ..., T) candidate model, and the parameter of the tth candidate model is θ t , the t-th candidate model processes the unlabeled data to obtain a probability vector corresponding to the unlabeled data output by the t-th candidate model. Assuming that the t-th candidate model supports C categories (the C categories supported by the t-th candidate model are the same as the C categories supported by the initial model), the probability vector can include C probability values ​​corresponding to the C categories. For example, assuming that the t-th candidate model supports category 1, category 2, and category 3, the probability vector can include 3 probability values, such as [0.8, 0.15, 0.05], where 0.8 is the probability value corresponding to category 1, 0.15 is the probability value corresponding to category 2, and 0.05 is the probability value corresponding to category 3.

[0080] Obviously, when the unlabeled data is input to each candidate model, the candidate model can output a probability vector, and the probability vector includes 3 probability values. Assuming that each candidate model supports category 1, category 2 and category 3, these 3 probability values ​​correspond to category 1, category 2 and category 3 respectively.

[0081] To sum up, for each unlabeled data in the unlabeled dataset, after inputting the unlabeled data into T candidate models respectively, T probability vectors can be obtained. The first probability vector is the probability vector output by the first candidate model, and the probability vector includes 3 probability values. Similarly, the Tth probability vector is the probability vector output by the Tth candidate model, and the probability vector includes 3 probability values.

[0082] Step 2052: For each category, determine the average probability value corresponding to the category based on the probability values ​​corresponding to the category in the T probability vectors, that is, determine the average probability value based on the T probability values.

[0083] For example, for category 1, we select the probability value corresponding to category 1 from the first probability vector, and so on. Then, we select the probability value corresponding to category 1 from the Tth probability vector, obtaining a total of T probability values. We then calculate the average of these T probability values, which is the average probability value corresponding to category 1. Similarly, we can obtain the average probability values ​​corresponding to category 2 and category 3.

[0084] For example, the average probability value corresponding to category c can be determined using the following formula (3):

[0085]

[0086] In formula (3), p(y=c|x;θ t ) is used to represent the probability value corresponding to category c in the probability vector output by the t-th candidate model. Category c can be any category supported by the candidate model. The value range of t is 1-T. It is used to represent the t-th candidate model. p(y=c|x) represents the average probability value corresponding to category c.

[0087] For example, for category 1, based on the probability value corresponding to category 1 in the probability vector output by the first candidate model, ..., the probability value corresponding to category 1 in the probability vector output by the Tth candidate model, the average probability value corresponding to category 1 is determined, and so on, the average probability value corresponding to each category can be obtained.

[0088] Step 2053: Determine the overall prediction value based on the average probability values ​​corresponding to the C categories.

[0089] For example, assuming that the C categories are three categories, such as category 1, category 2, and category 3, the overall prediction value can be determined based on the average probability value corresponding to category 1, the average probability value corresponding to category 2, and the average probability value corresponding to category 3. Taking the mutual information as an example, the overall prediction value can be the information entropy of the overall prediction. See formula (4) for an example of determining the overall prediction value.

[0090]

[0091] In formula (4), p(y=c|x) represents the average probability value corresponding to category c, and the value range of c can be 1-C, that is, the value of c is 1, 2, ..., C in sequence. Represents the overall predicted value.

[0092] Step 2054: For each candidate model, determine the local prediction value corresponding to the candidate model based on the probability vector output by the candidate model (the probability vector includes C probability values ​​corresponding to C categories).

[0093] For example, assuming that C categories are three categories, such as category 1, category 2, and category 3, then based on the three probability values ​​in the probability vector output by the t-th candidate model (such as the probability value corresponding to category 1, the probability value corresponding to category 2, and the probability value corresponding to category 3), the local prediction value corresponding to the t-th candidate model can be determined. Taking the mutual information as an example, the local prediction value can be the information entropy predicted by the t-th candidate model. See formula (5) for an example of determining the local prediction value.

[0094]

[0095] In formula (5), p(y=c|x;θ t ) is used to represent the probability value corresponding to category c in the probability vector output by the t-th candidate model. Category c can be any category, and the value range of c is 1-C, that is, the value of c is 1, 2, ..., C in sequence. Used to represent the local prediction value corresponding to the t-th candidate model.

[0096] Step 2055: Determine the uncertainty corresponding to the unlabeled data based on the overall prediction value and the local prediction value corresponding to each candidate model. Exemplarily, the uncertainty is used to represent the inconsistency of the prediction results of multiple candidate models (i.e., T candidate models) for the same unlabeled data. That is, the greater the uncertainty, the greater the inconsistency of the prediction results of multiple candidate models for the unlabeled data.

[0097] Taking mutual information as an example, based on the overall prediction value (i.e., the information entropy of the overall prediction) and the local prediction value corresponding to each candidate model (i.e., the information entropy of the candidate model prediction), the uncertainty corresponding to the unlabeled data can be determined using the following formula (5). Of course, formula (5) is just an example.

[0098]

[0099] In formula (5), Used to represent the overall prediction value, that is, the overall prediction value of the unlabeled data x, It is used to represent the local prediction value corresponding to the t-th candidate model (the local prediction value for the unlabeled data x). The value range of t is 1-T, that is, the value of t is 1, 2, ..., T in sequence. It is used to represent the average of the local prediction values ​​corresponding to all candidate models. It is used to express the uncertainty, that is, the uncertainty of the unlabeled data x. In summary, the uncertainty of the unlabeled data x can be determined based on the overall prediction value and the average of the local prediction values ​​corresponding to all candidate models, without any restrictions.

[0100] For example, the uncertainty of unlabeled data x is It can also be recorded as uncertainty uct(x). Since the uncertainty uct(x) of the unlabeled data x is used as a weighting factor, the weighting factor can be located in a specified interval. The specified interval can be configured according to experience, such as [0,1]. Therefore, the uncertainty of the unlabeled data x is Convert the value into a value in the specified interval, and use the converted value as the uncertainty uct(x). There is no restriction on this conversion method, as long as the uncertainty uct(x) after conversion is within the specified interval.

[0101] In summary, for each unlabeled data in the unlabeled data set, the uncertainty corresponding to the unlabeled data can be obtained based on steps 2051 to 2055, which will not be repeated here.

[0102] Step 206: For each unlabeled data point in the unlabeled data set, determine the distance between the second eigenvector corresponding to the unlabeled data point and the first eigenvector corresponding to each labeled data point based on the uncertainty corresponding to the unlabeled data point and the characteristic distribution. For example, the distance between the second eigenvector corresponding to the unlabeled data point and the first eigenvector corresponding to the labeled data point is determined based on the uncertainty corresponding to the unlabeled data point and the characteristic distribution corresponding to the target category of the labeled data point.

[0103] For example, for the unlabeled data x in the unlabeled dataset (the unlabeled data x is any unlabeled data in the unlabeled dataset) and the labeled data y in the labeled dataset (the labeled data y is any labeled data in the labeled dataset), the distance value between the second eigenvector corresponding to the unlabeled data x and the first eigenvector corresponding to the labeled data y can be determined based on the uncertainty corresponding to the unlabeled data x and the feature distribution corresponding to the target category corresponding to the labeled data y.

[0104] Exemplarily, the difference between the second eigenvector corresponding to the unlabeled data x and the first eigenvector corresponding to the labeled data y can be determined, and the distribution difference between the difference and the feature distribution corresponding to the target category corresponding to the labeled data y can be determined (which can also be called the degree of difference. The greater the degree of difference, the greater the probability that the unlabeled data is selected). Then, based on the uncertainty corresponding to the unlabeled data x, the weighting coefficient corresponding to the distribution difference is determined, and based on the distribution difference and the weighting coefficient, the distance value between the second eigenvector and the first eigenvector is determined. Among them, the greater the uncertainty, the greater the weighting coefficient and the greater the distance value; the greater the distribution difference, the greater the distance value.

[0105] In a possible implementation, in order to determine the distance between the second eigenvector corresponding to the unlabeled data x and the first eigenvector corresponding to the labeled data y, formula (6) may be used:

[0106]

[0107] In formula (6), D is used to represent the total number of feature space dimensions, d is used to represent the dth feature space dimension among all feature space dimensions, and the value range of d can be 1-D. (d) Used to represent the eigenvalue of the dth feature space dimension in the second eigenvector corresponding to the unlabeled data x, Y (d) Used to represent the eigenvalue of the d-th feature space dimension in the first eigenvector corresponding to the labeled data y, σ d Used to represent the variance value of the d-th feature space dimension in the variance feature vector (i.e., feature distribution).

[0108] In summary, based on the second eigenvector corresponding to the unlabeled data x, the first eigenvector corresponding to the labeled data y, and the characteristic distribution (i.e., variance eigenvector) corresponding to the target category corresponding to the labeled data y, when the value of d is 1-D in sequence, we can get The value of is recorded as the distribution difference. Then, the uncertainty uct(x) of the unlabeled data x can be used to weight the distribution difference. That is, the uncertainty uct(x) is used as the weighting coefficient of the distribution difference. The distance value d(x,y) between the second eigenvector corresponding to the unlabeled data x and the first eigenvector corresponding to the labeled data y can be obtained.

[0109] From formula (6), we can see that X (d) -Y (d) represents the difference between the second eigenvector and the first eigenvector, Indicates that the difference and the characteristic distribution σ d The distribution difference between them, that is, through the characteristic distribution σ d The difference between the second eigenvector and the first eigenvector is recalibrated to obtain the distribution difference between the difference and the characteristic distribution. The uncertainty uct(x) of the unlabeled data x is used as the weighting coefficient corresponding to the distribution difference, that is, the distribution difference is weighted by the uncertainty uct(x) to obtain the distance value between the second eigenvector and the first eigenvector. Obviously, the larger the uncertainty uct(x), the larger the weighting coefficient and the larger the distance value. In addition, the larger the distribution difference, the larger the distance value.

[0110] See also Figure 5As shown, the difference between the second eigenvector and the first eigenvector can be determined, and the difference between the second eigenvector and the first eigenvector can be recalibrated using the characteristic distribution to obtain a distribution difference between the difference and the characteristic distribution. Then, the distribution difference can be weighted by the uncertainty to obtain the distance value between the second eigenvector and the first eigenvector.

[0111] See also Figure 6 As shown, based on the labeled data set, the first eigenvector corresponding to each labeled data can be obtained, and the characteristic distribution can be obtained. Based on the unlabeled data set, the second eigenvector corresponding to each unlabeled data can be obtained, and the uncertainty corresponding to each unlabeled data can be obtained. The distance between the second eigenvector and the first eigenvector is recalibrated by the characteristic distribution (i.e., the manifold distribution prior) to obtain the similarity index under the manifold prior (i.e., the distance index, i.e., the distribution difference of the above embodiment), and the distribution difference is weighted by the uncertainty to finally obtain the distance value between the second eigenvector and the eigenvector. In the above process, the sampling of representative samples is realized based on the distance value, that is, samples with high uncertainty are sampled.

[0112] Step 207: For each unlabeled data point in the unlabeled data set, a target distance value corresponding to the unlabeled data point is determined based on the distance between the second eigenvector corresponding to the unlabeled data point and the first eigenvector corresponding to each labeled data point in the labeled data set. For example, a minimum distance value is selected from the distance values ​​between the second eigenvector and each first eigenvector, and the target distance value corresponding to the unlabeled data point is determined based on the minimum distance value, such as using the minimum distance value as the target distance value.

[0113] For example, for each unlabeled data in the unlabeled data set, the distance value between the second eigenvector corresponding to the unlabeled data and the first eigenvector corresponding to each labeled data in the labeled data set can be determined, and the minimum distance value can be used as the target distance value corresponding to the unlabeled data.

[0114] For example, L represents a labeled dataset, U represents an unlabeled dataset, and for any unlabeled data x in the unlabeled dataset j (x j ∈U), the unlabeled data x j To each labeled data x in the labeled dataset L i (x i ∈L) is the minimum value of the distance value, which is used as the unlabeled data x j The target distance value from the label dataset L is expressed as follows: d(x j ,L)=min{d(x j ,x i )xi ∈L}.

[0115] Step 208: Based on the target distance value corresponding to each unlabeled data in the unlabeled data set, select data to be calibrated from the unlabeled data set. For example, all unlabeled data are sorted based on the target distance value corresponding to each unlabeled data. Based on the sorting result, P unlabeled data with the largest target distance value can be selected from the unlabeled data set as the data to be calibrated, where P can be a positive integer.

[0116] For example, if all unlabeled data are sorted in descending order of target distance value, the top P unlabeled data in the unlabeled data set can be selected as the data to be calibrated. If all unlabeled data are sorted in descending order of target distance value, the bottom P unlabeled data in the unlabeled data set can be selected as the data to be calibrated.

[0117] Exemplarily, P can be a value configured based on experience, such as 3, 5, 10, etc., or P can be determined based on the total number of unlabeled data in the unlabeled dataset, for example, the total number of unlabeled data * m%, where m can be a value configured based on experience, such as 1, 2, etc. There is no restriction on the value of P.

[0118] Step 209 : perform data calibration on the data to be calibrated, and update the data to be calibrated to the labeled data in the labeled dataset, that is, migrate the data to be calibrated from the unlabeled dataset to the labeled dataset.

[0119] For example, after selecting P uncalibrated data (i.e., unlabeled data) from an unlabeled dataset, the user can manually calibrate the P uncalibrated data, or a calibration algorithm can be used to calibrate the P uncalibrated data. There is no restriction on this, as long as the uncalibrated data has calibration information, such as a calibration box (e.g., a rectangular box containing the target object) and a calibration category (e.g., the category of the target object). After the uncalibrated data is calibrated, the uncalibrated data is converted from unlabeled data to labeled data, and the uncalibrated data is migrated from the unlabeled dataset to the labeled dataset.

[0120] Step 210: Train the initial model based on the labeled data set to obtain a trained model.

[0121] Step 211: Determine whether the model training end condition has been met. If the model training end condition has not been met, then step 212 may be executed; if the model training end condition has been met, then step 213 may be executed.

[0122] For example, if the number of iterations of the initial model (each time the initial model is trained using a labeled data set, the number of iterations can be increased by 1) reaches a preset threshold (which can be configured based on experience), it is determined that the model training end condition has been met; otherwise, it is determined that the model training end condition has not been met.

[0123] For another example, if the training time of the initial model reaches a preset time threshold (which can be configured based on experience), it is determined that the model training end condition has been met; otherwise, it is determined that the model training end condition has not been met.

[0124] For another example, if the performance of the trained model reaches the expected index, it is determined that the model training end condition has been met; if the performance of the trained model does not reach the expected index, it is determined that the model training end condition has not been met.

[0125] For another example, if the total number of calibrated unlabeled data reaches a preset threshold (which can be configured based on experience), it is determined that the model training end condition has been met; if the total number of calibrated unlabeled data does not reach the preset threshold, it is determined that the model training end condition has not been met.

[0126] Of course, the above are just a few examples, and there is no restriction on the conditions for ending model training.

[0127] Step 212: Update the trained model to the initial model and return to step 202, i.e., repeat steps 202 to 211 until the model training end condition is met, and then execute step 213.

[0128] Step 213: Determine the trained model as the target model and output the target model, i.e., deploy the target model online. The target model then performs data processing, i.e., artificial intelligence processing, on the data to be processed. There are no restrictions on this data processing process. For example, if the target model is used to implement a detection function, the target model can be used to perform target detection on the data to be processed. For example, the target model can detect target boxes in the data to be processed (e.g., the image to be processed) and identify the category, such as vehicle category, animal category, electronic product category, etc.

[0129] It can be seen from the above technical solutions that in the embodiment of the present application, by making calibration value judgments on a large amount of unlabeled data, high-value unlabeled data are selected from a large amount of unlabeled data for calibration, and each unlabeled data to be calibrated has a high amount of information, and the information overlap is ensured to be as little as possible, so as to eventually achieve a model with better performance under limited annotation, that is, to train a high-quality model with better model performance. Based on the feature distribution corresponding to the labeled data and the uncertainty corresponding to the unlabeled data, the data to be calibrated can be selected from the unlabeled data set, thereby considering the uncertainty of a single sample and the diversity between samples, and using the manifold prior of the labeled data distribution to characterize the distribution difference of the unlabeled data. The uncertainty and diversity of the unlabeled data are considered simultaneously, and the query logic is simpler. In the process of selecting unlabeled data based on diversity, the diversity (i.e., distribution difference) between labeled data and unlabeled data, as well as the diversity within the unlabeled data set are considered. Using the feature distribution shape of the labeled data set as a metric prior, it can automatically adapt as the query data changes, without introducing additional parameters, and has better robustness and versatility. By simultaneously considering the uncertainty of a single sample and the diversity across samples, the uncertainty of the model for unlabeled data is characterized by the mutual information of multi-model predictions, and the distribution differences of unlabeled data are characterized by the manifold prior of the labeled data distribution. This combination of the two enables the selection of valuable calibration sample sets. This approach is independent of a specific image classification network structure, and the calculation of uncertainty does not rely on a specific model ensemble. It can be flexibly designed based on specific applications, making the learning sampling process flexible and portable.

[0130] Based on the same application concept as the above method, a data processing device is proposed in the embodiment of the present application, see Figure 7 FIG. 1 is a schematic diagram of the structure of the data processing device, which may include:

[0131] An acquisition module 71 is used to input each labeled data in the labeled data set into the initial model to obtain a first eigenvector corresponding to each labeled data, and determine a characteristic distribution based on the first eigenvector corresponding to each labeled data; for each unlabeled data in the unlabeled data set, input the unlabeled data into the initial model to obtain a second eigenvector corresponding to the unlabeled data; and, for each unlabeled data in the unlabeled data set, determine the uncertainty corresponding to the unlabeled data; a determination module 72 is used to determine a distance value between the second eigenvector and the first eigenvector corresponding to each labeled data based on the uncertainty corresponding to the unlabeled data and the characteristic distribution; and determine a target distance value corresponding to the unlabeled data based on the distance value between the second eigenvector and each first eigenvector; a calibration module 73 is used to select data to be calibrated from the unlabeled data set based on the target distance value corresponding to each unlabeled data in the unlabeled data set, and perform data calibration on the data to be calibrated.

[0132] Exemplarily, the acquisition module 71 is also used to input each labeled data in the labeled data set into the initial model to obtain the predicted category corresponding to each labeled data; on this basis, the acquisition module 71 is specifically used to determine the feature distribution based on the first eigenvector corresponding to each labeled data: for each target category supported by the initial model, all labeled data matching the target category are determined based on the predicted category corresponding to each labeled data, and the feature distribution corresponding to the target category is determined based on the first eigenvector corresponding to all labeled data matching the target category; and the determination module 72 is specifically used to determine the distance value between the second eigenvector and the first eigenvector corresponding to each labeled data based on the uncertainty corresponding to the unlabeled data and the feature distribution: based on the uncertainty corresponding to the unlabeled data and the feature distribution corresponding to the target category corresponding to the labeled data, the distance value between the second eigenvector and the first eigenvector corresponding to the labeled data is determined.

[0133] Exemplarily, when the acquisition module 71 determines the feature distribution corresponding to the target category based on the first feature vector corresponding to all labeled data matching the target category, it is specifically used to: determine the mean feature vector corresponding to the target category based on the first feature vector corresponding to all labeled data matching the target category, determine the variance feature vector corresponding to the target category based on the difference between each first feature vector and the mean feature vector; and determine the feature distribution corresponding to the target category based on the variance feature vector.

[0134] Exemplarily, when determining the distance value between the second eigenvector and the first eigenvector corresponding to the labeled data based on the uncertainty corresponding to the unlabeled data and the characteristic distribution corresponding to the target category corresponding to the labeled data, the determination module 72 is specifically used to: determine the difference between the second eigenvector and the first eigenvector; determine the distribution difference between the difference and the characteristic distribution; determine the weighting coefficient corresponding to the distribution difference based on the uncertainty, and determine the distance value between the second eigenvector and the first eigenvector based on the distribution difference and the weighting coefficient; the greater the uncertainty, the greater the weighting coefficient, the greater the distance value; the greater the distribution difference, the greater the distance value.

[0135] Exemplarily, when the acquisition module 71 determines the uncertainty corresponding to the unlabeled data, it is specifically used to: input the unlabeled data into T candidate models respectively to obtain probability vectors output by the T candidate models; wherein the T candidate models all support C categories, and the probability vectors include C probability values ​​corresponding to the C categories; T and C are both positive integers; for each category, the average probability value corresponding to the category is determined based on the probability values ​​corresponding to the category in the T probability vectors, and the overall prediction value is determined based on the average probability values ​​corresponding to the C categories; for each candidate model, the local prediction value corresponding to the candidate model is determined based on the probability vector output by the candidate model; and the uncertainty corresponding to the unlabeled data is determined based on the overall prediction value and the local prediction value corresponding to each candidate model.

[0136] Exemplarily, when the determination module 72 determines the target distance value corresponding to the unlabeled data based on the distance value between the second eigenvector and each first eigenvector, it is specifically used to: select the minimum distance value from the distance values ​​between the second eigenvector and each first eigenvector, and determine the target distance value corresponding to the unlabeled data based on the minimum distance value; when the calibration module 73 selects the data to be calibrated from the unlabeled data set based on the target distance value corresponding to each unlabeled data in the unlabeled data set, it is specifically used to: sort all the unlabeled data based on the target distance value corresponding to each unlabeled data, and select P unlabeled data with large target distance values ​​from the unlabeled data set as the data to be calibrated based on the sorting result.

[0137] Exemplarily, the device also includes: a training module, used to update the data to be calibrated to the labeled data in the labeled data set; training the initial model based on the labeled data set to obtain a trained model; if the model training end condition is met, determining the trained model as the target model, and outputting the target model; wherein the target model is used to perform data processing on the data to be processed; if the model training end condition is not met, updating the trained model to the initial model, and the acquisition module inputs each labeled data in the labeled data set into the initial model.

[0138] Based on the same application concept as the above method, a data processing device (ie, electronic device) is proposed in the embodiment of the present application, see Figure 8 As shown, the data processing device includes: a processor 81 and a machine-readable storage medium 82, wherein the machine-readable storage medium 82 stores machine-executable instructions that can be executed by the processor 81; the processor 81 is used to execute the machine-executable instructions to implement the data processing method disclosed in the above example of this application. For example, the following steps can be implemented:

[0139] Inputting each labeled data in the labeled data set into the initial model to obtain a first eigenvector corresponding to each labeled data, and determining a feature distribution based on the first eigenvector corresponding to each labeled data;

[0140] For each unlabeled data in the unlabeled data set, input the unlabeled data into the initial model to obtain a second eigenvector corresponding to the unlabeled data; and determine the uncertainty corresponding to the unlabeled data;

[0141] Determine the distance value between the second eigenvector and the first eigenvector corresponding to each labeled data based on the uncertainty corresponding to the unlabeled data and the characteristic distribution; determine the target distance value corresponding to the unlabeled data based on the distance value between the second eigenvector and each first eigenvector;

[0142] Based on the target distance value corresponding to each unlabeled data in the unlabeled data set, data to be calibrated is selected from the unlabeled data set, and data calibration is performed on the data to be calibrated.

[0143] Based on the same application concept as the above method, an embodiment of the present application also provides a machine-readable storage medium, on which a number of computer instructions are stored. When the computer instructions are executed by a processor, the data processing method disclosed in the above example of the present application can be implemented.

[0144] The machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that may contain or store information, such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, a storage drive (such as a hard disk drive), a solid-state drive, any type of storage disk (such as a CD, DVD, etc.), or similar storage media, or a combination thereof.

[0145] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email transceiver, game console, tablet computer, wearable device, or any combination of these devices.

[0146] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing this application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0147] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0148] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0149] Furthermore, these computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0150] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0151] The foregoing is merely an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.

Claims

1. A data processing method, characterized in that: The method comprises: Input each labeled data in the labeled data set into the initial model to obtain a first eigenvector corresponding to each labeled data, and determine a feature distribution corresponding to the target category corresponding to the labeled data based on the first eigenvector corresponding to each labeled data; For each unlabeled data in the unlabeled data set, the unlabeled data is input into the initial model to obtain a second eigenvector corresponding to the unlabeled data; the uncertainty corresponding to the unlabeled data is determined; wherein the uncertainty is used to represent the inconsistency of the prediction results of multiple candidate models on the unlabeled data, and the greater the uncertainty, the greater the inconsistency of the prediction results of the multiple candidate models on the unlabeled data; Based on the uncertainty corresponding to the unlabeled data and the characteristic distribution, a distance value between the second eigenvector and the first eigenvector corresponding to each labeled data is determined; wherein, a difference between the second eigenvector and the first eigenvector is determined; a distribution difference between the difference and the characteristic distribution is determined; a weighting coefficient corresponding to the distribution difference is determined based on the uncertainty, and a distance value between the second eigenvector and the first eigenvector is determined based on the distribution difference and the weighting coefficient; wherein, the distance value is determined using the following formula: ; D represents the total number of feature space dimensions, d represents the dth feature space dimension among all feature space dimensions, Represents the eigenvalue of the dth feature space dimension in the second eigenvector corresponding to the unlabeled data x, Represents the eigenvalue of the dth feature space dimension in the first eigenvector corresponding to the labeled data y, Represents the variance value of the dth feature space dimension in the feature distribution, represents the distribution difference, represents the uncertainty, Indicates the distance value; Based on the distance value between the second eigenvector and each first eigenvector, the target distance value corresponding to the unlabeled data is determined; based on the target distance value corresponding to each unlabeled data in the unlabeled data set, the data to be calibrated is selected from the unlabeled data set, and data calibration is performed on the data to be calibrated.

2. The method according to claim 1, characterized in that After inputting each labeled data in the labeled data set into the initial model, the predicted category corresponding to each labeled data is obtained; The determining of the feature distribution corresponding to the target category corresponding to the labeled data based on the first feature vector corresponding to each labeled data includes: for each target category supported by the initial model, determining all labeled data matching the target category based on the predicted category corresponding to each labeled data, and determining the feature distribution corresponding to the target category based on the first feature vector corresponding to all labeled data matching the target category.

3. The method according to claim 2, characterized in that Determining a feature distribution corresponding to the target category based on first feature vectors corresponding to all labeled data matching the target category includes: Determining a mean eigenvector corresponding to the target category based on first eigenvectors corresponding to all labeled data matching the target category, and determining a variance eigenvector corresponding to the target category based on a difference between each first eigenvector and the mean eigenvector; A feature distribution corresponding to the target category is determined based on the variance feature vector.

4. The method according to claim 1, wherein in, The greater the uncertainty, the greater the weighting coefficient and the greater the distance value; The greater the distribution difference, the greater the distance value.

5. The method according to claim 1, characterized in that Determining the uncertainty corresponding to the unlabeled data includes: Input the unlabeled data to T candidate models respectively to obtain probability vectors output by the T candidate models; wherein the T candidate models all support C categories, and the probability vectors include C probability values ​​corresponding to the C categories; T and C are both positive integers; For each category, the average probability value corresponding to the category is determined based on the probability values ​​corresponding to the category in the T probability vectors, and the overall prediction value is determined based on the average probability values ​​corresponding to the C categories; for each candidate model, the local prediction value corresponding to the candidate model is determined based on the probability vector output by the candidate model; The uncertainty corresponding to the unlabeled data is determined based on the overall prediction value and the local prediction value corresponding to each candidate model.

6. The method according to claim 1, characterized in that Determining the target distance value corresponding to the unlabeled data based on the distance values ​​between the second eigenvector and each first eigenvector includes: selecting a minimum distance value from the distance values ​​between the second eigenvector and each first eigenvector, and determining the target distance value corresponding to the unlabeled data based on the minimum distance value; The method of selecting data to be calibrated from the unlabeled data set based on the target distance value corresponding to each unlabeled data in the unlabeled data set includes: sorting all unlabeled data based on the target distance value corresponding to each unlabeled data, and based on the sorting result, selecting P unlabeled data with large target distance values ​​from the unlabeled data set as the data to be calibrated, where P is a positive integer.

7. The method according to claim 1, characterized in that After calibrating the data to be calibrated, the method further includes: Updating the data to be calibrated to the labeled data in the labeled data set; Training the initial model based on the labeled data set to obtain a trained model; If the model training end condition is met, the trained model is determined as the target model and the target model is output; wherein the target model is used to perform data processing on the data to be processed; If the model training end condition is not met, the trained model is updated to the initial model, and the process returns to executing the operation of inputting each labeled data in the labeled data set into the initial model.

8. A data processing device, characterized in that: The device comprises: An acquisition module is configured to input each labeled data in the labeled data set into the initial model to obtain a first eigenvector corresponding to each labeled data, and determine a feature distribution corresponding to a target category corresponding to the labeled data based on the first eigenvector corresponding to each labeled data; for each unlabeled data in the unlabeled data set, input the unlabeled data into the initial model to obtain a second eigenvector corresponding to the unlabeled data; and determine an uncertainty corresponding to the unlabeled data; wherein the uncertainty is used to represent the inconsistency of the prediction results of multiple candidate models on the unlabeled data, and the greater the uncertainty, the greater the inconsistency of the prediction results of the multiple candidate models on the unlabeled data; A determination module is configured to determine the distance value between the second eigenvector and the first eigenvector corresponding to each labeled data based on the uncertainty corresponding to the unlabeled data and the characteristic distribution; and determine the target distance value corresponding to the unlabeled data based on the distance value between the second eigenvector and each first eigenvector; wherein, when determining the distance value between the second eigenvector and the first eigenvector corresponding to each labeled data, the determination module is specifically configured to: determine the difference between the second eigenvector and the first eigenvector; determine the distribution difference between the difference and the characteristic distribution; determine a weighting coefficient corresponding to the distribution difference based on the uncertainty, and determine the distance value between the second eigenvector and the first eigenvector based on the distribution difference and the weighting coefficient; and the determination module uses the following formula to determine the distance value: ; D represents the total number of feature space dimensions, d represents the dth feature space dimension among all feature space dimensions, Represents the eigenvalue of the dth feature space dimension in the second eigenvector corresponding to the unlabeled data x, Represents the eigenvalue of the dth feature space dimension in the first eigenvector corresponding to the labeled data y, Represents the variance value of the dth feature space dimension in the feature distribution, represents the distribution difference, represents the uncertainty, Indicates the distance value; The calibration module is used to select data to be calibrated from the unlabeled data set based on the target distance value corresponding to each unlabeled data in the unlabeled data set, and perform data calibration on the data to be calibrated.

9. The device according to claim 8, characterized in that in, The acquisition module is further configured to input each labeled data in the labeled data set into the initial model to obtain a predicted category corresponding to each labeled data; when the acquisition module determines the feature distribution corresponding to the target category corresponding to the labeled data based on the first eigenvector corresponding to each labeled data, it is specifically configured to: for each target category supported by the initial model, determine all labeled data matching the target category based on the predicted category corresponding to each labeled data, and determine the feature distribution corresponding to the target category based on the first eigenvector corresponding to all labeled data matching the target category; Wherein, when determining the feature distribution corresponding to the target category based on the first feature vectors corresponding to all labeled data matching the target category, the acquisition module is specifically configured to: determine the mean feature vector corresponding to the target category based on the first feature vectors corresponding to all labeled data matching the target category, determine the variance feature vector corresponding to the target category based on the difference between each first feature vector and the mean feature vector; and determine the feature distribution corresponding to the target category based on the variance feature vector; The greater the uncertainty, the greater the weighting coefficient and the greater the distance value; the greater the distribution difference, the greater the distance value; Wherein, when the acquisition module determines the uncertainty corresponding to the unlabeled data, it is specifically used to: input the unlabeled data into T candidate models respectively to obtain the probability vectors output by the T candidate models; wherein, the T candidate models all support C categories, and the probability vectors include C probability values ​​corresponding to the C categories; T and C are both positive integers; for each category, the average probability value corresponding to the category is determined based on the probability values ​​corresponding to the category in the T probability vectors, and the overall prediction value is determined based on the average probability values ​​corresponding to the C categories; for each candidate model, the local prediction value corresponding to the candidate model is determined based on the probability vector output by the candidate model; the uncertainty corresponding to the unlabeled data is determined based on the overall prediction value and the local prediction value corresponding to each candidate model; Wherein, when the determination module determines the target distance value corresponding to the unlabeled data based on the distance value between the second eigenvector and each first eigenvector, it is specifically used to: select the minimum distance value from the distance values ​​between the second eigenvector and each first eigenvector, and determine the target distance value corresponding to the unlabeled data based on the minimum distance value; when the calibration module selects the data to be calibrated from the unlabeled data set based on the target distance value corresponding to each unlabeled data in the unlabeled data set, it is specifically used to: sort all the unlabeled data based on the target distance value corresponding to each unlabeled data, and select P unlabeled data with large target distance values ​​from the unlabeled data set as the data to be calibrated based on the sorting result; The device further includes: a training module for updating the data to be calibrated to the labeled data in the labeled data set; training the initial model based on the labeled data set to obtain a trained model; if the model training end condition is met, determining the trained model as the target model and outputting the target model; wherein the target model is used to perform data processing on the data to be processed; if the model training end condition is not met, updating the trained model to the initial model, and the acquisition module inputs each labeled data in the labeled data set into the initial model.

10. A data processing device, characterized in that: include: a processor and a machine-readable storage medium storing machine-executable instructions capable of being executed by the processor; The processor is configured to execute machine-executable instructions to implement the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device for determining data sample with annotation value

    CN113657510A