Medical entity relationship identification model training method and device, equipment and storage medium

By performing two-layer annotation on medical text samples, namely symptom range entities and auxiliary information entities, a medical entity relationship recognition model was trained, which solved the problem of complex entity recognition in traditional Chinese medicine diagnosis and treatment scenarios and achieved efficient and accurate entity relationship recognition.

CN116467446BActive Publication Date: 2026-04-14PING AN TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PING AN TECH (SHENZHEN) CO LTD
Filing Date
2023-04-12
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing technologies that can only extract word-level entities cannot meet the needs of complex medical named entity recognition in traditional Chinese medicine diagnosis and treatment scenarios, especially in the face of challenges such as the large number of entity types, the difficulty in defining boundaries, and the nesting problem.

Method used

By performing two-layer annotation on medical text samples, namely symptom range entities and symptom-related information entities, relational information labels are obtained, a medical entity relationship recognition model is trained, and the symptom range entity-assisted recognition model is used to distinguish the correspondence between symptom entities and related information entities.

Benefits of technology

It improves the accuracy and training efficiency of medical entity relationship recognition, meets the needs of entity relationship recognition in traditional Chinese medicine diagnosis and treatment scenarios, reduces the amount of computation, and improves the recognition effect of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116467446B_ABST
    Figure CN116467446B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of intelligent decision-making, and provides a medical entity relationship identification model training method, a medical entity relationship identification method, a device, equipment and a storage medium. The medical entity relationship identification model training method comprises the following steps: obtaining a medical text sample; labeling symptom range entities and symptom entities in the medical text sample to obtain a first labeled sequence; labeling symptom accessory information entities in the medical text sample to obtain a second labeled sequence; obtaining relationship information labels representing the corresponding relationship between the symptom entities and the symptom accessory information entities; training a preset medical entity relationship identification model according to the first labeled sequence, the second labeled sequence and the relationship information labels to obtain a trained medical entity relationship identification model, which is used to identify the corresponding relationship between the symptom entities and the symptom accessory information entities in a to-be-identified medical text. The application can meet the entity relationship identification requirement in the traditional Chinese medicine diagnosis and treatment scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent decision-making technology, and in particular to a training method for a medical entity relationship recognition model, a method, apparatus, device and storage medium for recognizing medical entity relationships. Background Technology

[0002] Medical named entity recognition, also known as proper name recognition, is a common task in natural language processing (NLP) used to identify entities in the medical field.

[0003] In AI-driven TCM (Traditional Chinese Medicine) scenarios, based on TCM diagnostic logic, the symptoms described by the patient, along with information such as the duration, frequency, and severity of those symptoms, are crucial for AI-driven TCM diagnosis and determine the effectiveness of downstream tasks. Therefore, medical named entity recognition in TCM scenarios requires a high level of expertise and is relatively complex, requiring the extraction of a significant amount of information. Furthermore, from a technical perspective, medical named entity recognition tasks in TCM scenarios face challenges such as the large number of entity types, difficulty in defining entity boundaries, and entity nesting. Existing recognition technologies that can only extract word-level entities cannot meet the recognition needs of TCM diagnostic and treatment scenarios. Summary of the Invention

[0004] The main purpose of this application is to provide a training method for a medical entity relationship recognition model, a method, device, equipment and storage medium for recognizing medical entity relationships, which aims to solve the technical problem that existing recognition technologies that can only extract word-level entities cannot meet the recognition needs in the context of traditional Chinese medicine diagnosis and treatment.

[0005] Firstly, this application provides a method for training a medical entity relationship recognition model, the method comprising:

[0006] Obtain medical text samples;

[0007] The symptom range entities and symptom entities in the medical text sample are labeled to obtain the first labeling sequence;

[0008] The symptom-related information entities in the medical text sample are annotated to obtain a second annotation sequence;

[0009] Obtain relationship information tags that represent the correspondence between the symptom entity and the symptom-related information entity;

[0010] Based on the first annotation sequence, the second annotation sequence, and the relationship information label, a preset medical entity relationship recognition model is trained to obtain a trained medical entity relationship recognition model. The trained medical entity relationship recognition model is used to identify the correspondence between symptom entities and symptom-related information entities in the medical text to be identified.

[0011] Secondly, this application also provides a method for identifying medical entity relationships, the method comprising:

[0012] Obtain the medical text to be recognized;

[0013] The medical text to be identified is identified based on a pre-trained medical entity relationship recognition model, thereby obtaining the correspondence between symptom entities and symptom-related information entities in the medical text to be identified.

[0014] Thirdly, this application also provides a training device for a medical entity relationship recognition model, the device comprising:

[0015] The first acquisition module is used to acquire medical text samples;

[0016] The first annotation module is used to annotate the symptom range entities and symptom entities in the medical text sample to obtain the first annotation sequence;

[0017] The second annotation module is used to annotate the symptom-related information entities in the medical text sample to obtain a second annotation sequence;

[0018] The second acquisition module is used to acquire relationship information tags that represent the correspondence between the symptom entity and the symptom-related information entity;

[0019] The training module is used to train a preset medical entity relationship recognition model based on the first annotation sequence, the second annotation sequence, and the relationship information label to obtain a trained medical entity relationship recognition model. The trained medical entity relationship recognition model is used to identify the correspondence between symptom entities and symptom-related information entities in the medical text to be identified.

[0020] Fourthly, this application also provides a computer device, the computer device including a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, it implements the steps of the medical entity relationship recognition model training method or the medical entity relationship recognition method described above.

[0021] Fifthly, this application also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the above-described method for training a medical entity relationship recognition model or a method for recognizing medical entity relationships.

[0022] This application discloses a method, apparatus, computer device, and readable storage medium for training a medical entity relationship recognition model. The method involves: acquiring a medical text sample; labeling symptom range entities and symptom entities in the medical text sample to obtain a first labeling sequence; labeling symptom-related information entities in the medical text sample to obtain a second labeling sequence; obtaining relationship information tags representing the correspondence between the symptom entities and the symptom-related information entities; and training a preset medical entity relationship recognition model based on the first labeling sequence, the second labeling sequence, and the relationship information tags to obtain a trained medical entity relationship recognition model. The trained medical entity relationship recognition model is used to identify the correspondence between symptom entities and symptom-related information entities in the medical text to be identified. By optimizing the annotation strategy for medical text samples, a novel approach is taken to add annotations for symptom range entities. This divides the annotation of medical text samples into two layers: symptom range entity annotation and symptom-related information entity annotation. On the one hand, this overcomes the problems of overlapping and complex entity annotations in traditional annotation methods. On the other hand, by utilizing symptom range entities, the medical entity relationship recognition model can effectively assist in achieving the training objective of distinguishing the correspondence between symptom entities and symptom-related information entities. This avoids the need to perform pairwise pairing and extraction of medical entity relationships for all entities in the medical text samples during training, greatly reducing related computations and effectively improving training efficiency and model performance. The trained medical entity relationship recognition model can accurately identify the correspondence between medical named entities, meeting the entity relationship recognition needs in traditional Chinese medicine diagnosis and treatment scenarios.

[0023] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0024] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 This is a flowchart illustrating an embodiment of the medical entity relationship recognition model training method of this application;

[0026] Figure 2 This is a flowchart illustrating the training of a preset medical entity relationship recognition model, as described in one embodiment of the training method for the medical entity relationship recognition model of this application.

[0027] Figure 3This is a flowchart illustrating an embodiment of the method for identifying medical entity relationships in this application;

[0028] Figure 4 A schematic block diagram of a medical entity relationship recognition model training device provided in an embodiment of this application;

[0029] Figure 5 This is a schematic block diagram of the structure of a computer device according to an embodiment of this application.

[0030] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0031] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0032] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.

[0033] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0034] It should be understood that, in order to clearly describe the technical solutions of the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish the same or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and the terms "first" and "second" are not necessarily different.

[0035] It should also be understood that the term "and / or" as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0036] This application provides a method for training a medical entity relationship recognition model, a method for recognizing medical entity relationships, an apparatus, a computer device, and a readable storage medium. The method for training the medical entity relationship recognition model aims to incorporate symptom range entities and utilize these entities to effectively assist the model in achieving the training objective of distinguishing the correspondence between symptom entities and symptom-related information entities. This improves training efficiency and model performance, enabling the trained model to accurately identify the correspondence between medical named entities, thus meeting the entity relationship recognition needs in traditional Chinese medicine scenarios.

[0037] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0038] Please see Figure 1 , Figure 1 This application provides a method for training a medical entity relationship recognition model. This method is mainly applied to a medical entity relationship recognition model training device, which can be a terminal device with data processing capabilities, such as a server.

[0039] The server can be a standalone server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and data analysis platforms.

[0040] like Figure 1 As shown, the training method for the medical entity relationship recognition model includes steps S101 to S105.

[0041] Step S101: Obtain medical text samples.

[0042] For example, medical text samples can be obtained from a preset database, by receiving medical text samples input by the user, or by obtaining medical text samples from a medical cloud platform (a medical and health service cloud platform created using cloud computing based on new technologies such as cloud computing, mobile technology, multimedia, 4G communication, big data, and the Internet of Things, combined with medical technology).

[0043] Medical text samples can be electronic healthcare records, digitized personal health records, and other electronic records with archival value. Taking AI-assisted TCM diagnosis and treatment as an example, medical text samples include textual information describing the patient's symptoms, such as "I've had night sweats for four or five days, it's really bad, and now my palms and soles are also prone to sweating," "I have a bit of a cold, I've been coughing a lot for the past few days, but I don't have a headache," and "Sometimes I have severe menstrual cramps, and my back hurts when it's about to start."

[0044] Step S102: Label the symptom range entities in the medical text sample to obtain the first labeling sequence.

[0045] The medical text sample contains multiple medical named entities. Medical named entities refer to custom entities in medical text that have special meaning or strong referentiality.

[0046] A custom symptom range entity refers to a symptom and its related attribute information, including multiple entities such as the symptom and its corresponding conditions, time, frequency, location, and severity. For example, taking the medical text "Sometimes I have severe abdominal pain when I have my period, and my back hurts when it's about to start," the symptom range entities are: "Sometimes I have severe abdominal pain when I have my period" and "My back hurts when it's about to start." The symptom range entity contains the symptom entities: "severe abdominal pain" and "back pain."

[0047] Furthermore, symptom-related attribute information entities (condition, time, frequency, location, severity) are defined as symptom-related information entities. For example, taking the medical text "always coughs badly at night and doesn't get better" as an example, the symptom-related information entities are: "Time: [Evening]", "Severity: [Severe]", and "Frequency: [Frequent]".

[0048] To better understand the definitions of symptom scope entities and symptom-related information entities, the entities in medical texts are categorized by label, and corresponding label descriptions and examples are provided. The label descriptions and examples for each entity are shown in the table below:

[0049]

[0050]

[0051]

[0052] It should be noted that the medical text samples are used to train a pre-defined medical entity relationship recognition model. The recognition task of this trained model differs from traditional medical entity recognition models, which can only recognize word-level entities. This trained model needs to identify symptom-related information entities under their corresponding symptoms; that is, it is used to identify the correspondence between symptom entities and their related information entities. Symptom range entities can assist the medical entity relationship recognition model in making decisions regarding this recognition task.

[0053] Therefore, the annotation strategy is optimized, and the annotation method of traditional medical named entity recognition is creatively improved. The annotation of symptom range entities is added, and the annotation is divided into two layers: symptom range entity annotation and symptom-related information entity annotation.

[0054] The symptom range entities and symptom-related information entities in the medical text samples can be labeled according to the above label names to ensure the accuracy of the labeling. It is understood that the label types and descriptions in the table above are only for illustrative purposes and do not require labeling.

[0055] We can prioritize labeling symptom range entities and symptom entities in medical text samples to obtain the first labeling sequence.

[0056] In some embodiments, BIO annotation can be used to annotate symptom range entities and symptom entities in the medical text sample. Specifically, each element in the medical text sample is labeled as "B-FW", "I-FW", "I-FW-ZZ", or "O". Here, "B-FW" indicates that the segment containing this element belongs to the FW (symptom range) type and this element is at the beginning of the segment; "I-FW" indicates that the segment containing this element belongs to the FW (symptom range) type and this element is in the middle or at the end of the segment; "I-FW-ZZ" indicates that the segment containing this element belongs to the FW-ZZ (symptoms included in the symptom range) type; and "O" indicates that this element does not belong to any type.

[0057] For example, taking the medical text sample "Sometimes I have severe abdominal pain during my period, and my back hurts at the beginning of my period" as an example, "Sometimes I have severe abdominal pain during my period" and "My back hurts at the beginning of my period" belong to the symptom range entity, which includes "severe abdominal pain" and "back pain" as symptom entities. Using BIO annotation to annotate them, the first annotation sequence is as follows:

[0058]

[0059]

[0060] That is, the first annotation sequence is a character sequence containing symptom range entities and symptom entities: "[O, O, B-FW, I-FW, I-FW, I-FW, I-FW, I-FW, I-FW, I-FW-ZZ, I-FW-ZZ, I-FW-ZZ, I-FW-ZZ, I-FW-ZZ, I-FW-ZZ, I-FW-ZZ, O, B-FW, I-FW, I-FW, I-FW, I-FW, I-FW, I-FW, I-FW, I-FW, I-FW, I-FW, I-FW-ZZ, I-FW-ZZ]".

[0061] Step S103: Annotate the symptom-related information entities in the medical text sample to obtain a second annotation sequence;

[0062] The symptom-related information entities in the medical text sample are labeled to obtain the second labeling sequence.

[0063] In some embodiments, BIO annotation can also be used to annotate symptom-related information entities in medical text samples. Specifically, each element in the medical text sample is labeled as "B-TJ", "I-TJ", "B-SJ", "I-SJ", "B-PL", "I-PL", "B-BU", "I-BU", "B-CD", "I-CD", or "O". In this context, "B-TJ" indicates that the segment containing this element belongs to the TJ (condition) type and this element is at the beginning of the segment; "B-TJ" indicates that the segment containing this element belongs to the TJ (condition) type and this element is in the middle or at the end of the segment; "B-SJ" indicates that the segment containing this element belongs to the SJ (time) type and this element is at the beginning of the segment; "I-SJ" indicates that the segment containing this element belongs to the SJ (time) type and this element is in the middle or at the end of the segment; "B-PL" indicates that the segment containing this element belongs to the PL (frequency) type and this element is at the beginning of the segment; "I-PL" indicates that the segment containing this element belongs to the PL (frequency) type and this element is in the middle or at the end of the segment; "B-BU" indicates that the segment containing this element belongs to the BU (location) type and this element is at the beginning of the segment; "I-BU" indicates that the segment containing this element belongs to the BU (location) type and this element is in the middle or at the end of the segment; and "O" indicates that this element does not belong to any type.

[0064] For example, taking the medical text sample "Sometimes my period cramps are severe, and my back hurts at the beginning of my period" as an example, the symptom-related information entities are: "sometimes" belongs to the frequency entity, "having my period" belongs to the condition entity, "stomach" belongs to the location entity, "severe" belongs to the degree entity, "at the beginning of my period" belongs to the condition entity, and "back" belongs to the location entity. Using BIO annotation, the resulting second annotation sequence is as follows:

[0065]

[0066] That is, the second annotation sequence is a character sequence containing symptom-related information entities: "[O, O, B-PL, I-PL, I-PL, B-TJ, I-TJ, I-TJ, B-BU, I-BU, O, O, B-CD, I-CD, O, B-TJ, I-TJ, I-TJ, I-TJ, I-TJ, I-TJ, I-TJ, I-TJ, I-TJ, B-BU, O]".

[0067] In some embodiments, to ensure the accuracy of the first and second annotation sequences, the first and second annotation sequences can also be sent to the review end for review by reviewers to verify the correctness of the first and second annotation sequences based on medical text samples. If incorrect, the sequences are re-annotated and returned through the review end, which helps to improve the training accuracy of the medical entity relationship recognition model.

[0068] Step S104: Obtain relationship information tags that represent the correspondence between the symptom entity and the symptom-related information entity.

[0069] Since the trained medical entity relationship recognition model needs to identify symptom-related information entities under the corresponding symptoms, it is also necessary to extract relationship information labels that represent the correspondence between symptom entities and symptom-related information entities in the medical text sample.

[0070] In some embodiments, the symptom entity-symptom-related information entity pairs in the medical text sample can be pre-labeled with correspondence information tags to obtain relationship information labels. That is, the relationship information tags represent the correspondence between symptom-related information entities and symptom entities. For example, the relationship information tags for symptom entity-symptom-related information entity pairs are shown below:

[0071]

[0072]

[0073] Step S105: Based on the first annotation sequence, the second annotation sequence, and the relationship information label, train the preset medical entity relationship recognition model to obtain the trained medical entity relationship recognition model, wherein the trained medical entity relationship recognition model is used to identify the correspondence between symptom entities and symptom-related information entities in the medical text to be identified.

[0074] Subsequently, the preset medical entity relationship recognition model is trained based on the aforementioned first annotation sequence, second annotation sequence, and relational information labels of symptom entity-symptom-related information entity pairs.

[0075] Specifically, the pre-defined medical entity relationship recognition model includes a symptom range entity recognition sub-model, a symptom-related information entity recognition sub-model, and an entity relationship recognition sub-model. The symptom range entity recognition sub-model can use a BERT+CRF model, the symptom-related information entity recognition sub-model can also use a BERT+CRF model, and the entity relationship recognition sub-model can use a softmax classifier. The BERT layer is a network layer based on a Bidirectional Encoder Representation from Transformers (Bidirectional Attention Neural Network), and the CRF layer is a network layer based on a Conditional Random Field.

[0076] In some embodiments, before training the preset medical entity relationship recognition model based on the first annotation sequence, the second annotation sequence, and the relationship information tags, the method includes: obtaining pre-trained medical text samples and fine-tuning the Bert based on the pre-trained medical text samples.

[0077] Considering that the open-source BERT is not suitable for medical texts in the medical field, before training the preset medical entity relationship recognition model, BERT can be fine-tuned with preset pre-trained medical text samples to improve BERT's ability to express medical texts. This will enable BERT to better express the semantics of medical texts and improve BERT's performance in subsequent entity recognition tasks.

[0078] In some embodiments, training the preset medical entity relationship recognition model based on the first annotation sequence, the second annotation sequence, and the relationship information tags specifically involves: using the first annotation sequence as input to the symptom range entity recognition sub-model; using the second annotation sequence as input to the symptom-related information entity recognition sub-model; using the outputs of the symptom range entity recognition sub-model and the symptom-related information entity recognition sub-model as input to the entity relationship recognition sub-model; using the relationship information tags as training tags for the preset medical entity relationship recognition model; and determining that the preset medical entity relationship recognition model has completed training when the decrease in loss value between two adjacent training rounds is less than a preset threshold.

[0079] Please see Figure 2 , Figure 2This is a flowchart illustrating the process of training a pre-defined medical entity relationship recognition model. During training, the first labeled sequence is used as input to the symptom range entity recognition sub-model, and the second labeled sequence is used as input to the symptom-related information entity recognition sub-model. The outputs of both the symptom range and symptom-related information entity recognition sub-models are also used as input to the entity relationship recognition sub-model. Furthermore, the relationship information labels of symptom entity-symptom-related information entity pairs are used as training labels for the pre-defined medical entity relationship recognition model. During training, predicted relationship information labels for symptom entity-symptom-related information entity pairs are obtained, and the loss value between the predicted relationship information labels and the input relationship information labels is calculated. If the decrease in loss value between two adjacent training rounds is less than a preset threshold, the pre-defined medical entity relationship recognition model is considered successfully trained, resulting in a well-trained medical entity relationship recognition model.

[0080] The trained medical entity relationship recognition model involves two main tasks: entity recognition and entity relationship extraction. Specifically, the symptom range entity recognition sub-model identifies symptom range entities and symptom entities; the symptom-related information entity recognition sub-model identifies symptom-related information entities such as degree entities, frequency entities, condition entities, location entities, and time entities; and the entity relationship recognition sub-model classifies symptom range entities, symptom entities, and symptom-related information entities by pairing them up and determining the correspondence between entities. The output of the trained medical entity relationship recognition model is the correspondence between symptom entity and related information entity pairs.

[0081] The above-described method for training a medical entity relationship recognition model involves: acquiring medical text samples; labeling symptom range entities and symptom entities in the medical text samples to obtain a first labeling sequence; labeling symptom-related information entities in the medical text samples to obtain a second labeling sequence; obtaining relationship information tags representing the correspondence between the symptom entities and the symptom-related information entities; and training a preset medical entity relationship recognition model based on the first labeling sequence, the second labeling sequence, and the relationship information tags to obtain a trained medical entity relationship recognition model. The trained medical entity relationship recognition model is used to identify the correspondence between symptom entities and symptom-related information entities in the medical text to be identified. By optimizing the annotation strategy for medical text samples, a novel approach is taken to add annotations for symptom range entities. This divides the annotation of medical text samples into two layers: symptom range entity annotation and symptom-related information entity annotation. On the one hand, this overcomes the problems of overlapping and complex entity annotations in traditional annotation methods. On the other hand, by utilizing symptom range entities, the medical entity relationship recognition model can effectively assist in achieving the training objective of distinguishing the correspondence between symptom entities and symptom-related information entities. This avoids the need to perform pairwise pairing and extraction of medical entity relationships for all entities in the medical text samples during training, greatly reducing related computations and effectively improving training efficiency and model performance. As a result, the trained medical entity relationship recognition model can accurately identify the correspondence between medical named entities, meeting the entity relationship recognition needs in the context of traditional Chinese medicine.

[0082] Furthermore, referring to Figure 3 Based on the above embodiments, this application also provides a method for identifying medical entity relationships. This method for identifying medical entity relationships can be applied to scenarios such as intelligent diagnosis and treatment and remote consultation.

[0083] like Figure 3 As shown, the method for identifying the medical entity relationship also includes steps S201 to S202.

[0084] Step S201: Obtain the medical text to be recognized;

[0085] Step S202: Based on the trained medical entity relationship recognition model, the medical text to be recognized is identified to obtain the correspondence between symptom entities and symptom-related information entities in the medical text to be recognized.

[0086] The soon-to-be-trained medical entity relationship recognition model will be used to predict the correspondence between target symptom entities and target symptom-related information entities in the medical text to be identified.

[0087] In some embodiments, step S202 specifically involves: inputting the medical text to be identified into the trained medical entity relationship recognition model; identifying symptom range entities and symptom entities in the medical text to be identified through the symptom range entity recognition sub-model of the trained medical entity relationship recognition model; identifying symptom-related information entities in the medical text to be identified through the symptom-related information entity recognition sub-model of the trained medical entity relationship recognition model; classifying the symptom range entities, symptom entities, and symptom-related information entities in the medical text to be identified through the entity relationship recognition sub-model of the trained medical entity relationship recognition model, and extracting the correspondence between symptom entities and symptom-related information entities in the medical text to be identified.

[0088] After acquiring the medical text to be identified, the text is input into the trained medical entity relationship recognition model. The symptom range entity recognition sub-model identifies the symptom range entities and symptom entities in the medical text; the symptom-related information entity recognition sub-model identifies the symptom-related information entities in the medical text; and the entity relationship recognition sub-model classifies the symptom range entities, symptom entities, and symptom-related information entities in the medical text, and extracts the correspondence between symptom entities and symptom-related information entities in the medical text.

[0089] The entity relationship recognition sub-model is actually used for classification tasks. For example, for the scope entity "Sometimes I have severe menstrual cramps," "Sometimes I have my period" is a "symptom triggering condition" relationship with "Severe abdominal pain." After BERT processing, we can obtain a word-level token vector (7 vectors of 1*756) corresponding to "Sometimes I have my period." We add up the word-level token vectors corresponding to "Sometimes I have my period" and take the average to get a single 1*756 vector representing "Sometimes I have my period." The same operation is performed on "Severe abdominal pain," resulting in a vector representing "Severe abdominal pain." The vector representing "Sometimes I have my period" and the vector representing "Severe abdominal pain" are concatenated as features and used for classification in the entity relationship recognition sub-model.

[0090] The above-described method for identifying medical entity relationships involves acquiring the medical text to be identified, identifying the medical text based on a trained medical entity relationship identification model, and obtaining the correspondence between symptom entities and symptom-related information entities in the medical text. This method improves the accuracy of medical named entity relationship identification by extracting the correspondence between symptom entities and symptom-related information entities based on a trained medical entity relationship identification model.

[0091] Please refer to Figure 4 , Figure 4 This is a schematic block diagram of a medical entity relationship recognition model training device provided in an embodiment of this application.

[0092] like Figure 4 As shown, the device 400 includes: a first acquisition module 401, a first annotation module 402, a second annotation module 403, a second acquisition module 404, and a training module 405.

[0093] The first acquisition module 401 is used to acquire medical text samples;

[0094] The first annotation module 402 is used to annotate the symptom range entities and symptom entities in the medical text sample to obtain a first annotation sequence;

[0095] The second annotation module 403 is used to annotate the symptom-related information entities in the medical text sample to obtain a second annotation sequence;

[0096] The second acquisition module 404 is used to acquire relationship information tags that represent the correspondence between the symptom entity and the symptom-related information entity;

[0097] The training module 405 is used to train a preset medical entity relationship recognition model based on the first annotation sequence, the second annotation sequence and the relationship information label to obtain a trained medical entity relationship recognition model, wherein the trained medical entity relationship recognition model is used to identify the correspondence between symptom entities and symptom-related information entities in the medical text to be identified.

[0098] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the device and its modules and units described above can be referred to the corresponding processes in the aforementioned embodiments of the medical entity relationship recognition model training method, and will not be repeated here.

[0099] The apparatus provided in the above embodiments can be implemented as a computer program, which can be used in, for example... Figure 5 It runs on the computer device shown.

[0100] Please see Figure 5 , Figure 5 This is a schematic block diagram illustrating the structure of a computer device provided in an embodiment of this application. The computer device can be a personal computer (PC), a server, or other device with data processing capabilities.

[0101] like Figure 5 As shown, the computer device includes a processor, memory, and network interface connected via a system bus, wherein the memory may include non-volatile storage media and internal memory.

[0102] Non-volatile storage media can store operating systems and computer programs. These computer programs include program instructions that, when executed, cause the processor to perform any training method for a medical entity relationship recognition model.

[0103] The processor provides computing and control capabilities, supporting the operation of the entire computer device.

[0104] Internal memory provides an environment for the execution of computer programs in non-volatile storage media. When the computer program is executed by the processor, it enables the processor to execute any medical entity relationship recognition model training method.

[0105] This network interface is used for network communication, such as sending assigned tasks. Those skilled in the art will understand that... Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0106] It should be understood that the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, a general-purpose processor can be a microprocessor or any conventional processor.

[0107] In one embodiment, the processor is configured to run a computer program stored in memory to perform the following steps:

[0108] Obtain medical text samples;

[0109] The symptom range entities and symptom entities in the medical text sample are labeled to obtain the first labeling sequence;

[0110] The symptom-related information entities in the medical text sample are annotated to obtain a second annotation sequence;

[0111] Obtain relationship information tags that represent the correspondence between the symptom entity and the symptom-related information entity;

[0112] Based on the first annotation sequence, the second annotation sequence, and the relationship information label, a preset medical entity relationship recognition model is trained to obtain a trained medical entity relationship recognition model. The trained medical entity relationship recognition model is used to identify the correspondence between symptom entities and symptom-related information entities in the medical text to be identified.

[0113] In some embodiments, the preset medical entity relationship recognition model includes a symptom range entity recognition sub-model, a symptom-related information entity recognition sub-model, and an entity relationship recognition sub-model.

[0114] In some embodiments, when the processor trains the preset medical entity relationship recognition model based on the first annotation sequence, the second annotation sequence, and the relationship information tags, it is used to implement:

[0115] The first labeled sequence is used as the input to the symptom range entity recognition sub-model;

[0116] The second labeled sequence is used as the input to the symptom-related information entity recognition sub-model;

[0117] The outputs of the symptom range entity recognition sub-model and the symptom-related information entity recognition sub-model are used as the inputs of the entity relationship recognition sub-model.

[0118] The relationship information tags are used as training tags for the preset medical entity relationship recognition model;

[0119] If the decrease in loss value between two adjacent training rounds is less than a preset threshold, the training of the preset medical entity relationship recognition model is considered complete.

[0120] In some embodiments, the symptom range entity recognition sub-model includes a Bert+CRF model. Before the processor implements the training of the preset medical entity relationship recognition model based on the first annotation sequence, the second annotation sequence, and the relationship information labels, it is used to perform the following:

[0121] Obtain pre-trained medical text samples and fine-tune the Bert based on the pre-trained medical text samples.

[0122] In some embodiments, when the processor implements the annotation of symptom range entities and symptom entities in the medical text sample to obtain a first annotation sequence, it is used to:

[0123] The symptom range entities in the medical text sample are labeled using a preset labeling method to obtain the labeling sequence corresponding to the symptom range entities;

[0124] Add annotations for symptom entities in the medical text sample to the annotation sequence corresponding to the symptom range entities to obtain the first annotation sequence.

[0125] In one embodiment, the processor is configured to run a computer program stored in memory and further perform the following steps:

[0126] Obtain the medical text to be recognized;

[0127] The medical text to be identified is identified based on a pre-trained medical entity relationship recognition model, thereby obtaining the correspondence between symptom entities and symptom-related information entities in the medical text to be identified.

[0128] In some embodiments, when the processor implements the recognition of the medical text to be recognized based on the trained medical entity relationship recognition model to obtain the correspondence between symptom entities and symptom-related information entities in the medical text to be recognized, it is used to achieve:

[0129] The medical text to be identified is input into the trained medical entity relationship recognition model. The symptom range entity recognition sub-model of the trained medical entity relationship recognition model is used to identify the symptom range entities and symptom entities in the medical text to be identified.

[0130] The symptom-related information entity recognition sub-model of the trained medical entity relationship recognition model is used to identify symptom-related information entities in the medical text to be identified.

[0131] The entity relationship recognition sub-model of the trained medical entity relationship recognition model is used to classify symptom range entities, symptom entities, and symptom-related information entities in the medical text to be identified, and extract the correspondence between symptom entities and symptom-related information entities in the medical text to be identified.

[0132] This application also provides a computer-readable storage medium storing a computer program, the computer program including program instructions, and the method implemented when the program instructions are executed can refer to various embodiments of the medical entity relationship recognition model training method of this application, or various embodiments of the medical entity relationship recognition method.

[0133] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiments, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, SmartMedia Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the computer device.

[0134] Furthermore, the computer-readable storage medium may primarily include a program storage area and a data storage area, wherein the program storage area may store the operating system, at least one application required for a function, etc.; and the data storage area may store data created based on the use of blockchain nodes, etc.

[0135] The blockchain referred to in this invention is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.

[0136] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0137] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. The above descriptions are merely specific implementations of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A training method for a medical entity relationship recognition model, characterized in that, The method includes the following steps: Obtain medical text samples; The BIO annotation method is used to annotate the symptom range entities in the medical text sample to obtain the annotation sequence corresponding to the symptom range entities; Add annotations for symptom entities in the medical text sample to the annotation sequence corresponding to the symptom range entities to obtain the first annotation sequence; The symptom-related information entities in the medical text sample are annotated to obtain a second annotation sequence; Obtain relationship information tags that represent the correspondence between the symptom entity and the symptom-related information entity; Based on the first annotation sequence, the second annotation sequence, and the relationship information label, a preset medical entity relationship recognition model is trained to obtain a trained medical entity relationship recognition model. The trained medical entity relationship recognition model is used to identify the correspondence between symptom entities and symptom-related information entities in the medical text to be identified.

2. The training method for the medical entity relationship recognition model according to claim 1, characterized in that, The preset medical entity relationship recognition model includes a symptom range entity recognition sub-model, a symptom-related information entity recognition sub-model, and an entity relationship recognition sub-model.

3. The training method for the medical entity relationship recognition model according to claim 2, characterized in that, The step of training a preset medical entity relationship recognition model based on the first annotation sequence, the second annotation sequence, and the relationship information tags includes: The first labeled sequence is used as the input to the symptom range entity recognition sub-model; The second labeled sequence is used as the input to the symptom-related information entity recognition sub-model; The outputs of the symptom range entity recognition sub-model and the symptom-related information entity recognition sub-model are used as the inputs of the entity relationship recognition sub-model. The relationship information tags are used as training tags for the preset medical entity relationship recognition model; If the decrease in loss value between two adjacent training rounds is less than a preset threshold, the training of the preset medical entity relationship recognition model is considered complete.

4. The training method for the medical entity relationship recognition model according to claim 2, characterized in that, The symptom range entity recognition sub-model includes the Bert+CRF model; Before training the preset medical entity relationship recognition model based on the first annotation sequence, the second annotation sequence, and the relationship information tags, the following steps are included: Obtain pre-trained medical text samples and fine-tune the Bert based on the pre-trained medical text samples.

5. A method for identifying medical entity relationships, characterized in that, The method includes: Obtain the medical text to be recognized; The medical text to be identified is input into the trained medical entity relationship recognition model. The symptom range entity recognition sub-model of the trained medical entity relationship recognition model is used to identify the symptom range entity and symptom entity in the medical text to be identified. The symptom-related information entity recognition sub-model of the trained medical entity relationship recognition model is used to identify symptom-related information entities in the medical text to be identified. The entity relationship recognition sub-model of the trained medical entity relationship recognition model is used to classify symptom range entities, symptom entities, and symptom-related information entities in the medical text to be identified, and extract the correspondence between symptom entities and symptom-related information entities in the medical text to be identified.

6. A training device for a medical entity relationship recognition model, characterized in that, The medical entity relationship recognition model training device includes: The first acquisition module is used to acquire medical text samples; The first annotation module is used to annotate the symptom range entities in the medical text sample using the BIO annotation method to obtain the annotation sequence corresponding to the symptom range entities; and to add annotations for the symptom entities in the medical text sample to the annotation sequence corresponding to the symptom range entities to obtain the first annotation sequence. The second annotation module is used to annotate the symptom-related information entities in the medical text sample to obtain a second annotation sequence; The second acquisition module is used to acquire relationship information tags that represent the correspondence between the symptom entity and the symptom-related information entity; The training module is used to train a preset medical entity relationship recognition model based on the first annotation sequence, the second annotation sequence, and the relationship information label to obtain a trained medical entity relationship recognition model. The trained medical entity relationship recognition model is used to identify the correspondence between symptom entities and symptom-related information entities in the medical text to be identified.

7. A computer device, characterized in that, The computer device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, it implements the steps of the medical entity relationship recognition model training method as described in any one of claims 1 to 4, or the steps of the medical entity relationship recognition method as described in claim 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, it implements the steps of the medical entity relationship recognition model training method as described in any one of claims 1 to 4, or the steps of the medical entity relationship recognition method as described in claim 5.

Citation Information

Patent Citations

  • Symptom entity identification method of medical text and related device

    CN110069779A

  • Medical entity relation joint extraction method

    CN112818676A