Sample data processing method and device, electronic equipment and computer readable medium
Through active learning and clustering technology, efficient screening and labeling of sample data is solved, and the problem of high and low efficiency of sample data labeling in deep supervised learning is achieved, and the effect of reducing labeling costs and improving efficiency is achieved.
Patent Information
- Application Number
- CN202411331540.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-01-07
AI Technical Summary
In the prior art, sample data marking is costly and inefficient, especially in the field of deep supervision and learning. The marking task of massive data consumes a lot of manpower, material resources and financial resources, and the marking efficiency is low.
By initializing active learning to extract data, obtain unlabeled sample data, perform clustering to obtain cluster clusters, determine the information entropy in the cluster cluster, determine the sample data to be marked based on the information entropy and the active learning cycle, and mark it. Update the tagged dataset to train the target model.
The cost of sample data labeling is reduced, the efficiency of sample data labeling is improved, and the potential effective labels are efficiently obtained through clustering and information entropy screening, reducing the burden of manual labeling.
Smart Images

Figure CN119272048A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a sample data processing method, device, electronic device and computer-readable medium. Background Art
[0002] At present, the rise of Internet e-commerce applications has greatly changed the traditional retail landscape. In recent years, e-commerce companies are still seeking new technical means to help e-commerce platforms better understand and meet consumer needs. As a cutting-edge technology, artificial intelligence is playing an increasingly important role in the e-commerce field. Artificial intelligence has become a core element to promote innovation and growth in the e-commerce industry. In particular, deep learning absorbs the working mechanism of biological nerves, allowing machines to imitate human activities such as audio-visual and thinking, solving many traditional machine learning problems, and making great progress in the field of e-commerce. Artificial intelligence has achieved some significant results in many e-commerce scenarios, such as computer vision CV product image review, search technology SR product word relevance matching, user interest data mining DT, intelligent customer service (natural language processing MLP, voice), product recommendation and personalized technical services. The field of deep supervised learning is a very important branch of machine learning. Almost all deep supervised learning schemes must label these massive data with relevant learning labels before applying these data. To complete the labeling task of these data, it is very costly (manpower, material resources, and financial resources), and the labeling efficiency is low. Summary of the invention
[0003] In view of this, the embodiments of the present application provide a sample data processing method, device, electronic device and computer-readable medium, which can solve the problems of high cost and low efficiency of existing sample data labeling.
[0004] To achieve the above objective, according to one aspect of an embodiment of the present application, a sample data processing method is provided, including:
[0005] Initialize the extracted data for active learning and obtain unlabeled sample data from the extracted data;
[0006] Cluster the unlabeled sample data to obtain clusters;
[0007] Determine the information entropy of the unlabeled sample data in each cluster, and determine the sample data to be labeled based on the information entropy and the active learning cycle;
[0008] Labeling the sample data to be labeled to obtain labeled sample data;
[0009] The labeled dataset is updated based on the labeled sample data, and the target model is trained using the updated labeled dataset.
[0010] Optionally, the unlabeled sample data is clustered to obtain various clusters, including:
[0011] The unlabeled sample data is clustered based on the preset attribute categories to obtain clusters corresponding to the preset attribute types.
[0012] Optionally, based on information entropy and active learning cycle, determining sample data to be labeled includes:
[0013] In each active learning cycle, a preset number of unlabeled sample data with the lowest information entropy is screened from each cluster to serve as sample data to be labeled.
[0014] Optionally, the preset number is determined based on a marking budget for each active learning cycle.
[0015] Optionally, labeling the sample data to be labeled to obtain labeled sample data includes:
[0016] The sample data to be marked is sent to the offline marking node, and the marking pending prompt information is pushed to the offline marking node, so that the offline marking node marks the data to be marked to obtain the marked sample data.
[0017] Optionally, labeling the sample data to be labeled to obtain labeled sample data includes:
[0018] Perform similarity matching between the sample data to be labeled and the labeled sample data in the labeled data set, and determine the label of the sample data to be labeled based on the matching result data;
[0019] The corresponding sample data to be labeled is labeled based on the label to obtain labeled sample data.
[0020] Optionally, updating the labeled dataset based on the labeled sample data includes:
[0021] The labeled sample data is added to the labeled dataset to obtain an updated labeled dataset.
[0022] In addition, the present application also provides a sample data processing device, including:
[0023] An acquisition unit is configured to initialize the extracted data for active learning and acquire unlabeled sample data from the extracted data;
[0024] A clustering unit is configured to cluster the unlabeled sample data to obtain clusters;
[0025] The sample data to be labeled determining unit is configured to determine the information entropy of the unlabeled sample data in each cluster, and determine the sample data to be labeled based on the information entropy and the active learning cycle;
[0026] a marking unit, configured to mark the sample data to be marked to obtain marked sample data;
[0027] The updating unit is configured to update the labeled data set based on the labeled sample data, and use the updated labeled data set to train the target model.
[0028] Optionally, the clustering unit is further configured to:
[0029] The unlabeled sample data is clustered based on the preset attribute categories to obtain clusters corresponding to the preset attribute types.
[0030] Optionally, the to-be-marked sample data determining unit is further configured to:
[0031] In each active learning cycle, a preset number of unlabeled sample data with the lowest information entropy is screened from each cluster to serve as sample data to be labeled.
[0032] Optionally, the preset number is determined based on a marking budget for each active learning cycle.
[0033] Optionally, the marking unit is further configured to:
[0034] The sample data to be marked is sent to the offline marking node, and the marking pending prompt information is pushed to the offline marking node, so that the offline marking node marks the data to be marked to obtain the marked sample data.
[0035] Optionally, the marking unit is further configured to:
[0036] Perform similarity matching between the sample data to be labeled and the labeled sample data in the labeled data set, and determine the label of the sample data to be labeled based on the matching result data;
[0037] The corresponding sample data to be labeled is labeled based on the label to obtain labeled sample data.
[0038] Optionally, the updating unit is further configured to:
[0039] The labeled sample data is added to the labeled dataset to obtain an updated labeled dataset.
[0040] In addition, the present application also provides a sample data processing electronic device, including: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by one or more processors, the one or more processors implement the sample data processing method as described above.
[0041] In addition, the present application also provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, the sample data processing method as described above is implemented.
[0042] To achieve the above objective, according to another aspect of the embodiments of the present application, a computer program product is provided.
[0043] A computer program product according to an embodiment of the present application includes a computer program, and when the program is executed by a processor, the sample data processing method provided by the embodiment of the present application is implemented.
[0044] An embodiment of the above invention has the following advantages or beneficial effects: the present application obtains unlabeled sample data in the extracted data by initializing the extracted data for active learning; clusters the unlabeled sample data to obtain various clusters; determines the information entropy of the unlabeled sample data in various clusters, and determines the sample data to be labeled based on the information entropy and the active learning cycle; labels the sample data to be labeled to obtain labeled sample data; updates the labeled data set based on the labeled sample data, and uses the updated labeled data set to train the target model. The sample data labeling processing cost is reduced and the sample data labeling processing efficiency is improved.
[0045] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with specific implementation examples. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The accompanying drawings are used to better understand the present application and do not constitute an improper limitation on the present application.
[0047] Figure 1 is a schematic diagram of the main flow of a sample data processing method according to an embodiment of the present application;
[0048] Figure 2 is a schematic diagram of the main flow of a sample data processing method according to an embodiment of the present application;
[0049] Figure 3 is a schematic diagram of the main flow of a sample data processing method according to an embodiment of the present application;
[0050] Figure 4 is a schematic diagram of main units of a sample data processing device according to an embodiment of the present application;
[0051] Figure 5is an exemplary system architecture diagram to which the embodiments of the present application can be applied;
[0052] Figure 6 It is a structural diagram of a computer system of a terminal device or server suitable for implementing an embodiment of the present application. DETAILED DESCRIPTION
[0053] The following is an explanation of the exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of known functions and structures is omitted in the following description. It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of the present application are in compliance with the relevant provisions of national laws and regulations. It should be noted that in the embodiments of the present application, certain software, components, models, and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or must have used the solution. In the technical solution of the present application, the collection, collection, update, analysis, processing, use, transmission, storage, etc. of the user personal information involved are in compliance with the provisions of relevant laws and regulations, are used for legal and reasonable purposes, and do not violate public order and good customs, are not shared, leaked or sold outside these legal uses, and are subject to supervision and management by regulatory authorities. Take necessary measures to prevent illegal access to such user personal information data, maintain the security of user personal information, network security and national security, ensure that persons who have access to personal information data comply with relevant laws and regulations, and ensure the security of user personal information. Once such user personal information data is no longer needed, the risk should be minimized by limiting or even prohibiting data collection and / or deleting data.
[0054] When used, including in certain related applications, user privacy is protected by de-identifying data, such as by removing specific identifiers when used, controlling the amount or specificity of data stored, controlling how data is stored, and / or other methods of de-identification.
[0055] Figure 1 is a schematic diagram of the main flow of a sample data processing method according to an embodiment of the present application. Figure 1 As shown, the sample data processing method mainly includes the following steps S101 to S105.
[0056] Step S101, initializing the extracted data for active learning, and obtaining unlabeled sample data in the extracted data.
[0057] In the embodiment of the present application, FINCH: is an unsupervised data clustering algorithm, which stands for "First Neighbor Clustering Hierarchy" and aims to provide a fast clustering method that does not require pre-specified number of clusters.
[0058] Binary Cross-Entropy Loss: Binary Cross-Entropy Loss, sometimes also called log loss, is a loss function commonly used in binary classification problems. This loss function measures the "distance" between the probability distribution predicted by the model and the probability distribution of the true label.
[0059] Artificial Intelligence: Artificial Intelligence (AI) is a branch of computer science that focuses on creating systems or machines that can perform tasks that usually require human intelligence. These tasks include language understanding, visual recognition, decision making, translation, speech recognition, etc.
[0060] Data labeling: Data labeling is the process of preparing data for training machine learning models. In this process, human labelers or automated systems add labels or annotations to raw data (such as images, text, videos, etc.) to indicate specific features, objects, or categories in the data. The purpose of data labeling is to provide clear guidance to help machine learning models understand how the data should be interpreted. These labels or annotations serve as supervisory signals to guide the model to learn how to recognize or classify new, unlabeled data during the training process. High-quality data labeling is critical to training accurate machine learning models, especially in supervised learning scenarios, where model performance depends largely on the quality and quantity of labeled data.
[0061] Product Identical: This concept in retail and e-commerce usually refers to identical or very similar products. This term may not be standard industry terminology, but in this context, it may refer to a few things:
[0062] Different listings for the same product: On e-commerce platforms, the same product may be sold by different sellers at different prices, in different package quantities, or under different selling conditions. Although they are the same product, they may appear in search results as separate listings.
[0063] Comparison of similar products: When purchasing products, customers may look for products with similar functions, brands or prices for comparison and selection. These products may be the same or similar in core functions, but may differ in brand, appearance or other attributes.
[0064] Substitutes or competing products: In market analysis, similar products can also refer to goods that can replace each other. For example, within a certain range, mobile phone chargers from different brands may be considered similar products because they provide the same basic functions.
[0065] In this embodiment, the execution subject of the sample data processing method (for example, a server) can initialize the acquired extracted data for active learning training through a wired connection or a wireless connection.
[0066] The extracted data may include a small amount of valid label data and a large amount of unlabeled sample data. The execution subject may obtain a large amount of unlabeled sample data in the extracted data to extract data with potential valid labels therefrom.
[0067] Step S102: clustering the unlabeled sample data to obtain clusters.
[0068] Specifically, clustering the unlabeled sample data to obtain various clusters includes: clustering the unlabeled sample data based on preset attribute categories to obtain various clusters corresponding to preset attribute types.
[0069] For example, the preset attribute category may be color, weight, etc., and the embodiments of the present application do not specifically limit the preset attribute category.
[0070] In some embodiments, the execution subject may also input the unlabeled sample data into the clustering model, so as to cluster the unlabeled sample data through the decision tree in the clustering model to obtain various clusters, thereby improving the accuracy of clustering.
[0071] Step S103, determining the information entropy of the unlabeled sample data in each cluster, and determining the sample data to be labeled based on the information entropy and the active learning cycle.
[0072] Information entropy is used to measure the data's classification value from valid labels and invalid labels. Low information entropy means that the sample has a large amount of information and is more likely to be a sample of unknown category, from which it is easy to extract data with potential valid labels.
[0073] In each active learning training cycle, the information entropy of the unlabeled sample data in each cluster is sorted in ascending order, and the unlabeled sample data corresponding to the first ranked information entropy is determined as the sample data to be labeled, so as to accurately obtain the sample data to be labeled.
[0074] Step S104: label the sample data to be labeled to obtain labeled sample data.
[0075] Specifically, marking the sample data to be marked to obtain the marked sample data includes: sending the sample data to be marked to an offline marking node, and pushing marking pending prompt information to the offline marking node, so that the offline marking node marks the data to be marked to obtain the marked sample data.
[0076] The offline marking node may be a marking expert or a terminal corresponding to the marking expert. The embodiment of the present application does not specifically limit the offline marking node.
[0077] After determining the offline marking node, the execution entity can generate marking to-do prompt information based on the sample data to be marked and the preset marking time, so that the offline marking node can complete the marking of the data to be marked within the preset marking time according to the marking to-do prompt information, and obtain the marked sample data in a timely and accurate manner.
[0078] Step S105: update the labeled data set based on the labeled sample data, and use the updated labeled data set to train the target model.
[0079] The labeled sample data is added to the labeled data set by overwriting or replacing to obtain an updated labeled data set, so that a target model, such as a business model, can be trained based on the updated labeled data set.
[0080] This embodiment obtains unlabeled sample data in the extracted data by initializing the active learning; clusters the unlabeled sample data to obtain various clusters; determines the information entropy of the unlabeled sample data in each cluster, and determines the sample data to be labeled based on the information entropy and the active learning cycle; labels the sample data to be labeled to obtain labeled sample data; updates the labeled data set based on the labeled sample data, and uses the updated labeled data set to train the target model. The sample data labeling processing cost is reduced and the sample data labeling processing efficiency is improved.
[0081] Figure 2 is a schematic diagram of the main flow of a sample data processing method according to an embodiment of the present application. Figure 2 As shown, the sample data processing method mainly includes the following steps S201 to S205.
[0082] Step S201, initializing the extracted data for active learning, and obtaining unlabeled sample data in the extracted data.
[0083] Initialize the extracted data for active learning , the data has been manually labeled and contains valid labeled data D l +D u . D l Contains K labels, D uContains unknown number of labels, K and U have no intersection. Get unlabeled sample data from the extracted data.
[0084] Step S202: clustering the unlabeled sample data to obtain clusters.
[0085] The execution subject can cluster the unlabeled sample data through the classifier to obtain various clusters.
[0086] Step S203, determining the information entropy of the unlabeled sample data in each cluster, and in each active learning cycle, selecting a preset number of unlabeled sample data with the lowest information entropy from each cluster as sample data to be labeled.
[0087] Specifically, the preset number is determined based on a labeling budget for each active learning cycle.
[0088] For example, the labeling budget of the active learning cycle is b, which means: b is the labeling budget of D in each iteration. u The amount of data to be queried, the unlabeled samples are clustered into K clusters. According to the labeling budget b of each cycle, K categories of b sample data with the lowest information entropy S value are selected from these clusters as the sample data to be labeled. A low information entropy S value means that the sample has a large amount of information and is more likely to be a sample of unknown category, and it is easier to extract data with potential valid labels from it.
[0089] Step S204: label the sample data to be labeled to obtain labeled sample data.
[0090] Specifically, labeling the sample data to be labeled to obtain labeled sample data includes: performing similarity matching between the sample data to be labeled and labeled sample data in the labeled data set, and determining the label of the sample data to be labeled according to the matching result data; and labeling the corresponding sample data to be labeled based on the label to obtain labeled sample data.
[0091] If there is data in the labeled data set that matches the sample data to be labeled (here it means that the similarity is greater than a preset threshold), the label corresponding to the matching data is determined as the label of the corresponding sample data to be labeled, and the corresponding sample data to be labeled is labeled according to the label to obtain labeled sample data, thereby improving the efficiency and accuracy of sample labeling.
[0092] Step S205: update the labeled data set based on the labeled sample data, and use the updated labeled data set to train the target model.
[0093] Specifically, updating the labeled data set based on the labeled sample data includes: adding the labeled sample data to the labeled data set to obtain an updated labeled data set.
[0094] This facilitates accurate training of the target model based on the updated labeled dataset.
[0095] Figure 3 FIG. 1 is a schematic diagram of the main flow of a sample data processing method according to an embodiment of the present application. Figure 3 As shown, the AL model is an active learning query model. A method for active learning to handle high noise is designed. Each active iteration active learning (AL) cycle of the method includes the following steps:
[0096] 0. Pre-training AL model, active learning model training: First, set a valid label K and use a small amount of known valid product data D l , and also mark a small amount of invalid labeled data D au , the data label set K and the invalid data label set U have no intersection. This data user is used to iteratively train the feature extractor F and the classifier M K+1 and K generators {M 1~K} (i from 1 to K) (generator such as Figure 3 M1 and M2 in );
[0097] 1. Calculate the valid S1 label index and the invalid label S2 index, and calculate two data indexes: use information entropy to measure the data from the valid label classification release and invalid label partition value. S1 has a small information entropy on the valid label data and a large information entropy on the invalid label. On the contrary, S2 has a large information entropy on the valid label data and a small information entropy on the invalid label.
[0098] 3. Query samples, mix valid labels and invalid labels, mix valid labels and a small amount of invalid labels, perform sample clustering and selection: Then, cluster the unlabeled data, that is, the unlabeled samples into K clusters, and select K class b samples with the lowest information entropy S value from these clusters according to the labeling budget b of each cycle for labeling. A low information entropy S value indicates that the sample has a large amount of information and is more likely to be a sample of an unknown category;
[0099] 4. Dataset update: Based on the labeled samples, update the labeled dataset and active unknown dataset, that is, update the valid target labels and invalid labels based on the labeled data;
[0100] 5. Update the model and train the target model: Use the updated labeled dataset to train the target model, which is the business model.
[0101] The embodiment of the present application combines two data information entropy indicators to identify samples that are most informative to the model, which may belong to known categories or unknown categories. By clustering and selecting samples with the lowest S value, this method aims to effectively utilize the limited effective labeling budget in each AL cycle to enhance the model's ability to recognize valid categories. This strategy helps to improve the generalization ability of the model, especially when facing unknown invalid categories.
[0102] For example, the working process is as follows:
[0103] Set the input parameters:
[0104] D l : A small amount of valid label data, D u A large amount of unlabeled data, R is the number of active learning iterations, K has effectively labeled categories, and b is the number of active learning iterations from D u The amount of data to be queried. F query data feature extraction model, C unknown label clustering model, T business model (same product data model), K classification recognition models {G i}.
[0105] Operation process:
[0106] 1. Initialize active learning to extract data , the data has been manually labeled and contains valid labeled data D l +D u . D l Contains K labels, D u Contains unknown number of labels, K and U have no intersection;
[0107] 2. D au Train model F, C, and use D l Training i} K i =1 Use the following formula to calculate their L total Minimum objective function. l ) minimizes the binary cross entropy loss (L bce ), in the extraction (D au ) minimizes L em and L t Loss, in D l ∪D au Minimize the cross entropy loss (L ce ). It should be noted that before the first active learning cycle, L in the overall goal is not considered. em and L t loss, because at this time D au is an empty set. At the beginning of training, since no active learning iteration has been performed, Dau is empty. Therefore, L is not set before the first active learning cycle. em and L t The loss is included in the overall objective function. As the active learning cycle progresses, samples are selected from the unlabeled data and labeled and added to the training set. au is no longer empty, and the corresponding loss function will be incorporated into the overall goal. The loss function here includes: L bce (Binary Cross-Entropy Loss): This is a loss function commonly used in binary classification problems to measure the gap between the probability distribution predicted by the model and the actual label. ce Quantify the loss of data on labeled data. L em Quantify the loss on labeled invalid labels.
[0108]
[0109] Loop through the active learning rounds from .
[0110] If D u Not empty, use FINCH algorithm D u Calculate the cluster center C i , use the following equation to calculate all samples X to C i Specific S d Equation, S d The user calculates the information entropy value of the sample to the unknown class as follows:
[0111]
[0112]
[0113] F(x) is the feature extraction function. To characterize sample X to class C i The probability when T is a hyperparameter, which is the temperature coefficient set.
[0114] Take all samples X (same product), calculate the index S c (x), the information entropy value of the user's effective label. Extract D u Clustered to C i..K {C1, C2, …, C k}, calculate the sample X to the known G i Uncertainty information entropy of K for classification.
[0115]
[0116]
[0117] Among them, H i (x) represents a given G i The entropy value of G i The model that has been classified by i determines whether X belongs to this category.
[0118] Traverse each marked G i According to the formula below, Calculate each sample to G i The minimum information entropy value, the samples X in advance b / K in each K class ui .
[0119] Take the union of all samples, and all the extracted samples are equal to Push to the marking expert for marking.
[0120] Read X according to the marking expert k Effectively labeled data X u Invalid labeled data (noise data), update dataset D L ←D L ∪X k , D au ← D au ∪ X u , D u ←D u / X active .
[0121] Labeled data D L Update model T and calculate cross-entropy loss D L Determine whether to continue to the next iteration.
[0122] The embodiment of the present application provides an active learning framework, which uses valid data and unknown distributed data to select samples with valid information entropy values in the active learning rounds. In the process of data extraction, the extracted data is as much as possible data with potential valid labels. Two entropy scores (Sc(x), Sd(x)) are proposed, which are known and unknown samples for accurate active learning sampling, and the feature scheme of commodity attributes and the unsupervised method of combining FINCH are used to replace the method of obtaining the class center of unknown labels.
[0123] The embodiment of the present application can effectively utilize labeled data and unlabeled data through a novel active learning framework. The unlabeled data is a mixture of required data (such as color classification red, yellow, and blue) and unnecessary data (other types of data, color data, or blank data). Effectively improve the distinction between known and unknown samples. Two indicators are used to measure entropy information data. The first entropy information indicator is calculated using the output of a known classifier. This indicator quantifies the uncertainty of the distribution of sampled goods relative to known categories (red, yellow, and blue); the second entropy information indicator is used to simulate unknown distributions from unknown samples obtained from active learning rounds. These two indicators quantify the uncertainty of the sample relative to the distribution of unknown category data. Finally, active sampling is performed using the comprehensive entropy score of all unlabeled samples. In addition, in order to ensure diversity, each cluster is adaptively clustered and sampled according to the active learning budget.
[0124] Figure 4 is a schematic diagram of the main units of the sample data processing device according to an embodiment of the present application. Figure 4 As shown, the sample data processing device 400 includes an acquiring unit 401 , a clustering unit 402 , a to-be-labeled sample data determining unit 403 , a labeling unit 404 and an updating unit 405 .
[0125] The acquisition unit 401 is configured to initialize the extracted data for active learning and acquire unlabeled sample data from the extracted data.
[0126] The clustering unit 402 is configured to cluster the unlabeled sample data to obtain clusters.
[0127] The sample data to be labeled determining unit 403 is configured to determine the information entropy of the unlabeled sample data in each cluster, and determine the sample data to be labeled based on the information entropy and the active learning cycle.
[0128] The marking unit 404 is configured to mark the sample data to be marked to obtain marked sample data.
[0129] The updating unit 405 is configured to update the labeled data set based on the labeled sample data, and use the updated labeled data set to train the target model.
[0130] In some embodiments, the clustering unit 402 is further configured to: cluster the unlabeled sample data based on preset attribute categories to obtain clusters corresponding to preset attribute types.
[0131] In some embodiments, the sample data to be labeled determining unit 403 is further configured to: in each active learning cycle, screen out a preset number of unlabeled sample data with the lowest information entropy from each cluster as the sample data to be labeled.
[0132] In some embodiments, the preset number is determined based on a labeling budget for each active learning cycle.
[0133] In some embodiments, the marking unit 404 is further configured to: send the sample data to be marked to the offline marking node, and push marking pending prompt information to the offline marking node, so that the offline marking node marks the data to be marked to obtain marked sample data.
[0134] In some embodiments, the labeling unit 404 is further configured to: perform similarity matching between the sample data to be labeled and the labeled sample data in the labeled data set, and determine the label of the sample data to be labeled based on the matching result data; and label the corresponding sample data to be labeled based on the label to obtain labeled sample data.
[0135] In some embodiments, the updating unit 405 is further configured to: add the labeled sample data to the labeled data set to obtain an updated labeled data set.
[0136] It should be noted that the sample data processing method and the sample data processing device of the present application have corresponding relationships in terms of specific implementation contents, so the repeated contents will not be described again.
[0137] Figure 5 An exemplary system architecture 500 is shown to which the sample data processing method or sample data processing apparatus according to the embodiment of the present application can be applied.
[0138] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, 503, a network 504 and a server 505. Network 504 is used to provide a medium for communication links between terminal devices 501, 502, 503 and server 505. Network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0139] Users can use terminal devices 501, 502, 503 to interact with server 505 through network 504 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 501, 502, 503, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).
[0140] The terminal devices 501 , 502 , and 503 may be various electronic devices having a sample data processing screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0141] Server 505 may be a server that provides various services, such as a background management server (only as an example) that supports the extracted data of active learning obtained by users using terminal devices 501, 502, and 503. The background management server may initialize the extracted data of active learning, obtain unlabeled sample data in the extracted data; cluster the unlabeled sample data to obtain each clustering cluster; determine the information entropy of the unlabeled sample data in each clustering cluster, and determine the sample data to be labeled based on the information entropy and the active learning cycle; label the sample data to be labeled to obtain labeled sample data; update the labeled data set based on the labeled sample data, and use the updated labeled data set to train the target model. Reduce the sample data labeling processing cost and improve the sample data labeling processing efficiency.
[0142] It should be noted that the sample data processing method provided in the embodiment of the present application is generally executed by the server 505 , and accordingly, the sample data processing device is generally disposed in the server 505 .
[0143] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0144] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 of a terminal device suitable for implementing an embodiment of the present application. Figure 6 The terminal device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0145] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the computer system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0146] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.
[0147] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present application are executed.
[0148] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. Computer-readable storage media may include, for example, but are not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0149] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0150] The units involved in the embodiments described in the present application may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes an acquisition unit, a clustering unit, a sample data determination unit to be marked, a marking unit, and an update unit. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0151] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device initializes the extracted data for active learning, obtains unlabeled sample data in the extracted data; clusters the unlabeled sample data to obtain each clustering cluster; determines the information entropy of the unlabeled sample data in each clustering cluster, and determines the sample data to be labeled based on the information entropy and the active learning cycle; labels the sample data to be labeled to obtain labeled sample data; updates the labeled data set based on the labeled sample data, and uses the updated labeled data set to train the target model.
[0152] The computer program product of the present application includes a computer program, and when the computer program is executed by a processor, the sample data processing method in the embodiment of the present application is implemented.
[0153] According to the technical solution of the embodiment of the present application, the sample data labeling processing cost can be reduced and the sample data labeling processing efficiency can be improved.
[0154] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A sample data processing method, characterized in that: include: Initialize the extracted data for active learning, and obtain unlabeled sample data from the extracted data; Clustering the unlabeled sample data to obtain clusters; Determine the information entropy of the unlabeled sample data in each of the clusters, and determine the sample data to be labeled based on the information entropy and the active learning cycle; Marking the sample data to be marked to obtain marked sample data; The labeled data set is updated based on the labeled sample data, and the target model is trained using the updated labeled data set.
2. The method according to claim 1, characterized in that: The step of clustering the unlabeled sample data to obtain clusters includes: The unlabeled sample data is clustered based on preset attribute categories to obtain clusters corresponding to the preset attribute types.
3. The method according to claim 1, characterized in that The determining of the sample data to be labeled based on the information entropy and the active learning cycle includes: In each active learning cycle, a preset number of unlabeled sample data with the lowest information entropy is screened from each cluster to be used as sample data to be labeled.
4. The method according to claim 3, characterized in that: The preset number is determined based on a marking budget of each active learning cycle.
5. The method according to claim 1, characterized in that The step of marking the sample data to be marked to obtain marked sample data includes: The sample data to be marked is sent to an offline marking node, and marking pending prompt information is pushed to the offline marking node, so that the offline marking node marks the data to be marked to obtain marked sample data.
6. The method according to claim 1, characterized in that The step of marking the sample data to be marked to obtain marked sample data includes: Performing similarity matching between the sample data to be labeled and the labeled sample data in the labeled data set, and determining the label of the sample data to be labeled according to the matching result data; The corresponding sample data to be labeled is labeled based on the label to obtain labeled sample data.
7. The method according to claim 1, characterized in that The updating of the labeled data set based on the labeled sample data comprises: The labeled sample data is added to the labeled data set to obtain an updated labeled data set.
8. A sample data processing device, characterized in that: include: An acquisition unit is configured to initialize the extracted data for active learning and acquire unlabeled sample data from the extracted data; A clustering unit, configured to cluster the unlabeled sample data to obtain clusters; A sample data to be labeled determining unit is configured to determine the information entropy of the unlabeled sample data in each cluster, and determine the sample data to be labeled based on the information entropy and the active learning cycle; a marking unit, configured to mark the sample data to be marked to obtain marked sample data; An updating unit is configured to update the labeled data set based on the labeled sample data, and use the updated labeled data set to train the target model.
9. A sample data processing electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.