Sample screening method and device based on generalization optimization algorithm

By using a generalization optimization algorithm to select high-value samples from medical image data for annotation, the problems of high cost and data redundancy in manual annotation are solved, and efficient model training and improved recognition performance are achieved.

CN121935607APending Publication Date: 2026-04-28BEIJING XIAOYING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING XIAOYING TECH CO LTD
Filing Date
2025-12-23
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

When building an AI recognition system, especially in the field of medical images, existing technologies often involve costly and error-prone manual annotation. Furthermore, data redundancy leads to resource waste and low model training efficiency, making it difficult to effectively select the most representative samples for annotation.

Method used

A sample selection method based on a generalization optimization algorithm is adopted. The most informative samples are selected and labeled through a high-value sample selection system to build a training dataset. The pre-trained intelligent recognition model is used to output the sample category and quantity, and redundant samples in the dataset are removed.

Benefits of technology

It effectively reduces the time required for expert annotation, ensures the rationality of data distribution, improves model recognition performance, reduces model training resource overhead, and shortens the experimental cycle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121935607A_ABST
    Figure CN121935607A_ABST
Patent Text Reader

Abstract

The invention discloses a sample screening method and device based on a generalization optimization algorithm, and the method comprises the steps: collecting to-be-screened target data, and constructing a to-be-screened data set; inputting the to-be-screened data set into a pre-trained intelligent recognition model to obtain sample categories output by the intelligent recognition model and the statistical number of the sample categories; wherein the intelligent identification model is obtained by training a machine learning network by using a training data set, the training data set is constructed after marking screened training data, and the training data is obtained by screening collected original data in batches through a high-value sample selection system. According to the method, the optimal recognition effect of the model can be achieved with the minimum labeling workload, the samples with the highest information value are scientifically selected for labeling, redundant samples in a data set are effectively removed, and the time needed by expert labeling is greatly shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing methods, and specifically to a sample selection method and apparatus based on a generalization optimization algorithm. Background Technology

[0002] Building an AI-powered recognition system presents numerous challenges, with data annotation being a crucial one. Data annotation in natural scenes is typically handled by specialized teams, ensuring efficiency through collaboration among a large number of annotators. However, with massive amounts of data, manual annotation is not only costly but also prone to errors, especially in the field of medical imaging, which demands specialized knowledge. Accurate interpretation of medical images relies on experienced and highly qualified experts, but due to the scarcity of such talent in this industry, conducting large-scale data annotation under limited resources is extremely difficult.

[0003] Furthermore, samples in large-scale databases may contain highly similar information, leading to information redundancy. If the most representative samples can be carefully selected for expert annotation, the amount of data to be annotated can be significantly reduced without affecting the model's recognition accuracy, thus efficiently utilizing limited expert resources. When annotation resources are limited, prioritizing the annotation of samples with the richest information can improve the model's recognition performance, shorten the experimental cycle, and effectively alleviate common problems such as data imbalance during data collection.

[0004] In existing technologies, the following methods are generally used for sample processing: 1. Completely label all collected data, ignoring the presence of redundant samples in the database. While simple and direct, this approach fails to effectively filter and remove duplicate or similar information, leading to resource waste and inefficiency. When dealing with massive amounts of data, an indiscriminate labeling strategy not only increases costs but may also introduce unnecessary noise, affecting the training performance of subsequent models. This method treats all samples in the training dataset equally, failing to consider potential information redundancy and ignoring the similarity and repetition between samples, resulting in a large amount of duplicate information during the labeling process.

[0005] 2. Constructing a supervised learning-based statistical learning recognition model includes steps such as feature engineering, data preprocessing, and model training. Statistical learning models rely on hand-designed features, requiring deep involvement from domain experts. Furthermore, the quality of these hand-designed features directly impacts the model's final performance, limiting further improvements. This method undifferentiates all data, generating a large amount of invalid annotations (i.e., information redundancy), severely wasting valuable annotation resources. Especially when annotation resources are scarce, this inefficient approach not only increases annotation costs but also affects the model's recognition accuracy.

[0006] 3. Construct a deep learning recognition model based on supervised learning, utilizing deep neural networks for automatic feature extraction and classification. Deep learning has demonstrated superior performance on many tasks, but it primarily relies on large-scale labeled datasets for training. When labeling resources are limited, the model will perform poorly due to a lack of sufficient data, severely limiting its true performance. This method uses all collected data for model training, extending the training cycle, increasing time costs, and hindering rapid model iteration and optimization. Summary of the Invention

[0007] Therefore, embodiments of the present invention provide a sample screening method and apparatus based on a generalization optimization algorithm to solve at least one technical problem existing in the prior art.

[0008] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions: This invention provides a sample selection method based on a generalization optimization algorithm, the method comprising: Collect the target data to be filtered and construct the dataset to be filtered; The dataset to be screened is input into a pre-trained intelligent recognition model to obtain the sample categories output by the intelligent recognition model and the statistical number of each sample category; The intelligent recognition model is obtained by training a machine learning network using a training dataset. The training dataset is constructed by labeling the selected training data. The training data is obtained by filtering the collected raw data in batches through a high-value sample selection system.

[0009] In some embodiments, a training dataset is constructed using the collected raw data, specifically including: Collect a large amount of raw data and construct the original dataset; The original dataset is divided into multiple batch combinations; Each batch combination is input into the high-value sample selection system for screening to obtain the output data after screening for each batch combination. Each output data point is labeled by an expert, and the labeled data is incorporated into the dataset to form the training dataset.

[0010] In some embodiments, the high-value sample selection system includes a distance calculation module, a sample partitioning module, a centroid optimization module, and an iteration control module; in: The distance calculation module is used to calculate, according to a preset metric method, the distance between each sample in a batch of unlabeled data sets and the distance between each sample and the labeled data set in that batch, which serves as the initial center point. Calculate the distance between each sample in the dataset and output the distance matrix. The sample partitioning module is connected to the distance calculation module and is used to receive the distance matrix, and for each sample in the unlabeled data set, according to the nearest distance principle, partition it into the set represented by the corresponding center point and output the partitioning result. The center point optimization module is connected to the sample partitioning module. It is used to receive the partitioning result, and for each partitioned sample set, it attempts to select a new sample as the center point in the set and calculates the sum of the distances from all samples in the set to the old and new center points. If the sum of the distances corresponding to the new center point is smaller, the center point is updated and the updated center point set is output. The iteration control module is connected to the distance calculation module, the sample partitioning module, and the center point optimization module, respectively, and is used to control the iterative execution of the entire optimization process: in each iteration, the distance calculation module is triggered to recalculate the distance based on the latest center point set, and the sample partitioning module and the center point optimization module are driven to work in sequence; the iteration control module is also used to determine whether the center point set has stabilized (i.e. the center point set no longer changes after two consecutive iterations). If it has stabilized, the iteration is terminated, and the final center point set is output as the support set for this batch.

[0011] In some embodiments, the optimization objective of the high-value sample selection system is to solve for the upper limit of the loss of the support set.

[0012] In some embodiments, solving for the upper limit of the loss of the support set specifically includes: S1: Using the initially labeled dataset Based on this, all samples are set as center sample points. Unlabeled data are separated from the data in batch s and these unlabeled data are combined into a set. ; S2: Calculate the set according to the predetermined measurement method. Each data point in the data and The distance between each data point in the matrix is ​​used to obtain the metric result matrix; S3: Target For each sample in the dataset, compare it with... Sort the samples by distance: S4: For For all sample points, perform step S3 to obtain the partitioned data set, and calculate the value of each partitioned data set. The distances between sample points and their corresponding center points are calculated, and these distances are summed to obtain the total distance for each partition set; S5: Based on the partitioned dataset, for each set with each center point as the core, randomly select one sample as the new center point, calculate the distance between all points in the partitioned set and this new center point, and sum these distances. Repeat steps S2-S5 until all center points no longer change; throughout the iteration process, continuously optimize the selection of center points and the division of the set, and the final set of center points will serve as the support set for this batch.

[0013] In some embodiments, in step S3, for For a single sample, select the one closest to it. The sample is used as the center sample point, and the sample is used as the center sample point. The samples are divided into a set constructed with the central sample point as the core.

[0014] In some embodiments, in step S5, if the calculated new total distance is less than the total distance corresponding to the original center point, the new center point is retained; otherwise, other samples are randomly selected from the partition set as center points, and the distance calculation and comparison operations are performed again.

[0015] The present invention also provides a sample screening device based on a generalization optimization algorithm, the device comprising: The data acquisition unit is used to collect the target data to be filtered and to construct the dataset to be filtered. The result generation unit is used to input the dataset to be screened into a pre-trained intelligent recognition model to obtain the sample categories output by the intelligent recognition model and the statistical number of each sample category. The intelligent recognition model is obtained by training a machine learning network using a training dataset. The training dataset is constructed by labeling the selected training data. The training data is obtained by filtering the collected raw data in batches through a high-value sample selection system.

[0016] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method described above.

[0017] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described above.

[0018] The sample screening method and apparatus based on generalization optimization algorithm provided by this invention collects target data to be screened and constructs a dataset to be screened; the dataset to be screened is then input into a pre-trained intelligent recognition model to obtain the sample categories output by the intelligent recognition model and the statistical quantity of each sample category; wherein, the intelligent recognition model is obtained by training a machine learning network using a training dataset, the training dataset is constructed by labeling the screened training data, and the training data is obtained by screening the collected raw data in batches through a high-value sample selection system.

[0019] Thus, this method and apparatus are high-value sample selection methods based on generalization theory, which can achieve the best recognition effect of the model with minimal annotation workload. By scientifically selecting the most "informationally valuable" samples for annotation, redundant samples in the dataset are effectively eliminated, significantly reducing the time required for expert annotation. At the same time, this method also proactively avoids the long-tail effect during the data collection stage, ensuring the rationality of data distribution and guaranteeing the model's recognition performance. Attached Figure Description

[0020] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.

[0021] The structures, proportions, sizes, etc. illustrated in this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed herein, and are not intended to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and objectives that the present invention can produce, should still fall within the scope of the technical content disclosed in the present invention.

[0022] Figure 1 This is one of the flowcharts for the sample screening method based on the generalization optimization algorithm provided by the present invention; Figure 2 The second flowchart illustrates the sample selection method based on the generalization optimization algorithm provided by this invention. Figure 3 The third flowchart of the sample screening method based on generalization optimization algorithm provided by the present invention; Figure 4 A schematic diagram of the support set; Figure 5 This is a structural block diagram of a computer device provided by the present invention. Detailed Implementation

[0023] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] In one specific implementation, please refer to Figure 1 The sample selection method based on generalization optimization algorithm provided by this invention includes the following steps: S110: Collect the target data to be filtered and construct the dataset to be filtered; S120: Input the dataset to be screened into the pre-trained intelligent recognition model to obtain the sample categories output by the intelligent recognition model and the statistical number of each sample category; The intelligent recognition model is obtained by training a machine learning network using a training dataset. The training dataset is constructed by labeling the selected training data. The training data is obtained by filtering the collected raw data in batches through a high-value sample selection system.

[0025] In general, the method provided by this invention includes two aspects: model training and model invocation, such as... Figure 2 As shown on the left, during model training, a large amount of raw data is collected to construct a raw database (or raw dataset). High-value samples are selected from the data in the raw database, and then the selected data is labeled. The filtered and labeled data is then used to construct a training database (or training dataset). The training database is divided into a training set, a validation set, and a test set. The model is trained using the training set, and the resulting intelligent recognition model is packaged. Figure 2 As shown on the right, during the model invocation process, the data to be filtered is collected, the dataset to be filtered is constructed, and the dataset to be filtered is input into the invoked intelligent recognition model to obtain the sample categories and the statistical number of each sample category.

[0026] Specifically, in the sample screening method based on a generalization optimization algorithm provided by this invention, different types of data are collected using different methods during the data acquisition process. For medical data, images can be acquired using electron microscopes, phase-contrast microscopes, and optical microscopes, and data can be collected using a microscope camera. For natural data, data can be collected using ordinary cameras or networks. During the high-value sample selection process, the collected raw data is divided into N batches, and each batch of data is input into the high-value sample selection system to select the most representative and informative samples (i.e., the support set) from each batch. Subsequently, these selected samples are labeled by annotation personnel and included in the training database. During the data annotation process, for medical data, professional doctors can use specific annotation tools to annotate information such as categories; for natural data, experts in related fields or annotation teams can use annotation tools (such as LabelMe) to annotate the data. After the amount of annotation reaches a certain scale, the labeled data is divided into training, validation, and test sets according to a certain ratio to prepare data for model construction.

[0027] In some embodiments, a training dataset is constructed using the collected raw data, specifically including: Collect a large amount of raw data and construct the original dataset; The original dataset is divided into multiple batch combinations; Each batch combination is input into the high-value sample selection system for screening to obtain the output data after screening for each batch combination. Each output data point is labeled by an expert, and the labeled data is incorporated into the dataset to form the training dataset.

[0028] Specifically, when selecting samples based on the high-value sample selection system, the above method is used for sample selection in each batch of data. Finally, the high-value samples from each batch are grouped together and handed over to annotation personnel for labeling. After annotation, a training database is constructed. Following convention, the training database is divided into training, validation, and test sets in a 7:2:1 ratio to facilitate subsequent training of the intelligent recognition model. All data in the database consists of high-information, high-value, and low-redundancy samples, making full use of limited annotation resources and significantly reducing the loss of annotation resources and the resource overhead of model training. This method has excellent practical value.

[0029] In some embodiments, the high-value sample selection system includes a distance calculation module, a sample partitioning module, a centroid optimization module, and an iteration control module; in: The distance calculation module is used to calculate, according to a preset metric method, the distance between each sample in a batch of unlabeled data sets and the distance between each sample and the labeled data set in that batch, which serves as the initial center point. Calculate the distance between each sample in the dataset and output the distance matrix. The sample partitioning module is connected to the distance calculation module and is used to receive the distance matrix, and for each sample in the unlabeled data set, according to the nearest distance principle, partition it into the set represented by the corresponding center point and output the partitioning result. The center point optimization module is connected to the sample partitioning module. It is used to receive the partitioning result, and for each partitioned sample set, it attempts to select a new sample as the center point in the set and calculates the sum of the distances from all samples in the set to the old and new center points. If the sum of the distances corresponding to the new center point is smaller, the center point is updated and the updated center point set is output. The iteration control module is connected to the distance calculation module, the sample partitioning module, and the centroid optimization module, respectively, and is used to control the iterative execution of the entire optimization process: in each iteration, the distance calculation module is triggered to recalculate the distance based on the latest centroid set, and the sample partitioning module and the centroid optimization module are driven to work in sequence; the iteration control module is also used to determine whether the centroid set has stabilized (i.e., the centroid set no longer changes after two consecutive iterations). If it has stabilized, the iteration is terminated, and the final centroid set is output as the support set for this batch; wherein, the optimization objective of the high-value sample selection system is to solve the upper limit of the loss of the support set.

[0030] Specifically, the high-value sample selection system is mainly used to collect and accumulate raw data, build a raw database, and divide the raw database into N batches. The collected data is then screened, and each batch of data is sent to the high-value sample selection system to calculate feature richness, selecting the most valuable batch of samples from each group. The selected labeled samples are collected and handed over to professional labelers for labeling. After labeling, a training database is built, and the database is divided into a training set, a validation set, and a test set in a 7:2:1 ratio.

[0031] Furthermore, this invention constructs a high-value sample selection system based on generalization theory.

[0032] First, data is collected to construct an initial redundant database. Then, data from this database is input into a "high-value sample selection" system in batches to remove redundant samples, retaining only those with substantial information. All selected samples with high information content are then labeled by professional annotators and added to the database to construct a training database. The training database is then divided into training, validation, and test sets. The intelligent recognition model is trained using the training set, the optimal model parameters are selected using the validation set, and the model performance is tested using the test set. Finally, the category of each sample is output, and the number of samples in each category is counted. The final statistical results are then output.

[0033] Specifically, when constructing the original database, the first step is to collect relevant data on a large scale, gathering samples under different conditions to enrich the diversity of the data. During the data collection phase, it is necessary to collect data from all scenarios as much as possible. This not only helps to select samples with the highest information content for different attributes, thus building a diverse training database, but also helps to improve the recognition and generalization abilities of the classification model, giving the model strong practical value.

[0034] In the high-value sample selection system, the active sample selection system is built upon generalization theory. Under generalization theory, a model trained on a batch of good, high-value samples should have the same performance as a model trained using all data, including evaluation metrics such as generalization error and test error. In deep learning, due to the limitations of optimization algorithms, such as stochastic gradient descent, it is impossible to evaluate the value of individual samples during optimization, and the results are not statistically significant. Furthermore, training a model for each individual sample is time-consuming and inefficient. Therefore, a batch selection system selects several high-value samples from each batch. Within the generalization theory framework, if a model is trained on a batch of high-quality, high-value samples, the resulting model should perform identically to a model trained using all data, including evaluation metrics such as generalization error and test error. In deep learning, due to the limitations of current optimization algorithms, such as stochastic gradient descent, it is difficult to evaluate the value of individual samples during optimization, and the results are not statistically complete. Moreover, training a model for each sample individually is time-consuming and extremely inefficient. In this embodiment, samples with high value are selected from each batch to improve the efficiency and performance of model training.

[0035] The optimization goals are as follows:

[0036] in, The selected high-value sample set is defined by x, y, z, A, and b.

[0037] The optimization objective is to optimize based on a given initial set of labeled samples. Finding a sample set This makes the model in and Optimization on the training set constituted by the model yields the performance with the smallest error on unknown data.

[0038] However, the above objective cannot be directly optimized. Based on the generalization error theory, the following formula holds true.

[0039]

[0040]

[0041]

[0042] Where n represents all training data (including unlabeled data), and where, Represents the loss function. This represents the expectation under a certain distribution. Let A represent the joint distribution that x and y follow, where A represents the model, x represents the training data, and y is the class label.

[0043] The upper bound of the optimization objective is composed of the generalization error, training error, and support set error. In practical applications, neural networks often exhibit good generalization ability with relatively small generalization errors. Furthermore, existing research has demonstrated that the generalization error of neural networks is bounded and can be limited by an upper bound; therefore, this patent does not focus on it. Simultaneously, due to the extremely strong data fitting ability of neural networks, theoretically the training error can approach zero infinitely. Therefore, this patent assumes that the training error is zero, and the final error of interest is the support set error. The upper bound of the optimization objective then becomes:

[0044] Where s represents the training set. Now, minimizing the "upper bound" of the optimization objective will minimize the original optimization objective, and the new optimization objective becomes:

[0045] in This indicates that the data has been labeled. This indicates unlabeled data. Due to the presence of unlabeled data, the loss value cannot be directly calculated in the above optimization objective, making it difficult to directly optimize this objective. To achieve effective calculation, we expect the optimization objective and the unlabeled data to be independent of each other. Using the theory of function continuity, and through rigorous derivation, we obtain the upper bound for the direct optimization of this objective. When the activation function is selected as softmax, and the loss function uses mean squared error loss, the loss function L satisfies the Lipschitz condition. Based on the Lipschitz condition, for real numbers p and p0 in the interval [0, 1], and y' belonging to the set {0, 1}, the corresponding inequality holds, as specifically stated below:

[0046] in, p represents the probability that the model is wrong when the predicted probability is p, and p' is similar.

[0047] For the initial optimization objective, the following equation holds:

[0048] Its upper bound is:

[0049] in, Represents the loss function. This represents the expectation under a certain distribution. express The predicted probability of a sample, where C is the total number of categories and k is the kth category.

[0050] After simplification, we get:

[0051] Where δ is the sample The coverage radius, is a hyperparameter, and L is the Lipschitz constant.

[0052] Continuing to use the Lipschitz condition, the first part of the above equation can be written as the following inequality:

[0053] After sorting, it is as follows:

[0054] final:

[0055] in Indicates the specific loss value. Here, u is the preset probability, n is the predicted probability value, and n is the sample size.

[0056] At this point, the incalculable optimization objective is transformed into finding the support set (e.g., Figure 4 (As shown) The problem of the upper bound of the loss is that this upper bound is independent of the data labeling and is only related to the sample coverage radius δ and the total number of samples. Since the total number of samples only determines the decay rate of the upper bound, this embodiment only considers the optimization of δ. At this time, the optimization objective becomes:

[0057] The optimization objective then becomes finding the data set that minimizes the maximum coverage radius δ, based on a given initial labeled set. This set is the support set. Using samples in the support set as the center point with a radius of δ, all samples in the batch can be covered. All samples in the batch can then be represented by the support set within the δ-neighborhood. The support set of this batch is the desired objective.

[0058] However, finding the optimal solution to this problem is NP-hard, with extremely high computational complexity. This patent designs a heuristic greedy algorithm that can obtain a better solution with polynomial complexity.

[0059] In some embodiments, solving for the upper limit of the loss of the support set specifically includes: S1: Using the initially labeled dataset Based on this, all samples are set as center sample points. Unlabeled data are separated from the data in batch s and these unlabeled data are combined into a set. ; S2: Calculate the set according to the predetermined measurement method. Each data point in the data and The distance between each data point in the matrix is ​​used to obtain the metric result matrix; S3: Target For each sample in the dataset, compare it with... Sort the samples by distance: For For a single sample, select the one closest to it. The sample is used as the center sample point, and the sample is used as the center sample point. The samples are divided into sets constructed with this central sample point as the core; S4: For For all sample points, perform step S3 to obtain the partitioned data set, and calculate the value of each partitioned data set. The distances between sample points and their corresponding center points are calculated, and these distances are summed to obtain the total distance for each partition set; S5: Based on the partitioned dataset, for each set with each center point as the core, randomly select one sample as the new center point, calculate the distance between all points in the partitioned set and this new center point, and sum these distances; if the sum of the new distances is less than the sum of the distances corresponding to the original center points, then retain the new center point; otherwise, continue to randomly select other samples in the partitioned set as center points, and re-perform the distance calculation and comparison operations. Repeat steps S2-S5 until all center points no longer change; throughout the iteration process, continuously optimize the selection of center points and the division of the set, and the final set of center points will serve as the support set for this batch.

[0060] Specifically, such as Figure 3 As shown, the steps involved in solving the support set are as follows: 1. Initial sample partitioning; First, using the initially labeled dataset... Based on this, all samples are designated as center sample points. Simultaneously, unlabeled data are separated from batch s of data and grouped into a set. .

[0061] 2. Determination of measurement method: Select a suitable measurement method, including but not limited to KL divergence, cosine distance and Euclidean distance. These measurement methods will be used for subsequent distance calculation and similarity assessment between samples.

[0062] 3. Distance calculation; for sets Each data point and set in For each data point in the dataset, the distance between them is calculated using the selected metric. This calculation method ultimately yields a dataset of size [value missing]. The measurement result matrix, which contains and Distance information between pairs of samples.

[0063] 4. Sample partitioning criteria; based on the measurement results calculated in step 3, for... For each sample in the dataset, compare it with... The samples are sorted by distance. For a single sample, select the one closest to it. The sample is used as the center sample point, and the sample is used as the center sample point. The samples are divided into a set constructed with the central sample point as the core.

[0064] 5. Distance summation operation; for All sample points are partitioned according to the method in step 4 to obtain the partitioned dataset. Then, the values ​​of each partitioned dataset are calculated. The distances between sample points and their corresponding center points are calculated, and these distances are summed to obtain the total distance for each partition set.

[0065] 6. Centroid Optimization: Based on the partitioned dataset, for each set centered on a specific centroid, randomly select one sample as the new centroid. Then, calculate the distances between all points in the partitioned set and this new centroid, and sum these distances. If the sum of the new distances is less than the sum of the distances corresponding to the original centroids, retain the new centroid; otherwise, continue to randomly select other samples in the partitioned set as centroids, and recalculate and compare the distances.

[0066] 7. Iteration process: Repeat steps 3 to 6 until all center points no longer change. Throughout the iteration process, continuously optimize the selection of center points and the division of the set. The final set of center points will serve as the support set for this batch.

[0067] 8. Results Output and Labeling: Output the results of this support set and provide them to experts in relevant fields for data labeling, so as to provide a more valuable data foundation for subsequent data analysis and model training.

[0068] In the above specific embodiments, the sample screening method based on generalization optimization algorithm provided by the present invention collects target data to be screened and constructs a dataset to be screened; the dataset to be screened is input into a pre-trained intelligent recognition model to obtain the sample categories output by the intelligent recognition model and the statistical quantity of each sample category; wherein, the intelligent recognition model is obtained by training a machine learning network using a training dataset, the training dataset is constructed by labeling the screened training data, and the training data is obtained by screening the collected raw data in batches through a high-value sample selection system.

[0069] Thus, this method, based on generalization theory, is a high-value sample selection approach that achieves optimal model recognition with minimal annotation workload. By scientifically selecting the most "informationally valuable" samples for annotation, it effectively eliminates redundant samples in the dataset, significantly reducing the time required for expert annotation. Furthermore, this method proactively avoids the long-tail effect during the data collection phase, ensuring the rationality of data distribution and guaranteeing the model's recognition performance.

[0070] Specifically, the method provided by this invention utilizes generalization theory to filter redundant samples in the original database, significantly reducing the number of samples requiring annotation. This fully utilizes limited annotation resources, improves annotation efficiency, and constructs a diverse and accurate training database. This method can significantly reduce the number of samples in the training database, lower the resource overhead of model training, and shorten the model experiment cycle, enabling rapid model iteration and validation. By using less data to be labeled, this method reduces the possibility of data labeling errors, resulting in smaller labeling errors for all selected samples. Simultaneously, diverse and highly informative samples greatly enhance the model's recognition and generalization abilities, giving the final recognition model high application value.

[0071] In addition to the methods described above, this invention also provides a sample screening device based on a generalization optimization algorithm, the device comprising: The data acquisition unit is used to collect the target data to be filtered and to construct the dataset to be filtered. The result generation unit is used to input the dataset to be screened into a pre-trained intelligent recognition model to obtain the sample categories output by the intelligent recognition model and the statistical number of each sample category. The intelligent recognition model is obtained by training a machine learning network using a training dataset. The training dataset is constructed by labeling the selected training data. The training data is obtained by filtering the collected raw data in batches through a high-value sample selection system.

[0072] In some embodiments, a training dataset is constructed using the collected raw data, specifically including: Collect a large amount of raw data and construct the original dataset; The original dataset is divided into multiple batch combinations; Each batch combination is input into the high-value sample selection system for screening to obtain the output data after screening for each batch combination. Each output data point is labeled by an expert, and the labeled data is incorporated into the dataset to form the training dataset.

[0073] In some embodiments, the high-value sample selection system includes: The module includes a distance calculation module, a sample partitioning module, a center point optimization module, and an iteration control module. The distance calculation module is used to calculate, according to a preset metric method, the distance between each sample in a batch of unlabeled data sets and the distance between each sample and the labeled data set in that batch, which serves as the initial center point. Calculate the distance between each sample in the dataset and output the distance matrix. The sample partitioning module is connected to the distance calculation module and is used to receive the distance matrix, and for each sample in the unlabeled data set, according to the nearest distance principle, partition it into the set represented by the corresponding center point and output the partitioning result. The center point optimization module is connected to the sample partitioning module. It is used to receive the partitioning result, and for each partitioned sample set, it attempts to select a new sample as the center point in the set and calculates the sum of the distances from all samples in the set to the old and new center points. If the sum of the distances corresponding to the new center point is smaller, the center point is updated and the updated center point set is output. The iteration control module is connected to the distance calculation module, the sample partitioning module, and the center point optimization module, respectively, and is used to control the iterative execution of the entire optimization process: in each iteration, the distance calculation module is triggered to recalculate the distance based on the latest center point set, and the sample partitioning module and the center point optimization module are driven to work in sequence; the iteration control module is also used to determine whether the center point set has stabilized (i.e. the center point set no longer changes after two consecutive iterations). If it has stabilized, the iteration is terminated, and the final center point set is output as the support set for this batch.

[0074] In some embodiments, the optimization objective of the high-value sample selection system is to solve for the upper limit of the loss of the support set.

[0075] In some embodiments, solving for the upper limit of the loss of the support set specifically includes: S1: Using the initially labeled dataset Based on this, all samples are set as center sample points. Unlabeled data are separated from the data in batch s and these unlabeled data are combined into a set. ; S2: Calculate the set according to the predetermined measurement method. Each data point in the data and The distance between each data point in the matrix is ​​used to obtain the metric result matrix; S3: Target For each sample in the dataset, compare it with... Sort the samples by distance: S4: For For all sample points, perform step S3 to obtain the partitioned data set, and calculate the value of each partitioned data set. The distances between sample points and their corresponding center points are calculated, and these distances are summed to obtain the total distance for each partition set; S5: Based on the partitioned dataset, for each set with each center point as the core, randomly select one sample as the new center point, calculate the distance between all points in the partitioned set and this new center point, and sum these distances. Repeat steps S2-S5 until all center points no longer change; throughout the iteration process, continuously optimize the selection of center points and the division of the set, and the final set of center points will serve as the support set for this batch. In some embodiments, in step S3, for For a single sample, select the one closest to it. The sample is used as the center sample point, and the sample is used as the center sample point. The samples are divided into a set constructed with the central sample point as the core.

[0076] In some embodiments, in step S5, if the calculated new total distance is less than the total distance corresponding to the original center point, the new center point is retained; otherwise, other samples are randomly selected from the partition set as center points, and the distance calculation and comparison operations are performed again.

[0077] In the above specific embodiments, the sample screening device based on the generalization optimization algorithm provided by the present invention collects target data to be screened and constructs a dataset to be screened; the dataset to be screened is input into a pre-trained intelligent recognition model to obtain the sample categories output by the intelligent recognition model and the statistical quantity of each sample category; wherein, the intelligent recognition model is obtained by training a machine learning network using a training dataset, the training dataset is constructed by labeling the screened training data, and the training data is obtained by screening the collected raw data in batches through a high-value sample selection system.

[0078] Thus, this device employs a high-value sample selection method based on generalization theory, enabling the model to achieve optimal recognition results with minimal annotation workload. By scientifically selecting the most "informationally valuable" samples for annotation, redundant samples in the dataset are effectively eliminated, significantly reducing the time required for expert annotation. Simultaneously, this method proactively avoids the long-tail effect during the data collection phase, ensuring the rationality of data distribution and guaranteeing the model's recognition performance.

[0079] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and model predictions. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The model predictions of the computer device store static and dynamic information data. The network interface of the computer device is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements the steps in the above method embodiments.

[0080] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the computer device to which the present invention is applied. A specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0081] Corresponding to the above embodiments, this invention also provides a computer storage medium containing one or more program instructions. These one or more program instructions are used to execute the method described above.

[0082] The present invention also provides a computer program product, the computer program product including a computer program, the computer program being stored on a non-transitory computer-readable storage medium, and the computer being able to perform the above-described method when the computer program is executed by a processor.

[0083] In this embodiment of the invention, the processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0084] The various methods, steps, and logic diagrams disclosed in the embodiments of this invention can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The processor reads information from the storage medium and, in conjunction with its hardware, completes the steps of the above methods.

[0085] The storage medium can be memory, such as volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.

[0086] Among them, non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory.

[0087] Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (Synchlink DRAM, SLDRAM), and direct memory bus RAM (DRRAM).

[0088] The storage media described in the embodiments of the present invention are intended to include, but are not limited to, these and any other suitable types of memory.

[0089] Those skilled in the art will recognize that, in one or more of the examples above, the functions described in this invention can be implemented using a combination of hardware and software. When applied as software, the corresponding functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transmission of computer programs from one place to another. Storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0090] The above specific embodiments further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of the present invention should be included within the scope of protection of the present invention.

Claims

1. A sample selection method based on a generalization optimization algorithm, characterized in that, The method includes: Collect the target data to be filtered and construct the dataset to be filtered; The dataset to be screened is input into a pre-trained intelligent recognition model to obtain the sample categories output by the intelligent recognition model and the statistical number of each sample category; The intelligent recognition model is obtained by training a machine learning network using a training dataset. The training dataset is constructed by labeling the selected training data. The training data is obtained by filtering the collected raw data in batches through a high-value sample selection system.

2. The sample selection method based on generalization optimization algorithm according to claim 1, characterized in that, The training dataset is constructed using the collected raw data, specifically including: Collect a large amount of raw data and construct the original dataset; The original dataset is divided into multiple batch combinations; Each batch combination is input into the high-value sample selection system for screening to obtain the output data after screening for each batch combination. Each output data point is labeled by an expert, and the labeled data is incorporated into the dataset to form the training dataset.

3. The sample selection method based on generalization optimization algorithm according to claim 2, characterized in that, The high-value sample selection system includes a distance calculation module, a sample partitioning module, a centroid optimization module, and an iteration control module; Wherein: The distance calculation module is used to calculate, according to a preset metric method, the distance between each sample in a batch of unlabeled data set and the labeled data set in that batch that serves as the initial center point. Calculate the distance between each sample in the dataset and output the distance matrix. The sample partitioning module is connected to the distance calculation module and is used to receive the distance matrix, and for each sample in the unlabeled data set, according to the nearest distance principle, partition it into the set represented by the corresponding center point and output the partitioning result. The center point optimization module is connected to the sample partitioning module. It is used to receive the partitioning result, and for each partitioned sample set, it attempts to select a new sample as the center point in the set and calculates the sum of the distances from all samples in the set to the old and new center points. If the sum of the distances corresponding to the new center point is smaller, the center point is updated and the updated center point set is output. The iteration control module is connected to the distance calculation module, the sample partitioning module, and the center point optimization module, respectively, and is used to control the iterative execution of the entire optimization process: in each iteration, the distance calculation module is triggered to recalculate the distance based on the latest center point set, and the sample partitioning module and the center point optimization module are driven to work in sequence; the iteration control module is also used to determine whether the center point set has stabilized. If it has stabilized, the iteration is terminated, and the final center point set is output as the support set for this batch.

4. The sample selection method based on generalization optimization algorithm according to claim 3, characterized in that, The optimization objective of the high-value sample selection system is to solve for the upper limit of the loss of the support set.

5. The sample selection method based on generalization optimization algorithm according to claim 4, characterized in that, Solving for the upper bound of the loss of the support set specifically includes: S1: Using the initially labeled dataset Based on this, all samples are set as center sample points. Unlabeled data are separated from the data in batch s and these unlabeled data are combined into a set. ; S2: Calculate the set according to the predetermined measurement method. Each data point in the data and The distance between each data point in the matrix is ​​used to obtain the metric result matrix; S3: Target For each sample in the dataset, compare it with... Sort the samples by distance: S4: For For all sample points, perform step S3 to obtain the partitioned data set, and calculate the value of each partitioned data set. The distances between sample points and their corresponding center points are calculated, and these distances are summed to obtain the total distance for each partition set; S5: Based on the partitioned dataset, for each set with each center point as the core, randomly select one sample as the new center point, calculate the distance between all points in the partitioned set and this new center point, and sum these distances. Repeat steps S2-S5 until all center points no longer change; throughout the iteration process, continuously optimize the selection of center points and the division of the set, and the final set of center points will serve as the support set for this batch.

6. The sample selection method based on generalization optimization algorithm according to claim 5, characterized in that, In step S3, for For a single sample, select the one closest to it. The sample is used as the center sample point, and the sample is used as the center sample point. The samples are divided into a set constructed with the central sample point as the core.

7. The sample selection method based on generalization optimization algorithm according to claim 6, characterized in that, In step S5, if the calculated new total distance is less than the total distance corresponding to the original center point, the new center point is retained; otherwise, other samples are randomly selected from the partition set as center points, and the distance calculation and comparison operations are repeated.

8. A sample screening device based on a generalization optimization algorithm, characterized in that, The device includes: The data acquisition unit is used to collect the target data to be filtered and to construct the dataset to be filtered. The result generation unit is used to input the dataset to be screened into a pre-trained intelligent recognition model to obtain the sample categories output by the intelligent recognition model and the statistical number of each sample category. The intelligent recognition model is obtained by training a machine learning network using a training dataset. The training dataset is constructed by labeling the selected training data. The training data is obtained by filtering the collected raw data in batches through a high-value sample selection system.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method as described in any one of claims 1-7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1-7.