A method for training a data detection model, a method and apparatus for data detection
Through initial label training and screening and labeling of target sample data, combined with tuning algorithms to optimize the model, the problem of high error rate in manual labeling is solved, the robustness and accuracy of the model are improved, and the manpower and material costs are reduced.
Patent Information
- Application Number
- CN202210695684.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-20
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2042-06-20
AI Technical Summary
Existing supervised learning models require a large amount of manually labeled data before training, which increases the error rate of manual labeling, affects the accuracy of the model, and has high manpower and material costs.
The basic data detection model is trained through initial labels, the target sample data is screened for re-labeling, the initial data detection model is trained using the target sample data and the labeling results, and different tuning algorithms are used to optimize the model to improve the robustness and accuracy of the model.
It reduces the error rate of manually labeled data, reduces manpower and material costs, and improves the robustness and accuracy of the model.
Smart Images

Figure CN115099324B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of training models, and in particular to a method for training data detection models, a method and apparatus for data detection. Background Art
[0002] With the development of artificial intelligence technology, various supervised learning models have gradually emerged.
[0003] Currently, various supervised learning models require extensive labeled data for training or fine-tuning before practical application. To reduce manual labeling costs, this approach typically requires only one person to annotate a batch of data. However, this approach leads to a gradual increase in the error rate of manually labeled data, resulting in lower accuracy for the trained models.
[0004] Therefore, how to provide a technical solution for a data detection method that reduces the error rate of manually labeled data has become a technical problem that needs to be solved urgently. Summary of the Invention
[0005] The purpose of some embodiments of the present application is to provide a method for training a data detection model, a method and device for data detection. Through the technical solutions of the embodiments of the present application, pseudo data labels (that is, initial labels) can be added in the process of training the data detection model to improve the robustness of the target data detection model. At the same time, the target data detection model is used to detect manually labeled data, which can reduce the error rate of manually labeled data and reduce manpower and material costs.
[0006] In a first aspect, some embodiments of the present application provide a method for training a data detection model, including: obtaining an initial data detection model, wherein the initial data detection model is obtained by training a basic data detection model through an initial labeled data set, and the initial labeled data set includes initial data and initial labels corresponding to the initial data, and the initial labels are generated after the initial data is input into the basic data detection model; inputting a sample data set into the initial data detection model to obtain a labeling detection result, wherein the labeling detection result is used to characterize whether the model labeling result is consistent with the manual labeling result, and the sample data set includes sample data and the manual labeling result corresponding to the sample data; using the labeling detection result, filtering out target sample data from the sample data, and labeling the target sample data by at least two people to obtain a labeling result; using at least the target sample data and the labeling result, training the initial data detection model to obtain a target data detection model, wherein the target data detection model is used to detect whether the target model detection result is consistent with the manual labeling result.
[0007] Some embodiments of the present application train a basic data detection model with pseudo-label data (that is, initial labels) to obtain an initial data detection model, and then re-label the target sample data filtered out from the sample data to obtain a labeling result with higher accuracy. The initial data detection model is then trained again to obtain a target data detection model with better robustness and higher accuracy. The target data detection model is then used to detect manually labeled data, which can reduce the error rate of manually labeled data and reduce manpower and material costs.
[0008] In some embodiments, before obtaining the initial data detection model, the method further includes: training a language model using a basic data set to obtain a basic data detection model to be optimized; and optimizing the basic data detection model to be optimized using a first tuning algorithm to obtain the basic data detection model.
[0009] In some embodiments of the present application, a language model is trained using a basic data set and then optimized using a first tuning algorithm to obtain a basic data detection model. Since the basic data set has a small amount of data and the parameters of the trained basic data detection model to be optimized are relatively small, the first tuning algorithm can be used to optimize the basic data detection model to be optimized, thereby improving the acquisition efficiency and accuracy of the basic data detection model.
[0010] In some embodiments, before the initial data detection model is trained using at least the target sample data and the labeling results, the method further includes: obtaining the remaining sample data in the sample data except the target sample data; the training of the initial data detection model using at least the target sample data and the labeling results includes: training the initial data detection model using the target sample data and the labeling results, as well as the remaining sample data and the manual labeling results corresponding to the remaining sample data.
[0011] Some embodiments of the present application can increase the training data set for training the initial data detection model by training the initial data detection model with target sample data and remaining sample data at the same time, improve the accuracy of the acquired target data detection model, and reduce the overfitting problem in the initial data detection model.
[0012] In some embodiments, the method of at least using the target sample data and the labeling results to train the initial data detection model and obtain the target data detection model includes: at least using the target sample data and the labeling results to train the initial data detection model and obtain the data detection model to be optimized; optimizing the data detection model to be optimized using a second tuning algorithm to obtain the target data detection model.
[0013] In some embodiments of the present application, after training the initial data detection model using target sample data and corresponding annotation results, a second tuning algorithm is used to adjust parameters to obtain the final target data detection model, which can ensure the detection accuracy of the target data detection model and improve the model effect.
[0014] In some embodiments, the language model is an ERNIE model, the first tuning algorithm is a feature extraction algorithm, and the second tuning algorithm is a deep network fine-tuning algorithm.
[0015] Some embodiments of the present application use different tuning algorithms for different data amounts, thereby improving the quality and effect of the training model.
[0016] In a second aspect, some embodiments of the present application provide a method for data detection, comprising: obtaining a data set to be detected, the data set to be detected including original data and manual annotation results corresponding to the original data; inputting the data set to be detected into a target data detection model obtained through any embodiment of the first aspect, and obtaining a detection result of the data set to be detected, wherein the detection result is used to characterize whether the detection result of the target model is consistent with the manual annotation result.
[0017] In a third aspect, some embodiments of the present application provide a device for training a data detection model, comprising: an acquisition module configured to acquire an initial data detection model, wherein the initial data detection model is obtained by training a basic data detection model through an initial labeled data set, the initial labeled data set including data to be labeled and labels corresponding to the data to be labeled, and the labels corresponding to the data to be labeled are generated after the data to be labeled is input into the basic data detection model; a result module configured to input a sample data set into the initial data detection model to acquire a labeling detection result, wherein the labeling detection result is used to characterize whether the model labeling result is consistent with the manual labeling result, and the sample data set includes sample data and the manual labeling result corresponding to the sample data; a screening module configured to screen out target sample data from the sample data through the labeling detection result, and label the target sample data by at least two people to obtain a labeling result; a training module configured to train the initial data detection model using at least the target sample data and the labeling result to acquire a target data detection model, wherein the target data detection model is used to detect whether the target model detection result is consistent with the manual labeling result.
[0018] In a fourth aspect, some embodiments of the present application provide a data detection device, comprising: a data acquisition module, configured to acquire a data set to be detected, wherein the data set to be detected includes original data and manual annotation results corresponding to the original data; a data detection module, configured to input the data set to be detected into a target data detection model obtained through any embodiment of the first aspect, and obtain a detection result of the data set to be detected, wherein the detection result is used to characterize whether the target model detection result is consistent with the manual annotation result.
[0019] In a fifth aspect, some embodiments of the present application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the method described in any embodiment of the first aspect or the second aspect.
[0020] In a sixth aspect, some embodiments of the present application provide an electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, the method described in any embodiment of the first or second aspect can be implemented.
[0021] In a seventh aspect, some embodiments of the present application provide a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, it can implement the method described in any embodiment of the first aspect or the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of some embodiments of the present application, the following is a brief introduction to the drawings required for use in some embodiments of the present application. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0023] Figure 1 A system diagram of data detection provided for some embodiments of the present application;
[0024] Figure 2 A flow chart of a method for training a data detection model provided for some embodiments of the present application;
[0025] Figure 3 A flow chart of a data detection method provided for some embodiments of the present application;
[0026] Figure 4 A block diagram of the components of a training data detection model provided in some embodiments of the present application;
[0027] Figure 5A block diagram of data detection components provided in some embodiments of the present application;
[0028] Figure 6 A schematic diagram of an electronic device is provided for some embodiments of the present application. DETAILED DESCRIPTION
[0029] The technical solutions in some embodiments of the present application will be described below in conjunction with the drawings in some embodiments of the present application.
[0030] It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and should not be understood as indicating or implying relative importance.
[0031] In related technologies, the large-scale application of deep learning pre-trained models requires a large amount of labeled data to adjust the models for downstream tasks. Prior art requires extensive human effort to label large amounts of data, typically requiring two to three people to jointly label the same data, resulting in high labor costs. To reduce labor costs, a single person is currently required to label a batch of data. This operation increases the error rate of manually labeled data, which in turn affects the accuracy of the pre-trained model.
[0032] In view of this, some embodiments of the present application provide a method for training a data detection model, a method and device for data detection. The method first uses the initial label generated by the basic data detection model to update the basic data model to obtain an initial data detection model, and then re-screens the target sample data from the sample data and re-labels it to obtain a labeling result, and then uses the target sample data and the corresponding labeling result to train the initial data detection model to obtain a target data detection model. This method can improve the robustness of the target data detection model. At the same time, using the target data detection model to detect manually labeled data can reduce the error rate of manually labeled data and reduce manpower and material costs.
[0033] like Figure 1 As shown, some embodiments of the present application provide a data detection system that can be applied to some embodiments of the present application. The system diagram includes a terminal device 100 and a data detection server 200, wherein the terminal device 100 can be used to obtain a data set to be detected, and send the obtained data set to be detected to the data detection server 200 for detection to obtain a detection result of the data set to be detected.
[0034] In addition, it should be noted that in some other embodiments of the present application, the terminal device 100 has the function of obtaining a data set to be detected and performing detection on the data set to be detected to obtain a detection result. In this case, the data detection server 200 may not be provided. The terminal device may be a PC terminal or a mobile terminal, and this application does not specifically limit this.
[0035] Figure 1 The trained target data detection model is deployed on the data detection server 200. It is through this trained model that the data detection server 200 can obtain the detection results of the data set to be detected.
[0036] It is understandable that in order to enable the data detection model on the data detection server 200 to have the ability to detect the data set to be detected and obtain detection results, the model needs to be trained first.
[0037] The following is combined with Figure 2 The process of training data detection models provided by some embodiments of the present application is exemplified.
[0038] Please see the attached Figure 2 , Figure 2 A flow chart of a method for training a data detection model provided in some embodiments of the present application, the method comprising:
[0039] S210, obtaining an initial data detection model, wherein the initial data detection model is obtained by training a basic data detection model through an initial annotated data set, the initial annotated data set includes initial data and initial labels corresponding to the initial data, and the initial labels are generated after the initial data is input into the basic data detection model.
[0040] In order to improve the robustness of the trained model, for example, in some embodiments of the present application, the initial data can be input into the basic data detection model to obtain a pseudo data label (that is, an initial label), and then the basic data detection model is trained using the initial data and the initial label to obtain the initial data detection model. In order to reduce the influence of the pseudo data label on the training model, when the basic data detection model is trained using the initial data set, the learning weight of the initial data set is set to a value lower than the normal learning weight. For example, if the normal learning weight is set to 50%, the learning weight of the initial data set can be set to a value lower than 50%, such as 30%, 25% or 41%, etc.
[0041] In some embodiments of the present application, before executing S210, the method of training the data detection model also includes: training the language model using the basic data set to obtain the basic data detection model to be optimized; optimizing the basic data detection model to be optimized using the first tuning algorithm to obtain the basic data detection model.
[0042] For example, in some embodiments of the present application, it is first necessary to determine the task domain and task type, and then obtain a basic data set. Among them, the basic data set contains original data and original labels corresponding to the original data. The original labels are obtained by manually annotating the original data. The same original data requires at least two people to annotate and the annotation results are consistent to obtain the corresponding original labels. The basic data set is then used to train the language model (for example, the ERNIE model) to obtain a basic data detection model to be optimized. Since there are fewer original data in the basic data set, a feature extraction algorithm, that is, a feature-base algorithm (as a specific example of the first tuning algorithm) is used to fine-tune the basic data detection model to be optimized to obtain a basic data detection model. It should be understood that in actual application scenarios, the type of the appropriate first tuning algorithm can be selected according to the amount of data.
[0043] S220: Input the sample data set into the initial data detection model to obtain a labeling detection result, wherein the labeling detection result is used to characterize whether the model labeling result is consistent with the manual labeling result, and the sample data set includes sample data and the manual labeling result corresponding to the sample data.
[0044] For example, in some embodiments of the present application, a sample data set is input into an initial data detection model, and result data in which the manual annotation results are inconsistent with the model annotation results (as a specific example of the annotation detection results) and result data in which they are consistent (as a specific example of the annotation detection results) can be obtained. It should be noted that the manual annotation results corresponding to the sample data are obtained by annotating the sample data by one person.
[0045] S230 , screening target sample data from the sample data based on the labeling detection result, and labeling the target sample data by at least two people to obtain a labeling result.
[0046] For example, in some embodiments of the present application, result data in which the manual annotation results and the model annotation results are inconsistent in the annotation detection results is obtained, target sample data corresponding to the inconsistent result data is screened out from the sample data, and then the target sample data is annotated by at least two people to obtain an annotation result corresponding to the target sample data. By annotating the target sample data again by at least two people and obtaining an annotation result when the annotations are consistent, errors in the manual annotation results or inaccurate model detection can be corrected.
[0047] S240, using at least the target sample data and the annotation result to train the initial data detection model to obtain a target data detection model, wherein the target data detection model is used to detect whether the target model detection result is consistent with the manual annotation result.
[0048] For example, in some other embodiments of the present application, the target sample data and the corresponding annotation results can be used as a training data set to train the initial data detection model to obtain a target data detection model.
[0049] In order to obtain a rich training data set, in some other embodiments of the present application, before executing S240, the method for training the data detection model further includes: obtaining remaining sample data in the sample data except the target sample data.
[0050] For example, in some other embodiments of the present application, result data whose manual annotation results are consistent with the model annotation results are obtained, and the remaining sample data corresponding to the result data that are consistent with the results are filtered out from the sample data.
[0051] In some other embodiments of the present application, S240 may further include: training the initial data detection model using the target sample data and the annotation results, as well as the remaining sample data and the manual annotation results corresponding to the remaining sample data.
[0052] For example, in some embodiments of the present application, the result data with consistent labeled detection results in S220 may be added to the training data set for training the initial data detection model, and the initial data detection model may be trained to obtain the target data detection model.
[0053] In some embodiments of the present application, S240 may also include: using at least the target sample data and the labeling results to train the initial data detection model to obtain the data detection model to be optimized; optimizing the data detection model to be optimized using a second tuning algorithm to obtain the target data detection model.
[0054] For example, in some embodiments of the present application, since the amount of data in the training data set is large after data accumulation when the initial data detection model is used, in order to improve the accuracy of the target data detection model, a deep network fine-tuning algorithm, that is, a fine-tuning algorithm (as a specific example of the second tuning algorithm) can be used to fine-tune (that is, tune) the optimized data detection model to obtain the final target data detection model. It should be understood that in actual application scenarios, the type of the appropriate second tuning algorithm can be selected based on the amount of data.
[0055] In other embodiments of the present application, S240 may also include: using the target sample data and the labeling results, as well as the remaining sample data and the manual labeling results corresponding to the remaining sample data, to train the initial data detection model to obtain the data detection model to be optimized; using a second tuning algorithm to optimize the data detection model to obtain the target data detection model.
[0056] For example, in some embodiments of the present application, it can be seen from the above embodiments that the training data set contains two types of data, the first type of data is the target sample data and the annotation results corresponding to the target sample data, and the second type of data is the remaining sample data and the manual annotation results corresponding to the remaining sample data. In order to improve the accuracy of the trained model, when training the initial data detection model, the learning weight value of the second type of data can be set to be greater than the learning weight value of the first type of data, so that the initial data detection model can have the ability to detect the first type of data, thereby improving the detection quality and effect of the target data detection model. For example, the learning weight value of the second type of data can be set to 65%, and the learning weight value of the first type of data can be set to 35%. In actual application scenarios, the learning weight value of the second type of data and the learning weight value of the first type of data can be set according to actual conditions, and this application does not make specific limitations here.
[0057] The following is combined with Figure 3 This paper describes the implementation process of a method for obtaining a target data detection model based on a language model and performing data detection using the target data detection model.
[0058] Please see the attached Figure 3 , Figure 3 A flow chart of a data detection method provided in some embodiments of the present application, the method comprising:
[0059] S310: Acquire a data set to be detected, where the data set to be detected includes original data and manual annotation results corresponding to the original data.
[0060] For example, as a specific example of the present application, the original data in a certain business field is annotated by the same person to obtain manual annotation results, and then the data set to be tested is obtained.
[0061] S320: Input the data set to be detected into the target data detection model to obtain a detection result of the data set to be detected, wherein the detection result is used to indicate whether the target model detection result is consistent with the manual annotation result.
[0062] For example, as a specific example of this application, by Figure 2 The provided method embodiment of a training data detection model obtains a target data detection model (e.g., a target ERNIE model). The target data set to be detected is input into the target ERNIE to obtain an output detection result. The detection result can be used to determine whether the target model detection result is consistent with the manual annotation result, thereby quickly and accurately detecting whether the manual annotation result has any labeling errors.
[0063] Please refer to Figure 4 , Figure 4 The following is a block diagram showing the composition of the device for training data detection model provided by some embodiments of the present application. It should be understood that the device for training data detection model is similar to the above Figure 2 Corresponding to the method embodiment, the device can execute the various steps involved in the above method embodiment. The specific functions of the device for training the data detection model can be found in the description above. To avoid repetition, the detailed description is appropriately omitted here.
[0064] Figure 4The device for training the data detection model includes at least one software function module that can be stored in a memory in the form of software or firmware or solidified in the device for training the data detection model, and the device for training the data detection model includes: an acquisition module 410, which is at least configured to obtain an initial data detection model, wherein the initial data detection model is obtained by training a basic data detection model with an initial labeled data set, and the initial labeled data set includes data to be labeled and labels corresponding to the data to be labeled, and the labels corresponding to the data to be labeled are generated after the data to be labeled is input into the basic data detection model; a result module 420, which is at least configured to input a sample data set into the initial data detection model, Obtaining a labeling detection result, wherein the labeling detection result is used to characterize whether the model labeling result is consistent with the manual labeling result, and the sample data set includes sample data and the manual labeling result corresponding to the sample data; the screening module 430 is at least configured to filter out target sample data from the sample data through the labeling detection result, and label the target sample data at least two times to obtain a labeling result; the training module 440 is at least configured to use at least the target sample data and the labeling result to train the initial data detection model to obtain a target data detection model, wherein the target data detection model is used to detect whether the target model detection result is consistent with the manual labeling result.
[0065] In some embodiments of the present application, before obtaining module 410, the device for training the data detection model also includes a model acquisition module (not shown in the figure): it can be configured to train the language model using the basic data set to obtain the basic data detection model to be optimized; optimize the basic data detection model to be optimized using the first tuning algorithm to obtain the basic data detection model.
[0066] In some embodiments of the present application, the screening module 430 can also be configured to obtain the remaining sample data in the sample data except the target sample data; the training module 440 can be configured to use the target sample data and the annotation results, as well as the remaining sample data and the manual annotation results corresponding to the remaining sample data, to train the initial data detection model.
[0067] In some embodiments of the present application, the training module 440 can be configured to at least use the target sample data and the labeling results to train the initial data detection model to obtain the data detection model to be optimized; and use a second tuning algorithm to optimize the data detection model to obtain the target data detection model.
[0068] In some embodiments of the present application, the language model is an ERNIE model, the first tuning algorithm is a feature extraction algorithm, and the second tuning algorithm is a deep network fine-tuning algorithm.
[0069] Please refer to Figure 5 , Figure 5 The following is a block diagram showing the composition of the data detection device provided by some embodiments of the present application. It should be understood that the data detection device is similar to the above-mentioned Figure 3 Corresponding to the method embodiment, the device can execute each step involved in the above method embodiment. The specific functions of the data detection device can be found in the description above. To avoid repetition, the detailed description is appropriately omitted here.
[0070] Figure 5 The data detection device includes at least one software function module that can be stored in a memory or fixed in the data detection device in the form of software or firmware, and the data detection device includes: a data acquisition module 510, which is at least configured to obtain a data set to be detected, and the data set to be detected includes original data and manual annotation results corresponding to the original data; a data detection module 520, which is at least configured to input the data set to be detected into a Figure 3 In the target data detection model obtained in any embodiment, the detection result of the data set to be detected is obtained, wherein the detection result is used to characterize whether the target model detection result is consistent with the manual annotation result.
[0071] Some embodiments of the present application further provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the operations corresponding to any of the methods provided in the above embodiments.
[0072] Some embodiments of the present application further provide a computer program product, which includes a computer program, wherein when the computer program is executed by a processor, it can implement the operations corresponding to any of the methods provided in the above embodiments.
[0073] like Figure 6 As shown, some embodiments of the present application provide an electronic device 600, which includes: a memory 610, a processor 620, and a computer program stored in the memory 610 and executable on the processor 620, wherein the processor 620 can implement a method as described in any of the above embodiments when reading the program from the memory 610 through the bus 630 and executing the program.
[0074] Processor 620 can process digital signals and can include various computing architectures, such as a complex instruction set computer architecture, a reduced instruction set computer architecture, or an architecture that implements a combination of multiple instruction sets. In some examples, processor 620 can be a microprocessor.
[0075] The memory 610 can be used to store instructions executed by the processor 620 or data related to the execution of instructions. These instructions and / or data may include code for implementing some or all functions of one or more modules described in the embodiments of this application. The processor 620 of the embodiment of the present disclosure can be used to execute the instructions in the memory 610 to implement the method shown above. The memory 610 includes dynamic random access memory, static random access memory, flash memory, optical storage, or other memory known to those skilled in the art.
[0076] The foregoing is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included within the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined or explained in subsequent figures.
[0077] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
[0078] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
Claims
1. A method for training a data detection model, characterized in that: include: Obtaining an initial data detection model, wherein the initial data detection model is obtained by training a basic data detection model using an initial annotated dataset, the initial annotated dataset including initial data and initial labels corresponding to the initial data, the initial labels being generated after inputting the initial data into the basic data detection model; Inputting a sample data set into the initial data detection model to obtain a labeling detection result, wherein the labeling detection result is used to indicate whether the model labeling result is consistent with the manual labeling result, and the sample data set includes sample data and the manual labeling result corresponding to the sample data; Filtering target sample data from the sample data based on the labeled detection results, and labeling the target sample data by at least two people to obtain labeling results; Using at least the target sample data and the annotation results, the initial data detection model is trained to obtain a target data detection model, wherein the target data detection model is used to detect whether the target model detection result is consistent with the manual annotation result; Before training the initial data detection model using at least the target sample data and the annotation results, the method further includes: Acquire remaining sample data except the target sample data from the sample data; The step of training the initial data detection model by at least using the target sample data and the annotation result includes: Training the initial data detection model using the target sample data and the annotation results, as well as the remaining sample data and the manual annotation results corresponding to the remaining sample data; Among them, the training data set for training the initial data detection model contains two types of data. The first type of data is the target sample data and the annotation results corresponding to the target sample data, and the second type of data is the remaining sample data and the manual annotation results corresponding to the remaining sample data. When training the initial data detection model, the learning weight value of the second type of data is set to be greater than the learning weight value of the first type of data.
2. The method according to claim 1, wherein Before acquiring the initial data detection model, the method further includes: Use the basic data set to train the language model and obtain the basic data detection model to be optimized; The basic data detection model to be optimized is optimized using a first tuning algorithm to obtain the basic data detection model.
3. The method according to claim 2, wherein The step of training the initial data detection model using at least the target sample data and the annotation result to obtain a target data detection model includes: Using at least the target sample data and the annotation results, the initial data detection model is trained to obtain a data detection model to be optimized; The data detection model to be optimized is optimized using a second tuning algorithm to obtain the target data detection model.
4. The method according to claim 3, wherein The language model is an ERNIE model, the first tuning algorithm is a feature extraction algorithm, and the second tuning algorithm is a deep network fine-tuning algorithm.
5. A data detection method, characterized in that: include: Acquire a data set to be tested, the data set to be tested including original data and manual annotation results corresponding to the original data; The data set to be tested is input into the target data detection model obtained by the method according to any one of claims 1 to 4 to obtain the detection result of the data set to be tested, wherein the detection result is used to characterize whether the target model detection result is consistent with the manual annotation result.
6. A device for training a data detection model, characterized in that: include: an acquisition module configured to acquire an initial data detection model, wherein the initial data detection model is obtained by training a basic data detection model using an initial annotated dataset, the initial annotated dataset including data to be annotated and labels corresponding to the data to be annotated, the labels corresponding to the data to be annotated being generated after the data to be annotated is input into the basic data detection model; A result module is configured to input a sample data set into the initial data detection model to obtain a labeling detection result, wherein the labeling detection result is used to indicate whether the model labeling result is consistent with the manual labeling result, and the sample data set includes sample data and the manual labeling result corresponding to the sample data; a screening module configured to screen target sample data from the sample data based on the labeling detection results, and perform at least two labeling operations on the target sample data to obtain labeling results; a training module configured to train the initial data detection model using at least the target sample data and the annotation result to obtain a target data detection model, wherein the target data detection model is used to detect whether the target model detection result is consistent with the manual annotation result; The screening module is further configured to obtain the remaining sample data in the sample data except the target sample data; the training module is further configured to train the initial data detection model using the target sample data and the annotation results, as well as the remaining sample data and the manual annotation results corresponding to the remaining sample data; Among them, the training data set for training the initial data detection model contains two types of data. The first type of data is the target sample data and the annotation results corresponding to the target sample data, and the second type of data is the remaining sample data and the manual annotation results corresponding to the remaining sample data. When training the initial data detection model, the learning weight value of the second type of data is set to be greater than the learning weight value of the first type of data.
7. A data detection device, characterized in that: include: A data acquisition module is configured to acquire a data set to be detected, wherein the data set to be detected includes original data and manual annotation results corresponding to the original data; The data detection module is configured to input the data set to be detected into the target data detection model obtained by the method according to any one of claims 1 to 4, and obtain the detection result of the data set to be detected, wherein the detection result is used to characterize whether the target model detection result is consistent with the manual annotation result.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the program can implement the method according to any one of claims 1 to 5 when executed by a processor.
9. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor can implement the method according to any one of claims 1 to 5 when executing the program.
Citation Information
Patent Citations
Named entity recognition method and device, computer equipment and storage medium
CN110704633A
Target detection method and related equipment
CN113408566A