A method and apparatus for medical entity matching

By designing prompt templates for entities and entity sub-attributes, extracting and concatenating mask word vectors using a mask language model, and combining them with a convolutional neural network for entity consistency prediction, the problem of low accuracy in surgical entity matching in existing technologies is solved, achieving fine-grained entity matching results.

CN115547486BActive Publication Date: 2025-11-14太保科技有限公司
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211157944.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-22
Publication Date
2025-11-14
Estimated Expiration
2042-09-22

AI Technical Summary

Technical Problem

Existing medical entity matching models, which only consider entity information in surgical entity matching tasks, have poor matching results and low accuracy.

Method used

Design prompt templates for entities and entity sub-attributes, extract mask word vectors through a pre-trained model of the Masked Language Model (MLM), concatenate and combine them, and input them into a convolutional neural network for entity consistency prediction.

Benefits of technology

It achieves fine-grained entity matching, improving the accuracy of medical entity matching, especially in surgical entity matching tasks, and can better distinguish difficult samples.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115547486B_ABST
    Figure CN115547486B_ABST
Patent Text Reader

Abstract

This application discloses a method and apparatus for medical entity matching. It pre-designs prompt templates for entities and entity sub-attributes, and extracts masked word vectors for both entities and entity sub-attributes using a pre-trained model based on a masked language model (MLM). These vectors are then concatenated and combined to complete entity matching. The method described in this application integrates complete entity semantics and entity sub-attribute information, and uses entity sub-attributes as the basic unit, achieving fine-grained entity matching and improving matching accuracy. Designing entity sub-attribute prompt templates helps the model extract features based on the characteristics of entity sub-attributes, which is beneficial for the model to distinguish difficult samples.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of medical entity recognition, and in particular to a method and apparatus for medical entity matching. Background Technology

[0002] With the rapid development of deep learning and the popularization of smart healthcare, the demand for using natural language processing technology to identify medical information is growing. Among these applications, medical entity matching aims to use machines to identify and extract clinically relevant entities from a set of purely medical text documents, and then match them with predefined categories for classification, thereby improving the efficiency and quality of clinical research.

[0003] Existing medical information recognition models are primarily semantic matching models, which use entities as the basic unit and obtain labels from the literal expression and semantic level of entity names for matching. However, in surgical entity matching tasks, matching based solely on entity information yields unsatisfactory results. Therefore, improving the accuracy of medical entity matching has become an urgent problem to be solved. Summary of the Invention

[0004] To address the aforementioned problems, this application provides a method and apparatus for medical entity matching. The aim is to make entity matching results more accurate and efficient.

[0005] This application discloses a method for medical entity matching, the method comprising:

[0006] Based on the characteristics of medical entities and the characteristics of entity sub-attributes, design entity prompt templates and entity sub-attribute prompt templates;

[0007] The entity prompt template and entity sub-attribute prompt template are input into a pre-trained model based on masked language model (MLM) to obtain the output results corresponding to each template;

[0008] Combine the output results;

[0009] The entity matching result is obtained based on the spliced ​​result.

[0010] Optionally, before designing entity hint templates and entity sub-attribute hint templates, the method further includes: summarizing the sub-attributes of each type of entity based on predefined entity categories.

[0011] Optionally, the design entity prompt template and entity sub-attribute prompt template include: if the entity has no sub-attributes, then fill in "none" as the entity sub-attribute value in the entity sub-attribute prompt template.

[0012] Optionally, obtaining the output results corresponding to each template includes: obtaining the vector representation of the mask words in the entity prompt template and the entity sub-attribute prompt template.

[0013] Optionally, obtaining the entity matching result based on the concatenated result includes: inputting the concatenated result into the classification layer of a convolutional neural network to obtain a predicted value of entity consistency.

[0014] Based on the above method, this application also discloses a medical entity matching device, including: a design unit, an output result acquisition unit, a splicing unit, and a matching unit.

[0015] The design unit is used to design entity prompt templates and entity sub-attribute prompt templates;

[0016] The output result acquisition unit is used to acquire the output results corresponding to each template based on the pre-trained model of the masked language model MLM.

[0017] The splicing unit is used to splice the output results;

[0018] The matching unit is used to obtain entity matching results.

[0019] Optionally, the apparatus further includes: an induction unit for inducing sub-attributes of each type of entity.

[0020] Optionally, the design unit is used to: if the entity has no sub-attributes, fill in the entity sub-attribute prompt template with "none" as the entity sub-attribute value.

[0021] Optionally, the output result acquisition unit is used to: acquire the vector representation of the mask words in the entity prompt template and the entity sub-attribute prompt template.

[0022] Optionally, the matching unit is used to: input the concatenated result into the classification layer in the convolutional neural network to obtain a predicted value of entity consistency.

[0023] This application discloses a method and apparatus for medical entity matching. It pre-designs prompt templates for entities and entity sub-attributes, and extracts masked word vectors for both entities and entity sub-attributes using a pre-trained model based on a masked language model (MLM). These vectors are then concatenated and combined to complete entity matching. The method described in this application integrates complete entity semantics and entity sub-attribute information, and uses entity sub-attributes as the basic unit, achieving fine-grained entity matching and improving matching accuracy. Designing entity sub-attribute prompt templates helps the model extract features based on the characteristics of entity sub-attributes, which is beneficial for the model to distinguish difficult samples. Attached Figure Description

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

[0025] Figure 1 This is a flowchart illustrating a method for medical entity matching disclosed in an embodiment of this application;

[0026] Figure 2 This is a flowchart illustrating another method for medical entity matching disclosed in an embodiment of this application;

[0027] Figure 3 This is a schematic diagram of the structure of a medical entity matching device disclosed in an embodiment of this application. Detailed Implementation

[0028] 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, and 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.

[0029] Example 1: This application discloses a method for medical entity matching, which is applied to the field of medical entity recognition. It extracts mask word vectors of entities and entity sub-attributes through a pre-trained model based on masked language model MLM, and then concatenates and combines them to complete entity matching.

[0030] For details, please refer to Figure 1 The medical entity matching method disclosed in this embodiment includes the following steps:

[0031] Step 101: Based on the characteristics of the medical entity and the characteristics of its sub-attributes, design entity prompt templates and entity sub-attribute prompt templates.

[0032] In the method described in this embodiment, before designing the entity hint template and entity sub-attribute hint template, as an optional implementation method, the entity sub-attributes can first be summarized according to the predefined entity categories. Based on the entity's name characteristics: Feature A + Feature B, the entity sub-attribute characteristics can be summarized into Sub-attribute A and Sub-attribute B. For example, the name characteristics of the entity "surgery": "anatomical location + surgical procedure", can be summarized into entity sub-attributes "anatomical location" and "surgical procedure".

[0033] The method for summarizing entity sub-attributes described is merely an example, and no specific limit is placed on the number of sub-attributes. A prompt template should be designed after the sub-attributes are summarized.

[0034] As a feasible method, the steps of designing the prompt template are as follows: Design an entity prompt template for whether {First Entity} and {Second Entity} are of the same type of {Entity}, and set the answer as a mask word. Design an entity sub-attribute prompt template for whether {First Sub-Attribute} and {Second Sub-Attribute} are of the same type of {Sub-Attribute}, and set the answer as a mask word. Surgical procedure prompt: Whether {First Sub-Attribute} and {Second Sub-Attribute} are of the same type of {Sub-Attribute}, and set the answer as a mask word.

[0035] In the embodiments described in this application, the first entity and the second entity are input samples that need to be matched. In the explanation of the embodiments described in this application, the first entity can be an eyelid incision in the surgical entity, and the second entity can be an orbital incision in the surgical entity. The sub-attributes A and B are categorized based on entity name characteristics, such as anatomical location and surgical procedure in the surgical entity. In the explanation of the embodiments described in this application, sub-attribute A can be eyelid / orbital, and sub-attribute B can be incision. The mask word can be yes or no, or true or false, etc. The above examples are merely illustrative and not intended to limit the scope.

[0036] The answers are either yes or no. The number of entity sub-attributes can be zero, one, two, or more; there is no limitation here. When an entity has zero sub-attributes, the input sub-attribute value is "none" or any character that indicates that the entity has no sub-attributes, and it is directly matched with the predefined entity category of that entity.

[0037] Step 102: Input the entity hint template and entity sub-attribute hint template into the pre-trained model based on masked language model MLM, and obtain the output results corresponding to each template.

[0038] The task of the MLM (Mask Language Model) model is to mask (or replace) a portion of the words (tokens) in a sentence, and then attempt to reconstruct this masked word (MASK token) based on the remaining part of the sentence. In the method described in this embodiment, the pre-trained model ultimately outputs the vector representation corresponding to each word in the sentence, and then obtains the vector representation corresponding to the masked word. Since the masked word set by the template in the method described in this embodiment is either yes or no, the vector representation is a yes or no vector representation, semantically representing a yes or no judgment.

[0039] Step 103: Concatenate the output results.

[0040] This involves concatenating the vector representations corresponding to the output mask words. This vector concatenation is a common feature fusion method, such as feature vector v1∈R. n v2∈R m If these features are concatenated at the same order, the fused feature vector is v = [v1, v2] ∈ R. n+m Where R represents the vector space, and m and n are the dimensions of the vectors, which can be equal or unequal. The inventive point of the method described in this application lies mainly in the method of medical entity matching, so it will not be explained in detail here.

[0041] The number of vector representations corresponding to the mask words corresponds to the number of mask words set in the template designed in step 101, and is not specifically limited here.

[0042] Step 104: Obtain the entity matching result based on the spliced ​​result.

[0043] The concatenated vector is input into the classification layer of the convolutional neural network, and the classification layer outputs the predicted value of entity consistency.

[0044] The entity matching result is a predicted value of entity matching consistency, presented in numerical form. In the method described in this embodiment, as a feasible approach, the classification layer outputs the predicted value of consistency between {first entity} and {second entity}, and the magnitude of the value indicates the degree of entity matching. When the entity matching degree is high, it indicates that the two entities belong to the same predefined entity category. The number of entities is set in the template designed in step 101 and is not specifically limited here.

[0045] The method described in this embodiment pre-designs prompt templates for entities and their sub-attributes, which helps the model extract features based on the characteristics of the entity's sub-attributes. Furthermore, compared to existing techniques that match solely based on entity features, the method described in this embodiment uses entity sub-attributes as the basic unit, achieving fine-grained entity matching and improving matching accuracy.

[0046] Example 2: This application discloses a method for medical entity matching in a given scenario. Please refer to [link / reference]. Figure 2 This embodiment describes the method for entity matching of surgical entities.

[0047] Step 201: Summarize entity sub-attributes based on predefined entity categories.

[0048] In the method described in this embodiment, as a feasible approach, based on the name characteristics of the "surgery" entity, namely "anatomical location + surgical procedure", the entity sub-attributes can be summarized as "anatomical location" and "surgical procedure".

[0049] The above methods for summarizing entity sub-attributes are merely examples.

[0050] Step 202: Design entity prompt template.

[0051] In the method described in this embodiment, as a feasible approach, the entity prompt template is:

[0052] Surgical entity prompt: Are {blepharoplasty} and {orbital incision} the same type of {surgery}?: [MASK]. The MASK is a mask word designed for the prompt template. In the method described in this embodiment, as a feasible approach, the mask word is either "yes" or "no".

[0053] Step 203: Design entity sub-attribute hint template.

[0054] In the method described in this embodiment, as a feasible approach, the entity sub-attribute prompt template is as follows:

[0055] Anatomical site suggestion: Are {eyelid} and {orbit} the same type of {anatomical site}? [MASK]; Surgical procedure suggestion: Are {incision} and {incision} the same type of {surgical procedure}? [MASK]

[0056] The design tips above are just examples.

[0057] Step 204: Input each prompt template into the pre-trained model based on the MLM model.

[0058] Step 205: Obtain the corresponding mask word vector.

[0059] Step 206: Concatenate the masked word vectors of the entity and its sub-attributes, and input them into the classification layer.

[0060] In the method described in this embodiment, as a feasible approach, the splicing operation involves concatenating three one-dimensional vectors corresponding to the three masks, each with a dimension of 768. After concatenation, the dimension becomes 768*3.

[0061] Step 207: The classification layer outputs the prediction results.

[0062] The prediction result is a predicted value for entity matching consistency, presented in numerical form. In the method described in this embodiment, as a feasible approach, the classification layer outputs a predicted value for the consistency between {eyelid incision} and {orbital incision}, with the value between 0 and 1. The larger the value, the higher the entity matching degree, i.e., the greater the consistency.

[0063] This embodiment describes the entity matching process for surgical entities. By designing entity and entity sub-attribute hint templates, the model can better extract features based on the characteristics of different entity categories. Furthermore, the question-and-answer design allows the model to perform entity matching from the lowest level at the input stage. The concatenation of mask word vectors takes into account the features of entity sub-attributes, enabling the model to better distinguish difficult samples.

[0064] Based on the medical entity matching method disclosed in the above embodiments, this embodiment correspondingly discloses a medical entity matching apparatus. Please refer to [link to relevant documentation]. Figure 3 The device includes: a design unit 301, an output result acquisition unit 302, a splicing unit 303, and a matching unit 304.

[0065] The design unit 301 is used to design entity prompt templates and entity sub-attribute prompt templates;

[0066] The output result acquisition unit 302 is used to acquire the output results corresponding to each template based on the MLM pre-trained model;

[0067] The splicing unit 303 is used to splice the output results;

[0068] The matching unit 304 is used to obtain entity matching results.

[0069] Optionally, the apparatus further includes: an induction unit for inducing sub-attributes of each type of entity.

[0070] Optionally, the design unit 301 is used to: if the entity has no sub-attributes, fill in the entity sub-attribute prompt template with "none" as the entity sub-attribute value.

[0071] Optionally, the output result acquisition unit 302 is used to: acquire the vector representation of the mask words in the entity prompt template and the entity sub-attribute prompt template.

[0072] Optionally, the matching unit 304 is used to: input the concatenated result into the classification layer in the convolutional neural network to obtain the predicted value of the entity consistency.

[0073] The embodiments in this specification are described in a progressive manner. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant details can be found in the method section.

[0074] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0075] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0076] The features described in the embodiments of this specification can be substituted for or combined with each other, so that those skilled in the art can implement or use this application.

[0077] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for matching medical entities, characterized in that, The method includes: Based on predefined entity categories, the sub-attributes of each entity category are summarized. Based on the characteristics of medical entities and their sub-attributes, design entity suggestion templates and entity sub-attribute suggestion templates; if an entity has no sub-attributes, fill in "none" as the entity sub-attribute value in the entity sub-attribute suggestion template. The entity prompt template and entity sub-attribute prompt template are input into a pre-trained model based on masked language model (MLM) to obtain the output results corresponding to each template; Combine the output results; The concatenated result is input into the classification layer of the convolutional neural network to obtain the predicted value of entity consistency, which is used as the entity matching result.

2. The method according to claim 1, characterized in that, The step of obtaining the output results corresponding to each template includes: obtaining the vector representation of the mask words in the entity prompt template and the entity sub-attribute prompt template.

3. A device for matching medical entities, characterized in that, include: Induction unit, design unit, output result acquisition unit, splicing unit, and matching unit; The induction unit is used to inductively summarize the sub-attributes of each type of entity. The design unit is used to design entity prompt templates and entity sub-attribute prompt templates; if an entity has no sub-attributes, then "none" is filled into the entity sub-attribute prompt template as the entity sub-attribute value. The output result acquisition unit is used to acquire the output results corresponding to each template based on the pre-trained model of the masked language model MLM. The splicing unit is used to splice the output results; The matching unit is used to input the concatenated result into the classification layer of the convolutional neural network to obtain the predicted value of entity consistency, which is used as the entity matching result.

4. The apparatus according to claim 3, characterized in that, The output result acquisition unit is used to: acquire the vector representation of the mask words in the entity prompt template and the entity sub-attribute prompt template.

Citation Information

Patent Citations

  • Traditional Chinese medicine stomachache health preserving scheme obtaining device based on BERT language model and CNN model

    CN113345574A

  • Text matching method and device, equipment, and storage medium

    CN114077862A

  • Text detection method and device and electronic equipment

    CN114218961A