Method and equipment for training entity link model in medical entity link

By encoding and similarity calculations of medical entities using an encoder with shared parameters, determining the target loss function to train the entity link model, solving the problem that existing algorithms cannot accurately learn vector representation, and improving the model performance and the accuracy of entity link results.

CN120196746AActive Publication Date: 2025-06-24BEIJING JIAOTONG UNIV
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510235607.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-06-24
Estimated Expiration
2045-02-28

AI Technical Summary

Technical Problem

The existing medical entity linking algorithm cannot accurately learn vector representation, resulting in a degradation of model generalization performance and inaccurate entity linking results, especially when maintaining reasonable distances between multiple positive sample groups.

Method used

The first encoder and the second encoder that share parameters are used to encode the target text mention and total entity, calculate the similarity between the mention vector and the entity vector, and determine the target loss function based on the similarity to train the entity link model in the medical entity link.

Benefits of technology

By integrating the upper and lower relationship information of concepts in the medical ontology library, better dense vector representations are learned, making the vector distance between entities with similar ontology semantic structures closer, improving the performance of the entity link model and improving the accuracy of entity link results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120196746A_ABST
    Figure CN120196746A_ABST
Patent Text Reader

Abstract

The invention discloses a method and equipment for training an entity link model in a medical entity link. The method comprises the steps of obtaining a target text mention to be subjected to entity linking and a total entity in a medical ontology library; the first encoder and the second encoder are used for conducting encoding operation on the target text mention and the total entity respectively, and a mention vector and an entity vector are obtained correspondingly; calculating a first similarity between the mention vector and the entity vector; matching candidate entities mentioned by the target text from the total entities; calculating a second similarity between the target text mention and the candidate entity; and determining a target loss function based on the first similarity and the second similarity so as to train the entity link model in the medical entity link. By means of the scheme, the performance of the entity linking model can be improved, and the entity linking result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application generally relates to the technical field of entity linking. More specifically, this application relates to a method for training an entity linking model in medical entity linking, a method for medical entity linking, an electronic device, and a computer-readable storage medium. Background Art

[0002] In recent years, with the rapid development of computer technology and the rapid growth of biomedical data, a large amount of medical data, scientific research literature, clinical medical records, etc. have become important basic resources for precision medicine research. Biomedical Entity Linking (BEL) is a core task in the field of medical natural language processing, aiming to match and associate medical term mentions (such as diseases, symptoms, genes, etc.) in text with entity concepts in medical ontology libraries (such as UMLS, MeSH, ISPO, etc.). For example, mentions such as "delayed speech", "speech delay", "sluggish speech", "slow speech", and "heavy voice delay" in the text are associated (or linked) with "sluggish speech" in the medical ontology library, all representing the same concept.

[0003] The mention terms in medical texts are complex in expression form and constantly updated. It is extremely time-consuming and laborious, and also extremely unrealistic to rely solely on manual labor to standardize huge amounts of data and update the ontology library. Currently, there are various methods for medical entity linking, including, for example, methods based on semantic information and structure in the ontology, graph-based linking, frameworks for unsupervised Chinese medical text entity recognition and linking, and technical architectures based on general-domain BLINK. However, existing entity linking algorithms simply separate positive and negative samples and cannot accurately learn vector representations. This way of forcing all negative samples to be far away from the anchor points may cause the distance relationship between other anchor points and their corresponding positive samples to be disrupted. That is to say, the large displacement of negative samples in the vector space will generate interference, affecting the original geometric structure with other anchor points and positive samples, and destroying the coordination and representation stability of the overall vector space. This may lead to a decline in the model's generalization performance, resulting in inaccurate entity linking results, especially for situations where it is necessary to maintain a reasonable distance between multiple positive sample groups simultaneously.

[0004] In view of this, there is an urgent need to provide a solution for training an entity linking model in medical entity linking, so that the vector distances between entities with similar ontology semantic structures are closer, improving the performance of the entity linking model and the entity linking results. Summary of the Invention

[0005] To at least solve one or more of the above-mentioned technical problems, the present application proposes a solution for training an entity linking model in medical entity linking in multiple aspects.

[0006] In a first aspect, the present application provides a method for training an entity linking model in medical entity linking, where the entity linking model at least includes a first encoder and a second encoder sharing parameters, and the method includes: obtaining a target text mention to be entity-linked and total entities in a medical ontology library; using the first encoder and the second encoder to perform encoding operations on the target text mention and the total entities respectively, and correspondingly obtaining a mention vector and an entity vector; calculating a first similarity between the mention vector and the entity vector; matching candidate entities of the target text mention from the total entities; calculating a second similarity between the target text mention and the candidate entities; determining a target loss function based on the first similarity and the second similarity to train the entity linking model in medical entity linking.

[0007] In some embodiments, the first similarity includes a cosine similarity, and the second similarity includes a tree structure similarity.

[0008] In other embodiments, the candidate entities of the target text mention are matched from the total entities by the following operations: determining a matching score between the corresponding target text mention and each entity in the total entities according to the first similarity; selecting the entities under the maximum number of targets of the matching scores as the candidate entities to match the candidate entities of the target text mention from the total entities.

[0009] In still other embodiments, determining the target loss function based on the first similarity and the second similarity includes: calculating a mean squared error loss based on the first similarity and the second similarity to determine the target loss function.

[0010] In still other embodiments, the entity linking model further includes a re-ranking module, and the method further includes: using the re-ranking module to calculate new scores for each candidate entity, where the re-ranking module is trained based on a cross-entropy loss; selecting the entity with the highest new score as the candidate entity.

[0011] In still other embodiments, it further includes: in response to updating the medical ontology library, calculating a new target loss function based on the total entities in the updated medical ontology library and the historical total entities to train the entity linking model in medical entity linking.

[0012] In some other embodiments, calculating a new target loss function based on the total entities in the updated medical ontology and the historical total entities includes: determining an intermediate target loss function and a first weight parameter based on the total entities in the updated medical ontology; determining a second weight parameter corresponding to the historical total entities; and performing an elastic weight consolidation operation according to the intermediate target loss function, the first weight parameter, and the second weight parameter to obtain the new target loss function.

[0013] In a second aspect, the present application provides a method for medical entity linking, including: obtaining a target text mention to be entity-linked; inputting the target text mention into an entity linking model trained according to multiple embodiments in the foregoing first aspect for entity linking to obtain an entity linking result.

[0014] In a third aspect, the present application provides an electronic device, including: a processor; and a memory storing computer instructions for training an entity linking model in medical entity linking, which, when executed by the processor, implement multiple embodiments in the foregoing first aspect; or storing computer instructions for medical entity linking, which, when executed by the processor, implement the embodiments in the foregoing second aspect.

[0015] In a fourth aspect, the present application provides a computer-readable storage medium storing computer program instructions for training an entity linking model in medical entity linking, which, when executed by one or more processors, implement multiple embodiments in the foregoing first aspect; or storing computer program instructions for training an entity linking model in medical entity linking, which, when executed by one or more processors, implement the embodiments in the foregoing second aspect.

[0016] Through the above-provided solution for training an entity linking model in medical entity linking, embodiments of the present application respectively encode a target text mention and total entities by using a first encoder and a second encoder with shared parameters to obtain a mention vector and an entity vector correspondingly, calculate a first similarity between the mention vector and the entity vector and a second similarity between the target text mention and a candidate entity, and then jointly determine a target loss function based on the first and second similarities to train the entity linking model. Based on this, it is possible to fuse the hyponymy relationship information of concepts in the medical ontology, learn a better dense vector representation, make the vector distances between entities with similar ontology semantic structures closer, improve the performance of the entity linking model, and enhance the entity linking result. Description of the Drawings

[0017] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features, and advantages of the exemplary embodiments of the present application will become readily understandable. In the drawings, several embodiments of the present application are shown in an exemplary rather than restrictive manner, and the same or corresponding reference numerals denote the same or corresponding parts, wherein:

[0018] Figure 1 is an exemplary flowchart showing a method for training an entity linking model in medical entity linking according to an embodiment of the present application;

[0019] Figure 2 is an exemplary overall flowchart showing the training of an entity linking model in medical entity linking according to an embodiment of the present application;

[0020] Figure 3 is an exemplary flowchart showing a method for medical entity linking according to an embodiment of the present application;

[0021] Figure 4 is an exemplary structural block diagram of an electronic device according to an embodiment of the present application. Detailed Embodiments

[0022] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative efforts fall within the protection scope of the present application.

[0023] It should be understood that the terms "including" and "comprising" used in the specification and claims of the present application indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.

[0024] It should also be understood that the terms used in the specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification and claims of the present application, unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" are intended to include the plural forms. It should also be further understood that the term " / and / " used in the specification and claims of the present application refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0025] As used in this specification and the claims, the term "if" may be construed contextually as "when" or "once" or "in response to determining" or "in response to detecting". Similarly, the phrases "if determined" or "if [described condition or event] is detected" may be construed contextually to mean "once determined" or "in response to determining" or "once [described condition or event] is detected" or "in response to detecting [described condition or event]".

[0026] According to the description of the background art, medical entity linking aims to align specific term mentions (such as diseases, symptoms, genes, etc.) in medical texts with corresponding conceptual entities in medical knowledge bases, in order to standardize terms with the same concept but diverse expressions, thereby facilitating information retrieval, knowledge integration, and intelligent analysis. Specifically, entity linking mainly includes the following contents:

[0027] (1) Mention detection: The task of mention detection is to identify and locate entity mentions in the text, ensuring accurate capture of complete phrases, such as "hypertension" rather than "high" or "blood pressure". This step typically uses Named Entity Recognition (NER) technology, evolving from early rule-based methods to deep learning-based models such as BiLSTM, and then to the currently widely used pre-trained language model BERT, greatly improving the accuracy of mention detection. In the context of medical entity linking, mention detection extracts medical terms from the text, laying the foundation for subsequent entity linking.

[0028] (2) Candidate entity generation: In this stage, candidate entities that may match in the knowledge base are generated for each entity mention. The main methods include string matching, synonym expansion, inverted index, graph structure analysis, and embedding representation, etc. By calculating the similarity between the mention and the entity or based on retrieval models such as TF-IDF and BM25 to screen the most likely candidate entities, a candidate set is provided for subsequent precise disambiguation.

[0029] (3) Candidate entity ranking: The candidate entity set is scored and ranked to determine the most suitable candidate entity. Ranking methods usually combine the surface form features and context features of the mention and the entity, and use learning classification or learning to rank models to optimize the matching accuracy. In addition, graph models are also applied to capture the relationships between candidate entities. Currently, mainstream entity linking systems are mainly based on general domain knowledge bases, and still face challenges such as insufficient knowledge base structuring and scarce labeled data when directly applied to the Chinese medical field.

[0030] Although entity linking algorithms have been widely applied in general domains, entity linking in the medical domain remains a relatively new problem. In terms of English corpora, semantic text similarity has been used to link entity mentions in clinical texts. There are also collective reasoning methods that utilize semantic information and structures in ontologies to solve entity linking problems in biomedical literature. Graph-based linking methods first construct graphs for entity mentions, knowledge bases, and candidate items, and then use information entropy and similarity algorithms to link biomedical entities. The quality of the results of these methods depends on the context information of entities and the completeness of the knowledge base, and there has been little research on entity linking problems in Chinese corpora.

[0031] Existing methods have only studied the work on Chinese medical term standardization and have not achieved entity linking well. For example, the spatial vector model is used to classify disease names in medical insurance data according to the classification system in the International Classification of Diseases, 10th Revision (ICD-10), but the correspondence between disease names and ICD-10 disease standard terms has not been achieved. Or, through a retrieval method, the standardization problem of medical terms is solved by retrieving in three dimensions: pinyin, characters, and words of medical terms.

[0032] The technical architecture of BLINK in the general domain makes full use of the powerful capabilities of the BERT model. It increases the data for entity linking by integrating data from other domains and requires large-scale pre-training to improve model results. However, due to the professionalism and domain specificity of medical terms, the model needs to learn more accurate vector representations, so this method is not applicable to the medical entity linking of this application.

[0033] In addition, existing entity linking algorithms simply separate positive and negative samples and cannot accurately learn vector representations. This way of forcing all negative samples away from the anchor point, although achieving the separation of negative samples from the current anchor point, will cause a global pushing-away effect, which may damage the distance relationship between other anchor points and their corresponding positive samples. That is to say, the large displacement of negative samples in the vector space will produce interference, affecting the original geometric structure with other anchor points and positive samples, and destroying the coordination and representation stability of the overall vector space. That is, it may lead to a large difference in vector representations of similar entities, while the vector representations of irrelevant entities are relatively close, thus affecting the accuracy and reliability of entity linking. This way may lead to a decline in the generalization performance of the model during the optimization process, especially when multiple positive sample groups need to maintain reasonable distances at the same time.

[0034] In addition, none of the existing medical entity linking methods consider the dynamic update of the ontology library, and their entity linking algorithms cannot adapt to the changes in the ontology library. In actual situations, with the update of the ontology library, the feature vector space of the terms in the ontology library will change. When the entity linking algorithm trained on the old version of the ontology is applied to the new version of the ontology, it often faces the problem of performance degradation. For example, when new disease concepts are added or the information of certain drugs is updated in the medical ontology library, the existing algorithms may not be able to incorporate this new information into the entity linking process in a timely manner and still perform matching and linking according to the old ontology library, resulting in a decrease in the accuracy of the linking results. To adapt to the update of the ontology library, the entire algorithm often needs to be retrained and adjusted, which not only consumes a large amount of computing resources and time but also incurs high maintenance costs.

[0035] Based on this, the present application provides a method for training an entity linking model in medical entity linking. By using a dual encoder to fuse the hyponymy and hypernymy relationship information of concepts in the medical ontology library, a loss function is calculated using the similarity of the ontology semantic structure to guide the training and optimization of the model. Based on this, the entity linking model can learn a better dense vector representation, making the vector distances between entities with similar ontology semantic structures closer, improving the performance of the entity linking model, and enhancing the entity linking results. Further, the embodiments of the present application also optimize the loss function by jointly updating the total entities and historical total entities in the updated medical ontology library on the basis of the already implemented entity linking, that is, incorporating continuous learning to better adapt to the dynamic update of the ontology library.

[0036] The following will describe multiple embodiments of the embodiments of the present application in detail with reference to the accompanying drawings.

[0037] Figure 1 FIG. is an exemplary flowchart showing a method 100 for training an entity linking model in medical entity linking according to an embodiment of the present application. Among them, the entity linking model may at least include a first encoder and a second encoder sharing parameters. In some embodiments, the first encoder and the second encoder may be, for example, BERT models. As Figure 1 shown in, the method 100 includes: Step S101: Obtain a target text mention to be entity-linked and the total entities in the medical ontology library; Step S102: Use the first encoder and the second encoder to perform encoding operations on the target text mention and the total entities respectively, and obtain a mention vector and an entity vector correspondingly; Step S103: Calculate the first similarity between the mention vector and the entity vector; Step S104: Match the candidate entities of the target text mention from the total entities; Step S105: Calculate the second similarity between the target text mention and the candidate entities; Step S106: Determine a target loss function based on the first similarity and the second similarity to train the entity linking model in medical entity linking.

[0038] First, at step S101, obtain the target text mention to be entity-linked and all entities in the medical ontology library. As mentioned above, the target text mention can be, for example, medical terms such as diseases, symptoms, genes, etc., such as "speech delay", "sluggish speech"; "hypertension", etc. All entities in the medical ontology library can be, for example, those that contain the aforementioned text mentions or related concepts or entries corresponding to the text mentions. For example, the related entry corresponding to "speech delay" and "sluggish speech" is "sluggish speech".

[0039] Next, at step S102, use the first encoder and the second encoder to perform encoding operations on the target text mention and all entities respectively, and obtain a mention vector and an entity vector correspondingly. In some implementation scenarios, the first and second encoders with shared parameters can be used to encode the target text mention and all entities into dense vector representations respectively, so as to map the two into the same vector space.

[0040] It can be understood that the dense vector representation is a way to convert mentions (such as specific medical terms) in biomedical texts and entities in the medical ontology library into numerical vectors. These vectors have dense features and can effectively represent the semantic information of entities, playing a key role in medical entity linking. Through encoding by the first and second encoders (such as the BERT model), the dense vectors can capture the deep semantic information of biomedical terms and entities. For example, for medical terms with similar meanings, their corresponding dense vectors will be relatively close in the vector space, which can reflect the semantic relevance between these terms.

[0041] As an example, assume that the target text mention is denoted as m and each entity in all entities is denoted as e i , and both the first and second encoders adopt the BERT model, then the mention vector y m = Pool mean (BERT(m)) and the entity vector y ei = Pool mean (BERT(e i )) can be obtained, where Pool mean represents average pooling.

[0042] Based on the extracted mention vector and entity vector, at step S103, calculate the first similarity between the mention vector and the entity vector. In some embodiments, this first similarity can be, for example, the cosine similarity. Specifically, in one implementation scenario, the cosine similarity between the mention vector y m and all entity vectors in the knowledge base can be calculated through the following formula:

[0043]

[0044] Further, at step S104, candidate entities mentioned in the target text are matched from the total entities. In some embodiments, the matching scores between the corresponding target text mentions and each entity in the total entities can be determined according to the first similarity, and the entities under the maximum number of targets of the matching scores are selected as candidate entities to match the candidate entities mentioned in the target text from the total entities. For example, the top K entities with the highest matching scores are selected as candidate entities, where the higher the first similarity (such as cosine similarity), the higher the matching score. As an example, for each target text mention m, the top K candidate entities with the highest matching scores are found in the total entity set E in the medical ontology library: {e1, e2, … e K} = argtopK e∈E Sim(m, e i ).

[0045] After obtaining the candidate entities, at step S105, the second similarity between the target text mention and the candidate entity is calculated. In some embodiments, the second similarity can be, for example, a tree structure similarity, that is, the second similarity is calculated based on the positions of the mention and the candidate entity in the tree structure. Specifically, in one implementation scenario, the tree structure similarity between the target text mention m and the candidate entity can be calculated by the following formula:

[0046]

[0047] where lcs represents the length of the longest common substring, that is, the nearest common root node found according to the tree structure; freq(c) represents the number of child nodes of node c, which is 1 when c is a leaf node, and freq(root) represents the number of root nodes.

[0048] Finally, at step S106, the target loss function is determined based on the first similarity and the second similarity to train the entity linking model in the medical entity linking. In some embodiments, the mean squared error loss is calculated based on the first similarity and the second similarity to determine the target loss function. That is, the target loss function is the mean squared error loss, and based on this mean squared error loss, the entity linking model is trained forward and backward to obtain a trained entity linking model. In one implementation scenario, based on the first similarity Sim(m, e i ) and the second similarity the target loss function L (MSE) can be calculated by the following formula:

[0049]

[0050] As described above, in the embodiments of the present application, the first encoder and the second encoder using shared parameters respectively encode the target text mention and the total entities to obtain a mention vector and an entity vector, extract candidate entities, calculate the first and second similarities, and jointly calculate the target loss function to train the entity linking model. Based on this, by fusing the hypernymy and hyponymy relationship information of concepts in the medical ontology library through the dual encoders, and using the similarity of the ontology semantic structure to guide the training and optimization of the model, the dual encoders can learn a better dense vector representation, and the vector distances between entities with similar ontology semantic structures are closer, thereby improving the performance of the entity linking model and the entity linking result.

[0051] In some embodiments, the above entity linking model may further include a re-ranking module that calculates a new score for each candidate entity by using the re-ranking module, and selects the entity with the highest new score as the candidate entity. Among them, the re-ranking module is obtained by training based on the cross-entropy loss. Based on this, by further considering the semantic similarity between the mention and the candidate entity through the re-ranking module, it is possible to capture finer-grained interactions between the mention and the candidate entity, realize more accurate ranking of the candidate entities, and further improve the accuracy of the entity linking model.

[0052] Specifically, in an implementation scenario, for each mention m and its corresponding set of K candidate entities {e1, e2,... e K}, the re-ranking module calculates a new scoring for each candidate entity Finally, select the entity with the highest score In some implementation scenarios, the re-ranking module is obtained by training based on the cross-entropy loss, that is, optimizing the probability -logP(e * |m) that the correct candidate entity for each mention is selected as the final linked entity, and the cross-entropy loss L rerank is represented by the following formula:

[0053]

[0054] In some embodiments, the embodiments of the present application also involve updating the medical ontology library, calculating a new target loss function based on the total entities in the updated medical ontology library and the historical total entities, so as to train the entity linking model in medical entity linking. In some embodiments, the intermediate target loss function and the first weight parameter can be determined through the total entities in the updated medical ontology library, the second weight parameter corresponding to the historical total entities is determined, and then an elastic weight combination operation is performed according to the intermediate target loss function, the first weight parameter and the second weight parameter to obtain a new target loss function.

[0055] It can be understood that continuous learning is a process of gradually acquiring new knowledge from non-stationary data streams while retaining previously learned information, which mainly involves strategies and experiences. Among them, strategies refer to various methods used to balance learning new data and retaining previous knowledge, and are specifically divided into regularization-based methods and data-based strategies. Preferably, the strategy of elastic weight consolidation regularization is adopted, which avoids forgetting historical knowledge by imposing constraints on the entity linking model parameters. The data strategy involves storing a subset of historical data, which, together with new data, forms a training set to ensure that the entity linking model strengthens historical knowledge while learning new information.

[0056] Experience represents each stage of data exposure and learning, enabling the entity linking model to gradually process and adapt to new inputs, which can help the model learn gradually without degrading the performance of early tasks. That is, through continuous learning, the entity linking model can quickly update when receiving new ontology concepts or relationships while retaining previous knowledge, enabling the entity linking model to adapt to changes in the medical ontology library at any time without retraining the entire model after the medical ontology library is updated.

[0057] In the implementation scenario, corresponding labels can be set according to the order of entity updates. For example, if the linked entity is not yet in the ontology library, it is marked as NIL; if the linked entity has been added to the ontology library, it is updated to the corresponding entity label. As an example, during the update process, the data marked as NIL in the historical data is selected as the replay dataset to prevent the entity linking model from forgetting, and the labels of these NIL data change dynamically with the update of the ontology library. If at time t, the link of the term m is NIL, i.e., label(m)=NIL; if at time t + 1, after the ontology library is updated and m is mapped to the entity e, then label(m)=e.

[0058] Furthermore, assume that O t represents the ontology library version at time t, D t represents the input dataset used at time t, and the entity linking model needs to be adjusted as O t is updated so that in the ontology library O t+1 at time t + 1, the entity linking model can still accurately link the entities in the input text. As mentioned above, the entity linking model can include the first and second encoders and a re-ranking module.

[0059] In the implementation scenario, for all entities in the updated medical ontology library at the current moment, by using the aforementioned training process, the intermediate target loss function L new at the current moment can be obtained, and the corresponding first weight parameter θ i can be obtained, as well as the second weight parameter corresponding to the total historical entities In this scenario, a new target loss function L can be obtained by using the elastic weight consolidation operation EWC , which can be specifically expressed as follows:

[0060]

[0061] where λ represents the regularization coefficient, which is used to control the importance of historical knowledge. F i represents the diagonal element of the Fisher information matrix, which is used to measure the importance of each first weight and second weight parameter. Based on this, the embodiments of the present application achieve efficient and stable entity linking that can adapt to the dynamic update of the ontology library.

[0062] Figure 2 is an exemplary overall flowchart showing the training of the entity linking model in medical entity linking according to the embodiments of the present application. It should be understood that Figure 2 is a specific embodiment of the method 100 above, so the descriptions made above regarding Figure 1 also apply to Figure 1 here. Figure 2 .

[0063] As Figure 2 shown, at step S201, the target text mention to be entity-linked and all entities in the medical ontology library are obtained. Then, at steps S202 and S203, the target text mention and all entities are respectively encoded using a first encoder and a second encoder, so as to obtain a mention vector and an entity vector at steps S204 and S205. At step S206, candidate entities that match the target text mention from all entities are used. For example, the K entities with the highest matching scores based on similarity are obtained as candidate entities. Additionally, a re-ranking module can also be used to recalculate new scores for re-ranking to obtain the final candidate entities.

[0064] Furthermore, at step S207, the first similarity between the mention vector and the entity vector is calculated, and at step S208, the second similarity between the target text mention and the candidate entities is calculated. The first similarity can be, for example, the cosine similarity, and the second similarity can be, for example, the tree structure similarity, which can be specifically calculated based on the above formulas (1) and (2). At step S209, the target loss function is determined based on the first similarity and the second similarity. The target loss function is the mean squared error loss, which can be specifically calculated based on the above formula (3). In some embodiments, at step S210, the historical all entities can also be combined to calculate a new target loss function based on elastic weight consolidation. Finally, at step S211, the entity linking model in medical entity linking is trained based on the new target loss function.

[0065] Figure 3 is an exemplary flowchart showing a method 300 for medical entity linking according to an embodiment of the present application. As Figure 3 shown, the method 300 may include step S301: obtaining a target text mention to be entity-linked and step S302: inputting the target text mention into a trained entity-linking model for entity linking to obtain an entity-linking result. Among them, for more details about the training of the entity-linking model, reference may be made to the above Figure 1 description, which will not be elaborated herein in the present application.

[0066] Figure 4 is an exemplary structural block diagram showing an electronic device 400 according to an embodiment of the present application. It can be understood that the electronic device 400 may include the device of the embodiment of the present application, and the device for implementing the solution of the present application may be a single device (such as a computing device) or a multifunctional device including various peripheral devices.

[0067] As Figure 4 shown, the electronic device of the present application may further include a central processor or central processing unit (“CPU”) 411, which may be a general-purpose CPU, a dedicated CPU, or other information processing and program execution units. Further, the electronic device 400 may further include a mass storage 412 and a read-only memory (“ROM”) 413, where the mass storage 412 may be configured to store various types of data, including various target text mentions and total entities, mention vectors and entity vectors, first similarity and second similarity, target loss function, algorithm data, intermediate results, and various programs required to run the electronic device 400 in a medical ontology library. The ROM 413 may be configured to store data and instructions for power-on self-test of the electronic device 400, initialization of each functional module in the system, driver for basic input / output of the system, and data and instructions required to boot the operating system.

[0068] Optionally, the electronic device 400 may further include other hardware platforms or components, such as the shown tensor processing unit (“TPU”) 414, graphics processing unit (“GPU”) 415, field programmable gate array (“FPGA”) 416, and machine learning unit (“MLU”) 417. It can be understood that although various hardware platforms or components are shown in the electronic device 400, this is merely exemplary rather than restrictive, and those skilled in the art may add or remove corresponding hardware according to actual needs. For example, the electronic device 400 may include only a CPU, related storage devices, and interface devices to implement the method for training the entity-linking model in medical entity linking or the method for medical entity linking of the present application.

[0069] In some embodiments, for the convenience of data transfer and interaction with an external network, the electronic device 400 of the present application further includes a communication interface 418, so that it can be connected to a local area network / wireless local area network ("LAN / WLAN") 405 through the communication interface 418, and then can be connected to a local server 406 or connected to the Internet ("Internet") 407 through the LAN / WLAN. Alternatively or additionally, the electronic device 400 of the present application can also be directly connected to the Internet or a cellular network based on wireless communication technology through the communication interface 418, such as based on the wireless communication technology of the third generation ("3G"), the fourth generation ("4G") or the fifth generation ("5G"). In some application scenarios, the electronic device 400 of the present application can also access a server 408 and a database 409 of an external network as needed, so as to obtain various known algorithms, data and modules, and can remotely store various data, such as various types of data or instructions for presenting, for example, the total entities, mention vectors and entity vectors, the first similarity and the second similarity, the target loss function, etc. in the target text mention and the medical ontology library.

[0070] The peripheral devices of the electronic device 400 may include a display device 402, an input device 403 and a data transmission interface 404. In one embodiment, the display device 402 may include, for example, one or more speakers and / or one or more visual displays, which are configured to train the entity linking model in the medical entity linking of the present application or to perform voice prompts and / or image and video displays for medical entity linking. The input device 403 may include, for example, other input buttons or controls such as a keyboard, a mouse, a microphone, a gesture capture camera, etc., which are configured to receive the input of audio data and / or user instructions. The data transmission interface 404 may include, for example, a serial interface, a parallel interface or a universal serial bus interface ("USB"), a small computer system interface ("SCSI"), a serial ATA, a FireWire, a PCI Express and a high-definition multimedia interface ("HDMI"), etc., which are configured for data transmission and interaction with other devices or systems. According to the solution of the present application, the data transmission interface 404 can receive the target text mention from the medical database and the total entities in the medical ontology library, and transmit to the electronic device 400 the total entities including the target text mention and the medical ontology library or various other types of data or results.

[0071] The above-mentioned CPU 411, large-capacity memory 412, ROM 413, TPU 414, GPU 415, FPGA 416, MLU 417, and communication interface 418 of the electronic device 400 of the present application can be interconnected through the bus 419 and achieve data interaction with peripheral devices through this bus. In one embodiment, through this bus 419, the CPU 411 can control other hardware components and their peripheral devices in the electronic device 400.

[0072] The above combination Figure 4 has described the electronic device that can be used to execute the present application. It should be understood that the device structure or architecture here is only exemplary, and the implementation manner and implementation entity of the present application are not limited by it, but can be changed without departing from the spirit of the present application.

[0073] According to the above description in combination with the drawings, those skilled in the art can also understand that the embodiments of the present application can also be implemented through software programs. Accordingly, the present application also provides a computer-readable storage medium, on which computer-readable instructions for training an entity linking model in medical entity linking or for medical entity linking are stored. When the computer-readable instructions are executed by one or more processors, they can be used to implement the method for training the entity linking model in medical entity linking described in combination with the attached Figure 1 drawings or the method for medical entity linking described in combination with Figure 3 the drawings.

[0074] It should be noted that although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. On the contrary, the steps depicted in the flowchart can change the execution order. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step for execution, and / or one step can be decomposed into multiple steps for execution.

[0075] It should be understood that when terms such as "first", "second", "third", and "fourth" are used in the claims, the description, and the drawings of the present application, they are only used to distinguish different objects, rather than to describe a specific order. The terms "comprising" and "including" used in the description and claims of the present application indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.

[0076] It should also be understood that the terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. As used in the specification and claims of this application, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include the plural forms. It should be further understood that the term "and / or" used in the specification and claims of this application refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0077] Although the embodiments of this application are as above, the above content is only an example for the convenience of understanding this application and is not intended to limit the scope and application scenarios of this application. Any person skilled in the technical field of this application can make any modifications and changes in the form of implementation and details without departing from the spirit and scope disclosed in this application. However, the scope of patent protection of this application shall still be subject to the scope defined by the appended claims.

[0078] In addition, the collection and acquisition of various data in this application comply with relevant laws and regulations and are authorized by the data providers. Any organization or individual that needs to obtain external data should obtain authorization in accordance with the law and ensure data security, and shall not illegally collect, use, process, or transmit unauthorized or unprotected data, nor illegally buy, provide, or disclose unauthorized or unprotected data.

Claims

1. A method for training an entity linking model in medical entity linking, wherein the entity linking model comprises at least a first encoder and a second encoder that share parameters, and the method comprises: Obtain the target text mentions to be entity linked and the total entities in the medical ontology library; Using the first encoder and the second encoder to respectively encode the target text mention and the total entity, and correspondingly obtain a mention vector and an entity vector; Calculating a first similarity between the mention vector and the entity vector; Matching candidate entities mentioned in the target text from the total entities; Calculating a second similarity between the target text mention and the candidate entity; A target loss function is determined based on the first similarity and the second similarity to train the entity linking model in medical entity linking. The method according to claim 1 , wherein the first similarity comprises cosine similarity and the second similarity comprises tree structure similarity.

3. The method according to claim 1 or 2, wherein the candidate entity mentioned by the target text is matched from the total entity by the following operations: Determining a matching score between the corresponding target text mention and each entity in the total entity according to the first similarity; The entity under the target quantity with the largest matching score is selected as the candidate entity to match the candidate entity mentioned in the target text from the total entities.

4. The method according to claim 1 or 2, wherein determining a target loss function based on the first similarity and the second similarity comprises: A mean square error loss is calculated based on the first similarity and the second similarity to determine the target loss function.

5. The method according to claim 3, wherein the entity linking model further comprises a reordering module, and the method further comprises: Calculate a new score for each candidate entity using the re-ranking module, wherein the re-ranking module is obtained based on cross entropy loss training; The new entity with the highest score is selected as the candidate entity.

6. The method according to claim 1, further comprising: In response to updating the medical ontology library, a new target loss function is calculated based on the total entities and the historical total entities in the updated medical ontology library to train the entity linking model in medical entity linking.

7. The method according to claim 6, wherein calculating a new target loss function based on the total entities and the historical total entities in the updated medical ontology library comprises: Determine an intermediate objective loss function and a first weight parameter based on the total entities in the updated medical ontology library; Determining a second weight parameter corresponding to the historical total entity; An elastic weight merging operation is performed according to the intermediate objective loss function, the first weight parameter and the second weight parameter to obtain a new objective loss function.

8. A method for medical entity linking, comprising: Get the target text mention to be entity linked; The target text mention is input into the entity linking model trained according to the method described in any one of claims 1 to 7 to perform entity linking and obtain an entity linking result.

9. An electronic device, comprising: processor; as well as A memory having computer instructions for training an entity linking model in medical entity linking stored thereon, which, when executed by a processor, implement the method according to any one of claims 1 to 7; or having computer instructions for medical entity linking stored thereon, which, when executed by a processor, implement the method according to claim 8.

10. A computer-readable storage medium, on which computer program instructions for training an entity linking model in medical entity linking are stored, and when the computer program instructions are executed by one or more processors, the method according to any one of claims 1-7 is implemented; or a computer program instruction for training an entity linking model in medical entity linking is stored, and when the computer program instructions are executed by one or more processors, the method according to claim 8 is implemented.

Citation Information

Patent Citations

  • Biomedical entity linking method based on knowledge representation

    CN110110324A

  • Entity linking method and device

    CN111415748A

  • Entity linking method and device based on semantic components

    CN111613341A

  • Entity link model training method, entity link method and entity link device

    CN113779225A

  • Intelligent online teaching resource knowledge point concept entity linking method

    CN114443813A