Model building method, device, storage medium and equipment
Through crowdsourcing annotation and quality assessment of online data, machine learning models and parameters are automatically selected, which solves the problems of cumbersome modeling and difficulty in construction by non-professionals in the existing technology, and improves the convenience and efficiency of model construction.
Patent Information
- Application Number
- CN201910904555.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-24
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2039-09-24
AI Technical Summary
The modeling process of existing visual modeling tools is cumbersome and requires manual operations by professionals. It is difficult for non-professionals to construct and optimize models, and the lack of understanding of model feature selection and parameter settings hinders modeling.
Through crowdsourcing annotation of online data, the annotation quality of the annotation results is obtained, and the machine learning model and training parameters are selected according to the task type and annotation quality to realize automatic configuration and training of the model and lower the modeling threshold for non-professionals.
It improves the convenience and efficiency of model construction, reduces the time cost of modelers, realizes automated configuration, simplifies the modeling process, and enables non-professionals to build models.
Smart Images

Figure CN112632179B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and more specifically, to a model building method, device, storage medium and equipment. Background Art
[0002] Visual modeling is a way of thinking about problems by organizing models around realistic ideas. It provides a mechanism to observe the developed system from different perspectives.
[0003] The current market has hatched a lot of visual modeling tools, but the current modeling tools are more demo-level, and usually the main modeling work needs to be handed over to modelers to perform modeling manually. The modeling process is very cumbersome and inconvenient; after the model is put into use, if the online data changes, the modeler needs to retrain the model or optimize the model to adapt to the changed online data; when the modeler is not particularly professional, he may not understand the model-related items such as feature selection and parameter setting, which will also bring many obstacles and inconveniences to the modeling work.
[0004] Therefore, there is an urgent need for a practical and effective model building solution to improve the convenience of model building. Summary of the invention
[0005] In view of the above problems, the present invention is proposed to provide a model building method, device, storage medium and processor that overcome the above problems or at least partially solve the above problems.
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] A model building method, comprising:
[0008] Get online data;
[0009] Perform crowdsourcing labeling on the online data to obtain labeling results; the labeling results include: labeled training data and labeling situation information;
[0010] Obtaining the annotation quality of the annotation result;
[0011] Select a corresponding machine learning model and corresponding model training parameters according to the current task type and the annotation quality of the annotation result;
[0012] The labeled training data is used to train the corresponding machine learning model according to the corresponding model training parameters to obtain a trained prediction model.
[0013] Preferably, obtaining the annotation quality of the annotation result includes:
[0014] According to the labeling results, the personal labeling accuracy of each labeler and the overall labeling accuracy of all labelers are obtained;
[0015] When the personal labeling accuracy of a labeler is lower than the overall labeling accuracy and the deviation from the overall labeling accuracy is greater than a preset deviation threshold, the number of labelers whose personal labeling accuracy is lower than the first accuracy threshold is obtained;
[0016] The labeling quality of the labeling result is determined according to the number of the partial labeling personnel.
[0017] Preferably, after obtaining the annotation quality of the annotation result, the method further includes:
[0018] According to the annotation quality of the annotation results, the ratio of the number of selected annotation users to the number of consistent collection users is adjusted.
[0019] Preferably, the selecting a corresponding machine learning model and corresponding model training parameters according to the current task type and the annotation quality of the annotation result includes:
[0020] Determining the difficulty of labeling the online data according to the labeling quality of the labeling result;
[0021] According to the current task type and the difficulty of labeling the online data, select the corresponding machine learning model and the corresponding model training parameters.
[0022] Preferably, after using the labeled training data to train the corresponding machine learning model according to the corresponding model training parameters to obtain a trained prediction model, the method further includes:
[0023] Get new online data;
[0024] Performing crowdsourcing annotation on the new online data to obtain new annotation results;
[0025] Using the trained prediction model to predict the new online data to obtain a prediction result;
[0026] According to the new annotation result and the prediction result, it is determined whether the trained prediction model meets the expected effect.
[0027] Preferably, after determining that the trained prediction model meets the expected effect, the method further includes:
[0028] Obtaining entropy value distribution information of the newly launched data according to the new annotation result and the prediction result;
[0029] According to the entropy value distribution information of the newly launched data, setting the prediction result alarm condition;
[0030] Monitoring subsequent prediction results of the prediction model;
[0031] When the subsequent prediction results of the prediction model meet the prediction result alarm condition, active learning data is selected to perform incremental training on the prediction model to obtain an optimized prediction model.
[0032] Preferably, the monitoring of the later prediction results of the prediction model includes:
[0033] Obtaining subsequent prediction results of the prediction model at preset time intervals;
[0034] According to the subsequent prediction result, obtaining entropy value information of the subsequent prediction result;
[0035] Monitor the entropy value information of the subsequent prediction results to see if they meet the preset entropy value alarm condition.
[0036] A model building device, comprising:
[0037] A crowdsourcing processing unit is used to obtain online data; perform crowdsourcing annotation on the online data to obtain an annotation result; the annotation result includes: annotated training data and annotation situation information; and obtain the annotation quality of the annotation result;
[0038] The algorithm processing unit is used to select a corresponding machine learning model and corresponding model training parameters according to the current task type and the annotation quality of the annotation result; use the annotated training data and train the corresponding machine learning model according to the corresponding model training parameters to obtain a trained prediction model.
[0039] A storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the model building method as described above.
[0040] A model building device includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other via the bus; and the processor is used to call program instructions in the memory to execute the above-mentioned model building method.
[0041] Through the above technical scheme, the model building method, device, storage medium and processor provided by the present invention obtain the annotation quality of the annotation results after crowdsourcing annotation of online data, and select the corresponding machine learning model and the corresponding model training parameters according to the current task type and the annotation quality of the annotation results, thereby combining the online data with the modeling configuration process to realize the automatic configuration of the model and model training parameters, which fully reduces the modeling threshold for non-professionals and makes the entire modeling process become a model that can be obtained with data, thereby improving the convenience of model construction and reducing the time cost of modelers.
[0042] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0044] Figure 1 A flowchart of a model building method provided in an embodiment of the present application;
[0045] Figure 2 A flowchart of a labeling quality acquisition solution provided in an embodiment of the present application;
[0046] Figure 3 A flow chart of a model effect testing solution provided in an embodiment of the present application;
[0047] Figure 4 A flow chart of the model monitoring optimization solution provided in the embodiment of the present application;
[0048] Figure 5 A schematic diagram of the structure of a model building device provided in an embodiment of the present application;
[0049] Figure 6 Another schematic diagram of the structure of the model building device provided in the embodiment of the present application;
[0050] Figure 7 A business process flow chart of the knowledge platform provided in the embodiment of the present application;
[0051] Figure 8 A business processing flow chart of a crowdsourcing processing unit provided in an embodiment of the present application;
[0052] Fig. 9 A business processing flow chart of the algorithm processing unit provided in the embodiment of the present application;
[0053] Fig.10 A business processing flow chart of the monitoring optimization unit provided in an embodiment of the present application;
[0054] Fig.11 A schematic diagram of the structure of the device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0055] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0056] See also Figure 1 , Figure 1 A flowchart of the model building method provided in an embodiment of the present application.
[0057] like Figure 1 As shown, the model building method of this embodiment may include:
[0058] S101: Obtain online data.
[0059] S102: Perform crowdsourcing annotation on the online data to obtain annotation results.
[0060] The labeling result at least includes: labeled training data and labeling information.
[0061] The labeling information mainly refers to the number of labelers for a data item to be labeled, the label information that each labeler has labeled for the data item to be labeled, and other information.
[0062] S103: Obtain the annotation quality of the annotation result.
[0063] Based on the labeled training data and the labeling information, the labeling quality of the labeling results can be analyzed. For example, the labeling results can be sampled, and the reviewers can perform quality checks and provide feedback on the labeling quality of the labeling results.
[0064] S104: Select a corresponding machine learning model and corresponding model training parameters according to the current task type and the annotation quality of the annotation result.
[0065] The current task type may be set in advance by the user, or may be determined based on the type of online data.
[0066] In one example, step S104 may include:
[0067] A1. Determining the difficulty of labeling the online data according to the labeling quality of the labeling result;
[0068] The annotation quality of the annotation result reflects the annotation difficulty of the online data to a certain extent, so the annotation difficulty of the online data can be determined according to the annotation quality of the annotation result. Furthermore, the present invention can also pre-set the corresponding relationship between the annotation quality and the annotation difficulty.
[0069] A2. Select a corresponding machine learning model and corresponding model training parameters according to the current task type and the difficulty of labeling the online data.
[0070] In this example, the present invention can also pre-configure the labeling difficulty corresponding to each machine learning model among the multiple machine learning models available for the current task type. In this way, after determining the multiple machine learning models available for the current task type, the corresponding machine learning model can be selected according to the labeling difficulty of the online data.
[0071] Specifically, different task types may correspond to different types of machine learning models. After determining the type of machine learning model suitable for the current task type, the corresponding machine learning model and corresponding model training parameters may be selected according to the difficulty of labeling the online data. There may be multiple machine learning modules of the same type.
[0072] Among them, there is also a preset corresponding relationship between the labeling difficulty and the model training parameters.
[0073] For example, in the case of deep learning, more difficult tasks can require a more complex network structure.
[0074] S105: Using the labeled training data, according to the corresponding model training parameters, the corresponding machine learning model is trained to obtain a trained prediction model.
[0075] The model building method provided in this embodiment obtains the annotation quality of the annotation results after crowdsourcing annotation of the online data, and selects the corresponding machine learning model and the corresponding model training parameters according to the current task type and the annotation quality of the annotation results, thereby combining the online data with the modeling configuration process to realize the automatic configuration of the model and model training parameters, which fully reduces the modeling threshold for non-professionals and makes the entire modeling process possible to obtain a model as long as there is data, thereby improving the convenience of model building and reducing the time cost of modelers.
[0076] In a specific application, the annotation quality of the annotation result can be obtained by analyzing the annotation accuracy of the annotator. Accordingly, the present invention also provides an annotation quality acquisition scheme to obtain the annotation quality of the annotation result according to the annotation result.
[0077] See also Figure 2 , Figure 2 A flowchart of the annotation quality acquisition solution provided in an embodiment of the present application.
[0078] like Figure 2 As shown, the annotation quality acquisition solution of this embodiment may include:
[0079] S201: According to the labeling results, the personal labeling accuracy of each labeler and the overall labeling accuracy of all labelers are obtained.
[0080] According to the labeling results, the individual labeling accuracy of each labeler is counted, and the overall labeling accuracy of all labelers is obtained. The individual labeling accuracy of the labeler can be obtained by the labeling reviewer after reviewing and evaluating the labeling results obtained this time, or by comparing and analyzing the labeling results with the pre-set standard labeling results by the data analysis software.
[0081] S202: When the personal labeling accuracy of a labeler is lower than the overall labeling accuracy and the deviation from the overall labeling accuracy is greater than a preset deviation threshold, the number of labelers whose personal labeling accuracy is lower than the first accuracy threshold is obtained.
[0082] If the overall labeling accuracy is high, but the personal labeling accuracy of some individual personnel is low, then the number t of some labeling personnel whose personal labeling accuracy is lower than the first accuracy threshold is obtained.
[0083] S203: Determine the labeling quality of the labeling result according to the number of the partial labeling personnel.
[0084] Wherein, step S203 may include:
[0085] B1. Obtain the total number of crowdsourced annotations N, the number of selected annotations n, and the number of consistent collections m.
[0086] The number of selected annotation personnel refers to the number of annotation personnel selected for annotation of the online data; the number of consistent recovery personnel refers to the number of annotation personnel who need to reach a consensus on the annotation results when recovering the annotation results. The specific meaning of "recovery" refers to the adoption of the annotation results.
[0087] B2. Use the following formula to calculate the annotation quality estimation value p of the annotation result: o :
[0088]
[0089] Among them, N is the total number of labeled people, n is the number of selected labeled people, m is the number of consistent recovered people, t is the number of partial labeled personnel, and threshold1 is the first accuracy threshold.
[0090] The values of m and n can be based on the difficulty of the task, the speed of annotation and the degree of inconsistency. For example, if the task is relatively simple and the annotation quality is relatively high, the recycling ratio m:n can be set lower. For example, three people are selected for annotation, and the data is recycled if two of them agree. This ensures that the labeled data with good quality is recycled. If the task is difficult and the annotation quality is relatively low, a higher recycling ratio m:n needs to be set. For example, seven people are selected for annotation, and the data is recycled if five of them agree. At this time, if three people are still selected for annotation and two of them agree, the recycled labeled data may be of lower quality.
[0091] Among them, "seven people labeled, five people unanimously collected" specifically means that seven people labeled the same data. When the annotation content of five people is consistent with that of the data, the annotation result agreed upon by these five people will be adopted.
[0092] The first accuracy threshold, threshold1, actually refers to the threshold of the personal annotation accuracy of the annotator, which indicates the lowest acceptable threshold of the personal annotation accuracy of the annotator. For example, if the personal annotation accuracy of some annotators is 50%, it is equivalent to pure guessing in two classifications, which is definitely unacceptable.
[0093] In addition, in order to avoid cheating by a large number of labelers, while determining the labeling quality as mentioned above, quality inspection can be carried out in combination with manual review, and the labeling quality of the labeling results can be fed back. By combining the two methods to obtain the labeling quality, the reliability of the labeling quality can be improved.
[0094] By judging whether the accuracy of the annotator in the text with more categories in the data distribution is higher than that in the category with smaller distribution, we can judge whether the annotator cheated. The higher the accuracy, the greater the suspicion of cheating. Of course, there is also a possibility that the annotators have a different understanding of the annotation specifications. In this case, we need to communicate with the annotators to improve the annotation quality.
[0095] Among them, the labeling accuracy of a certain labeler in a certain category = the number of labels in this category by the labeler / the total number of labels in this category, which is somewhat similar to the concept of recall rate.
[0096] In one example, after obtaining the annotation quality of the annotation result, the present invention may further adjust the ratio of the number of selected annotation persons n to the number of consistent collection persons m according to the annotation quality of the annotation result.
[0097] For example, when p o >threshold2, the number of people in the recycling ratio is increased to avoid the impact of poor labeling quality on the labeling quality. Among them, threshold2 is the second accuracy threshold.
[0098] The second accuracy threshold, threshold2, is actually the accuracy threshold of the annotation quality. It is used to limit the annotation quality and needs to be set according to the user's requirements for annotation quality. For example, for more complex tasks, threshold2 can be set lower; for simpler tasks, threshold2 can be set higher.
[0099] In general, threshold1<threshold2, the label quality estimate value p o In fact, it is approximately equal to the average annotation quality of all annotators, while threshold1 is equivalent to the lower limit of the annotation quality.
[0100] The annotation quality acquisition scheme provided in this embodiment determines the annotation quality of the annotation results by counting the annotation accuracy of the crowdsourced annotation personnel, which can substantially reduce the time cost of manual review. Of course, it can also be combined with manual review to autonomously improve the annotation quality of the crowdsourced annotation personnel, while improving the data annotation quality while saving part of the manual review work.
[0101] In specific applications, after the prediction model is initially trained, the prediction effect of the model needs to be tested to verify whether the prediction effect of the trained prediction model can reach the expected level. Accordingly, the present invention also provides a model effect testing scheme to test whether the prediction effect of the trained prediction model meets expectations.
[0102] See also Figure 3 , Figure 3 A flowchart of the model effect testing solution provided in an embodiment of the present application.
[0103] like Figure 3 As shown, the model effect testing scheme of this embodiment may include:
[0104] S301: Acquire new online data.
[0105] New online data is also online data, but different from the online data used in model training, the new online data can be a batch of data randomly selected from the online data and used as test data.
[0106] S302: Perform crowdsourcing annotation on the new online data to obtain new annotation results.
[0107] S303: Use the trained prediction model to predict the new online data to obtain a prediction result.
[0108] S304: Determine whether the trained prediction model meets the expected effect based on the new annotation result and the prediction result.
[0109] Under normal circumstances, if the new annotation result is highly consistent with the prediction result, it is determined that the trained prediction model meets the expected effect; otherwise, it is determined that the trained prediction model does not meet the expected effect.
[0110] If the trained prediction model meets the expected results, the online link will be carried out; if it does not meet the expected results, the model will be judged whether it is overfitting or underfitting. If it is overfitting, the training data will be supplemented; if it is underfitting, the model complexity will be adjusted or the model will be replaced. At the same time, it is necessary to check the impact of data labeling quality issues and optimize the model so that it ultimately meets the expected results.
[0111] The model effect testing solution provided in this embodiment actually uses new online data as test data. While using the prediction model to predict the test, it also performs crowdsourcing annotation on the test data, and compares the prediction results with the annotation results. Based on the consistency between the new annotation results and the prediction results reflected by the comparison results, it is determined whether the trained prediction model meets the expected results, thereby ensuring the accuracy of the prediction model.
[0112] In specific applications, after determining that the trained prediction model meets the expected effect, the prediction model begins to be put into use online. During use, the online data will change with time or data source changes. When the online data changes, the prediction effect of the prediction model may also have problems, so it is necessary to monitor the prediction effect of the prediction model in real time. Once a problem is found, it is necessary to optimize the prediction model in time to ensure the accuracy of the prediction model. Accordingly, the present invention also provides a model monitoring optimization scheme to achieve monitoring and optimization of the prediction model.
[0113] See also Figure 4 , Figure 4 A flowchart of the model monitoring optimization solution provided in an embodiment of the present application.
[0114] like Figure 4 As shown, the model monitoring optimization scheme of this embodiment may include:
[0115] S401: Obtain entropy distribution information of the newly-released data according to the new annotation result and the prediction result.
[0116] Entropy, also known as information entropy, means that the larger the entropy value, the more uncertain it is. Model monitoring and self-optimization are performed based on the entropy value.
[0117] The entropy formula is:
[0118] Among them, p represents probability and entropy represents entropy value.
[0119] After the prediction model passes the model test and achieves the expected effect, the entropy distribution of the test data can be statistically analyzed to obtain the entropy distribution information of the test data.
[0120] S402: Setting prediction result alarm conditions according to the entropy value distribution information of the newly-released data.
[0121] Based on the entropy distribution information of the newly launched data, the prediction accuracy of the prediction model in different entropy value ranges can be calculated, and the entropy threshold e and the proportion c of data with entropy values greater than the entropy threshold e in the relevant category can be determined according to the preset compliance conditions.
[0122] For example, different entropy intervals are set, such as 0-0.1, 0.1-0.2, ..., 0.9-1. If divided in this way, there are 10 intervals in total, because each data prediction result corresponds to an entropy value, which falls into one of these ten intervals. In this way, each entropy interval corresponds to a part of the data, and each data has a predicted value (model prediction) and a labeled value (manually labeled). Consistent is correct, and inconsistent is wrong. In this way, the accuracy of the data in each threshold interval can be obtained, and the entropy threshold e is set according to the accuracy. The data proportion c is calculated based on the set entropy threshold e to calculate the total amount of data in the entropy interval.
[0123] In addition, a floating threshold threshold3 needs to be set. If the proportion of data with entropy values greater than the entropy threshold e under the prediction category is greater than c×threshold3, it is determined that the prediction result alarm condition is met and the monitoring alarm is triggered.
[0124] Among them, the floating threshold threshold3 is also flexibly set according to the requirements of annotation quality.
[0125] S403: Monitoring subsequent prediction results of the prediction model.
[0126] In one example, step S403 may include:
[0127] C1. Obtaining subsequent prediction results of the prediction model at preset time intervals;
[0128] C2. Acquire entropy value information of the subsequent prediction result according to the subsequent prediction result;
[0129] C3. Monitor the entropy value information of the subsequent prediction results to see whether the preset entropy value alarm condition is reached.
[0130] S404: When the subsequent prediction results of the prediction model meet the prediction result alarm condition, active learning data is selected to perform incremental training on the prediction model to obtain an optimized prediction model.
[0131] After the preset entropy alarm condition is reached, the online data under each category predicted by the model can be selected according to the entropy threshold e, and a preset proportion (which needs to be set according to the model) of data can be randomly sampled as active learning data, and the model can be incrementally trained to optimize the prediction model.
[0132] After the model optimization is completed, a new batch of test data is selected to evaluate whether the optimized prediction model meets expectations. If the prediction effect of the optimized prediction model is not improved, the model features can be extracted and the data differences can be compared to determine whether the data distribution has changed significantly. If so, random data can be selected to supplement the training data; if not, it indicates that the current prediction model is no longer competent for the current task, and it is recommended to replace the model, adjust the model complexity, and modify the model parameters.
[0133] The model monitoring and optimization solution provided in this embodiment monitors the prediction model in real time after the prediction model is put into use online. Once it is found that the prediction effect of the model has deteriorated, the self-optimization process of the prediction model is initiated. When the data distribution changes over time or the user data type changes, the problem can be discovered in the first time, and the model can be automatically optimized in time, thereby ensuring the online effect and avoiding the problem of poor effect of the model on some specific data.
[0134] An embodiment of the present invention further provides a model building device, which is used to implement the model building method provided by the embodiment of the present invention. The technical content regarding the model building device described below can be referenced to the technical content of the model building method described above, and the same or similar parts will not be repeated.
[0135] See also Figure 5 , Figure 5 A schematic diagram of the structure of a model building device provided in an embodiment of the present application.
[0136] The model building device of this embodiment is used to implement the model building method of the above-mentioned embodiment, such as Figure 5 As shown, the device at least includes: a crowdsourcing processing unit 100 and an algorithm processing unit 200.
[0137] The crowdsourcing processing unit 100 is used to obtain online data; perform crowdsourcing labeling on the online data to obtain labeling results; the labeling results include: labeled training data and labeling situation information; and obtain the labeling quality of the labeling results.
[0138] The crowdsourcing processing unit 100 may include a crowdsourcing labeling subunit and a quality control subunit.
[0139] The crowdsourcing annotation subunit is used to perform crowdsourcing annotation on the online data to obtain annotation results.
[0140] The quality control subunit is used to obtain the annotation quality of the annotation result.
[0141] In one example, the quality control subunit is specifically used to: obtain the personal labeling accuracy of each labeler and the overall labeling accuracy of all labelers according to the labeling result; when the personal labeling accuracy of a labeler is lower than the overall labeling accuracy and the deviation from the overall labeling accuracy is greater than a preset deviation threshold, obtain the number of some labelers whose personal labeling accuracy is lower than the first accuracy threshold; determine the labeling quality of the labeling result according to the number of some labelers.
[0142] In one example, the crowdsourcing labeling subunit is further used to adjust the ratio of the number of people selected for labeling to the number of people who are consistently collected according to the labeling quality of the labeling result.
[0143] The algorithm processing unit 200 is used to select a corresponding machine learning model and corresponding model training parameters according to the current task type and the annotation quality of the annotation result; use the annotated training data and train the corresponding machine learning model according to the corresponding model training parameters to obtain a trained prediction model.
[0144] In one example, selecting a corresponding machine learning model and corresponding model training parameters according to the current task type and the annotation quality of the annotation result includes: determining the annotation difficulty of the online data according to the annotation quality of the annotation result; selecting a corresponding machine learning model and corresponding model training parameters according to the current task type and the annotation difficulty of the online data.
[0145] In one example, the crowdsourcing annotation subunit is further used to: acquire new online data; and perform crowdsourcing annotation on the new online data to obtain new annotation results.
[0146] Correspondingly, the algorithm processing unit 200 is also used to: use the trained prediction model to predict the new online data to obtain a prediction result; and determine whether the trained prediction model meets the expected effect based on the new annotation result and the prediction result.
[0147] The model building device provided in this embodiment obtains the annotation quality of the annotation results after crowdsourcing annotation of the online data, and selects the corresponding machine learning model and the corresponding model training parameters according to the current task type and the annotation quality of the annotation results, thereby combining the online data with the modeling configuration process, automatically configuring the model and model training parameters, and fully lowering the modeling threshold for non-professionals. The entire modeling process enables the model to be obtained as long as there is data, thereby improving the convenience of model building and reducing the time cost of modelers.
[0148] See also Figure 6 , Figure 6 Another structural schematic diagram of the model building device provided in an embodiment of the present application.
[0149] like Figure 6 As shown, the device includes, in addition to the crowdsourcing processing unit 100 and the algorithm processing unit 200 in the aforementioned embodiments, a monitoring optimization unit 300 is also included.
[0150] The monitoring and optimization unit 300 is used to: after determining that the trained prediction model meets the expected effect, obtain the entropy distribution information of the newly online data according to the new annotation results and the prediction results; set the prediction result alarm condition according to the entropy distribution information of the newly online data; monitor the subsequent prediction results of the prediction model; when the subsequent prediction results of the prediction model meet the prediction result alarm condition, select active learning data to perform incremental training on the prediction model to obtain an optimized prediction model.
[0151] Among them, the monitoring of the later prediction results of the prediction model may include: obtaining the subsequent prediction results of the prediction model at a preset time interval; obtaining the entropy value information of the subsequent prediction results based on the subsequent prediction results; and monitoring the entropy value information of the subsequent prediction results to determine whether a preset entropy value alarm condition is reached.
[0152] The model building device provided in this embodiment monitors the prediction model in real time after the prediction model is put into use online. Once it is found that the prediction effect of the model has deteriorated, the self-optimization process of the prediction model is initiated. When the data distribution changes over time or the user data type changes, the problem can be discovered in the first time, and the model can be automatically optimized in time, thereby ensuring the online effect and avoiding the problem of poor effect of the model on some specific data.
[0153] In practical applications, the model building device of the present invention can be used as an automated knowledge platform to realize the functions of automated modeling, online data monitoring and model self-optimization. The business processing flow of the automated knowledge platform can be as follows: Figure 7shown.
[0154] First, the collected online data is sent to the crowdsourcing processing unit, and the first batch of training data is annotated by the crowdsourcing processing unit to train the model;
[0155] Then, the model is trained through the algorithm processing unit to obtain a trained prediction model. When the prediction model meets expectations, the prediction results after the prediction model is put online are sent to the monitoring optimization unit.
[0156] Then, when the monitoring optimization unit alarms, active learning data is selected to optimize the prediction model.
[0157] If the monitoring optimization unit does not alarm, the prediction result will be output.
[0158] Among them, the crowdsourcing processing unit mainly includes two parts: the crowdsourcing labeling subunit and the quality control subunit. The crowdsourcing labeling subunit can be a data labeling platform, where crowdsourcing labelers mainly label the input data and use the label data as model training data; the quality control subunit is mainly used to review the quality of crowdsourcing labeling, adjust the labeling specifications and crowdsourcing personnel according to the review results, control the labeling quality, and ensure the accuracy of training data and test data.
[0159] The crowdsourcing annotation sub-unit can also include: classification annotation module, sequence annotation module, etc., and various annotation modules can be added later as needed. Here, taking the classification annotation module as an example, it can automatically define the label data (number of categories), define how many people are required to annotate, and how many people are consistent in collecting, to ensure the quality of annotation. You can also add trap questions to evaluate the annotation quality of the annotators and prevent cheating.
[0160] The business process of the crowdsourcing processing unit can be as follows: Figure 8 When data to be annotated comes in, the management staff will formulate corresponding annotation specifications and methods according to the needs, and train the annotators, who will then complete the annotation work.
[0161] The quality control of the quality control subunit can be mainly carried out in two aspects. First, by sampling the labeling results and having the auditors perform quality checks to obtain the data labeling quality. Second, the labeling accuracy of the labelers is obtained according to the labeling results statistics. The data labeling quality is analyzed by comparing each person's labeling accuracy with the overall accuracy of all crowdsourcing labelers. For details, please refer to the labeling quality acquisition solution in the previous embodiment.
[0162] If many people have low accuracy, consider whether there is a problem with the data or the annotation specifications need to be optimized and revised. Provide training for the annotation staff.
[0163] The algorithm processing unit can select various machine learning models and deep learning models, and select different models for training according to different task types. In the initial stage, the better model can be selected by comparing the effects of various models under the same type of task. For example, in the classification task, there can be traditional machine learning models such as SVM, logistic regression, random forest and other algorithms, as well as deep learning methods such as RNN and LSTM.
[0164] The model-related parameters and the number of network layers can be adjusted according to the annotation quality and difficulty given by the crowdsourcing processing unit. For example, when the annotation difficulty reaches 80%, which is a difficult category, the number of network layers of the deep learning model can be set to 5, the number of hidden layer nodes to 800, etc.
[0165] The business processing flow of the algorithm processing unit can be as follows Fig. 9 shown.
[0166] First, the collected online data is preprocessed by data cleaning, for example, data deduplication, removal of irrelevant data, data format processing, garbled code and other special characters and emoticons processing, etc. Then the training data is selected and sent to the crowdsourcing processing unit for data labeling. The results are split into training set data train data and validation set data valid data, and model training is performed to obtain the initial model, that is, the preliminarily trained prediction model.
[0167] Among them, the difficulty of data labeling can be obtained based on the accuracy of crowdsourcing labeling results (excluding problems such as cheating), and the corresponding model or model parameters can be set for modeling based on the difficulty of labeling. For example, in the case of deep learning, if the task is difficult, a more complex network structure can be set.
[0168] Then, the initial model is used to predict the new online data, and a batch of data is randomly sampled as the test set data, which is sent to the crowdsourcing processing unit for data labeling and evaluation of the model prediction effect. If the model prediction effect meets expectations, it enters the online link. If it does not meet expectations, it determines whether the model is overfitting or underfitting. If it is overfitting, additional training data is added. If it is underfitting, the model complexity is adjusted or the model is replaced. At the same time, it is necessary to check the impact of data labeling quality issues and optimize the model to meet the needs.
[0169] After the model prediction effect reaches the expected level, it is necessary to consider that the online data will have certain changes (caused by time, source, etc.), and the model needs to be monitored in real time. The monitoring and optimization unit monitors the model prediction effect in real time. If a problem is found, an alarm is triggered. Based on the model prediction results and the alarm setting threshold, active learning data is selected and sent to the crowdsourcing processing unit for data labeling to further iterate and optimize the model.
[0170] The business process flow chart of the monitoring optimization unit may be shown in FIG10 .
[0171] First, after the initial model meets the standard, the entropy distribution of the test set is statistically analyzed to obtain the entropy distribution of the test set, and the accuracy of model prediction in different entropy value intervals is calculated. According to the standard conditions, the entropy threshold e and the proportion of data c with entropy values greater than the entropy threshold in the relevant categories are obtained.
[0172] Secondly, the model prediction results are monitored at fixed time intervals △t, and a floating threshold threshold3 is set. When the proportion of data with entropy values greater than the entropy threshold e under the prediction category is greater than c×threshold3, an alarm is triggered.
[0173] The floating threshold is determined based on the online data quality requirements, which depends on the specific task. For example, according to the above entropy interval data percentage and data accuracy statistics, the overall error rate of the data entropy range can be obtained. By multiplying the overall error rate of the entropy interval by the proportion of data with entropy values greater than the entropy threshold e, the overall data accuracy estimate can be obtained. By adding the overall data accuracy requirement P0, the corresponding data percentage can be inferred, that is, the floating threshold threshold3.
[0174] After the preset entropy alarm condition is reached, the online data under each category predicted by the model can be selected according to the entropy threshold e, and a preset proportion (which needs to be set according to the model) of data can be randomly sampled as active learning data, and the model can be incrementally trained to optimize the prediction model.
[0175] After the model optimization is completed, a new batch of test data is selected to evaluate whether the optimized prediction model meets expectations. If the prediction effect of the optimized prediction model is not improved, the model features can be extracted and the data differences can be compared to determine whether the data distribution has changed significantly. If so, random data can be selected to supplement the training data; if not, it indicates that the current prediction model is no longer competent for the current task, and it is recommended to replace the model, adjust the model complexity, and modify the model parameters.
[0176] The automated knowledge platform provided by this application can free up developers' time, directly combine online data with the development environment, and connect crowdsourcing processing units in series. It effectively promotes the integration of data labeling, model training, result monitoring, and model optimization, saving the cost of data labeling, model development, and model optimization; and it fully reduces the modeling threshold for non-professionals, improves the modeling effect of non-professionals, and makes everything possible. Models can be obtained with data, and real-time monitoring can be performed with use; moreover, the monitoring optimization unit ensures the online effect and avoids the problem of poor model effects on some specific data. When the data distribution changes over time or when the user data type changes, problems can be discovered in the first place, and the model can be optimized automatically and in a timely manner.
[0177] The model building device provided by an embodiment of the present invention includes a processor and a memory. The crowdsourcing processing unit 100, algorithm processing unit 200, monitoring optimization unit 300, crowdsourcing labeling sub-unit and quality control sub-unit are all stored in the memory as program units, and the processor executes the above program units stored in the memory to realize corresponding functions.
[0178] The processor contains a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the convenience of model construction can be improved by adjusting the kernel parameters.
[0179] An embodiment of the present invention provides a storage medium on which a program is stored. When the program is executed by a processor, the model building method is implemented.
[0180] An embodiment of the present invention provides a processor, which is used to run a program, wherein the model building method is executed when the program is running.
[0181] like Fig.11 As shown, an embodiment of the present invention further provides an electronic device 10, which includes at least one processor 11, at least one memory 12 connected to the processor 11, and a bus 13; wherein the processor 11 and the memory 12 communicate with each other through the bus 13; the processor 11 is used to call the program instructions in the memory 12 to execute the above-mentioned model building method. The device in this article can be a server, a PC, a PAD, a mobile phone, etc.
[0182] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing the following method steps:
[0183] Get online data;
[0184] Perform crowdsourcing labeling on the online data to obtain labeling results; the labeling results include: labeled training data and labeling situation information;
[0185] Obtaining the annotation quality of the annotation result;
[0186] Select a corresponding machine learning model and corresponding model training parameters according to the current task type and the annotation quality of the annotation result;
[0187] The labeled training data is used to train the corresponding machine learning model according to the corresponding model training parameters to obtain a trained prediction model.
[0188] Preferably, obtaining the annotation quality of the annotation result includes:
[0189] According to the labeling results, the personal labeling accuracy of each labeler and the overall labeling accuracy of all labelers are obtained;
[0190] When the personal labeling accuracy of a labeler is lower than the overall labeling accuracy and the deviation from the overall labeling accuracy is greater than a preset deviation threshold, the number of labelers whose personal labeling accuracy is lower than the first accuracy threshold is obtained;
[0191] The labeling quality of the labeling result is determined according to the number of the partial labeling personnel.
[0192] Preferably, after obtaining the annotation quality of the annotation result, the method further includes:
[0193] According to the annotation quality of the annotation results, the ratio of the number of selected annotation users to the number of consistent collection users is adjusted.
[0194] Preferably, the selecting a corresponding machine learning model and corresponding model training parameters according to the current task type and the annotation quality of the annotation result includes:
[0195] Determining the difficulty of labeling the online data according to the labeling quality of the labeling result;
[0196] According to the current task type and the difficulty of labeling the online data, select the corresponding machine learning model and the corresponding model training parameters.
[0197] Preferably, after using the labeled training data to train the corresponding machine learning model according to the corresponding model training parameters to obtain a trained prediction model, the method further includes:
[0198] Get new online data;
[0199] Performing crowdsourcing annotation on the new online data to obtain new annotation results;
[0200] Using the trained prediction model to predict the new online data to obtain a prediction result;
[0201] According to the new annotation result and the prediction result, it is determined whether the trained prediction model meets the expected effect.
[0202] Preferably, after determining that the trained prediction model meets the expected effect, the method further includes:
[0203] Obtaining entropy value distribution information of the newly launched data according to the new annotation result and the prediction result;
[0204] According to the entropy value distribution information of the newly launched data, setting the prediction result alarm condition;
[0205] Monitoring subsequent prediction results of the prediction model;
[0206] When the subsequent prediction results of the prediction model meet the prediction result alarm condition, active learning data is selected to perform incremental training on the prediction model to obtain an optimized prediction model.
[0207] Preferably, monitoring the later prediction results of the prediction model includes:
[0208] Obtaining subsequent prediction results of the prediction model at preset time intervals;
[0209] According to the subsequent prediction result, obtaining entropy value information of the subsequent prediction result;
[0210] Monitor the entropy value information of the subsequent prediction results to see if they meet the preset entropy value alarm condition.
[0211] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0212] In a typical configuration, the device includes one or more processors (CPU), memory and bus. The device may also include input / output interface, network interface and the like.
[0213] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.
[0214] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0215] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0216] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0217] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A model building method, characterized in that: include: Get online data; Performing crowdsourcing annotation on the online data to obtain an annotation result; The labeling results include: labeled training data and labeling information; Obtaining the annotation quality of the annotation result; Select a corresponding machine learning model and corresponding model training parameters according to the current task type and the annotation quality of the annotation result; Using the labeled training data, and according to the corresponding model training parameters, the corresponding machine learning model is trained to obtain a trained prediction model; Wherein, after the corresponding machine learning model is trained using the labeled training data according to the corresponding model training parameters to obtain a trained prediction model, the method further includes: Get new online data; Performing crowdsourcing annotation on the new online data to obtain new annotation results; Using the trained prediction model to predict the new online data, to obtain a prediction result; Determining whether the trained prediction model meets the expected effect according to the new annotation result and the prediction result; After determining that the trained prediction model meets the expected effect, the method further includes: Obtaining entropy value distribution information of the new online data according to the new annotation result and the prediction result; According to the entropy value distribution information of the new online data, setting the prediction result alarm condition; Monitoring subsequent prediction results of the prediction model; When the subsequent prediction results of the prediction model meet the prediction result alarm condition, selecting active learning data to perform incremental training on the prediction model to obtain an optimized prediction model; Wherein, obtaining the annotation quality of the annotation result includes: According to the labeling results, the personal labeling accuracy of each labeler and the overall labeling accuracy of all labelers are obtained; When the personal labeling accuracy of a labeler is lower than the overall labeling accuracy and the deviation from the overall labeling accuracy is greater than a preset deviation threshold, the number of labelers whose personal labeling accuracy is lower than the first accuracy threshold is obtained; The labeling quality of the labeling result is determined according to the number of the partial labeling personnel.
2. The method according to claim 1, characterized in that After obtaining the annotation quality of the annotation result, the method further includes: According to the annotation quality of the annotation results, the ratio of the number of selected annotation users to the number of consistent collection users is adjusted.
3. The method according to claim 1, characterized in that The selecting of a corresponding machine learning model and corresponding model training parameters according to the current task type and the annotation quality of the annotation result includes: Determining the difficulty of labeling the online data according to the labeling quality of the labeling result; According to the current task type and the difficulty of labeling the online data, select the corresponding machine learning model and the corresponding model training parameters.
4. The method according to claim 1, characterized in that The monitoring of the later prediction results of the prediction model includes: Obtaining subsequent prediction results of the prediction model at preset time intervals; According to the subsequent prediction result, obtaining entropy value information of the subsequent prediction result; Monitor the entropy value information of the subsequent prediction results to see if they meet the preset entropy value alarm condition.
5. A model building device, characterized in that: include: A crowdsourcing processing unit for obtaining online data; Performing crowdsourcing annotation on the online data to obtain an annotation result; The labeling result includes: labeled training data and labeling information; obtaining the labeling quality of the labeling result; An algorithm processing unit, configured to select a corresponding machine learning model and corresponding model training parameters according to the current task type and the annotation quality of the annotation result; train the corresponding machine learning model using the annotated training data and the corresponding model training parameters to obtain a trained prediction model; Wherein, after the corresponding machine learning model is trained using the labeled training data according to the corresponding model training parameters to obtain a trained prediction model, the algorithm processing unit further includes: Get new online data; Performing crowdsourcing annotation on the new online data to obtain new annotation results; Using the trained prediction model to predict the new online data, to obtain a prediction result; Determining whether the trained prediction model meets the expected effect according to the new annotation result and the prediction result; After determining that the trained prediction model meets the expected effect, the algorithm processing unit further includes: Obtaining entropy value distribution information of the new online data according to the new annotation result and the prediction result; According to the entropy value distribution information of the new online data, setting the prediction result alarm condition; Monitoring subsequent prediction results of the prediction model; When the subsequent prediction results of the prediction model meet the prediction result alarm condition, selecting active learning data to perform incremental training on the prediction model to obtain an optimized prediction model; Wherein, obtaining the annotation quality of the annotation result includes: According to the labeling results, the personal labeling accuracy of each labeler and the overall labeling accuracy of all labelers are obtained; When the personal labeling accuracy of a labeler is lower than the overall labeling accuracy and the deviation from the overall labeling accuracy is greater than a preset deviation threshold, the number of labelers whose personal labeling accuracy is lower than the first accuracy threshold is obtained; The labeling quality of the labeling result is determined according to the number of the partial labeling personnel.
6. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the model building method according to any one of claims 1 to 4.
7. A model building device, characterized in that: It includes at least one processor, and at least one memory and bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; the processor is used to call the program instructions in the memory to execute the model building method according to any one of claims 1-4.
Citation Information
Patent Citations
Classification model training method based on crowdsourcing technology
CN107247972A
Model acquisition method, device, electronic device, and computer-readable storage medium
CN108197664A
Optimization method and device for data annotation
CN108241662A
Method, device, terminal device and storage medium for optimizing machine learning model
CN108875963A
Data monitoring method and device, electronic device and computer readable storage medium
CN110008096A
