Method, device and equipment for identifying named entity in rare disease electronic medical record
By constructing and enhancing the rare disease vocabulary, training Chinese medical pre-trained models and combining conditional random fields, the accuracy and robustness of naming entity recognition in rare disease electronic medical records is solved, and efficient identification of rare diseases is achieved.
Patent Information
- Application Number
- CN202411545537.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2024-11-29
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When the prior art naming entity recognition in rare disease electronic medical records, word vector training is insufficient or new words are too many and professional, resulting in a decrease in recognition accuracy and robustness, especially in the word embedding process in rare disease fields. sex.
A rare disease initial synonym thesaurus was constructed, and the target synonym thesaurus was obtained through replacement enhancement. It was used to train Chinese medical pre-training models, generate word vectors, and combine conditional random fields for feature extraction and recognition.
It improves the accuracy of naming entity recognition in rare disease electronic medical records, and achieves data balance through data augmentation, which enhances the robustness and accuracy of recognition.
Smart Images

Figure CN119047472A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of natural language processing technology, and in particular to a method, device and equipment for identifying named entities in electronic medical records of rare diseases. Background Art
[0002] With the development of artificial intelligence technology, more and more fields have begun to use natural language processing for semantic recognition and processing. The purpose of named entity recognition in rare disease electronic medical records is to identify named entities from an unstructured electronic medical record of a rare disease patient and classify them into a predefined category. As an important source of data related to rare disease patients, named entities can effectively support many downstream applications in the field of natural language processing, such as disease characteristic research, medical record analysis, intelligent diagnosis, and information retrieval. In order to solve the problem that rare disease electronic medical records are small in number, have a large number of entity categories, and are highly professional compared to ordinary electronic medical records in actual applications, it is necessary to design a method for identifying named entities in rare disease electronic medical records.
[0003] In the existing method, the patent document with the invention name of "Identification of Entities in Electronic Medical Records" and the application number of "201980003795.2" discloses a method, system and apparatus for entity prediction, including a computer program encoded on a computer storage medium. One of the methods includes performing word segmentation on the text to be predicted to obtain a plurality of words. For each of the plurality of words, a determination is made as to whether the word has a pre-trained word vector. In response to determining that the word has a pre-trained word vector, a pre-trained word vector of the word is obtained. In response to determining that the word does not have a pre-trained word vector, a word vector of the word is determined based on a pre-trained stroke vector. The word vector and the pre-trained stroke vector are trained based on a text sample and a word vector model. The entity associated with the text is predicted by inputting the word vectors of the plurality of words into an entity prediction model.
[0004] In the existing method, the invention name is a method for identifying named entities in electronic medical records, and the patent document with application number 201710789885.1 discloses a method for identifying named entities in electronic medical records, including constructing a professional field dictionary of electronic medical records; classifying the text in the electronic medical records; entity labeling the text containing the named entities, and using the labeled text as a training set and the unlabeled text as a test set; preliminarily setting the size of the feature template window and the feature template content in the conditional random field model, and testing the test set; iteratively adjusting the size of the feature template window and the feature template content until the final feature template window size and feature template content are obtained; and using the conditional random field model to identify named entities for all electronic medical records. The method of the present invention can automatically identify the named entities of electronic medical records, greatly improve the recognition efficiency, and can continuously improve the accuracy and model recognition of the conditional random field model, and can perform entity recognition more accurately and quickly.
[0005] In the process of realizing the present invention, the inventors realized that there are at least the following technical problems in the prior art: the patent document with application number 201980003795.2 verified through experiments the effectiveness and superiority of n-stroke vectors in these tasks. Compared with other methods, n-stroke vectors can significantly improve the accuracy and efficiency of recognition and classification. However, if the number and types of words in the text sample are insufficient, the word vector training based on the cw2vec model may not be able to fully capture the semantic and morphological information of the words, resulting in a decrease in the quality of the word vector and affecting the accuracy of the entity prediction model. Moreover, if there are many new words or more professional words in the text sample, the new word prediction based on n-stroke vectors may not accurately reflect the meaning and attributes of the new words, resulting in the word vectors of the new words being inconsistent with the actual situation, affecting the robustness of the entity prediction model. The patent document with application number 201710789885.1 only sorts the vocabulary according to word frequency to obtain a new vocabulary, and uses the length of the new vocabulary as the vector dimension to construct a vector space model of the support vector machine algorithm; this word embedding method that only relies on the current text is not practical in the field of rare diseases. Due to the small number of electronic medical record samples for rare diseases and the large number of entities, external knowledge needs to be used in the word embedding process, resulting in the actual accuracy rate being not high enough. Summary of the invention
[0006] Embodiments of the present invention provide a method, apparatus, computer device and storage medium for identifying named entities in electronic medical records of rare diseases, so as to improve the recognition accuracy of named entities in electronic medical records of rare diseases.
[0007] In order to solve the above technical problems, the present application embodiment provides a method for identifying named entities in electronic medical records of rare diseases, including: Constructing an initial synonym vocabulary for rare diseases based on electronic medical record data of rare diseases; Replacing and enhancing the synonyms in the initial synonym thesaurus for rare diseases to obtain a target synonym thesaurus for rare diseases; Using the rare disease target synonym thesaurus to train a Chinese medical pre-training model to obtain a trained Chinese medical pre-training model; When receiving a recognition request for a named entity of an electronic medical record of a rare disease, using the trained Chinese medical pre-training model to generate a word vector based on the electronic medical record of the rare disease in the request, and performing feature extraction based on the word vector to obtain a target feature; The target features are identified using a conditional random field, and the corresponding entity naming labels are output.
[0008] Optionally, constructing an initial synonym word library for rare diseases based on the electronic medical record data of rare diseases includes: Using regular expression matching, obtain the disease name and basic disease information of the electronic medical record data of each rare disease, wherein the basic disease information includes at least one of the cause, clinical manifestations, examination information, and treatment information; Classify rare diseases based on the disease names to obtain rare disease categories; For each of the rare disease categories, the synonyms contained in the rare disease category are determined according to the basic information of the disease, and an initial synonym thesaurus for rare diseases is constructed.
[0009] Optionally, replacing and enhancing the synonyms in the initial synonym word library for rare diseases to obtain a target synonym word library for rare diseases comprises: Selecting the synonyms to be enhanced from the synonym database as a first data set, and performing enhancement processing on the first data set to obtain a second data set; The other synonyms in the synonym thesaurus are used to construct a third data set; The rare disease target synonym thesaurus is constructed based on the second data set and the third data set.
[0010] Optionally, the screening of the synonyms to be enhanced from the synonym database as a first data set includes: Counting the distribution of synonym proportions in the first data set; The synonyms exceeding the first preset threshold are enhanced by natural language semantic processing, and the synonyms whose proportion is lower than the second preset threshold are replaced by synonyms to obtain the second data set.
[0011] Optionally, the extracting features based on the word vector to obtain target features includes: The word vectors are respectively passed through a feature extraction layer combining a multi-head self-attention module and a bidirectional GRU module in parallel to obtain a first feature and a second feature; The first feature and the second feature are concatenated and fused to obtain the target feature.
[0012] In order to solve the above technical problems, the embodiment of the present application further provides a device for identifying named entities in electronic medical records of rare diseases, including: The vocabulary building module is used to build an initial synonym vocabulary for rare diseases based on the electronic medical record data of rare diseases; A thesaurus enhancement module, used for replacing and enhancing the synonyms in the initial synonym thesaurus for rare diseases to obtain a target synonym thesaurus for rare diseases; A model training module, used to train a Chinese medical pre-training model using the rare disease target synonym thesaurus to obtain a trained Chinese medical pre-training model; A feature extraction module, for, when receiving a recognition request for a named entity of an electronic medical record of a rare disease, using the trained Chinese medical pre-training model to generate a word vector based on the electronic medical record of a rare disease in the request, and performing feature extraction based on the word vector to obtain a target feature; The entity recognition module is used to use the conditional random field to recognize the target features and output the corresponding entity naming label.
[0013] Optionally, the vocabulary building module includes: A regular expression matching unit, used to obtain the disease name and basic disease information of the electronic medical record data of each rare disease by using a regular expression matching method, wherein the basic disease information includes at least one of the cause of disease, clinical manifestations, examination information, and treatment information; Disease classification unit, which is used to classify rare diseases based on the disease name and obtain rare disease categories; The word library construction unit is used to determine the synonyms contained in each rare disease category according to the basic information of the disease, and to construct an initial synonym word library for rare diseases.
[0014] Optionally, the vocabulary enhancement module includes: a synonym enhancement unit, configured to select synonyms to be enhanced from the synonym thesaurus as a first data set, and perform enhancement processing on the first data set to obtain a second data set; The first construction unit is used to construct a third data set with other synonyms in the synonym word library; The second construction unit is used to construct the rare disease target synonym vocabulary based on the second data set and the third data set.
[0015] Optionally, the synonym enhancement unit includes: A statistical subunit, used for collecting statistics on the distribution of synonym proportions in the first data set; The replacement enhancement subunit is used to perform synonym enhancement on the synonyms exceeding the first preset threshold by using natural language semantic processing, and to perform synonym replacement on the synonyms whose proportion is lower than the second preset threshold, so as to obtain the second data set.
[0016] Optionally, the feature extraction module includes: A feature parallel extraction unit, used for obtaining a first feature and a second feature by passing the word vector through a feature extraction layer in parallel with a multi-head self-attention module and a bidirectional GRU module; The feature splicing and fusion unit is used to splice and fuse the first feature and the second feature to obtain the target feature.
[0017] In order to solve the above technical problems, an embodiment of the present application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method for identifying named entities in electronic medical records of rare diseases when executing the computer program.
[0018] In order to solve the above technical problems, an embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the above-mentioned method for identifying named entities in electronic medical records of rare diseases.
[0019] The method, device, computer equipment and storage medium for identifying named entities in electronic medical records of rare diseases provided by the embodiments of the present invention build an initial synonym word library for rare diseases based on electronic medical record data of rare diseases; replace and enhance the synonyms in the initial synonym word library for rare diseases to obtain a target synonym word library for rare diseases; use the target synonym word library for rare diseases to train a Chinese medical pre-training model to obtain a trained Chinese medical pre-training model; when receiving a recognition request for named entities of electronic medical records of rare diseases, use the trained Chinese medical pre-training model to generate a word vector based on the electronic medical record of rare diseases in the request, and extract features based on the word vector to obtain target features; use conditional random fields to identify the target features and output corresponding entity naming labels. Enhancement of scarce data diseases to achieve data balance and enhance the accuracy of rare disease naming recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0021] Figure 1 is an exemplary system architecture diagram to which the present application may be applied; Figure 2 is a flowchart of an embodiment of a method for identifying named entities in electronic medical records of rare diseases of the present application; Figure 3 is a schematic diagram of electronic medical record recognition in the method for identifying named entities in electronic medical records of rare diseases of the present application; Figure 4 It is a schematic diagram of feature extraction in the method for identifying named entities in electronic medical records of rare diseases of the present application; Figure 5 It is a structural schematic diagram of an embodiment of a device for identifying named entities in electronic medical records of rare diseases according to the present application; Figure 6 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0023] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] See also Figure 1 ,like Figure 1As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0026] Users can use terminal devices 101 , 102 , 103 to interact with server 105 via network 104 to receive or send messages, etc.
[0027] Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV), laptop computers, desktop computers, etc.
[0028] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .
[0029] It should be noted that the method for identifying named entities in electronic medical records of rare diseases provided in the embodiments of the present application is executed by a server, and accordingly, the device for identifying named entities in electronic medical records of rare diseases is set in the server.
[0030] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. According to the implementation requirements, there may be any number of terminal devices, networks and servers. The terminal devices 101, 102, 103 in the embodiment of the present application may specifically correspond to application systems in actual production.
[0031] See also Figure 2 , Figure 2 A method for identifying named entities in electronic medical records of rare diseases provided by an embodiment of the present invention is shown. The method is applied in Figure 1 The server in is used as an example to illustrate the details as follows: S201: Construct an initial synonym vocabulary for rare diseases based on the electronic medical record data of rare diseases.
[0032] In a specific optional implementation, in step S201, constructing an initial synonym word library for rare diseases based on electronic medical record data of rare diseases includes: Using regular expression matching, obtain the disease name and basic disease information of the electronic medical record data of each rare disease, wherein the basic disease information includes at least one of the cause, clinical manifestations, examination information, and treatment information; Classify rare diseases based on the disease names to obtain rare disease categories; For each rare disease category, the synonyms contained in the rare disease category are determined based on the basic information of the disease, and an initial synonym thesaurus for rare diseases is constructed.
[0033] Specifically, first, use the regular expression `patient number:\s*([\d\w]+)` to extract the patient number in the electronic medical record. This regular expression matches a patient number that starts with "patient number:", followed by zero or more space characters, and then captures a patient number containing numbers and letters. This patient number can be used to uniquely identify the patient's hospitalization record.
[0034] Secondly, the possible disease names are enumerated through the regular expression `(Disease Name 1 | Disease Name 2 | Disease Name 3)` for fuzzy matching. The role of this regular expression is to find any occurrence of disease names in the electronic medical record text. For each different disease type, the above operation can be repeated to classify the electronic medical records according to different disease types.
[0035] Finally, the text information paragraphs in the electronic medical records are merged, so that all the full text of the electronic medical records are structured into the form of patient number, disease type and text paragraph. Figure 3 As shown, Figure 3 It is a schematic diagram of electronic medical record recognition in the method for identifying named entities in electronic medical records of rare diseases of the present application.
[0036] Furthermore, in a specific example, this embodiment needs to build a synonym word library based on the text content in the existing electronic medical records and the rare disease diagnosis and treatment guidelines (the rare disease diagnosis and treatment guidelines are the rare disease diagnosis and treatment guidelines issued by the General Office of the National Health Commission). Taking hemophilia as an example: Causes: FⅧ gene point mutation, FⅧ gene point deletion, FⅧ gene point rearrangement, etc.
[0037] Clinical manifestations: joint bleeding, muscle bleeding, deep tissue bleeding, etc. Examination information: screening test, corrective test, confirmatory test, inhibitor detection, genetic diagnosis, etc. Treatment information: replacement therapy, management of inhibitors, management of hemophilic arthropathy, management of hemophilic pseudotumors, etc.
[0038] This method can be used to construct a synonym database for rare diseases by disease type.
[0039] Furthermore, this embodiment also includes data preprocessing operations such as word segmentation, removal of inactive words and low-frequency words on the electronic medical record data based on an external rare disease dictionary.
[0040] S202: Replace and enhance the synonyms in the initial synonym vocabulary of rare diseases to obtain a target synonym vocabulary of rare diseases.
[0041] In a specific optional implementation, in step S202, synonyms in the initial synonym word library for rare diseases are replaced and enhanced to obtain a target synonym word library for rare diseases, including: Selecting synonyms to be enhanced from the synonym database as a first data set, and performing enhancement processing on the first data set to obtain a second data set; The other synonyms in the synonym thesaurus are used to construct a third data set; A rare disease target synonym thesaurus is constructed based on the second and third data sets.
[0042] In a specific optional implementation, synonyms to be enhanced are selected from a synonym word library as a first data set, and the first data set is enhanced to obtain a second data set including: Counting the distribution of synonym proportions in the first data set; The synonyms exceeding the first preset threshold are enhanced by natural language semantic processing, and the synonyms whose proportion is lower than the second preset threshold are replaced by synonyms to obtain a second data set.
[0043] The first preset threshold and the second preset threshold can be set according to actual needs and are not limited here.
[0044] In a specific example, the synonym entity replacement method includes: This synonym entity replacement method assumes that the number of replaceable entities in a piece of electronic medical record text is N, the proportion of entity adjustment in the text is α, n is the number of entities that need to be replaced, and n=Nα is taken. The n entities in the corpus are randomly replaced based on the synonym dictionary to generate new synthetic electronic medical record data.
[0045] This example is a sample text fragment of the electronic medical record of a hemophilia patient. There are 16 words in the synonym dictionary in this text, N=16, and assuming a=0.5, so 8 entities need to be replaced.
[0046] Before replacement: The child's left knee joint was significantly swollen, the skin temperature was elevated, tenderness was obvious, and the movement was limited. No other signs were abnormal. Routine blood tests showed that the platelet count was normal. Coagulation tests showed that the prothrombin time, thrombin time, and fibrinogen were all normal, and the activated partial thromboplastin time was prolonged. Confirmatory tests showed that the activity of coagulation factor VIII was 0.5 IU / dl. Inhibitor detection showed that the inhibitor titer was 0 BU / ml. Genetic diagnosis showed that the FⅧ gene had a reproducible gene inversion mutation.
[0047] After replacement: The child's left knee joint was significantly swollen, the skin temperature was elevated, tenderness was obvious, and the movement was limited. No other signs were abnormal. Routine blood tests showed normal platelet counts. Corrective tests showed that plasma prothrombin time, thrombin time, and coagulation factor I were all normal, and the activated partial thromboplastin time was prolonged. Confirmatory tests showed that the activity of coagulation factor FⅧ was 0.5 IU / dl. The screening test showed that the inhibitor titer was 0 BU / ml. Genetic diagnosis showed that the FⅧ gene had a reproducible FⅧ gene point deletion.
[0048] S203: Use the rare disease target synonym vocabulary to train the Chinese medical pre-training model to obtain a trained Chinese medical pre-training model.
[0049] S204: When a recognition request for a named entity of an electronic medical record of a rare disease is received, a trained Chinese medical pre-training model is used to generate a word vector based on the electronic medical record of the rare disease in the request, and feature extraction is performed based on the word vector to obtain a target feature.
[0050] In a specific optional implementation, in step S204, feature extraction is performed based on word vectors to obtain target features including: The word vectors are passed through the feature extraction layer in which the multi-head self-attention module and the bidirectional GRU module are combined in parallel to obtain the first feature and the second feature; The first feature and the second feature are concatenated and fused to obtain the target feature.
[0051] like Figure 4 As shown in the figure, the feature extraction layer of this embodiment is composed of two parallel modules: a bidirectional GRU module and a multi-head self-attention module. The bidirectional GRU module is used to learn the temporal features and contextual information of the text sequence, and the multi-head self-attention module is used to obtain the global features of the text sequence and the association strength between words. Finally, the outputs of the two modules are concatenated and used as the input of the CRF layer for sequence labeling.
[0052] This embodiment uses the Chinese medical pre-training model MC-bert in the word embedding stage. The model uses Chinese medical data for pre-training, which enhances the model's understanding of medical language. At the same time, the parallel structure of the multi-head self-attention mechanism module and the bidirectional GRU module has a stronger ability to capture the semantic information and association relationships of different dimensions in the rare disease text sequence than the traditional BiLSTM-CRF, and effectively reduces the model training time. At the same time, the multi-head self-attention mechanism can calculate the similarity between the characters at each position and the characters at other positions, and obtain the weight of each character, thereby highlighting key information and reducing the impact of redundant information.
[0053] S205: Use conditional random fields to identify target features and output corresponding entity naming labels.
[0054] Among them, Conditional Random Field (CRF) is a probabilistic model used to label or analyze sequence data, such as natural language processing, bioinformatics, machine vision, and network intelligence.
[0055] Conditional random fields are a discriminative model that assumes that the output random variables constitute a Markov random field, that is, the conditional probability distribution of the output random variables under the given input random variables. In a conditional random field, the distribution of the random variable Y is the conditional probability, and the given observation value is the random variable X. The layout of the graph model of the conditional random field can be arbitrarily given. The commonly used layout is a linked architecture, which has efficient algorithms for training, inference, or decoding.
[0056] In this embodiment, an initial synonym word library for rare diseases is constructed based on the electronic medical record data of rare diseases; synonyms in the initial synonym word library for rare diseases are replaced and enhanced to obtain a target synonym word library for rare diseases; the target synonym word library for rare diseases is used to train the Chinese medical pre-training model to obtain a trained Chinese medical pre-training model; when a recognition request for a named entity of an electronic medical record of a rare disease is received, a word vector is generated based on the electronic medical record of the rare disease in the request using the trained Chinese medical pre-training model, and feature extraction is performed based on the word vector to obtain a target feature; the target feature is identified using a conditional random field, and the corresponding entity naming label is output. The enhancement of scarce data diseases achieves data balance and enhances the accuracy of rare disease naming recognition.
[0057] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0058] Figure 5The principle block diagram of the device for identifying named entities in the electronic medical records of rare diseases is shown in a one-to-one correspondence with the method for identifying named entities in the electronic medical records of rare diseases in the above-mentioned embodiment. Figure 5 As shown, the device for identifying named entities in the electronic medical record of a rare disease includes a vocabulary building module 31, a vocabulary enhancement module 32, a model training module 33, a feature extraction module 34 and an entity recognition module 35. The functional modules are described in detail as follows: A vocabulary building module 31 is used to build an initial synonym vocabulary of rare diseases based on the electronic medical record data of rare diseases; The word library enhancement module 32 is used to replace and enhance the synonyms in the initial synonym word library of rare diseases to obtain a target synonym word library of rare diseases; A model training module 33 is used to train a Chinese medical pre-training model using a rare disease target synonym vocabulary to obtain a trained Chinese medical pre-training model; The feature extraction module 34 is used to generate a word vector based on the rare disease electronic medical record in the request using the trained Chinese medical pre-training model when receiving a recognition request for a named entity of a rare disease electronic medical record, and perform feature extraction based on the word vector to obtain a target feature; The entity recognition module 35 is used to use the conditional random field to recognize the target features and output the corresponding entity naming label.
[0059] Optionally, the vocabulary building module 31 includes: A regular expression matching unit, used to obtain the disease name and basic disease information of the electronic medical record data of each rare disease by using a regular expression matching method, wherein the basic disease information includes at least one of the cause of disease, clinical manifestations, examination information, and treatment information; Disease classification unit, which is used to classify rare diseases based on the disease name and obtain rare disease categories; The word library construction unit is used to determine the synonyms contained in each rare disease category according to the basic information of the disease, and to construct an initial synonym word library for rare diseases.
[0060] Optionally, the vocabulary enhancement module 32 includes: A synonym enhancement unit, used for selecting synonyms to be enhanced from the synonym thesaurus as a first data set, and performing enhancement processing on the first data set to obtain a second data set; The first construction unit is used to construct a third data set with other synonyms in the synonym word library; The second construction unit is used to construct a rare disease target synonym vocabulary based on the second data set and the third data set.
[0061] Optionally, the synonym enhancement unit includes: A statistical subunit, used for statistically analyzing the distribution of synonym proportions in the first data set; The replacement enhancement subunit is used to perform synonym enhancement on the synonyms exceeding the first preset threshold by using natural language semantic processing, and to perform synonym replacement on the synonyms whose proportion is lower than the second preset threshold, so as to obtain a second data set.
[0062] Optionally, the feature extraction module 34 includes: A feature parallel extraction unit is used to obtain a first feature and a second feature by combining the word vectors in parallel through a multi-head self-attention module and a bidirectional GRU module; The feature splicing and fusion unit is used to splice and fuse the first feature and the second feature to obtain the target feature.
[0063] For the specific definition of the device for identifying named entities in electronic medical records of rare diseases, please refer to the definition of the method for identifying named entities in electronic medical records of rare diseases mentioned above, which will not be repeated here. Each module in the above-mentioned device for identifying named entities in electronic medical records of rare diseases can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0064] To solve the above technical problems, the present application also provides a computer device. Figure 6 , Figure 6 This is a basic structural block diagram of the computer device in this embodiment.
[0065] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components connected to the memory 41, the processor 42, and the network interface 43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0066] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0067] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or D interface display memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 4. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as the program code of the method for identifying named entities in the electronic medical record of rare diseases, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0068] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run the program code stored in the memory 41 or process data, such as running the program code of the method for identifying named entities in the electronic medical record of rare diseases.
[0069] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0070] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores an interface display program, and the interface display program can be executed by at least one processor to enable the at least one processor to perform the steps of the method for identifying named entities in electronic medical records of rare diseases as described above.
[0071] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0072] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A method for identifying named entities in electronic medical records of rare diseases, characterized in that: include: Constructing an initial synonym thesaurus for rare diseases based on electronic medical record data of rare diseases; Replacing and enhancing the synonyms in the initial synonym thesaurus for rare diseases to obtain a target synonym thesaurus for rare diseases; Using the rare disease target synonym thesaurus to train a Chinese medical pre-training model to obtain a trained Chinese medical pre-training model; When receiving a recognition request for a named entity of an electronic medical record of a rare disease, using the trained Chinese medical pre-training model to generate a word vector based on the electronic medical record of the rare disease in the request, and performing feature extraction based on the word vector to obtain a target feature; The target features are identified using a conditional random field, and the corresponding entity naming labels are output.
2. The method for identifying named entities in rare disease electronic medical records according to claim 1, characterized in that: The method of constructing an initial synonym database for rare diseases based on the electronic medical record data of rare diseases includes: Using regular expression matching, obtain the disease name and basic disease information of the electronic medical record data of each rare disease, wherein the basic disease information includes at least one of the cause, clinical manifestations, examination information, and treatment information; Classify rare diseases based on the disease names to obtain rare disease categories; For each of the rare disease categories, the synonyms contained in the rare disease category are determined according to the basic information of the disease, and an initial synonym thesaurus for rare diseases is constructed.
3. The method for identifying named entities in electronic medical records of rare diseases according to claim 1, characterized in that: The replacing and enhancing the synonyms in the initial synonym word library of rare diseases to obtain a target synonym word library of rare diseases includes: Selecting the synonyms to be enhanced from the synonym database as a first data set, and performing enhancement processing on the first data set to obtain a second data set; The other synonyms in the synonym thesaurus are used to construct a third data set; The rare disease target synonym thesaurus is constructed based on the second data set and the third data set.
4. The method for identifying named entities in electronic medical records of rare diseases as claimed in claim 3, characterized in that: The method of selecting the synonyms to be enhanced from the synonym database as the first data set, and performing enhancement processing on the first data set to obtain the second data set includes: Counting the distribution of synonym proportions in the first data set; The synonyms exceeding the first preset threshold are enhanced by natural language semantic processing, and the synonyms whose proportion is lower than the second preset threshold are replaced by synonyms to obtain the second data set.
5. The method for identifying named entities in electronic medical records of rare diseases according to any one of claims 1 to 4, characterized in that: The feature extraction based on the word vector to obtain the target feature includes: The word vectors are respectively passed through a feature extraction layer combining a multi-head self-attention module and a bidirectional GRU module in parallel to obtain a first feature and a second feature; The first feature and the second feature are concatenated and fused to obtain the target feature.
6. A device for identifying named entities in electronic medical records of rare diseases, characterized in that: include: The vocabulary building module is used to build an initial synonym vocabulary for rare diseases based on the electronic medical record data of rare diseases; A thesaurus enhancement module is used to replace and enhance the synonyms in the initial synonym thesaurus for rare diseases to obtain a target synonym thesaurus for rare diseases; A model training module, used to train a Chinese medical pre-training model using the rare disease target synonym thesaurus to obtain a trained Chinese medical pre-training model; A feature extraction module, for, when receiving a recognition request for a named entity of an electronic medical record of a rare disease, using the trained Chinese medical pre-training model to generate a word vector based on the electronic medical record of a rare disease in the request, and performing feature extraction based on the word vector to obtain a target feature; The entity recognition module is used to use the conditional random field to recognize the target features and output the corresponding entity naming label.
7. The device for identifying named entities in electronic medical records of rare diseases according to claim 6, characterized in that: The word library building module includes: A regular expression matching unit, used to obtain the disease name and basic disease information of the electronic medical record data of each rare disease by using a regular expression matching method, wherein the basic disease information includes at least one of the cause of disease, clinical manifestations, examination information, and treatment information; Disease classification unit, which is used to classify rare diseases based on the disease name and obtain rare disease categories; The word library construction unit is used to determine the synonyms contained in each rare disease category according to the basic information of the disease, and to construct an initial synonym word library for rare diseases.
8. The device for identifying named entities in electronic medical records of rare diseases according to claim 6, characterized in that: The vocabulary enhancement module includes: a synonym enhancement unit, configured to select synonyms to be enhanced from the synonym thesaurus as a first data set, and perform enhancement processing on the first data set to obtain a second data set; The first construction unit is used to construct a third data set with other synonyms in the synonym word library; The second construction unit is used to construct the rare disease target synonym vocabulary based on the second data set and the third data set.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for identifying named entities in the electronic medical records of rare diseases as described in any one of claims 1 to 5 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for identifying named entities in electronic medical records of rare diseases as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Medical named entity recognition system and method based on ALBERT model fusion
CN113971405A
Legal named entity recognition method based on Mixup and BQRNN
CN114372465A
E-commerce commodity title named entity recognition method
CN115906845A
Text analysis method, computer equipment and computer readable storage medium
CN116562266A
Chinese dialogue text intention recognition method and device, equipment and storage medium
CN117494728A
