Named entity recognition method for Chinese electronic medical records based on medical dictionary knowledge enhancement

By introducing medical dictionary knowledge in Chinese electronic medical record naming entity recognition, combining RoBERTa-wwm-ext-large and BiLSTM models, a local mask attention mechanism was designed, and the problem of nesting and blurring of boundaries in Chinese electronic medical record naming entity recognition was solved. , improves recognition performance and generalization.

CN118643833BActive Publication Date: 2024-12-31TIBET ZANGXIN PHARMACEUTICAL CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410786765.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2024-12-31
Estimated Expiration
2044-06-18

AI Technical Summary

Technical Problem

There are problems such as text sequence length, medical entity nesting and entity boundary blur in the Chinese electronic medical record naming entity recognition task, which leads to challenges in the recognition performance and generalization of the existing technology.

Method used

Based on the method of knowledge enhancement of medical dictionary, using RoBERTa-wwm-ext-large pre-trained model combined with BiLSTM and global pointer network, matching medical concepts through medical dictionary and designing local mask attention mechanisms, capturing context semantics and calculating named entity scores. Solve the problems of entity nesting and boundary blur.

Benefits of technology

It effectively improves the accuracy and generalization of the recognition of named entities in Chinese electronic medical records, reduces noise, and enhances the model's ability to recognize medical entities, especially when dealing with nested entities and blurred boundaries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118643833B_ABST
    Figure CN118643833B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for named entity recognition of Chinese electronic medical records based on medical dictionary knowledge enhancement. Firstly, Chinese electronic medical record medical text data is collected and a medical dictionary is constructed. A pre-trained language model RoBERTa‑wwm‑ext‑large is used to extract features of the Chinese electronic medical record text data. Then, a feature vector is input into a BiLSTM model to learn the contextual semantics of the medical text. Meanwhile, the medical dictionary is queried, a masked attention mechanism is designed, and the local attention weights of tokens matching the medical concepts in the dictionary are calculated to obtain comprehensive semantic features containing the contextual information of the electronic medical records. Finally, a global pointer network model GP is used to simultaneously consider the feature information of the head and tail of the entity to predict the nested entity, so as to effectively solve the problems of fuzzy entity boundaries and difficult-to-handle entity nesting in the task of named entity recognition of Chinese electronic medical records.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of natural language processing in artificial intelligence, and specifically relates to a Chinese electronic medical record named entity recognition method based on medical dictionary knowledge enhancement. Background Art

[0002] In recent years, with the rapid development of artificial intelligence and big data technology, electronic medical records (EMR) have been widely used in the medical field. Electronic medical record data is the most important source of empirical data in biomedical research. It contains important medical information, such as clinical symptoms, diagnosis results, treatment plans, etc. It can be used as a treasure trove of medical knowledge and is widely used in the construction of medical knowledge graphs, medical question-answering systems, disease prediction and medical research. Electronic medical record named entity recognition is to automatically identify and extract medical entity information such as disease names, symptoms, diagnosis and treatment, and medication from electronic medical records. It is a basic task of natural language processing and information extraction.

[0003] At present, there are a lot of studies on named entity recognition of electronic medical records, but the Chinese medical record named entity recognition task has problems such as long text sequences, nested medical entities, and fuzzy entity boundaries, which leads to some challenges and difficulties in this field. In order to solve the above problems, the present invention proposes a Chinese electronic medical record named entity recognition method enhanced with medical dictionary knowledge. Based on the RoBERTa-wwm-ext-large pre-training model, the Chinese medical dictionary and the Attention mechanism are integrated, and the BiLSTM and GP (global pointer) are combined to identify and extract electronic medical record entities, which improves the nested entity recognition effect and achieves higher performance.

[0004] Early named entity recognition methods can be summarized as rule-based methods and feature engineering-based machine learning methods. These methods rely heavily on domain experts to manually formulate rules and feature engineering, which is costly and inefficient. In recent years, with the development of deep learning technology and pre-trained language models, researchers have proposed many electronic medical record named entity recognition methods based on deep learning technology. In the prior art, an attention network based on medical dictionaries is proposed, and a Bert+BiLSTM+Attention+CRF model is designed to enhance the model's medical term segmentation and recognition capabilities, but the problem of entity embedding in Chinese electronic medical records is ignored, so the generalization of the model is low. In the prior art, the naming recognition problem is modeled as a machine reading comprehension problem, and multi-granularity embedding is used to represent medical text. In the prior art, it is proposed to apply fine-grained medical text segmentation and establish a BiLSTM+CRF recognition model to improve the performance of entity recognition, but the algorithm has obvious defects in solving the problem of fuzzy entity boundaries. With the development of pre-trained language models, the medical domain knowledge training model Med-BERT is applied in the prior art to improve the recognition performance to a certain extent, but this type of pre-trained model cannot solve the entity embedding problem that is widely present in Chinese electronic medical records. In the existing technology, the graph attention network GAT is used to model Chinese medical texts. With the gradual maturity of generative large model technologies such as ChatGPT, researchers have begun to try to apply large models in the medical field. Whether it is a pre-trained language model or a large model such as ChatGPT, its application in the medical and health field is still in the exploratory stage.

[0005] At present, there have been a lot of research on named entity recognition in electronic medical records. However, the Chinese medical record named entity recognition task has problems such as long text sequences, nested medical entities, and fuzzy entity boundaries, which leads to some challenges and difficulties in this field. Summary of the invention

[0006] In view of the above-mentioned deficiencies in the prior art, the Chinese electronic medical record named entity recognition method based on medical dictionary knowledge enhancement provided by the present invention solves the problems of fuzzy entity boundaries and nested medical entities existing in the existing related Chinese electronic medical record named entity recognition methods.

[0007] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention is: a method for named entity recognition of Chinese electronic medical records based on medical dictionary knowledge enhancement, comprising the following steps:

[0008] S1. Collect Chinese electronic medical record text data and construct a medical dictionary:

[0009] S2, introduce the medical concepts in the medical dictionary into the word segmenter LTP, segment the Chinese electronic medical record text data, and input the pre-trained language model RoBERTa-wwm-ext-large for feature extraction to obtain the corresponding medical word embedding;

[0010] S3. For each word in the Chinese electronic medical record text data, the medical concept embedding of the word is searched in the medical dictionary, and the medical concept embedding is added bit by bit to the medical word embedding of the word to obtain the final word embedding;

[0011] S4. The BiLSTM model is used to capture the contextual semantics of each word in the Chinese electronic medical record text data. At the same time, the medical dictionary is queried to generate a masked attention vector, and then the attention weight matching the medical concept in the medical dictionary is calculated to obtain the comprehensive semantic feature representation of the word.

[0012] S5. Input the comprehensive semantic feature representation into the global pointer network, calculate the named entity score, and obtain the named entity category.

[0013] Furthermore, in step S1, the data in the medical dictionary includes medical entity names and medical concept names in Chinese electronic medical records.

[0014] Furthermore, in step S2, the pre-trained language model RoBERTa-wwm-ext-large is a model that is fine-tuned based on Chinese electronic medical record text data.

[0015] Furthermore, in step S3, the medical concept embedding is the average of all medical word embeddings in the same medical concept to which each word in the Chinese electronic medical record text data belongs.

[0016] Furthermore, the step S4 is specifically as follows:

[0017] S41. The BiLSTM model is used to capture the contextual semantics of each word in the Chinese electronic medical record text data, forming a feature representation of each word in the medical text;

[0018] S42, query the medical dictionary, match the medical concepts of each word in the text, and generate a masked attention vector;

[0019] S43, calculating the attention weight of each word based on the masked attention vector;

[0020] S44. Based on the attention weight of each word, the corresponding embedding representation is calculated and then fused to form a comprehensive semantic feature.

[0021] Furthermore, in the step S42, in the generated masked attention vector, the mask of the position where the words appearing in the medical dictionary are located is 1, and the mask of the positions where the remaining words are located is 0.

[0022] Furthermore, in step S43, the formula for calculating the attention weight of each word in the text is:

[0023]

[0024] In the formula, represents the embedded representation after mask operation, O i and O j represents the embedding representation of the i-th and j-th words output by the BiLSTM model, T j Indicates O j The corresponding mask attention vector, represents the mask operation, W u represents the learnable parameters in the model, [;] represents the connection operation, α i Indicates O j Relative to O i The attention weight, tanh() represents the hyperbolic tangent function, which is a nonlinear activation function, u i and u j They represent the embedding representations of the i-th and j-th medical word embeddings after nonlinear transformation, and u ik u represents the kth word in the medical concept of the i-th word k , n is the number of words in the medical concept where the i-th word is located.

[0025] Furthermore, in step S44, the word embedding representation e i The calculation formula is:

[0026] e i =tanh(W e [c i ;O i ])

[0027]

[0028] Where W e It represents the parameters that can be learned in the model, the subscript j represents the jth word in the medical concept, and n is the number of words in the medical concept where the ith word is located.

[0029] Furthermore, the step S5 is specifically as follows:

[0030] S51. For each embedding representation in the comprehensive semantic feature, e i Transform according to the following formula to obtain the starting position representation q of the αth type of named entity: i,α and the end position indicates k i,α ;

[0031] q i,α =Wq,α e i +b q,α

[0032] k i,α =W k,α e i +b k,α

[0033] Where W q,α and W k,α represents the learnable parameters in model training, b q,α and b k,α Represents the bias term of the model;

[0034] S52, indicating q according to the starting position i,α and the end position indicates k i,α , calculate the score s of a named entity of type α for the continuous segment from i to j α (i,j);

[0035]

[0036] In the formula, R i represents the rotational position encoding of the i-th word, R j represents the rotational position encoding of the jth word, R j-i It represents the relative rotation position encoding from the i-th word to the j-th word in the medical text, and the superscript T represents the matrix transposition operation.

[0037] The beneficial effects of the present invention are:

[0038] (1) A medical dictionary is constructed and introduced into the LTP word segmenter, which pays more attention to common medical concepts when segmenting medical electronic medical record texts, and effectively solves the boundary fuzziness problem in the process of named entity recognition in Chinese electronic medical records.

[0039] (2) The pre-trained language model RoBERTa-wwm-ext-large is used as a feature extractor for Chinese text. RoBERTa-wwm-ext-large adopts the full-word masking strategy for MLM training to retain the integrity of the entire word group or phrase, which helps to solve the problem of information loss in Chinese electronic medical records. At the same time, a large amount of medical text is used to fine-tune the RoBERTa-wwm-ext-large model to make it more suitable for medical entity recognition tasks and enable the model to better understand the contextual information of the text.

[0040] (3) By matching medical concepts with medical dictionaries, a local masked attention mechanism is designed to make the model pay more attention to words related to medical concepts in the text, effectively reducing the noise of named entity recognition and improving the accuracy of named entity recognition.

[0041] (4) The Global Pointer Network model (GP) is applied to simultaneously consider the feature information of the entity head and tail to predict nested entities, effectively solving the problem of nested entities being difficult to handle in the Chinese electronic medical record named entity recognition task. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 A flow chart of the method for named entity recognition in Chinese electronic medical records based on medical dictionary knowledge enhancement provided by the present invention.

[0043] Figure 2 This is a framework diagram of the Chinese electronic medical record named entity recognition process provided by the present invention. DETAILED DESCRIPTION

[0044] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.

[0045] The embodiment of the present invention provides a method for identifying named entities in Chinese electronic medical records based on medical dictionary knowledge enhancement, such as Figure 1-2 As shown, the following steps are included:

[0046] S1. Collect Chinese electronic medical record text data and construct a medical dictionary:

[0047] S2, introduce the medical concepts in the medical dictionary into the word segmenter LTP, segment the Chinese electronic medical record text data, and input the pre-trained language model RoBERTa-wwm-ext-large for feature extraction to obtain the corresponding medical word embedding;

[0048] S3. For each word in the Chinese electronic medical record text data, the medical concept embedding of the word is searched in the medical dictionary, and the medical concept embedding is added bit by bit to the medical word embedding of the word to obtain the final word embedding;

[0049] S4. The BiLSTM model is used to capture the contextual semantics of each word in the Chinese electronic medical record text data. At the same time, the medical dictionary is queried to generate a masked attention vector, and then the attention weight matching the medical concept in the medical dictionary is calculated to obtain the comprehensive semantic feature representation of the word.

[0050] S5. Input the comprehensive semantic feature representation into the global pointer network, calculate the named entity score, and obtain the named entity category.

[0051] In step S1 of the embodiment of the present invention, the general word segmentation model or word segmentation algorithm usually segments the text by words or subwords, and there are a large number of medical concepts and terms in the Chinese medical electronic medical record text. Subdividing these concepts or terms will cause the loss of medical semantics or even misunderstanding. Therefore, building a medical dictionary is very important for named entity recognition of Chinese electronic medical records.

[0052] In this embodiment, the data in the medical dictionary in step S1 includes medical entity names and medical concept names of Chinese electronic medical records.

[0053] Specifically, in this embodiment, 105,706 medical entity names and commonly used terminology names in Chinese electronic medical records are collected and sorted to construct a Chinese medical dictionary, of which 54,304 entities are from the International Classification of Diseases ICD library, 12,109 entities are from the Disease Diagnosis Code Library ICD-10, as well as 37,308 drug name terms and 1,985 common terms in Chinese electronic medical records. At the same time, Trie Tree is used to store the constructed medical dictionary, and the Aho-Corasick algorithm is used to search and match words in Chinese medical concepts in the dictionary. Trie Tree is a multi-branch tree structure, which can be used with the Aho-Corasic algorithm to well implement the storage and search of medical dictionaries.

[0054] In step S2 of the embodiment of the present invention, the pre-trained language model RoBERTa-wwm-ext-large is a model fine-tuned based on Chinese electronic medical record data.

[0055] Specifically, the pre-trained language model RoBERTa-wwm-ext-large in this embodiment is used as a feature extraction model, and the whole word masking strategy is used for MLM training to retain the integrity of the entire word group or phrase, which helps to solve the problem of information loss in Chinese electronic medical records and enables the model to better understand the contextual information of the text. Since the pre-trained language model RoBERTA-wwm-ext-large is trained on general data corpora such as Wikipedia, Book-Corpus, CC-NEWS, OPENWEBTEXT, STORIES, etc., it is not suitable for specific domain data such as Chinese electronic medical records. Therefore, in this embodiment, before applying RoBERTa-wwm-ext-large for feature extraction, a large amount of Chinese electronic medical record data is collected to fine-tune the RoBERTa-wwm-ext-large model.

[0056] In step S2 of the embodiment of the present invention, medical concepts or medical terms in the medical dictionary constructed by the present invention are introduced into the word segmenter LTP, and then the Chinese electronic medical record text data is segmented to enhance the vocabulary boundary of the Chinese electronic medical record; then feature extraction is performed through the fine-tuned pre-trained language model RoBERTa-wwm-ext-large to obtain medical word embeddings.

[0057] In step S3 of the embodiment of the present invention, the medical concept embedding is the mean of all medical word embeddings in the same medical concept to which each word in the Chinese electronic medical record text data belongs.

[0058] Exemplarily, the final word-level embedding representation of the word "branch" in "bronchitis" is the bitwise sum of the mean of the embeddings of the four words "branch", "air", "tube", "inflammation" and the embedding representation of "branch" itself.

[0059] Step S4 of the embodiment of the present invention is specifically as follows:

[0060] S41. Capture the context semantics of each word in the Chinese electronic medical record text data through the BiLSTM model to form the feature representation of each word in the medical text;

[0061] S42. Query the medical dictionary, match the medical concepts of each word in the text, and generate a masked attention vector;

[0062] S43. Calculate the attention weights of each word based on the masked attention vector;

[0063] S44. Calculate the corresponding embedding representation based on the attention weights of each word, and then fuse them to form a comprehensive semantic feature.

[0064] In step S41 of this embodiment, the final word embedding representation is input into the BiLSTM model for sequence encoding. Through the gating mechanism of the BiLSTM model, the electronic medical record text is selectively forgotten or passed, and the context semantics of the text is captured to form the feature representation of each word in the text.

[0065] In step S42 of this embodiment, in the generated masked attention vector, the mask at the position where the word appears in the medical dictionary is 1, and the mask at the position of the remaining words is 0. The masked attention vector in this embodiment can help the model pay more attention to the words related to medical concepts in the text, effectively reducing the noise of named entity recognition.

[0066] Specifically, query the medical dictionary to obtain the medical concepts to which each word (i.e., token) in the text belongs, and form a masked attention vector.

[0067] For example, the masked attention vector corresponding to the text "The patient has cough and sputum, and is suspected of having bronchitis" is T = [0,0,0,0,1,1,1,1,0,0,0,0,0,1,1,1,1], because the two medical concepts of "cough and sputum" and "bronchitis" are in the constructed medical dictionary, so the mask at the corresponding position is 1, and the masks at the other positions are 0.

[0068] In step S43 of this embodiment, the formula for calculating the attention weight of each word in the text is:

[0069]

[0070] In the formula, represents the embedded representation after mask operation, O i and O j represents the embedding representation of the i-th and j-th words output by the BiLSTM model, T j Indicates O j The corresponding mask attention vector, represents the mask operation, W u represents the learnable parameters in the model, [;] represents the connection operation, α i Indicates O j Relative to O i The attention weight, tanh() represents the hyperbolic tangent function, which is a nonlinear activation function, u i and u j They represent the embedding representations of the i-th and j-th medical word embeddings after nonlinear transformation, and u ik u represents the kth word in the medical concept of the i-th word k , n is the number of words in the medical concept where the i-th word is located.

[0071] Among them, for the mask operation It means that the words corresponding to "1" in the masked attention vector participate in the attention weight calculation, and the words corresponding to "0" are masked out, and finally we get

[0072] In step S44 of this embodiment, the word embedding representation e i The calculation formula is:

[0073] e i =tanh(W e [c i ;O i ])

[0074]

[0075] Where W eIt represents the parameters that can be learned in the model, the subscript j represents the jth word in the medical concept, and n is the number of words in the medical concept where the ith word is located.

[0076] In this embodiment, based on the above processing, the obtained word embedding representation is fused to form a comprehensive semantic feature [e1, e2, ..., e n ] as the input of the global pointer network GP.

[0077] Step S5 of the embodiment of the present invention is specifically as follows:

[0078] S51. For each embedding representation in the comprehensive semantic feature, e i Transform according to the following formula to obtain the starting position representation q of the αth type of named entity: i,α and the end position indicates k i,α ;

[0079] q i,α =W q,α e i +b q,α

[0080] k i,α =W k,α e i +b k,α

[0081] Where W q,α and W k,α represents the learnable parameters in model training, b q,α and b k,α Represents the bias term of the model;

[0082] S52, indicating q according to the starting position i,α and the end position indicates k i,α , calculate the score s of a named entity of type α for the continuous segment from i to j α (i,j);

[0083]

[0084] In the formula, R i represents the rotational position encoding of the i-th word, R j represents the rotational position encoding of the jth word, R j-i It represents the relative rotation position encoding from the i-th word to the j-th word in the medical text, and the superscript T represents the matrix transposition operation.

[0085] Specifically, in this embodiment, the global pointer network GP is used to model the Chinese electronic medical record named entity recognition problem as a multi-label classification problem, and the comprehensive semantic features [e1, e2, ..., e n]Process in the above manner to obtain the scores of each type of named entity.

[0086] In this embodiment, in order to make full use of the boundary information of the electronic command named entity, the rotation position encoding technology is introduced into the entity score, and the characteristics of the transformation matrix are used to Get the score s containing the relative position information from i to j α (i, j). In this way, identifying entities of a specific class α becomes a multi-label classification problem with a total of n(n+1) / 2 categories, where the number of labels is the number of entity categories in the electronic medical record text. Finally, the entity categories are obtained: B-dis (disease start), I-dis (disease middle), B-sym (symptom start), I-sym (symptom middle), B-dru (drug start), I-dru (drug middle), etc., and then combined to obtain the medical entities in the sentence: disease, symptom, drug, etc.

[0087] In the embodiment of the present invention, the Global Pointer Network (GP) is used as a classifier for named entity recognition, which effectively solves the problem of entity nesting in Chinese electronic medical records. GP considers the starting and ending positions of the entity at the same time, and uses the feature information of the head and tail to predict the nested entity. GP uses the idea of ​​global normalization for named entity recognition, is compatible with nested entities and non-nested entities, and can effectively solve the problem of entity nesting; at the same time, compared with the commonly used entity classifier conditional random field CRF, GP can run in parallel, and the efficiency is greatly improved.

[0088] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

[0089] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.

Claims

1. A method for named entity recognition in Chinese electronic medical records based on medical dictionary knowledge enhancement, characterized in that: The following steps are involved: S1. Collect Chinese electronic medical record text data and construct a medical dictionary: S2, introduce the medical concepts in the medical dictionary into the word segmenter LTP, segment the Chinese electronic medical record text data, and input the pre-trained language model RoBERTa-wwm-ext-large for feature extraction to obtain the corresponding medical word embedding; S3. For each word in the Chinese electronic medical record text data, the medical concept embedding of the word is searched in the medical dictionary, and the medical concept embedding is added bit by bit to the medical word embedding of the word to obtain the final word embedding; S4. The BiLSTM model is used to capture the contextual semantics of each word in the Chinese electronic medical record text data. At the same time, the medical dictionary is queried to generate a masked attention vector, and then the attention weight matching the medical concept in the medical dictionary is calculated to obtain the comprehensive semantic feature representation of the word. S5, inputting the comprehensive semantic feature representation into the global pointer network, calculating the named entity score, and obtaining the named entity category; The step S5 is specifically as follows: S51. For each embedding representation in the comprehensive semantic feature, e i Transform according to the following formula to obtain the starting position representation q of the αth type of named entity: i,α and the end position indicates k i,α ; q i,α =W q,α e i +b q,α k i,α =W k,α e i +b k,α Where W q,α and W k,α represents the learnable parameters in model training, b q,α and b k,α Represents the bias term of the model; S52, indicating q according to the starting position i,α and the end position indicates k i,α , calculate the score s of a named entity of type α for the continuous segment from i to j α (i,j); In the formula, R i represents the rotational position encoding of the i-th word, R j represents the rotational position encoding of the jth word, R j-i It represents the relative rotation position encoding from the i-th word to the j-th word in the medical text, and the superscript T represents the matrix transposition operation.

2. According to claim 1, the method for named entity recognition of Chinese electronic medical records based on medical dictionary knowledge enhancement is characterized in that: In step S1, the data in the medical dictionary includes medical entity names and medical concept names in Chinese electronic medical records.

3. The method for named entity recognition of Chinese electronic medical records based on medical dictionary knowledge enhancement according to claim 1 is characterized in that: In step S2, the pre-trained language model RoBERTa-wwm-ext-large is a model fine-tuned based on Chinese electronic medical record text data.

4. The method for named entity recognition of Chinese electronic medical records based on medical dictionary knowledge enhancement according to claim 1 is characterized in that: In step S3, the medical concept embedding is the average of all medical word embeddings in the same medical concept to which each word in the Chinese electronic medical record text data belongs.

5. The method for named entity recognition in Chinese electronic medical records based on medical dictionary knowledge enhancement according to claim 1 is characterized in that: The step S4 is specifically as follows: S41. The BiLSTM model is used to capture the contextual semantics of each word in the Chinese electronic medical record text data, forming a feature representation of each word in the medical text; S42, query the medical dictionary, match the medical concepts of each word in the text, and generate a masked attention vector; S43, calculating the attention weight of each word based on the masked attention vector; S44. Based on the attention weight of each word, the corresponding embedding representation is calculated and then fused to form a comprehensive semantic feature.

6. The method for named entity recognition in Chinese electronic medical records based on medical dictionary knowledge enhancement according to claim 5 is characterized in that: In the step S42, in the generated masked attention vector, the mask of the position where the words appearing in the medical dictionary are located is 1, and the mask of the positions where the other words are located is 0.

7. The method for named entity recognition in Chinese electronic medical records based on medical dictionary knowledge enhancement according to claim 5 is characterized in that: In step S43, the formula for calculating the attention weight of each word in the text is: In the formula, represents the embedding representation obtained after the mask operation, O i and O j represents the embedding representation of the i-th and j-th words output by the BiLSTM model, T j Indicates O j The corresponding mask attention vector, represents the mask operation, W u represents the parameters learned in the model, [;] represents the connection operation, α i Indicates O j Relative to O i The attention weight, tanh() represents the hyperbolic tangent function, which is a nonlinear activation function, u i and u j They represent the embedding representations of the i-th and j-th medical word embeddings after nonlinear transformation, and u ik u represents the kth word in the medical concept of the i-th word k , n is the number of words in the medical concept where the i-th word is located.

8. The method for named entity recognition of Chinese electronic medical records based on medical dictionary knowledge enhancement according to claim 7 is characterized in that: In step S44, the word embedding representation e i The calculation formula is: e i =tanh(W e [c i ;O i ]) Where W e represents the parameters learned in the model, the subscript j represents the jth word in the medical concept, and n is the number of words in the medical concept where the ith word is located.

Citation Information

Patent Citations

  • Chinese named entity identification method and Chinese named entity identification device based on RoBERTa-BiGRU-LAN model

    CN111626056A

  • Electronic medical record named entity identification method and system fusing deep learning and rules

    CN112001177A

  • Medical named entity recognition system and method based on RWLSTM model fusion

    CN114781382A

  • Diabetic medicine text named entity recognition method

    CN116341557A

  • Artificial intelligence-based named entity recognition method and apparatus, and electronic device

    US20220188521A1