Processing method and device for medical knowledge graph
Through the transfer learning method, a small amount of training data is used to train the medical entity model, which solves the problems of low recall rate and high cost in the existing technology, and realizes the efficient identification of medical entity aliases and new entities, expands the knowledge graph and quality controls the electronic medical records.
Patent Information
- Application Number
- CN202011415694.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-04
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2040-12-04
AI Technical Summary
Existing technologies have a low recall rate when identifying medical entity aliases and newly added medical entities, and require a large amount of labeled data for model training, resulting in high costs and low efficiency.
Using the transfer learning method, the neural network model obtained by training other tasks is combined with a small amount of training data to train the medical entity model, identify medical entities and expand the medical knowledge graph.
It improves the recall rate of medical entity recognition, reduces dependence on labeled data, reduces training costs, and expands the alias coverage of medical knowledge graphs, enabling quality control of electronic medical records.
Smart Images

Figure CN112541354B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence and can be used in fields such as knowledge graphs, transfer learning, and natural language processing. More specifically, it relates to a processing method and device for medical knowledge graphs, a training method and device for medical entity models, and an electronic device and storage medium. Background Art
[0002] With the widespread adoption of electronic medical records (EMRs), the application of medical knowledge graphs is becoming increasingly widespread. Due to factors such as geographic location and the level of medical knowledge, the same medical entity often has multiple different names and representations. Using medical texts such as EMRs, we can identify aliases and add new medical entities, thereby expanding existing medical knowledge graphs. Conversely, expanding the medical knowledge graph also allows for effective quality control of EMRs. Summary of the Invention
[0003] The present application provides a method and device for processing medical knowledge graphs, a method and device for training medical entity models, an electronic device, and a storage medium.
[0004] According to a first aspect, a training method for a medical entity model is provided, comprising: obtaining a training data set for a medical entity recognition task; obtaining a network model trained for other tasks, wherein the network model has the same underlying logic as the medical entity model; and training the network model based on the training data set to obtain the medical entity model.
[0005] According to a second aspect, a training device for a medical entity model is provided, comprising: a first acquisition module for acquiring a training data set for a medical entity recognition task; a second acquisition module for acquiring a network model trained for other tasks, wherein the network model has the same underlying logic as the medical entity model; and a training module for training the network model based on the training data set to obtain the medical entity model.
[0006] According to a third aspect, a processing method for a medical knowledge graph is provided, comprising: extracting medical entities from medical text; identifying the medical entities using a medical entity model obtained through transfer learning to obtain corresponding recognition results; and in response to the recognition result characterizing the medical entity as an alias of an existing standard entity, adding the medical entity to the medical knowledge graph and adding corresponding alias attribute information for the medical entity.
[0007] According to a fourth aspect, a processing device for a medical knowledge graph is provided, comprising: an extraction module for extracting medical entities from medical text; an identification module for identifying the medical entities using a medical entity model obtained through transfer learning to obtain corresponding identification results; and a knowledge graph processing module for characterizing the medical entity as an alias of an existing standard entity in response to the identification result, adding the medical entity to the medical knowledge graph and adding corresponding alias attribute information for the medical entity.
[0008] According to the fifth aspect, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method of an embodiment of the present application.
[0009] According to a sixth aspect, a non-transitory computer-readable storage medium storing computer instructions is provided, including: the above-mentioned computer instructions are used to enable the above-mentioned computer to execute the method of the embodiment of the present application.
[0010] According to a seventh aspect, a computer program product is provided, comprising a computer program / instruction, which implements the above-mentioned method of the embodiment of the present application when executed by a processor.
[0011] According to the technical solution provided in the embodiment of the present application, a medical entity model is obtained by transfer learning, which only requires a small amount of training data for model training, and thus does not require a large amount of labeled data, thereby saving costs and improving the model training efficiency and the recognition ability of the model. In addition, it is currently difficult to have enough medical knowledge and correctly labeled corpus for full training, and using the results of the previous model for transfer learning can solve this problem. In addition, through the embodiment of the present application, the number of medical entities in the original standard library can be expanded, and the medical entity aliases used by some entities in clinical electronic medical records can be obtained, and this part of the data can be returned to the total medical knowledge graph to increase the coverage of the alias attributes in the graph. In addition, the medical knowledge graph can also be used for quality control, such as in the process of generating electronic medical records, to determine whether the doctor's diagnosis is accurate, whether the medication is reasonable, and so on.
[0012] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present application.
[0014] Figure 1A The system architecture of the method and apparatus for processing medical knowledge graphs suitable for the embodiments of the present application is exemplified;
[0015] Figure 1B The following diagram exemplifies a scenario in which quality control of electronic medical records can be implemented in accordance with an embodiment of the present application;
[0016] Figure 2 The following is a flowchart illustrating a method for processing a medical knowledge graph according to an embodiment of the present application.
[0017] Figure 3 A flowchart of a method for training a medical entity model according to an embodiment of the present application is exemplarily shown;
[0018] Figure 4 The following is a block diagram illustrating a processing device for a medical knowledge graph according to an embodiment of the present application;
[0019] Figure 5 A block diagram illustrating a training apparatus for a medical entity model according to an embodiment of the present application is exemplified; and
[0020] Figure 6 A block diagram of an electronic device used to implement the above-mentioned method and apparatus according to an embodiment of the present application is exemplarily shown. DETAILED DESCRIPTION
[0021] The following description of exemplary embodiments of the present application is made in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0022] Several classification and recognition methods for medical entities are provided in the related art.
[0023] For example, some rules can be manually defined and then used to directly classify medical entities. Another example involves manually defining the similarity between attributes and defining corresponding similarity thresholds. A tree model is then constructed based on the similarity between each attribute and the threshold, and finally the tree model is used for matching to achieve classification of medical entities. Because the "rules" and "similarity between attributes" in these schemes are manually summarized, their coverage is incomplete, resulting in a low recall rate for medical entity aliases, such as only 50%.
[0024] For another example, existing tools can be used to obtain the location information of clinical medical entities (such as "left" and "right" in "left kidney stones" and "right kidney stones"), and then compare the location information of the two medical entities (such as comparing the location information "left" of "left kidney stones" with the location information "right" of "right kidney stones"). If the location information of the two medical entities is consistent, the similarity between the two medical entities is further calculated. If the similarity is less than a predefined similarity threshold, it is determined that the two medical entities are different names or expressions of the same medical entity. If the location information of the two medical entities is inconsistent, it will jump out directly. On the one hand, this solution relies on the existing interface to obtain location information, and the accuracy is low; on the other hand, even if the medical entities indicate different locations, they may have the same superordinate concept. For example, "left kidney stones" and "right kidney stones" indicate different locations, but both belong to the same superordinate concept, namely "kidney stones". Therefore, this solution also has the problem of low recall rate.
[0025] It should be understood that in the embodiment of the present application, the recall rate indicates how many positive samples (such as aliases belonging to the same medical entity) are found.
[0026] In this regard, an embodiment of the present application provides an improved medical entity recognition solution. Through transfer learning, a small amount of training data is used for training on the basis of a neural network model trained for other tasks to obtain a medical entity model for medical entity recognition tasks. The model is used to identify medical entities appearing in medical texts such as electronic medical records, find aliases of existing standard medical entities or add new medical entities, and expand the existing medical knowledge graph based on the found medical entities.
[0027] The present application will be described in detail below with reference to specific embodiments.
[0028] The system architecture of the method and apparatus for processing medical knowledge graphs suitable for the embodiments of the present application is introduced as follows.
[0029] Figure 1A The system architecture of the method and apparatus for processing medical knowledge graphs suitable for the embodiments of the present application is exemplified. It should be noted that Figure 1A What is shown is merely an example of a system architecture to which the embodiments of the present application can be applied, to help those skilled in the art understand the technical content of the present application, but does not mean that the embodiments of the present application cannot be used in other environments or scenarios.
[0030] like Figure 1A As shown, the system architecture 100 may include terminal devices 101 , 102 , 103 , a server 104 and a server 105 .
[0031] In an embodiment of the present application, clinical electronic medical records can be submitted from terminal devices 101, 102, and 103. Server 104 can extract training data from the clinical electronic medical records submitted by terminal devices 101, 102, and 103 over a period of time, and obtain a neural network model trained for other tasks, and then use the training data to train on the basis of the neural network model to obtain a medical entity model for medical entity recognition. Server 105 can obtain the medical entity model from server 104, and extract medical entities from the clinical electronic medical records submitted by terminal devices 101, 102, and 103, and then use the medical entity model to recognize the currently extracted medical entities, and expand the existing medical knowledge graph or normalize and construct a new medical knowledge graph based on the recognition results.
[0032] It should be understood that in the embodiment of the present application, server 104 and server 105 can be the same server, or they can be different servers, and the present application does not limit this.
[0033] It should also be understood that Figure 1A The number of terminal devices and servers in the embodiment is merely illustrative. Any number of terminal devices and servers may be provided as required.
[0034] The application scenarios of the processing method and device for medical knowledge graph suitable for the embodiments of the present application are introduced as follows.
[0035] It should be noted that the technical solution provided in the embodiments of this application can identify the aliases of existing standard medical entities and newly added standard medical entities. Therefore, the solution provided in the embodiments of this application can be used to expand or construct a medical knowledge graph, update a medical entity alias dictionary, improve the standard medical entity database, etc., and the medical knowledge graph can also be used to perform quality control on electronic medical records, etc.
[0036] like Figure 1B As shown, if a medical entity with female gender characteristics such as "uterine fibroids" appears in the chief complaint part of an electronic medical record, and a medical entity with male gender characteristics such as "prostatitis" appears in the diagnosis part, when the medical knowledge graph obtained by this application is used to perform quality control on the electronic medical record, the user can be prohibited from submitting such an electronic medical record with contradictory information, and the user can be prompted to modify the contradictory information.
[0037] The present invention solves the problem of differences in clinical medical entity data when incorporated into the medical knowledge graph. Furthermore, medical entity normalization can be achieved when generating electronic medical records, converting non-standard input into standard knowledge.
[0038] According to an embodiment of the present application, the present application provides a processing method for medical knowledge graphs.
[0039] Figure 2 A flowchart of a method for processing a medical knowledge graph according to an embodiment of the present application is exemplified.
[0040] like Figure 2 As shown, the method 200 may include operations S210 to S230.
[0041] In operation S210 , medical entities are extracted from the medical text.
[0042] In operation S220 , the medical entity model obtained through transfer learning is used to identify the medical entity to obtain a corresponding recognition result.
[0043] In operation S230 , in response to the recognition result indicating that the medical entity is an alias of an existing standard entity, the medical entity is added to the medical knowledge graph and corresponding alias attribute information is added to the medical entity.
[0044] In an embodiment of the present application, a medical entity model for identifying medical entity aliases and newly added medical entities can be pre-trained through transfer learning. Specifically, a network model having the same or similar underlying logic as the medical entity recognition task can be obtained, for example, a network model trained for a search-based question answering task can be obtained, and the training data can be used to train the network model to obtain the medical entity model required for use in operation S220 in an embodiment of the present application.
[0045] In an embodiment of the present application, in operation S210, medical entities can be extracted from the chief complaint, present medical history, and diagnosis of the clinical electronic medical record. Then, in operation S220, the medical entity extracted in operation S210 can be input into the aforementioned medical entity model to identify the medical entity and determine whether the medical entity is an alias of an existing standard entity or a newly added medical entity. In operation S230, if it is determined that the medical entity is an alias of an existing standard entity, the medical entity is added to the corresponding medical knowledge graph and corresponding alias attribute information is added for the medical entity.
[0046] It should be understood that in the embodiment of the present application, the existing standard entity refers to the standard medical entity that already exists in the preset form. In the embodiment of the present application, the medical entity that is an alias can be added to the medical entity alias dictionary to enrich the aliases included in the dictionary.
[0047] It should be understood that supervised learning usually requires a large amount of labeled data, and labeling data is a tedious and expensive task. Through the embodiment of the present application, a medical entity model is obtained by using transfer learning. Only a small amount of training data is required for model training, so a large amount of labeled data is not required, which can save costs and improve the efficiency of model training and the recognition ability of the model. In addition, it is currently difficult to have enough medical knowledge and correctly labeled corpus for full training, and using the results of the previous model for transfer learning can solve this problem. In addition, the medical entity aliases used by some entities in clinical electronic medical records can be obtained, and this part of the data can be returned to the total medical knowledge graph to increase the coverage of the alias attributes in the graph. In addition, the medical knowledge graph can also be used for quality control, such as in the process of generating electronic medical records, to determine whether the doctor's diagnosis is accurate, whether the medication is reasonable, and so on. In addition, through the embodiment of the present application, the use of the transfer model (i.e., the above-mentioned medical entity model) can improve the recall rate of clinical medical record knowledge classification while reducing the energy of manually configuring rules. Specifically, after the process is connected in any hospital, the clinical medical records of each hospital can be processed on a large scale before each admission to the hospital to enrich the clinical entity representation knowledge in the medical knowledge graph. This is more convenient and practical, and has a high reusability rate.
[0048] As an optional embodiment, the method may further include: in response to the above-mentioned recognition result obtained through operation S220 characterizing that the identified medical entity is a new entity that is not an alias of any existing standard entity, adding the medical entity as a new standard entity in the medical knowledge graph.
[0049] It should be understood that in the embodiment of the present application, if a medical entity is neither an existing standard entity in the preset form nor an alias of an existing standard entity in the preset form, the medical entity is considered to be a newly added standard medical entity, referred to as a newly added entity.
[0050] In the embodiment of the present application, newly added standard medical entities can be added to the standard medical entity database (referred to as the standard library) to expand the number of standard medical entities included in the standard library. At the same time, the newly added entities are updated to the medical knowledge graph to improve the medical knowledge graph.
[0051] Furthermore, after newly added entities are reviewed and added to the standard library, further medical entity similarity matching can be performed.
[0052] As an optional embodiment, the medical entity model used in operation S220 may be obtained through the following operations.
[0053] Obtain a training dataset for the medical entity recognition task.
[0054] Obtain a network model trained for other tasks, where the network model has the same underlying logic as the medical entity model.
[0055] Training is performed on the network model based on the training data set to obtain a medical entity model.
[0056] For example, in one embodiment, a retrieval-based question answering model trained for a retrieval-based question answering task can be obtained, and the medical entity model in the embodiment of the present application can be trained on this model.
[0057] In one embodiment, data annotation can be performed on the training data set obtained by the above operation. For example, medical entities with a certain degree of similarity can be extracted from clinical medical entities, such as medical entities with a certain degree of similarity recorded in the chief complaint, current medical history, and diagnosis section of the electronic medical record, and medical experts can perform data annotation. Specifically, it can be determined whether two or more medical clinical knowledge expressions are different names of the same medical entity. If so, they are marked as 1, otherwise they are marked as 0. Alternatively, the opposite marking can be made.
[0058] Furthermore, in the embodiment of the present application, the training data can be pre-processed, for example, data marked as consistent or inconsistent by experts can be spliced, for example, in the form of "word separator word". For example, such as "right kidney mass 1; right kidney cyst 1".
[0059] Alternatively, in another embodiment, the training dataset obtained by the above operation may not be labeled. For example, two or more medical entities with a certain degree of similarity extracted from the same electronic medical record may be defaulted to being different names of the same medical entity, while two or more medical entities with a certain degree of similarity extracted from different electronic medical records may be defaulted to being different names of medical entities.
[0060] Specifically, in the embodiment of the present application, medical entities with a certain similarity can be extracted from clinical medical entities based on the Levenshtein distance (a type of edit distance).
[0061] It's important to note that the Levenshtein distance is an edit distance, referring to the minimum number of edit operations required to transform two strings from one to the other. Permitted edit operations include replacing one character with another, inserting a character, and deleting a character. The Levenshtein distance measures the similarity between two characters and is defined as "the number of deletion, insertion, and substitution operations required to transform string a into string b." The smaller the Levenshtein distance, the higher the similarity.
[0062] It should be understood that supervised learning usually requires a large amount of labeled data, and labeling data is a tedious and expensive task. Through the embodiments of the present application, a medical entity model is obtained by using transfer learning, which only requires a small amount of training data for model training. Therefore, a large amount of labeled data or even no data labeling is required, which can save costs and improve the efficiency of model training and the recognition ability of the model. In addition, it is currently difficult to have enough medical knowledge and correctly labeled corpus for full training, and using the results of the previous model for transfer learning can solve this problem.
[0063] Further, as an optional embodiment, training on the network model based on the training data set may include the following operations.
[0064] The network model trained for other tasks is modified in the following way to obtain a modified network model: the last layer of the network model is removed and a fully connected layer and a soft max layer are added.
[0065] Training is performed based on the modified network model based on the training dataset.
[0066] It should be noted that adding a fully connected layer can integrate more features and achieve full feature coverage, that is, it can overcome the defect of the above-mentioned related technologies that the features cannot be fully covered due to manually defined rules.
[0067] In this embodiment of the present application, the soft max layer can be used as the activation function of the fully connected layer for classification problems. Specifically, in this embodiment of the present application, the soft max layer can output two categories: one category is consistent with an existing standard medical entity, that is, an alias of an existing standard medical entity; the other category is a non-alias category, that is, it may be a newly added entity not included in the standard library.
[0068] In addition, in an embodiment of the present application, during the training process based on the modified network model based on the acquired training data set, the modified network model can be fine-tuned, that is, the network layer parameters other than the fully connected layer and the soft max layer can be controlled to remain unchanged, and only the parameters of the fully connected layer and the soft max layer can be trained. Therefore, even if the amount of training data is not large, a medical entity model with high recognition ability can be efficiently trained to improve the recall rate of medical entities.
[0069] Furthermore, as an optional embodiment, the method may further include: before training on the basis of the modified network model based on the training dataset, using a semantic understanding pre-training framework to model the training data in the training dataset.
[0070] In one embodiment, ernie (a semantic understanding pre-training framework based on continuous learning) can be used to first uniformly model the training data in the training data set, and then input the above network model for training.
[0071] Through the embodiments of the present application, the Ernie semantic understanding pre-training framework is used to uniformly model the training data, and natural language information in multiple dimensions such as lexical, syntactic, and semantic can be obtained from the training data, thereby enhancing the general semantic representation ability of the training data.
[0072] As an optional embodiment, for a medical entity recognition task, obtaining a training dataset includes the following operations.
[0073] For the medical entity recognition task, obtain a candidate set of training data.
[0074] The edit distance between each medical entity in the candidate set of training data is calculated cyclically.
[0075] Data annotation is performed for multiple medical entities whose edit distance is less than a preset value.
[0076] Increase the proportion of multiple medical entities labeled as different medical entities in the training dataset.
[0077] In one embodiment, when obtaining a candidate set of training data for training, the Levenshtein distance can be used for data enhancement, that is, focused data preprocessing can be performed. Specifically, the edit distance between each medical entity in the candidate set of training data can be calculated cyclically, and a portion of training data with a smaller edit distance (such as less than a preset value) can be obtained, and it is considered that this portion of training data is more likely to be a different alias for the same entity. Priority labeling can be performed for this portion of training data. For entities that are not marked as aliases of the same medical entity, you can focus on this type of entity and increase the frequency of their appearance in the training data set. For example, for negative samples that appear to be relatively similar, such as left kidney stones and right kidney stones, they can be focused on to increase the frequency of their appearance in the training data set.
[0078] In an embodiment of the present application, by performing data enhancement on certain negative samples, such as using the edit distance to calculate the similarity of training data and increasing the proportion of some training data, the neural network can be prevented from learning irrelevant features, thereby fundamentally improving the model performance.
[0079] According to an embodiment of the present application, the present application provides a training method for a medical entity model.
[0080] Figure 3 The flowchart of the training method for a medical entity model according to an embodiment of the present application is exemplarily shown.
[0081] like Figure 3 As shown, the method 300 may include operations S310 to S330.
[0082] In operation S310 , a training dataset is obtained for a medical entity recognition task.
[0083] In operation S320 , a network model trained for other tasks is obtained, where the network model and the medical entity model have the same underlying logic.
[0084] In operation S330 , training is performed on the network model based on the training data set to obtain a medical entity model.
[0085] As an optional embodiment, training on the network model based on the training data set may include the following operations.
[0086] The network model trained for other tasks is modified in the following way to obtain a modified network model: the last layer of the network model is removed and a fully connected layer and a soft max layer are added.
[0087] Training is performed based on the modified network model based on the training dataset.
[0088] Furthermore, as an optional embodiment, the method may further include: before performing training on the basis of the modified network model based on the training dataset, modeling the training data in the training dataset using a semantic understanding pre-training framework.
[0089] As an optional embodiment, for a medical entity recognition task, obtaining a training dataset includes the following operations.
[0090] For the medical entity recognition task, obtain a candidate set of training data.
[0091] The edit distance between each medical entity in the candidate set of training data is calculated cyclically.
[0092] Data annotation is performed for multiple medical entities whose edit distance is less than a preset value.
[0093] Increase the proportion of multiple medical entities labeled as different medical entities in the training dataset.
[0094] It should be noted that the method for training a medical entity model in the embodiment of the present application is the same as the method for training a medical entity model in the aforementioned embodiment, and the embodiment of the present application will not be repeated here.
[0095] According to an embodiment of the present application, the present application also provides a processing device for medical knowledge graphs.
[0096] Figure 4A block diagram of a processing device for a medical knowledge graph according to an embodiment of the present application is exemplified.
[0097] like Figure 4 As shown, the device 400 may include: an extraction module 410, an identification module 420 and a knowledge graph processing module 430.
[0098] Specifically, the extraction module 410 is used to extract medical entities from medical texts.
[0099] The recognition module 420 is used to recognize medical entities using the medical entity model obtained through transfer learning to obtain corresponding recognition results.
[0100] The knowledge graph processing module 430 is used to add the medical entity to the medical knowledge graph and add corresponding alias attribute information for the medical entity in response to the recognition result characterizing the medical entity as an alias of an existing standard entity.
[0101] As an optional embodiment, the knowledge graph processing module is also used to: in response to the recognition result characterizing that the medical entity is a new entity that is not an alias of any existing standard entity, add the medical entity as a new standard entity in the medical knowledge graph.
[0102] As an optional embodiment, the medical entity model is obtained by a training device for a medical entity model, and the training device for a medical entity model includes: a first acquisition module, used to obtain a training data set for a medical entity recognition task; a second acquisition module, used to obtain a network model trained for other tasks, wherein the network model has the same underlying logic as the medical entity model; and a training module, used to train the network model based on the training data set to obtain the medical entity model.
[0103] As an optional embodiment, the training module includes: a modification unit, used to modify the network model in the following manner to obtain a modified network model: removing the last layer of the network model and adding a fully connected layer and a soft max layer; and a training unit, used to train on the basis of the modified network model based on the training data set.
[0104] As an optional embodiment, the device further includes: a pre-training module for modeling the training data in the training data set using a semantic understanding pre-training framework before training on the modified network model based on the training data set.
[0105] As an optional embodiment, the first acquisition module includes: an acquisition unit, used to obtain a training data candidate set for a medical entity recognition task; a calculation unit, used to cyclically calculate the edit distance between each medical entity in the training data candidate set; a data labeling unit, used to perform data labeling for multiple medical entities whose edit distance is less than a preset value; and a data enhancement unit, used to increase the proportion of multiple medical entities labeled as different medical entities in the training data set.
[0106] It should be noted that, in the embodiments of the present application, the embodiments of the processing device part for medical knowledge graphs are the same or similar to the embodiments of the processing method part for medical knowledge graphs, and the embodiments of the present application will not be repeated here.
[0107] According to an embodiment of the present application, the present application also provides a training device for a medical entity model.
[0108] Figure 5 A block diagram of a training device for a medical entity model according to an embodiment of the present application is exemplarily shown.
[0109] like Figure 5 As shown, the apparatus 500 may include: a first acquisition module 510 , a second acquisition module 520 and a training module 530 .
[0110] The first acquisition module 510 is used to acquire a training dataset for a medical entity recognition task.
[0111] The second acquisition module 520 is used to acquire a network model trained for other tasks, wherein the network model has the same underlying logic as the medical entity model.
[0112] The training module 530 is used to perform training on the network model based on the training data set to obtain a medical entity model.
[0113] As an optional embodiment, the training module includes: a modification unit, used to modify the network model in the following manner to obtain a modified network model: removing the last layer of the network model and adding a fully connected layer and a soft max layer; and a training unit, used to train on the basis of the modified network model based on the training data set.
[0114] As an optional embodiment, the device further includes: a pre-training module for modeling the training data in the training data set using a semantic understanding pre-training framework before training on the modified network model based on the training data set.
[0115] As an optional embodiment, the first acquisition module includes: an acquisition unit, used to obtain a training data candidate set for a medical entity recognition task; a calculation unit, used to cyclically calculate the edit distance between each medical entity in the training data candidate set; a data labeling unit, used to perform data labeling for multiple medical entities whose edit distance is less than a preset value; and a data enhancement unit, used to increase the proportion of multiple medical entities labeled as different medical entities in the training data set.
[0116] It should be noted that, in the embodiments of the present application, the embodiments of the training device for medical entity models are identical or similar to the embodiments of the training method for medical entity models, and the embodiments of the present application are not repeated here.
[0117] According to an embodiment of the present application, the present application further provides an electronic device, a readable storage medium, and a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the method of any of the above embodiments can be implemented.
[0118] like Figure 6 , is a block diagram of an electronic device according to the above-mentioned method (including a processing method for a medical knowledge graph or a training method for a medical entity model) of an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.
[0119] like Figure 6 As shown, the electronic device includes: one or more processors 601, a memory 602, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In other embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 601 is taken as an example.
[0120] Memory 602 is the non-transitory computer-readable storage medium provided in this application. The memory stores instructions executable by at least one processor to cause the at least one processor to perform the method provided in this application. The non-transitory computer-readable storage medium of this application stores computer instructions for causing a computer to perform the method provided in this application.
[0121] The memory 602 is a non-transient computer-readable storage medium that can be used to store non-transient software programs, non-transient computer executable programs and modules, such as the program instructions / modules corresponding to the above-mentioned method in the embodiment of the present application (for example, the attached Figure 4 The processor 601 executes various functional applications and data processing of the server by running the non-transient software programs, instructions, and modules stored in the memory 602, thereby implementing the above method in the above method embodiment.
[0122] The memory 602 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store data created by the use of the electronic device according to the above method, etc. In addition, the memory 602 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 602 may optionally include a memory remotely located relative to the processor 601, and these remote memories may be connected to the electronic device of the above method via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0123] The electronic device for implementing the above method of the present application may further include: an input device 603 and an output device 604. The processor 601, the memory 602, the input device 603 and the output device 604 may be connected via a bus or other means. Figure 6 The bus connection is taken as an example.
[0124] The input device 603 can receive input digital or character information and generate key signal input related to user settings and function control of the electronic device of the above method, such as input devices such as a touch screen, a keypad, a mouse, a trackpad, a touch pad, an indicator stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 604 may include a display device, an auxiliary lighting device (e.g., an LED), and a tactile feedback device (e.g., a vibration motor). The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some embodiments, the display device may be a touch screen.
[0125] Various implementations of the systems and techniques described herein can be realized in digital electronic circuit systems, integrated circuit systems, dedicated ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0126] These computer programs (also referred to as programs, software, software applications, or code) include machine instructions for a programmable processor and can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., a magnetic disk, an optical disk, a memory, a programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0127] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0128] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0129] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. This client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a server in a distributed system or a server integrated with a blockchain. The server may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.
[0130] According to the technical solution provided in the embodiment of the present application, a medical entity model is obtained by transfer learning, which only requires a small amount of training data for model training, and thus does not require a large amount of labeled data, thereby saving costs and improving the model training efficiency and the recognition ability of the model. In addition, it is currently difficult to have enough medical knowledge and correctly labeled corpus for full training, and using the results of the previous model for transfer learning can solve this problem. In addition, through the embodiment of the present application, the number of medical entities in the original standard library can be expanded, and the medical entity aliases used by some entities in clinical electronic medical records can be obtained, and this part of the data can be returned to the total medical knowledge graph to increase the coverage of the alias attributes in the graph. In addition, the medical knowledge graph can also be used for quality control, such as in the process of generating electronic medical records, to determine whether the doctor's diagnosis is accurate, whether the medication is reasonable, and so on.
[0131] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this application can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this application can be achieved. This is not a limitation herein.
[0132] The above specific embodiments do not constitute a limitation on the scope of protection of this application. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application shall be included within the scope of protection of this application.
Claims
1. A training method for a medical entity model, comprising: Obtain training datasets for medical entity recognition tasks; Obtaining a network model trained for other tasks, wherein the network model has the same underlying logic as the medical entity model; as well as Performing training on the network model based on the training data set to obtain the medical entity model; Among them, for the medical entity recognition task, a training data set is obtained, including: For medical entity recognition tasks, obtain candidate sets of training data; cyclically calculating the edit distance between each medical entity in the candidate set of the training data; performing data labeling for multiple medical entities having an edit distance less than a preset value, wherein the data labeling is used to classify the multiple medical entities having an edit distance less than the preset value into positive samples and negative samples, wherein the positive samples include multiple medical entities labeled as the same medical entity, and the negative samples include multiple medical entities labeled as different medical entities; and Increasing the frequency of occurrence of the negative samples in the training data set to achieve data enhancement of the negative samples; The training is performed on the network model based on the training data set, including: Modifying the network model in the following manner to obtain a modified network model: removing the last layer of the network model and adding a fully connected layer and a soft max layer, wherein the soft max layer outputs two types of medical entities, wherein one type of medical entity includes aliases of existing standard medical entities and the other type of medical entity includes non-alias medical entities; and Training is performed on the modified network model based on the training data set.
2. The method according to claim 1, further comprising: Before training on the modified network model based on the training data set, The training data in the training dataset is modeled using a semantic understanding pre-training framework.
3. A method for processing a medical knowledge graph, comprising: Extract medical entities from medical texts; Identifying the medical entity using the medical entity model trained by the method according to any one of claims 1-2 to obtain a corresponding recognition result; as well as In response to the recognition result characterizing that the medical entity is an alias of an existing standard entity, the medical entity is added to the medical knowledge graph and corresponding alias attribute information is added to the medical entity.
4. The method according to claim 3, further comprising: In response to the recognition result characterizing that the medical entity is a newly added entity that is not an alias of any existing standard entity, the medical entity is added to the medical knowledge graph as a newly added standard entity.
5. The method according to claim 3, wherein: The medical entity model is obtained by the following operations: Obtain training datasets for medical entity recognition tasks; Obtaining a network model trained for other tasks, wherein the network model has the same underlying logic as the medical entity model; as well as Training is performed on the network model based on the training data set to obtain the medical entity model.
6. A training device for a medical model, comprising: A first acquisition module is used to acquire a training dataset for a medical entity recognition task; A second acquisition module is used to acquire a network model trained for other tasks, wherein the network model has the same underlying logic as the medical entity model; as well as A training module, configured to perform training on the network model based on the training data set to obtain the medical entity model; The first acquisition module includes: An acquisition unit, for acquiring a candidate set of training data for a medical entity recognition task; A calculation unit, configured to cyclically calculate the edit distance between each medical entity in the training data candidate set; a data labeling unit, configured to perform data labeling on a plurality of medical entities having an edit distance less than a preset value, wherein the data labeling is configured to classify the plurality of medical entities having an edit distance less than the preset value into positive samples and negative samples, wherein the positive samples include a plurality of medical entities labeled as the same medical entity, and the negative samples include a plurality of medical entities labeled as different medical entities; and A data enhancement unit, configured to increase the frequency of occurrence of the negative samples in the training data set to achieve data enhancement of the negative samples; Wherein, the training module includes: a modification unit, configured to modify the network model in the following manner to obtain a modified network model: removing the last layer of the network model and adding a fully connected layer and a soft max layer, wherein the soft max layer outputs two types of medical entities, wherein one type of medical entity includes aliases of existing standard medical entities and the other type of medical entity includes non-alias medical entities; and A training unit is used to perform training on the basis of the modified network model based on the training data set.
7. The apparatus according to claim 6, further comprising: A pre-training module is used to model the training data in the training data set using a semantic understanding pre-training framework before training on the basis of the modified network model based on the training data set.
8. A processing device for a medical knowledge graph, comprising: Extraction module, used to extract medical entities from medical texts; an identification module, configured to identify the medical entity using the medical entity model trained by the apparatus according to any one of claims 5-6, and obtain a corresponding identification result; as well as The knowledge graph processing module is used to characterize the medical entity as an alias of an existing standard entity in response to the recognition result, add the medical entity to the medical knowledge graph and add corresponding alias attribute information for the medical entity.
9. The device according to claim 8, wherein The knowledge graph processing module is further configured to, in response to the recognition result characterizing that the medical entity is a newly added entity that is not an alias of any existing standard entity, add the medical entity as a newly added standard entity in the medical knowledge graph.
10. The device according to claim 8, wherein The medical entity model is obtained by a training device for a medical entity model, wherein the training device for a medical entity model comprises: A first acquisition module is used to acquire a training dataset for a medical entity recognition task; A second acquisition module is configured to acquire a network model trained for other tasks, wherein the network model has the same underlying logic as the medical entity model; and A training module is used to perform training on the network model based on the training data set to obtain the medical entity model.
11. An electronic device, wherein: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 5.
12. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 5.
13. A computer program product comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Medical knowledge map construction method, device, server and storage medium
CN109284396A
Cancer image prediction and discrimination method and system based on transfer learning
CN110660478A
Information labeling method and device and information processing method and device
CN111259669A