Method, device and electronic device for acquiring labeled data in the medical field
Through the cyclic update method, the entity recognition model and the medical terminology database calibration data are used to solve the problem of difficulty in obtaining annotated data in the medical field, achieve efficient and low-cost high-quality data set generation, and provide accurate training data for medical models. .
Patent Information
- Application Number
- CN202311864741.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-29
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2043-12-29
AI Technical Summary
The difficulty in obtaining annotated data in the medical field has led to a reduction in the accuracy of medical entity recognition models and text classification models. The amount of annotated data in the existing technology is sparse and highly specialized, making it difficult to meet the demand for efficient and high-quality data acquisition.
By obtaining the labeled data and the data to be labeled, using the preset entity recognition model for entity recognition, and calibrating the labeling results based on the medical terminology database, the data set is updated cyclically until the end conditions are met, and high-quality labeling data is generated.
In the case of limited annotation data, efficient and high-quality data set expansion is achieved, providing sufficient and accurate training data for models in the medical field, reducing annotation costs, and improving model accuracy and robustness.
Smart Images

Figure CN117875319B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device, and computer-readable storage medium for acquiring annotated data in the medical field. Background Art
[0002] In the training process of the medical knowledge question-answering model, medical entity recognition technology and medical field text classification are two crucial technical tasks. The medical entity recognition task aims to identify the important medical entities involved in the question, such as lesion sites, diseases, drugs, etc., to provide key information for subsequent problem processing. Medical field text classification can classify text into designated medical subject categories or further subject knowledge categories and other medical sub-fields to ensure that the medical knowledge question-answering model can provide answers with high accuracy and professionalism. The training of the entity recognition model for the medical entity recognition task and the text classification model for the medical text classification task requires labeled data of medical field texts. The quality of labeled data directly affects the accuracy of entity recognition and text classification.
[0003] However, due to the particularity of the medical field, data annotation requires a high degree of professionalism. Usually, the labeled samples need to be processed by professionals in the medical field, and it is difficult to obtain labeled data. In the existing technology, the amount of labeled data is scarce, which directly leads to the reduction of the accuracy of the entity recognition model and text classification model trained based on the labeled data.
[0004] It can be seen that in the existing technology, the method of obtaining labeled data in the medical field needs to be improved urgently. Summary of the invention
[0005] The embodiments of the present application provide a method for acquiring annotated data in the medical field, an apparatus, an electronic device, and a storage medium, which can efficiently and high-quality generate annotated data in the medical field and provide training data support for entity recognition models, text classification models, etc. in the medical field.
[0006] In a first aspect, an embodiment of the present application provides a method for acquiring annotated data in the medical field, comprising:
[0007] Acquire a first data set consisting of labeled data and a second data set consisting of data to be labeled, wherein the labeled data is: medical field text labeled with entity category labels;
[0008] Based on the labeled data in the first data set, training a preset entity recognition model;
[0009] Using the trained entity recognition model to perform entity recognition on each piece of data to be labeled in the second data set, and obtaining a predicted value of a labeling result corresponding to each piece of data to be labeled;
[0010] Calibrate the predicted value of the annotation result based on a preset medical terminology database to obtain a calibration result corresponding to each piece of the data to be annotated;
[0011] Based on the calibration result, performing an update operation on the first data set and the second data set to convert the data to be labeled in the second data set into the labeled data in the first data set;
[0012] Jump to the step of executing the next round of training a preset entity recognition model based on the labeled data in the first data set, and the step of performing an update operation on the first data set and the second data set based on the calibration result, until the end labeling condition is met, and the labeled data in the first data set is output.
[0013] In a second aspect, an embodiment of the present application provides a device for acquiring annotated data in the medical field, comprising:
[0014] The module for acquiring labeled data and data to be labeled is used to acquire a first data set consisting of labeled data and a second data set consisting of data to be labeled, wherein the labeled data is: medical field text labeled with entity category labels;
[0015] An entity recognition model training module, used to train a preset entity recognition model based on the labeled data in the first data set;
[0016] A pre-labeling module, used to perform entity recognition on each piece of data to be labeled in the second data set using the trained entity recognition model, and obtain a labeling result prediction value corresponding to each piece of data to be labeled;
[0017] A labeling result calibration module, used to calibrate the labeling result prediction value based on a preset medical terminology database to obtain a calibration result corresponding to each piece of the data to be labeled;
[0018] a labeled data generating module, configured to perform an update operation on the first data set and the second data set based on the calibration result, so as to convert the data to be labeled in the second data set into the labeled data in the first data set;
[0019] The data set updating module is used to jump to the next round of calling the entity recognition model training module to the labeled data generation module until the end labeling condition is met, and output the labeled data in the first data set.
[0020] In a third aspect, an embodiment of the present application further discloses an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for acquiring medical field annotation data described in the embodiment of the present application is implemented.
[0021] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the method for acquiring annotated data in the medical field disclosed in an embodiment of the present application.
[0022] The method for acquiring annotated data in the medical field disclosed in an embodiment of the present application is through acquiring a first data set consisting of annotated data and a second data set consisting of data to be annotated, wherein the annotated data is: medical field text annotated with entity category labels; based on the annotated data in the first data set, a preset entity recognition model is trained; the trained entity recognition model is used to perform entity recognition on each data to be annotated in the second data set to obtain an annotation result prediction value corresponding to each data to be annotated; the annotation result prediction value is calibrated based on a preset medical terminology database to obtain a calibration result corresponding to each data to be annotated; based on the calibration result, an update operation is performed on the first data set and the second data set to convert the data to be annotated in the second data set into the annotated data in the first data set; jump to the step of performing the next round of the step of training the preset entity recognition model based on the annotated data in the first data set to the step of performing the update operation on the first data set and the second data set based on the calibration result, until the annotation end condition is met, and the annotated data in the first data set is output. This method makes full use of professional medical knowledge for supervision, and achieves the expansion of high-quality data sets under the conditions of limited labeled data and limited resources, providing sufficient and accurate training data for entity recognition and text classification in the medical field without manual labeling, which improves the efficiency of labeling data and reduces the cost of labeling.
[0023] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0025] Figure 1 It is a flow chart of a method for acquiring annotated data in the medical field disclosed in an embodiment of the present application;
[0026] Figure 2 It is a schematic diagram of the structure of the entity recognition model used in the embodiment of the present application;
[0027] Figure 3 is a schematic diagram of entity labeling results obtained by using an entity recognition model in an embodiment of the present application;
[0028] Figure 4 yes Figure 3 A schematic diagram of labeled data obtained after calibration of the entity labeling results;
[0029] Figure 5 It is a schematic diagram of the structure of a device for acquiring annotated data in the medical field disclosed in an embodiment of the present application;
[0030] Figure 6 A block diagram schematically shows an electronic device for executing the method according to the present application; and
[0031] Figure 7 A storage unit for holding or carrying a program code for implementing the method according to the present application is schematically shown. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0033] Reference Figure 1 , a method for acquiring annotated data in the medical field disclosed in an embodiment of the present application includes: steps 110 to 160.
[0034] Step 110: Acquire a first data set consisting of labeled data and a second data set consisting of data to be labeled.
[0035] The labeled data is: medical field text labeled with entity category labels.
[0036] The method for acquiring annotated data in the medical field disclosed in the embodiment of the present application is used to perform sample annotation on text data in the medical field, for example, to perform sample annotation on the data to be annotated in the second data set.
[0037] When the present application is implemented, it is also necessary to obtain annotated data in the medical field. The annotated data may be derived from a public data set in the medical field. In the embodiments of the present application, the annotating method of the annotated data is not limited.
[0038] The annotated data includes two parts: a text sequence and annotations. The text sequence can be a question description or other related questions in a question-answering application in the medical field, and the annotation is a description of the location and category of the entity in the text sequence. For example, the annotation can be used to describe which character in the text sequence is a medical entity, what category of medical subject entity it is, or what category of subject knowledge entity it is. The categories of the medical subject entity include, but are not limited to, internal medicine, surgery, pediatrics, obstetrics and gynecology, otolaryngology, ophthalmology, stomatology, dentistry, etc. The categories of the subject knowledge entity include, but are not limited to, one or more of the following: disease name, disease symptoms, diagnostic method, treatment method, medical equipment, medicine, organ tissue, biological noun, etc.
[0039] Optionally, a BIO tagging mechanism can be used to annotate named entities in a text sequence. BIO tagging is a sequence tagging method that is mainly used in natural language processing tasks such as named entity recognition. The BIO tagging mechanism marks each element in the sequence as B, I, or O, representing the start, middle, and non-entity of the entity, respectively, and marks the entity types corresponding to the tags B and I. In the embodiments of the present application, taking the use of the BIO tagging mechanism to annotate data as an example, the method for obtaining annotated data is illustrated. Those skilled in the art should understand that in the specific implementation process, other tagging mechanisms can also be used for data tagging, and the tagging mechanism used in the embodiments of the present application is not limited.
[0040] The data to be labeled is obtained after data preprocessing of the collected data. For example, data obtained from data sources such as Wikipedia, Hanwang Bookstore, and open source knowledge databases can be cleaned according to rules. Among them, the data cleaning process includes but is not limited to one or more of the following: removing HTML tags, deleting special characters, converting text to lowercase to ensure consistency, removing stop words to reduce noise, performing stemming or word form restoration to simplify vocabulary forms, removing numbers, processing abbreviations, removing redundant blanks, processing repeated characters, missing value processing, etc., so as to obtain several pieces of data. These data cleaning of the collected data to obtain the data to be labeled helps to improve the quality of generating labeled data based on the data to be labeled.
[0041] After processing, each piece of data to be labeled may include one sentence or multiple sentences. For example, a piece of data to be labeled may be: "I have chest pain, do I need an electrocardiogram?"
[0042] Generally speaking, labeled data resources in the medical field are scarce, while the data to be labeled is massive.
[0043] Step 120: training a preset entity recognition model based on the labeled data in the first data set.
[0044] Next, based on the labeled data in the first data set, a preset entity recognition model is trained. In the embodiment of the present application, the entity recognition model can adopt an entity recognition model in the prior art. Preferably, the entity recognition model can be a model decision tree model including multiple different branch entity recognition models as the entity recognition model. For example, Figure 2 The model decision tree model shown includes three different branch entity recognition models, where the three different branch entity recognition models are: BERT model cascade CRF layer (i.e. conditional random field), BiLSTM (Bidirectional LSTM) model cascade CRF layer, ERNIE (Enhanced Representation through KNowledge IntEgrat ion) model. Among them, the BERT model cascade CRF layer performs well in extracting semantic information from input text, the BiLSTM model performs well in extracting contextual information, and the ERNIE model is a pre-trained language model that models various types of knowledge (such as grammatical knowledge, semantic knowledge, and entity knowledge, etc.), thereby improving the performance of natural language understanding tasks.
[0045] These branch entity recognition models are in a parallel relationship. Several branch entity recognition models make decisions together to form a model tree containing multiple models to fully utilize the advantages of each branch entity recognition model and improve the accuracy and generalization of entity recognition.
[0046] During the training phase of the entity recognition model, each branch entity recognition model will provide its own entity annotation results, and after weight learning, the prediction value of the entity annotation result will be obtained. For example, for each piece of annotated data, the vector representation of the text sequence in the annotated data is input to each branch entity recognition model respectively. After each branch entity recognition model performs feature extraction and mapping processing on the input vector representation, the corresponding output vectors O1, O2, O3 are obtained respectively. Finally, the following formula is used: f = W1*O1+W2*O2+W3*O3 to perform weighted fusion on the output vectors of each branch entity recognition model included in the entity recognition model to obtain the entity recognition result of the text sequence in the input annotated data.
[0047] Wherein, W1, W2 and W3 represent the weights of the corresponding branch entity recognition models respectively. Afterwards, the model loss value is calculated according to the entity recognition results and annotations of each labeled data, and the parameters of each branch entity recognition model and the weights of each branch entity recognition model are optimized based on the model loss value, so as to train the entity recognition model. In some optional embodiments, if each branch entity recognition model selects a pre-trained model, only the weights of each branch entity recognition model can be optimized.
[0048] For the training process of the entity recognition model, please refer to the prior art and will not be repeated in the embodiments of this application.
[0049] In the embodiment of the present application, by using a branch entity recognition model with a smaller parameter scale for voting training, the small-volume branch entity recognition model can take advantage of voting to learn the feature extraction capabilities that only large-volume models have, thereby achieving the advantage of low entity recognition model training costs. In addition, the entity recognition model is obtained by voting learning through multiple branch entity recognition models. In the inference stage, the entity labeling results obtained through voting learning are helpful to improve the accuracy of functional entity recognition and the robustness of the input text sequence.
[0050] Step 130: Use the trained entity recognition model to perform entity recognition on each piece of data to be labeled in the second data set to obtain a labeling result prediction value corresponding to each piece of data to be labeled.
[0051] After the entity recognition model is trained, in the data labeling stage, for each piece of data to be labeled in the second data set, the text vector of the text sequence in the data to be labeled can be obtained respectively, and then the text vector of the text sequence in each piece of data to be labeled can be input into the entity recognition model respectively. The entity recognition model is used to perform entity recognition on the text vector of each input text sequence respectively, and the entity labeling result corresponding to each piece of data to be labeled is obtained.
[0052] Optionally, the entity recognition model is a model decision tree model including multiple different branch entity recognition models, and the entity recognition model obtained by training is used to perform entity recognition on each data to be labeled in the second data set to obtain the labeling result prediction value corresponding to each data to be labeled, including: for each data to be labeled in the second data set, each branch entity recognition model is used to perform entity recognition on the data to be labeled to obtain the encoding vector output by each branch entity recognition model; the encoding vector output by each branch entity recognition model is weighted and fused to obtain the labeling result prediction value corresponding to each data to be labeled. The multiple different branch entity recognition models use different entity recognition algorithms.
[0053] For example, for a piece of data S to be annotated, it is first converted into a text vector X suitable for the input form requirements of the entity recognition model. After that, the text vector X is respectively input into the branch entity recognition model of the cascade CRF layer of the BERT model to obtain the first encoding vector O1, the text vector X is input into the branch entity recognition model of the cascade CRF layer of the BiLSTM model to obtain the second encoding vector O2, and the text vector X is input into the ERNIE branch entity recognition model to obtain the third encoding vector O3. Then, the first encoding vector O1, the second encoding vector O2, and the third encoding vector O3 obtained by the three branch entity recognition models are weighted and summed with the decision weights obtained by training to obtain the annotation result prediction value corresponding to the data S to be annotated. Among them, the annotation result prediction value can be the label of each element in the data S to be annotated (i.e., the text sequence) annotated with the BIO label mechanism, which is used for the position and type of the entity identified in the data S to be annotated. For example, it can be identified whether each character in the data S to be annotated belongs to an entity, and which medical subject category the entity belongs to, or which subject knowledge category the entity belongs to.
[0054] By performing entity recognition on each piece of data to be labeled in the second data set, a prediction value of a labeling result corresponding to each piece of data to be labeled can be obtained.
[0055] In an embodiment of the present application, entity recognition models of different classification levels can be trained based on the labeled data. For example, an entity recognition model for medical subject entity recognition can be trained based on the labeling information of medical subject entities in the labeled data, and an entity recognition model for subject knowledge entity recognition can be trained based on the labeling information of subject knowledge entities in the labeled data. Accordingly, when labeling the data to be labeled, two entity recognition models can be used to identify the medical subject entity and the subject knowledge entity in a piece of data to be labeled, so as to obtain the labeling result prediction value of each piece of data to be labeled, including: the medical subject entity and / or the subject knowledge entity.
[0056] Step 140: calibrate the predicted value of the annotation result based on a preset medical terminology database to obtain a calibration result corresponding to each piece of the data to be annotated.
[0057] Since the labeled data samples are scarce, the entity recognition model trained based on a small amount of labeled data may have errors in the inference results of the data to be labeled. Next, the predicted value of the labeling result of each piece of data to be labeled is calibrated based on a preset medical terminology database to improve the accuracy of the labeling result. The preset medical terminology database can be a public preset medical terminology database.
[0058] Optionally, the annotation result prediction value is calibrated based on a preset medical terminology database to obtain a calibration result corresponding to each piece of the data to be annotated, including: obtaining a predicted entity included in the data to be annotated based on the annotation result prediction value; performing similarity matching between the predicted entity and each keyword in the preset medical terminology database to obtain a matching result; in response to the matching result indicating that the keyword that meets the preset similarity condition with the predicted entity is matched, calibrating the annotation result prediction value and / or the data to be annotated based on the matched keyword to obtain a calibration result indicating successful calibration corresponding to the data to be annotated, wherein the calibration result includes: annotated data generated based on the keyword and / or the annotation result prediction value and the data to be annotated; in response to the matching result indicating that the keyword that meets the preset similarity condition with the predicted entity is not matched, obtaining a calibration result indicating failed calibration corresponding to the data to be annotated.
[0059] The data to be labeled is "I have a little chest pain, do I need an electrocardiogram?", and the predicted value of the labeling result obtained by performing entity recognition in the above steps is Figure 3Taking the annotation results shown in as an example, the identified medical entities include: "chest pain" and "electrocardiogram". The predicted values of the subject knowledge categories corresponding to these two medical entities X1 represent disease symptoms, and X2 represent diagnostic methods. First, according to the annotation result prediction values, the predicted entities "chest pain" and "electrocardiogram" included in the data to be annotated are obtained.
[0060] Afterwards, the two predicted entities are matched with each keyword in the preset medical term database for similarity to obtain matching results. For example, if the similarity between the predicted entity "chest pain" and the medical term "chest pain" in the preset medical term database is greater than the preset similarity threshold, and the similarity between the predicted entity "electrocardiogram" and the medical term "electrocardiogram" in the preset medical term database is greater than the preset similarity condition, then a matching result can be obtained in which the keyword in the preset medical term database that matches the predicted entity and meets the preset similarity condition can be obtained. If the predicted entity "chest pain" or "electrocardiogram" does not match a keyword in the preset medical term database that has a similarity greater than the preset similarity threshold, then a matching result can be obtained in which the keyword in the preset medical term database that does not match the predicted entity and meets the preset similarity condition can be obtained.
[0061] In some optional embodiments, each keyword in the preset medical terminology database is pre-associated with a medical subject category and a subject knowledge category. For example, the medical subject category associated with the keyword "chest pain" is internal medicine, and the associated subject knowledge category is disease symptoms. Therefore, after determining the keywords in the preset medical terminology database for predicting entity matching, the medical subject category and subject knowledge category corresponding to each keyword can be further determined.
[0062] In some optional embodiments, the preset medical terminology database is composed of multiple sub-databases or data tables. The preset medical terminology database includes: subject name keywords of different medical subject categories, and subject knowledge keywords of each subject knowledge category under each medical subject category. The subject name keywords of medical subjects are stored in a database or data table, and the subject knowledge keywords of each medical subject category are stored in different databases or data tables. In this way, in the process of keyword matching, a step-by-step matching method can be adopted to improve the efficiency of keyword matching.
[0063] Optionally, the similarity matching of the predicted entity with each keyword in a preset medical terminology database to obtain a matching result includes: similarity matching of the predicted entity with the subject name keywords in the preset medical terminology database; in response to matching the subject name keywords, using the subject knowledge keywords of the medical subject category corresponding to each of the matched subject name keywords as verification data sources, and splicing and combining the predicted entities matched with each of the subject name keywords with the predicted entities that did not match any subject name keywords to obtain a spliced entity, and then performing similarity matching of the spliced entity with the corresponding verification data source to obtain a matching result; in response to not matching the subject name keywords, obtaining a matching result indicating that the keywords were not matched.
[0064] Among them, the subject name keywords include but are not limited to one or more of the following: "Internal Medicine", "Surgery", "Pediatrics", "Otolaryngology", "Ophthalmology", "Stomatology", "Dentistry", etc. Correspondingly, the medical subject categories corresponding to the subject name keywords include but are not limited to one or more of the following: Internal Medicine, Surgery, Pediatrics, Obstetrics and Gynecology, Otolaryngology, Ophthalmology, Stomatology, Dentistry, etc. The subject knowledge keywords include but are not limited to one or more of the following: disease names (such as "heart disease", "conjunctivitis", etc.), disease symptoms (such as "chest pain", "dry and itchy eyes", etc.), treatment methods (such as "oral azithromycin", etc.), medical equipment (such as "blood pressure monitor", etc.), drugs (such as "azithromycin", etc.), organ tissues (such as "skin", etc.), biological terms (such as "bacterial culture", etc.), etc.
[0065] Taking the data to be annotated as "My eyes are dry and itchy, which eye drops are better?" as an example, after the above steps for entity recognition, the annotation results can be: the medical subject category of the predicted entity "eye" is "ophthalmology", and the subject knowledge category of the predicted entity "eye drops" is "therapeutic drugs". First, each predicted entity is similarly matched with the preset medical term database that stores the subject name keywords of medical subjects, and it can be obtained that the predicted entity "eye" matches the medical subject name keyword "ophthalmology" in the preset medical term database. Then, the vector representation of the predicted entity "ophthalmology" and the splicing vector of "eye drops" are spliced into an entity vector, and matched with the subject knowledge keywords in the preset medical term database of the subject knowledge of the medical subject "ophthalmology" to obtain a matching result. If the keyword is matched in the preset medical term database of the subject knowledge of the medical subject category "ophthalmology", it is considered that the predicted entity matches the keyword in the preset medical term database successfully. At this time, the successfully matched keywords, as well as the medical subject and subject knowledge category to which the successfully matched keywords belong, are recorded for subsequent use. If a keyword is matched in a preset medical terminology database of subject knowledge of the medical subject category "ophthalmology", it is considered that the predicted entity fails to match the keyword in the preset medical terminology database.
[0066] If the data to be annotated is text in a non-medical field, then entity recognition is performed through the aforementioned steps, and the predicted entity obtained will not be successfully matched to the medical subject when similarity matching is performed with the preset medical terminology database that stores the subject name keywords of the medical subject. In this case, a matching result will be obtained that the data to be annotated does not match the medical field keyword.
[0067] For example, based on the vector matching method of Facebook AI Simi lari ty Search (a similar vector search method), the medical subject name keywords can be matched from the preset medical terminology database. If the medical subject name keywords are matched, the medical subject category corresponding to the matched medical subject name keywords is used as the matching subject category. Subsequently, the vector of the successfully labeled prediction entity is spliced with other prediction entities to be judged, and the subject knowledge keywords of the matching subject category are matched again in the preset medical terminology database. If the keywords are successfully matched, it is considered that the prediction entity in the data to be labeled is successfully labeled. Otherwise, it is considered that the prediction entity is labeled incorrectly.
[0068] The above are two feasible implementation methods for matching predicted entities with keywords in a preset medical terminology database. In specific implementation, other methods can also be used to match predicted entities with keywords in a preset medical terminology database according to annotation needs, which will not be listed one by one in the embodiments of this application.
[0069] After obtaining the keyword matching result, the annotation result prediction value is further calibrated according to the matching result to obtain a calibration result.
[0070] As mentioned above, the preset medical terminology database includes: subject name keywords of different medical subject categories, and subject knowledge keywords of each subject knowledge category under each medical subject category. Optionally, the prediction value of the annotation result and / or the data to be annotated are calibrated according to the keywords obtained by matching to obtain the calibration result indicating successful calibration corresponding to the data to be annotated, including: sub-steps S1 to S5.
[0071] Sub-step S1, determining the prediction entity to be calibrated as the target prediction entity according to the consistency between the medical subject category and the subject knowledge category corresponding to the matched keywords.
[0072] First, for a piece of data to be labeled, the successfully matched predicted entities may all correspond to the same medical subject or to different medical subjects. If the successfully matched predicted entities in a piece of data to be labeled correspond to different medical subjects, it is necessary to select the predicted entities belonging to the same medical subject according to the pre-set strategy to generate labeled data.
[0073] Optionally, the prediction entity to be calibrated is determined as a target prediction entity based on the consistency of the medical subject category and the subject knowledge category corresponding to the matched keywords, including: when the matched keywords correspond to different medical subject categories and / or to different subject knowledge categories, the prediction entity matching the target keyword is selected according to a preset strategy as the target prediction entity, wherein the target keyword is: a subject name keyword and a subject knowledge keyword corresponding to a medical subject category. For example, a piece of data to be annotated includes 3 prediction entities, wherein prediction entity 1 matches the name keyword of medical subject category A, prediction entity 2 matches the name keyword of medical subject category B, and prediction entity 3 matches the subject knowledge keyword of a subject knowledge category of medical subject category A. Then, prediction entity 1 and prediction entity 3 corresponding to medical subject category A in the data to be annotated can be considered as target prediction entities for subsequent annotation, so that the obtained annotation results are suitable for training text classification models in the medical field.
[0074] Sub-step S2, according to the similarities and differences between the target prediction entity and the matched keywords, use the matched keywords to perform entity calibration on the target prediction entity in the data to be labeled, so as to obtain calibrated data to be labeled.
[0075] Next, in order to improve the quality of the acquired annotated data, the text in the data to be annotated is further calibrated based on the professional terms in the preset medical terminology database.
[0076] Optionally, based on the similarities and differences between the target prediction entity and the matched keywords, the matched keywords are used to perform entity calibration on the target prediction entity in the data to be labeled to obtain calibrated data to be labeled, including: when the target prediction entity is different from the matched keywords, replacing the corresponding target prediction entity with the matched keywords to obtain calibrated data to be labeled; when the target prediction entity is the same as the matched keywords, retaining the target prediction entity to obtain calibrated data to be labeled.
[0077] Taking the above-mentioned prediction entity "chest pain" as an example, which matches the keyword "chest pain" in the preset medical term database, and the prediction entity "electrocardiogram" as an example, the target prediction entities determined in the above steps are: "chest pain" and "electrocardiogram". Since the target prediction entity "chest pain" is different from the keyword "chest pain" matched in the preset medical term database, the keyword "chest pain" matched in the preset medical term database is used to replace the target prediction entity "chest pain" in the data to be labeled. The target prediction entity "electrocardiogram" is the same as the keyword "electrocardiogram" matched in the preset medical term database, so there is no need to replace it. After the keyword replacement, the calibrated data to be labeled is: "I have a little chest pain. Do I need an electrocardiogram?"
[0078] Sub-step S3, calibrating the annotation result prediction value according to the position information of the target prediction entity in the calibration data to be annotated, to obtain a annotation result calibration value.
[0079] Next, the calibration data to be labeled is labeled. For example, the prediction value of the labeling result of the data to be labeled can be adjusted, and only the labeling information of the starting position and the middle position of the target prediction entity in the calibration data to be labeled after the keyword replacement is labeled. For the text of the non-target prediction entity, its labeling information is modified to non-entity labeling information. Taking the data to be labeled "I have a little chest pain, do I need an electrocardiogram?" as an example, the obtained calibration data to be labeled is: "I have a little chest pain, do I need an electrocardiogram?" Correspondingly, the calibration value of the labeling result of the calibration data to be labeled is as follows: Figure 4 shown.
[0080] Sub-step S4, generating labeled data according to the calibration data to be labeled and the calibration value of the labeling result.
[0081] Next, the calibrated data to be labeled is used as a text sequence, and the calibration value of the labeling result of the calibrated data to be labeled is used as a label to generate a labeled data.
[0082] Sub-step S5, obtaining a calibration result indicating successful calibration corresponding to the data to be labeled according to the generated labeled data.
[0083] In some optional embodiments, entity text calibration may not be performed on the predicted entity in the data to be annotated, and the annotation result prediction value may be calibrated only according to the position of the target predicted entity. Afterwards, the original data to be annotated is used as the text sequence, and the calibrated annotation result prediction value is used as the annotation to generate a piece of annotated data.
[0084] At this point, the labeling process for a piece of data to be labeled is completed. The generated labeled data is: data with the entity location and category labeled.
[0085] In some optional embodiments, after generating the labeled data according to the calibrated data to be labeled and the calibration value of the labeling result, the method further includes: setting a medical subject category label for the labeled data generated according to the data to be labeled according to the medical subject category corresponding to the keyword matched by the target predicted entity; or setting a subject knowledge category label for the labeled data generated according to the data to be labeled according to the subject knowledge category corresponding to the keyword matched by the target predicted entity. After generating the labeled data with labeled entity information according to the data to be labeled, further, in order to generate training data for a text classification model in the medical field, medical subject category labels and subject knowledge category labels may be set for the generated labeled data, so that the generated labeled data may be set with not only entity information labels but also classification labels.
[0086] Step 150: Based on the calibration result, an update operation is performed on the first data set and the second data set to convert the data to be labeled in the second data set into the labeled data in the first data set.
[0087] Optionally, based on the calibration result, performing an update operation on the first data set and the second data set, including: for the calibration result indicating successful calibration, supplementing the labeled data in the calibration result to the first data set, and removing the data to be labeled corresponding to the calibration result from the second data set, so as to perform an update operation on the first data set and the second data set.
[0088] After the above steps, the obtained calibration results include two cases: successful calibration and failed calibration. For the case of successful calibration, labeled data is further generated. Afterwards, the generated labeled data is added to the first data set to supplement the first data set, and at the same time, the unlabeled data that generated the labeled data is removed from the second data set, completing the conversion of the unlabeled data to the labeled data.
[0089] According to the above steps, entity recognition and calibration are performed for each piece of data to be labeled in the second data set, so as to realize a round of transformation from data to be labeled to labeled data. For the data to be labeled that fails the calibration, it will continue to be retained in the second data set for the next round of transformation.
[0090] Step 160, jump to the step of executing the next round of training a preset entity recognition model based on the labeled data in the first data set to the step of performing an update operation on the first data set and the second data set based on the calibration result, until the end labeling condition is met, and the labeled data in the first data set is output.
[0091] Among them, the end labeling condition includes but is not limited to one or more of the following: the second data set is empty, the second data set has not been updated during at least two consecutive rounds of updating operations on the first data set and the second data set according to the verification results, and the number of labeled data in the first data set reaches a preset number.
[0092] After a round of conversion from unlabeled data to labeled data, if the amount of labeled data in the first data set does not meet the requirement for training the classification model or training the entity recognition model, the next round of conversion from unlabeled data to labeled data can be iteratively performed. That is, the labeled samples in the updated first data set are used as training data, step 120 is performed to retrain the entity recognition model, and steps 130 to 150 are performed on the updated second data set to perform the next round of conversion from unlabeled data to labeled data.
[0093] The method for acquiring annotated data in the medical field disclosed in an embodiment of the present application is through acquiring a first data set consisting of annotated data and a second data set consisting of data to be annotated, wherein the annotated data is: medical field text annotated with entity category labels; based on the annotated data in the first data set, a preset entity recognition model is trained; the trained entity recognition model is used to perform entity recognition on each data to be annotated in the second data set to obtain an annotation result prediction value corresponding to each data to be annotated; the annotation result prediction value is calibrated based on a preset medical terminology database to obtain a calibration result corresponding to each data to be annotated; based on the calibration result, an update operation is performed on the first data set and the second data set to convert the data to be annotated in the second data set into the annotated data in the first data set; jump to the step of performing the next round of the step of training the preset entity recognition model based on the annotated data in the first data set to the step of performing the update operation on the first data set and the second data set based on the calibration result, until the annotation end condition is met, and the annotated data in the first data set is output. This method makes full use of professional medical knowledge for supervision, and achieves the expansion of high-quality data sets under the conditions of limited labeled data and limited resources, providing sufficient and accurate training data for entity recognition and text classification in the medical field without manual labeling, which improves the efficiency of labeling data and reduces the cost of labeling.
[0094] Furthermore, the predicted value of the annotation result is calibrated using a preset medical terminology database. By converting the entities in the sample data into standardized medical entities in the medical field, the quality of the annotation data is improved, and the understanding and processing level of the text classification model trained based on the generated annotated data can be improved, thereby improving the accuracy and reliability of text classification. On the other hand, by introducing a voting mechanism, the training data is continuously updated, and the robustness and generalization ability of the entity recognition model are improved, thereby continuously improving the accuracy of the predicted value of the annotation result and improving the quality of the generated entity annotation data.
[0095] Reference Figure 5 The present application also discloses a device for acquiring annotated data in the medical field, the device comprising:
[0096] The labeled data and to-be-labeled data acquisition module 510 is used to acquire a first data set consisting of labeled data and a second data set consisting of to-be-labeled data, wherein the labeled data is: medical field text labeled with entity category labels;
[0097] An entity recognition model training module 520, used to train a preset entity recognition model based on the labeled data in the first data set;
[0098] A pre-labeling module 530 is used to perform entity recognition on each piece of data to be labeled in the second data set using the trained entity recognition model to obtain a labeling result prediction value corresponding to each piece of data to be labeled;
[0099] The annotation result calibration module 540 is used to calibrate the annotation result prediction value based on a preset medical terminology database to obtain a calibration result corresponding to each piece of the data to be annotated;
[0100] A labeled data generating module 550 is used to perform an update operation on the first data set and the second data set based on the calibration result, so as to convert the data to be labeled in the second data set into the labeled data in the first data set;
[0101] The data set updating module 560 is used to jump to execute the next round of calling the entity recognition model training module 520 to the labeled data generating module 550 until the end labeling condition is met, and output the labeled data in the first data set.
[0102] Optionally, the entity recognition model is a model decision tree model including a plurality of different branch entity recognition models, and the pre-labeling module 530 is further used to:
[0103] For each piece of data to be labeled in the second data set, use each branch entity recognition model to perform entity recognition on the data to be labeled, and obtain an encoding vector output by each branch entity recognition model;
[0104] The encoding vectors output by each branch entity recognition model are weighted and fused to obtain a labeling result prediction value corresponding to each piece of the data to be labeled.
[0105] Optionally, the annotation result calibration module 540 is further configured to:
[0106] According to the predicted value of the annotation result, obtaining the predicted entity included in the data to be annotated;
[0107] Performing similarity matching between the predicted entity and each keyword in a preset medical terminology database to obtain a matching result;
[0108] In response to the matching result indicating that the keyword that meets the preset similarity condition with the predicted entity is matched, the annotation result prediction value and / or the data to be annotated are calibrated according to the matched keyword to obtain a calibration result indicating successful calibration corresponding to the data to be annotated, wherein the calibration result includes: annotated data generated according to the keyword and / or the annotation result prediction value and the data to be annotated;
[0109] In response to the matching result indicating that the keyword that satisfies a preset similarity condition with the predicted entity is not matched, a calibration result indicating calibration failure corresponding to the data to be annotated is obtained.
[0110] Optionally, the preset medical terminology database includes: subject name keywords of different medical subject categories, and subject knowledge keywords of each subject knowledge category under each medical subject category, and the calibration processing of the annotation result prediction value and / or the data to be annotated is performed according to the keywords obtained by matching to obtain the calibration result indicating successful calibration corresponding to the data to be annotated, including:
[0111] According to the consistency between the medical subject category and the subject knowledge category corresponding to the matched keywords, determining the prediction entity to be calibrated as the target prediction entity;
[0112] According to the similarities and differences between the target prediction entity and the matched keywords, the matched keywords are used to perform entity calibration on the target prediction entity in the data to be labeled, so as to obtain calibrated data to be labeled;
[0113] According to the position information of the target prediction entity in the calibration data to be labeled, calibrate the labeling result prediction value to obtain a labeling result calibration value;
[0114] Generate labeled data according to the calibration data to be labeled and the calibration value of the labeling result;
[0115] A calibration result indicating successful calibration corresponding to the data to be labeled is obtained according to the generated labeled data.
[0116] Optionally, determining the prediction entity to be calibrated as a target prediction entity according to the consistency between the medical subject category and the subject knowledge category corresponding to the matched keywords includes:
[0117] When the matched keywords correspond to different medical subject categories and / or to different subject knowledge categories, the prediction entity that matches the target keyword is selected according to a preset strategy as the target prediction entity, wherein the target keyword is: a subject name keyword and a subject knowledge keyword corresponding to a medical subject category.
[0118] Optionally, the step of performing entity calibration on the target prediction entity in the data to be labeled using the matched keywords according to the similarities and differences between the target prediction entity and the matched keywords to obtain the calibrated data to be labeled includes:
[0119] In the case where the target prediction entity is different from the matched keyword, the corresponding target prediction entity is replaced by the matched keyword to obtain calibrated data to be annotated;
[0120] In the case that the target prediction entity is the same as the matched keyword, the target prediction entity is retained to obtain calibrated data to be annotated.
[0121] Optionally, after generating the labeled data according to the calibration data to be labeled and the calibration value of the labeling result, the method further includes:
[0122] According to the medical subject category corresponding to the keyword matched by the target prediction entity, setting a medical subject category label for the labeled data generated according to the data to be labeled; or
[0123] According to the subject knowledge category corresponding to the keyword matched by the target prediction entity, a subject knowledge category label is set for the labeled data generated based on the data to be labeled.
[0124] Optionally, the labeled data generating module 550 is further configured to:
[0125] For the calibration result indicating successful calibration, the labeled data in the calibration result is added to the first data set, and the data to be labeled corresponding to the calibration result is removed from the second data set, so as to perform an update operation on the first data set and the second data set.
[0126] The device for acquiring medical field annotated data disclosed in the embodiment of the present application is used to implement the method for acquiring medical field annotated data described in the embodiment of the present application. The specific implementation methods of each module of the device will not be repeated here, and reference can be made to the specific implementation methods of the corresponding steps in the method embodiment.
[0127] The device for acquiring annotated data in the medical field disclosed in an embodiment of the present application acquires a first data set consisting of annotated data and a second data set consisting of data to be annotated, wherein the annotated data is: medical field text annotated with entity category labels; based on the annotated data in the first data set, a preset entity recognition model is trained; the trained entity recognition model is used to perform entity recognition on each data to be annotated in the second data set to obtain an annotation result prediction value corresponding to each data to be annotated; the annotation result prediction value is calibrated based on a preset medical terminology database to obtain a calibration result corresponding to each data to be annotated; based on the calibration result, an update operation is performed on the first data set and the second data set to convert the data to be annotated in the second data set into the annotated data in the first data set; jumps to the step of performing the next round of the training of the preset entity recognition model based on the annotated data in the first data set to the step of performing the update operation on the first data set and the second data set based on the calibration result, until the annotation end condition is met, and the annotated data in the first data set is output. This device makes full use of professional medical knowledge for supervision, and achieves the expansion of high-quality data sets under conditions of limited labeled data and limited resources, providing sufficient and accurate training data for entity recognition and text classification in the medical field without the need for manual labeling, which improves the efficiency of labeling data and reduces labeling costs.
[0128] Furthermore, the predicted value of the annotation result is calibrated using a preset medical terminology database. By converting the entities in the sample data into standardized medical entities in the medical field, the quality of the annotation data is improved, and the understanding and processing level of the text classification model trained based on the generated annotated data can be improved, thereby improving the accuracy and reliability of text classification. On the other hand, by introducing a voting mechanism, the training data is continuously updated, and the robustness and generalization ability of the entity recognition model are improved, thereby continuously improving the accuracy of the predicted value of the annotation result and improving the quality of the generated entity annotation data.
[0129] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0130] The above is a detailed introduction to a method and device for acquiring annotated data in the medical field provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
[0131] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0132] The various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components in the electronic device according to the embodiment of the present application. The present application can also be implemented as a device or apparatus program (e.g., computer program and computer program product) for executing part or all of the methods described herein. Such a program implementing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0133] For example, Figure 6An electronic device that can implement the method according to the present application is shown. The electronic device can be a PC, a mobile terminal, a personal digital assistant, a tablet computer, etc. The electronic device traditionally includes a processor 610 and a memory 620 and a program code 630 stored on the memory 620 and can be run on the processor 610, and the processor 610 implements the method described in the above embodiment when executing the program code 630. The memory 620 can be a computer program product or a computer-readable medium. The memory 620 can be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk or a ROM. The memory 620 has a storage space 6201 for the program code 630 of a computer program for executing any method step in the above method. For example, the storage space 6201 for the program code 630 can include various computer programs for implementing the various steps in the above method respectively. The program code 630 is a computer-readable code. These computer programs can be read from one or more computer program products or written into the one or more computer program products. These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks. The computer program includes a computer readable code, and when the computer readable code is executed on an electronic device, the electronic device is caused to execute the method according to the above embodiment.
[0134] The embodiment of the present application further discloses a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the method for acquiring medical field annotation data as described in the embodiment of the present application are implemented.
[0135] Such a computer program product may be a computer-readable storage medium, which may have a computer-readable storage medium having a Figure 6 The memory 620 in the electronic device shown in the figure is similar to the storage segment, storage space, etc. The program code can be compressed and stored in the computer-readable storage medium in an appropriate form. The computer-readable storage medium is generally as shown in the reference Figure 7 The portable or fixed storage unit. Generally, the storage unit includes computer readable code 630', which is a code read by a processor. When the code is executed by the processor, each step in the method described above is implemented.
[0136] The term "one embodiment", "embodiment" or "one or more embodiments" herein means that a particular feature, structure or characteristic described in conjunction with the embodiment is included in at least one embodiment of the present application. In addition, please note that the examples of the term "in one embodiment" here do not necessarily all refer to the same embodiment.
[0137] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0138] In the claims, any reference signs placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present application may be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.
[0139] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for acquiring annotated data in the medical field, characterized in that: The method comprises: Acquire a first data set consisting of labeled data and a second data set consisting of data to be labeled, wherein the labeled data is: medical field text labeled with entity category labels; Based on the labeled data in the first data set, training a preset entity recognition model; Using the trained entity recognition model to perform entity recognition on each piece of data to be labeled in the second data set, and obtaining a predicted value of a labeling result corresponding to each piece of data to be labeled; Calibrate the predicted value of the annotation result based on a preset medical terminology database to obtain a calibration result corresponding to each piece of the data to be annotated; Based on the calibration result, performing an update operation on the first data set and the second data set to convert the data to be labeled in the second data set into the labeled data in the first data set; Jump to the step of executing the next round of training the preset entity recognition model based on the labeled data in the first data set to the step of performing an update operation on the first data set and the second data set based on the calibration result, until the end labeling condition is met, and the labeled data in the first data set is output; The step of calibrating the predicted value of the annotation result based on a preset medical terminology database to obtain a calibration result corresponding to each piece of the data to be annotated includes: According to the predicted value of the annotation result, obtaining the predicted entity included in the data to be annotated; Performing similarity matching between the predicted entity and each keyword in a preset medical terminology database to obtain a matching result; In response to the matching result indicating that the keyword that satisfies a preset similarity condition with the predicted entity is matched, the annotation result prediction value and / or the data to be annotated are calibrated according to the matched keyword to obtain a calibration result indicating successful calibration corresponding to the data to be annotated, wherein the calibration result indicating successful calibration includes: annotated data generated according to the calibrated data to be annotated and the annotation result calibration value, the calibrated data to be annotated is obtained by replacing the predicted entity in the data to be annotated with the keyword matched to a preset medical terminology database, and the annotation result calibration value is obtained by calibrating the annotation result prediction value according to the position information of the predicted entity in the calibrated data to be annotated; In response to the matching result indicating that the keyword that satisfies a preset similarity condition with the predicted entity is not matched, a calibration result indicating calibration failure corresponding to the data to be annotated is obtained.
2. The method according to claim 1, characterized in that The entity recognition model is a model decision tree model including a plurality of different branch entity recognition models. The entity recognition model obtained by training is used to perform entity recognition on each piece of data to be labeled in the second data set to obtain a labeling result prediction value corresponding to each piece of data to be labeled, including: For each piece of data to be labeled in the second data set, use each branch entity recognition model to perform entity recognition on the data to be labeled, and obtain an encoding vector output by each branch entity recognition model; The encoding vectors output by each branch entity recognition model are weighted and fused to obtain a labeling result prediction value corresponding to each piece of the data to be labeled.
3. The method according to claim 1, characterized in that The preset medical terminology database includes: subject name keywords of different medical subject categories, and subject knowledge keywords of each subject knowledge category under each medical subject category. The calibration process is performed on the annotation result prediction value and / or the data to be annotated according to the matched keywords to obtain the calibration result indicating successful calibration corresponding to the data to be annotated, including: According to the consistency between the medical subject category and the subject knowledge category corresponding to the matched keywords, determining the prediction entity to be calibrated as the target prediction entity; According to the similarities and differences between the target prediction entity and the matched keywords, the matched keywords are used to perform entity calibration on the target prediction entity in the data to be labeled, so as to obtain calibrated data to be labeled; According to the position information of the target prediction entity in the calibration data to be labeled, calibrate the labeling result prediction value to obtain a labeling result calibration value; Generate labeled data according to the calibration data to be labeled and the calibration value of the labeling result; A calibration result indicating successful calibration corresponding to the data to be labeled is obtained according to the generated labeled data.
4. The method according to claim 3, characterized in that The step of determining the prediction entity to be calibrated as the target prediction entity based on the consistency between the medical subject category and the subject knowledge category corresponding to the matched keywords includes: When the matched keywords correspond to different medical subject categories and / or to different subject knowledge categories, the prediction entity that matches the target keyword is selected according to a preset strategy as the target prediction entity, wherein the target keyword is: a subject name keyword and a subject knowledge keyword corresponding to a medical subject category.
5. The method according to claim 3, characterized in that: According to the similarities and differences between the target prediction entity and the matched keywords, using the matched keywords to perform entity calibration on the target prediction entity in the data to be labeled to obtain the calibrated data to be labeled, including: In the case where the target prediction entity is different from the matched keyword, the corresponding target prediction entity is replaced by the matched keyword to obtain calibrated data to be annotated; In the case that the target prediction entity is the same as the keyword obtained by matching, the target prediction entity is retained to obtain calibrated data to be annotated.
6. The method according to claim 3, characterized in that: After generating the labeled data according to the calibration data to be labeled and the calibration value of the labeling result, the method further includes: According to the medical subject category corresponding to the keyword matched by the target prediction entity, setting a medical subject category label for the labeled data generated according to the data to be labeled; or, According to the subject knowledge category corresponding to the keyword matched by the target prediction entity, a subject knowledge category label is set for the labeled data generated based on the data to be labeled.
7. The method according to claim 1, characterized in that The performing an updating operation on the first data set and the second data set based on the calibration result includes: For the calibration result indicating successful calibration, the labeled data in the calibration result is added to the first data set, and the data to be labeled corresponding to the calibration result is removed from the second data set, so as to perform an update operation on the first data set and the second data set.
8. A device for acquiring annotated data in the medical field, characterized in that: The device comprises: The module for acquiring labeled data and data to be labeled is used to acquire a first data set consisting of labeled data and a second data set consisting of data to be labeled, wherein the labeled data is: medical field text labeled with entity category labels; An entity recognition model training module, used to train a preset entity recognition model based on the labeled data in the first data set; A pre-labeling module, used to perform entity recognition on each piece of data to be labeled in the second data set using the trained entity recognition model, and obtain a labeling result prediction value corresponding to each piece of data to be labeled; A labeling result calibration module, used to calibrate the labeling result prediction value based on a preset medical terminology database to obtain a calibration result corresponding to each piece of the data to be labeled; a labeled data generating module, configured to perform an update operation on the first data set and the second data set based on the calibration result, so as to convert the data to be labeled in the second data set into the labeled data in the first data set; A data set updating module, used to jump to the next round of calling the entity recognition model training module to the labeled data generating module until the end labeling condition is met, and output the labeled data in the first data set; The labeling result calibration module is further used to: According to the predicted value of the annotation result, obtaining the predicted entity included in the data to be annotated; Performing similarity matching between the predicted entity and each keyword in a preset medical terminology database to obtain a matching result; In response to the matching result indicating that the keyword that satisfies a preset similarity condition with the predicted entity is matched, the annotation result prediction value and / or the data to be annotated are calibrated according to the matched keyword to obtain a calibration result indicating successful calibration corresponding to the data to be annotated, wherein the calibration result includes: annotated data generated according to the calibrated data to be annotated and the annotation result calibration value, the calibrated data to be annotated is obtained by replacing the predicted entity in the data to be annotated with the keyword matched to a preset medical terminology database, and the annotation result calibration value is obtained by calibrating the annotation result prediction value according to the position information of the predicted entity in the calibrated data to be annotated; In response to the matching result indicating that the keyword that satisfies a preset similarity condition with the predicted entity is not matched, a calibration result indicating calibration failure corresponding to the data to be annotated is obtained.
9. An electronic device comprising a memory, a processor, and a program code stored in the memory and executable on the processor, wherein: When the processor executes the program code, the method for acquiring medical field annotation data as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having program code stored thereon, characterized in that: When the program code is executed by a processor, the steps of the method for acquiring medical field annotation data as described in any one of claims 1 to 7 are implemented.
