Clinical Anesthesia Field Entity Extraction Method, Device, Storage Medium and Electronic Device
By obtaining and preprocessing long text data from multi-source clinical anesthesia knowledge text, combining a small amount of prior knowledge and string matching technology to generate training data, and using BERT and CRF models for entity extraction, the problems of low efficiency of long text data extraction and large labor in the field of clinical anesthesia are solved, and efficient entity extraction is achieved.
Patent Information
- Application Number
- CN202111628377.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-28
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2041-12-28
AI Technical Summary
Existing entity extraction studies in the field of clinical anesthesia are difficult to process long text data, and require a large amount of manual annotation data for model training, which consumes a lot of manual labor.
By obtaining long text data from multi-source clinical anesthesia knowledge text, data preprocessing is performed to form segmented label-free short text and its topics, using a small amount of prior knowledge to design entity types and string matching to generate labeled training data, and finally using BERT and CRF-based models for entity extraction.
The physical extraction of medium and long text data in the field of clinical anesthesia has been achieved, greatly reducing manual labor and improving work efficiency.
Smart Images

Figure CN114298046B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of computer application technology and clinical anesthesia. Specifically, it relates to a method and device for extracting entity knowledge from multi-source texts in the field of clinical anesthesia to establish a clinical anesthesia knowledge graph, a storage medium, and an electronic device. Background Art
[0002] Anesthesiologists are responsible for constantly observing the vital signs of patients and promptly performing rescue and treatment. Currently, there is a huge shortage of anesthesiologists, which has restricted the development of surgeries such as painless childbirth and painless gastroscopy. Domestic anesthesiologists are overloaded under high-intensity work pressure, objectively increasing the treatment cost and life safety risk of patients.
[0003] To alleviate the shortage of anesthesiologists, effectively ensure clinical safety and the quality of anesthesia surgeries, and promote the high-quality development of medical services, existing methods attempt to develop artificial intelligence anesthesia assistance systems, that is, to monitor the vital signs of patients after anesthesia during clinical surgeries, and through intelligent services during the surgical process, achieve early warning of emergencies and auxiliary emergency treatment to escort the clinical safety of patients. Among them, the auxiliary role of artificial intelligence largely depends on the quality of the constructed knowledge graph. Therefore, how to extract entities from multi-source (textbooks, physician oral accounts, and emergency guidelines) text data in the field of clinical anesthesia is the focus of research on such methods.
[0004] However, the existing research on entity extraction in the field of clinical anesthesia is almost blank, and the following problems exist in the broader scope of medical entity extraction research: First, existing research often focuses on entity extraction from short texts such as electronic medical record EMR data and electronic health record EHR data, and it is difficult to be migrated to long text data such as textbooks and emergency guidelines; second, existing research requires a large amount of manually labeled data for model training, and it is unable to use a small amount of prior knowledge to extract a large amount of labeled data for model training, which requires a large amount of manual labor. Summary of the Invention
[0005] The purpose of the present invention is to provide a method for entity extraction in the field of clinical anesthesia, which realizes the entity extraction of long text data in the field of clinical anesthesia, greatly reduces manual labor, and improves work efficiency.
[0006] To achieve the above purpose, the present invention provides a method for entity extraction in the field of clinical anesthesia, the method comprising:
[0007] Step 1, obtain multi-source clinical anesthesia knowledge texts from knowledge sources, and perform data preprocessing to form segmented unlabeled short texts and their themes;
[0008] Step 2: Design a series of entity types in the field of clinical anesthesia as the extraction objects of the entity extraction method, and use a small amount of prior knowledge to preset a small number of entities under each entity type for constructing the text data required for the subsequent training model.
[0009] Step 3: Use string matching technology to match the labeled training data required by the entity extraction model in the original data, and the remaining data is used as the data to be subjected to entity extraction.
[0010] Step 4: Use the model based on BERT and CRF to encode the data to be subjected to entity extraction, obtain the labels of the sequence data, and obtain the entities in the text data to be subjected to entity extraction.
[0011] Preferably, the knowledge sources in Step 1 include clinical anesthesia textbooks, emergency guidelines, and the oral experiences of clinical anesthesiologists.
[0012] Preferably, for the clinical anesthesia textbooks and emergency guidelines in Step 1, text chunking is performed based on chapters, that is, the original long text is divided into discrete short texts according to the smallest chapters in the book, and the theme of the corresponding short text is recorded as the chapter name where it is located; for the oral experiences in Step 1, the data is not chunked, and the corresponding theme is recorded as the problem in clinical anesthesia corresponding to the oral experience.
[0013] Preferably, the short text data X = [X1, X2..., X n obtained after the data preprocessing in Step 1, and the theme Y = [Y1, Y2..., Y n , where n is the number of entries in the chunked data.
[0014] Preferably, the entity types in Step 2 include emergency event entities, physical sign entities, diagnosis entities, emergency call entities, immediate treatment entities, and treatment measure entities.
[0015] Preferably, in Step 3, string matching technology is combined with a small amount of prior knowledge to generate training data, including: performing string matching on the text data with the text corresponding to the small number of example entities defined in Step 2, and if the matching is successful, marking the corresponding text with the corresponding entity type as the sequence label, and adding this part of the text data to the test set;
[0016] Among them, for the diversity of the same noun expression in the field of clinical anesthesia, and in order to generate as much training data as possible using a small amount of prior knowledge, fuzzy matching based on the Levenshtein distance calculation of similarity is used for entity string matching.
[0017] Preferably, the Levenshtein distance is an edit distance, that is, the minimum number of edit operations required to convert one string into another by replacing, inserting, or deleting characters; correspondingly, the similarity between two strings is defined in step 3 as where L is the Levenshtein distance between the two strings, and a and b represent the lengths of the two strings respectively; moreover, by adjusting the similarity threshold for string matching, a large amount of training data can be obtained from a small amount of prior knowledge for model training.
[0018] Preferably, the data processed by the model in step 4 includes the short text X i and its theme Y i , and the corresponding encoding model is divided into a theme encoding module and a short text encoding module;
[0019] To make full use of the information of the theme, a pre-trained BERT model is used to encode the theme; among them, the BERT model is a commonly used text encoder in natural language processing technology, which consists of an embedding representation layer and an encoder composed of 12 layers based on the multi-head self-attention mechanism and the point-wise feed-forward network; the calculation formula of the multi-head self-attention mechanism is as follows:
[0020] MultiHeadAttn(F l )=[head1,head2,…,head h W O
[0021] head i =Attention(F l Wi i Q ,F l W i K ,F l W i V )
[0022]
[0023] where F l is the input of the l-th layer network. When l = 0, the framework takes the sequence theme word embedding representation obtained by the embedding representation layer as the input; W Q ,W K ,W V ,W O ∈R d*d are pre-trained projection matrix parameters, d is the dimension of the preset item embedding representation vector, is a scaling factor to prevent the product of the attention mechanism from being too large;
[0024] The calculation formula of the point-level feed-forward network is as follows:
[0025]
[0026] FFN(x) = (ReLU(xW1 + b1))W2 + b2
[0027] where W1, b1, W2, b2 are pre-trained parameters;
[0028] Input the text corresponding to the theme Y i after word segmentation by character into the pre-trained BERT model, and the semantic representation vector q i ∈R d of the theme string can be obtained, where d is the length of the semantic representation vector;
[0029] For the short text X i , the short text encoding model proposed by this method consists of an embedding representation layer and three layers of feature extraction backbones:
[0030] The embedding representation layer is composed of a word embedding layer, a position embedding layer, and a radical embedding layer. Among them, the pre-trained word vectors are used as the word embedding layer to map each word or symbol in the text with length n to a d-dimensional vector space, denoted as E ∈ R n*d ; in addition, a learnable position embedding representation layer is used to integrate the sequential information of the text sequence into the learning process, denoted as P ∈ R n*d ; then, considering that words sharing the same radical in medical texts often refer to the same type of entity, a radical embedding layer is designed to model this information, denoted as S ∈ R n*d ; finally, the embedding representation E i of the short text x i is obtained as E = E + P + S;
[0031] The feature extraction backbone network in this method consists of a topic-sensitive attention mechanism and a point-level feed-forward network. The topic-sensitive attention mechanism is used to extract important information in the short text x i under the given theme, and the corresponding calculation formula is as follows:
[0032] TopicAwareAttn(F l ) = Attn * W O
[0033] Attn = Attention(QW Q , F l W K , F l W V )
[0034]
[0035] Among them, F l is the input of the l-th layer network. When l = 0, the framework takes the sequence word embedding representation obtained by the embedding representation layer as the input, that is, F 0 = E i ; Q is the semantic representation vector q i of the topic string after being broadcast to obtain an n*d matrix, W Q , W K , W V , W O ∈R d*d is the learnable projection matrix parameter, d is the dimension of the preset item embedding representation vector, is the scaling factor to prevent the product of the attention mechanism from being too large;
[0036] The point-wise feed-forward network in the feature extraction backbone network is to add non-linear fitting ability to the self-attention module, and the corresponding calculation formula is as follows:
[0037]
[0038] FFN(x)=(ReLU(xW1 + b1))W2 + b2
[0039] where W1, b1, W2, b2 are learnable parameters;
[0040] After encoding the short text X i and its topic Y i by the encoding model, the CRF layer is used as the final prediction output layer. By inputting the encoded result into the CRF layer, the label M = [m1, m2,... m i of each character in the original sequence X l is obtained, where l is the length of the short text X i , and then the entity extraction task is completed according to the label.
[0041] The present invention also provides an entity extraction device in the field of clinical anesthesia. The device includes:
[0042] A segmentation unit for obtaining long text data in the field of clinical anesthesia and segmenting it into multiple short texts and their corresponding topics;
[0043] An extraction unit for extracting entities in the field of clinical anesthesia in the text by using the trained model based on BERT and CRF.
[0044] Preferably, the segmentation unit is configured to obtain the original text data in the field of clinical anesthesia through external input or web crawler; among them,
[0045] For textbooks and emergency guides, divide them into multiple short texts according to the smallest chapters therein, and the corresponding theme is the chapter name; for the oral texts of physicians, no text segmentation is performed, and the corresponding theme is defined as the problems in clinical anesthesia corresponding to the oral experience.
[0046] Preferably, the extraction unit is configured to pre-train an extraction model based on BERT and CRF, input the short text in the field of clinical anesthesia and its corresponding theme into the model, and the model outputs the label M = [m1, m2, … m l corresponding to each character in the short text, and then complete the task of entity extraction according to the label;
[0047] Output the entities in the short text according to the labels produced by the model, and save them to the local database at the same time.
[0048] The present invention also provides a clinical anesthesia field entity storage medium, and the storage medium stores instructions, and when the instructions run, they control the device where the storage medium is located to execute the steps of the above-mentioned clinical anesthesia field entity extraction method.
[0049] The present invention also provides a clinical anesthesia field entity electronic device, including a memory and one or more instructions, the instructions are stored in the memory, and are configured to be executed by one or more processors to perform:
[0050] Obtain long text data in the field of clinical anesthesia and divide it into multiple short texts and their corresponding themes;
[0051] Use the trained model based on BERT and CRF to extract the entities in the text in the field of clinical anesthesia.
[0052] According to the above technical solution, the present invention successively passes through: First, obtain multi-source clinical anesthesia knowledge texts from knowledge sources and perform data preprocessing to form segmented unlabeled short texts and their themes; second, design a series of entity types in the field of clinical anesthesia as the extraction objects of the entity extraction method, and use a small amount of prior knowledge to preset a small number of entities under each entity type for subsequent construction of the text data required for training the model; third, use string matching technology to match the labeled training data required by the entity extraction model in the original data, and the remaining data is used as the data to be subjected to entity extraction; finally, use the model based on BERT and CRF to encode the data to be subjected to entity extraction to obtain the labels of the sequence data, and obtain the entities in the text data to be subjected to entity extraction. In this way, the entity extraction of long text data in the field of clinical anesthesia is successfully realized, greatly reducing manual labor and improving work efficiency.
[0053] Other features and advantages of the present invention will be described in detail in the subsequent specific implementation part. Brief Description of the Drawings
[0054] The accompanying drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present invention, but do not constitute a limitation to the present invention. In the accompanying drawings:
[0055] Figure 1 is a schematic flow chart of a method for entity extraction in the field of clinical anesthesia provided by the present invention;
[0056] Figure 2 is a schematic diagram of a neural model based on BERT and CRF provided by the present invention;
[0057] Figure 3 is a schematic diagram of a device for entity extraction in the field of clinical anesthesia provided by the present invention;
[0058] Figure 4 is a schematic diagram of an electronic device for entity extraction in the field of clinical anesthesia provided by the present invention. Detailed Description of the Embodiments
[0059] The following will describe in detail the specific embodiments of the present invention with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for explaining and understanding the present invention, and are not used to limit the present invention.
[0060] See Figure 1 , the present invention provides a method for entity extraction in the field of clinical anesthesia, and the method includes:
[0061] Step 1: Obtain multi-source clinical anesthesia knowledge texts from knowledge sources, and perform data preprocessing to form segmented unlabeled short texts and their themes;
[0062] Step 2: Design a series of entity types in the field of clinical anesthesia as the extraction objects of the entity extraction method, and use a small amount of prior knowledge to preset a small number of entities under each entity type for constructing the text data required for training the model subsequently;
[0063] Step 3: Use string matching technology to match the labeled training data required by the entity extraction model in the original data, and the remaining data is used as the data to be subjected to entity extraction;
[0064] Step 4: Use the model based on BERT and CRF to encode the data to be subjected to entity extraction, obtain the labels of the sequence data, and obtain the entities in the text data to be subjected to entity extraction.
[0065] The knowledge sources in the above Step 1 are multi-source, and specifically may include clinical anesthesia textbooks, emergency guidelines, and the oral experience of clinical anesthesiologists, etc.
[0066] Specifically, for the clinical anesthesia textbooks and emergency guidelines in Step 1, text chunking is performed based on chapters, that is, the original long text is divided into discrete short texts according to the smallest chapters in the book, and the theme of the corresponding short text is recorded as the chapter name where it is located; for the oral experiences in Step 1, the data is not chunked, and the corresponding theme is recorded as the problem in clinical anesthesia corresponding to the oral experience.
[0067] In this way, the short text data x = [x1, X2..., X n obtained after the data preprocessing in Step 1, and the theme Y = [Y1, Y2..., Y n , where n is the number of entries in the chunked data.
[0068] The entity types in Step 2 include emergency event entities, physical sign entities, diagnosis entities, emergency call entities, immediate treatment entities, treatment measure entities, and so on.
[0069] The following table lists some of the entity types predefined in the present invention and the corresponding entities of the examples:
[0070]
[0071] In addition, in order to solve the problem that the entity extraction technology in the medical field in the past required a large amount of manually labeled data for training, in Step 3, a string matching technology is used in combination with a small amount of prior knowledge to generate training data, including: performing string matching between the text data and the text corresponding to a small number of example entities defined in Step 2, and if the matching is successful, marking the corresponding text with the corresponding entity type as a sequence label, and adding this part of the text data to the test set;
[0072] Among them, for the diversity of the same noun expression in the field of clinical anesthesia, and in order to generate as much training data as possible using a small amount of prior knowledge, fuzzy matching based on the Levenshtein distance calculation similarity is used for entity string matching.
[0073] The above-mentioned Levenshtein distance is an edit distance, that is, the minimum number of edit operations required to convert one string into another by replacing, inserting, or deleting characters; correspondingly, in Step 3, the similarity between two strings is defined as where L is the Levenshtein distance between the two strings, and a and b represent the lengths of the two strings respectively; and by adjusting the similarity threshold for string matching, a large amount of training data can be obtained from a small amount of prior knowledge for model training.
[0074] The data processed by the model in Step 4 includes the short text X i and its theme Y i , and the corresponding encoding model is divided into a theme encoding module and a short text encoding module;
[0075] As Figure 2 described above, to make full use of the information of the theme, a pre-trained BERT model is used to encode the theme; among them, the BERT model is a commonly used text encoder in natural language processing technology, and is composed of an embedding representation layer and an encoder composed of 12 layers based on the multi-head self-attention mechanism and the point-wise feed-forward network; the calculation formula of the multi-head self-attention mechanism is as follows:
[0076] MultiHeadAttn(F l ) = [head1, head2, …, head h W O
[0077] head i = Attention(F l W i Q , F l W i K , F l W i V )
[0078]
[0079] Among them, F l is the input of the l-th layer network. When l = 0, the framework takes the sequence theme text embedding representation obtained by the embedding representation layer as the input; W Q , W K , W V , W O ∈R d*d are pre-trained projection matrix parameters, d is the dimension of the preset item embedding representation vector, is a scaling factor to prevent the product of the attention mechanism from being too large;
[0080] The calculation formula of the point-wise feed-forward network is as follows:
[0081]
[0082] FFN(x) = (ReLU(xW1 + b1))W2 + b2
[0083] Among them, W1, b1, W2, b2 are pre-trained parameters;
[0084] Input the text corresponding to the theme Y i after word segmentation by character into the pre-trained BERT model, and the semantic representation vector q i ∈R d, where d is the length of the semantic representation vector;
[0085] For the short text X i , the short text encoding model proposed by this method consists of an embedding representation layer and three layers of feature extraction backbones:
[0086] The embedding representation layer is composed of a character embedding layer, a position embedding layer, and a radical embedding layer. Among them, the pre-trained word vectors are used as the character embedding layer to map each character or symbol in the text of length n to a d-dimensional vector space, denoted as E ∈ R n*d ; In addition, a learnable position embedding representation layer is used to integrate the sequence information of the text into the learning process, denoted as P ∈ R n*d ; Then, considering that words sharing the same radical in medical texts often refer to the same type of entity, a radical embedding layer is designed to model this information, denoted as S ∈ R n*d ; Finally, the embedding representation E of the short text x i is obtained i = E + P + S;
[0087] The feature extraction backbone network in this method consists of a topic-sensitive attention mechanism and a point-wise feed-forward network. The topic-sensitive attention mechanism is used to extract important information in the short text x i under a given topic, and the corresponding calculation formula is as follows:
[0088] TopicAwareAttn(F l ) = Attn * W O
[0089] Attn = Attention(QW Q , F l W K , F l W V )
[0090]
[0091] where F l is the input of the l-th layer network. When l = 0, the framework takes the sequence character embedding representation obtained by the embedding representation layer as the input, that is, F 0 = E i ; Q is an n * d matrix obtained by broadcasting the semantic representation vector q i of the topic string. W Q , W K , W V , W O ∈ R d*d are learnable projection matrix parameters, and d is the dimension of the preset item embedding representation vector. is a scaling factor to prevent the product of the attention mechanism from being too large;
[0092] The point-wise feed-forward network in the feature extraction backbone network is to add non-linear fitting ability to the self-attention module. The corresponding calculation formula is as follows:
[0093]
[0094] FFN(x) = (ReLU(xW1 + b1))W2 + b2
[0095] where W1, b1, W2, b2 are learnable parameters;
[0096] After encoding the short text X i and its topic Y i using the encoding model, the CRF layer is used as the final prediction output layer. By inputting the encoded result into the CRF layer, the label M = [m1, m2,... m i of each character in the original sequence X is obtained, where l is the length of the short text X l , and then the entity extraction task is completed according to the labels. i
[0097] See Figure 3 , the present invention also provides an entity extraction device in the field of clinical anesthesia. The device includes:
[0098] A segmentation unit for obtaining long text data in the field of clinical anesthesia and segmenting it into multiple short texts and their corresponding topics;
[0099] An extraction unit for extracting entities in the field of clinical anesthesia in the text using a trained model based on BERT and CRF.
[0100] Among them, the segmentation unit is configured to obtain the original text data in the field of clinical anesthesia through external input or web crawling; among them,
[0101] For textbooks and emergency guidelines, they are divided into multiple short texts according to the smallest chapters therein, and the corresponding topic is the chapter name; for physician oral texts, the text is not segmented, and the corresponding topic is defined as the problems in clinical anesthesia corresponding to the oral experience.
[0102] The extraction unit is configured to pre-train an extraction model based on BERT and CRF, input the short text in the field of clinical anesthesia and its corresponding topic into the model, and the model outputs the label M = [m1, m2,... m l corresponding to each character in the short text, and then complete the entity extraction task according to the labels;
[0103] Output the entities in the short text according to the labels produced by the model, and save them to the local database at the same time.
[0104] In addition, the present invention also provides a storage medium for entities in the field of clinical anesthesia. The storage medium stores instructions, and when the instructions run, they control the device where the storage medium is located to execute the steps of the above-mentioned method for extracting entities in the field of clinical anesthesia.
[0105] As Figure 4 shown, the present invention also provides an electronic device for entities in the field of clinical anesthesia, including a memory and one or more instructions. The instructions are stored in the memory and are configured to be executed by one or more processors to perform:
[0106] Obtain long text data in the field of clinical anesthesia and segment it into multiple short texts and their corresponding themes;
[0107] Use the trained model based on BERT and CRF to extract entities in the field of clinical anesthesia in the text.
[0108] In addition, the present invention uses the Levenshtein distance as the standard for calculating similarity in string fuzzy matching. Other technicians can form other embodiments by replacing the similarity calculation method to extract the test set in the long text;
[0109] The present invention uses the pre-trained BERT model as the encoding model for short text themes. Other technicians can form other embodiments by replacing the theme encoding model.
[0110] The preferred embodiments of the present invention have been described in detail above in conjunction with the accompanying drawings. However, the present invention is not limited to the specific details in the above embodiments. Within the scope of the technical concept of the present invention, various simple modifications can be made to the technical solutions of the present invention, and these simple modifications all fall within the protection scope of the present invention.
[0111] In addition, it should be noted that, among the various specific technical features described in the above specific embodiments, they can be combined in any suitable manner without conflict. To avoid unnecessary repetition, the present invention will not separately describe various possible combination methods.
[0112] In addition, any combination can be made between different embodiments of the present invention as long as it does not violate the idea of the present invention, and it should also be regarded as the content disclosed by the present invention.
Claims
1. A method for entity extraction in the field of clinical anesthesia, characterized in that The method includes: Step 1: Obtain multi-source clinical anesthesia knowledge texts from knowledge sources and perform data preprocessing to form segmented unlabeled short texts and their topics. Step 2: Design a series of entity types in the clinical anesthesia field as the extraction objects of the entity extraction method, and use a small amount of prior knowledge to preset a small number of entities under each entity type for constructing the text data required for the subsequent training model. Step 3: Use string matching technology to match the labeled training data required by the entity extraction model in the original data, and the remaining data is used as the data to be subjected to entity extraction. Step 4: Use the model based on BERT and CRF to encode the data to be subjected to entity extraction to obtain the labels of the sequence data, and obtain the entities in the text data to be subjected to entity extraction. In Step 3, string matching technology is combined with a small amount of prior knowledge to generate training data, including: performing string matching between the text data and the text corresponding to the small number of example entities defined in Step 2. If the match is successful, the corresponding text is marked with the corresponding entity type as the sequence label, and this part of the text data is added to the test set. Among them, in view of the diversity of the same noun expression in the clinical anesthesia field and in order to generate as much training data as possible using a small amount of prior knowledge, fuzzy matching based on the Levenshtein distance calculation similarity is used for entity string matching. The Levenshtein distance is a type of edit distance, that is, the minimum number of edit operations required to convert one string into another by replacing, inserting, or deleting characters; correspondingly, in step 3, the similarity between two strings is defined as where L is the Levenshtein distance between the two strings, and a and b represent the lengths of the two strings respectively; moreover, by adjusting the similarity threshold for string matching, a large amount of training data can be obtained from a small amount of prior knowledge for model training; The data processed by the model in step 4 includes the short text X i and its theme Y i , and the corresponding encoding model is divided into a theme encoding module and a short text encoding module; To make full use of the information of the topic, use the pre-trained BERT model to encode its topic; among them, the BERT model is a commonly used text encoder in natural language processing technology, which consists of an embedding representation layer and an encoder composed of 12 layers based on the multi-head self-attention mechanism and the point-wise feed-forward network; the calculation formula of the multi-head self-attention mechanism is as follows: MultiHeadAttn(F l ) = [head1, head2, …, head h W O head i = Attention(F l W i Q , F l W i K , F l W i V ) Among them, F l is the input of the l-th layer network. When l = 0, the framework takes the sequence topic word embedding representation obtained by the embedding representation layer as the input; W Q , W K , W V , W O ∈R d*d are pre-trained projection matrix parameters, d is the dimension of the embedding representation vector space, is a scaling factor to prevent the product of the attention mechanism from being too large. Q, K, and V are the query, key, and value matrices required in the self-attention mechanism calculation respectively; The calculation formula of the point-wise feed-forward network is as follows: FFN(x) = (ReLU(xW1 + b1))W2 + b2 Among them, W1, b1, W2, b2 are pre-trained parameters, and FFN(x) refers to the point-wise feed-forward network with input x. and represent the first and the n-th characters in the input of the l-th layer network, respectively. Subject Y i After word-segmenting the corresponding text by character and inputting it into the pre-trained BERT model, the semantic representation vector q of the topic string can be obtained i ∈R d ; For short text X i , the short text encoding model proposed by this method consists of an embedding representation layer and three layers of feature extraction backbones: The embedding representation layer consists of a character embedding layer, a position embedding layer, and a radical embedding layer. Among them, the pre-trained word vectors are used as the character embedding layer to map each character or symbol in the text of length n to a d-dimensional embedding representation vector space, denoted as E ∈ R n*d ; In addition, a learnable position embedding representation layer is used to integrate the sequential information of the text sequence into the learning process, denoted as P ∈ R n*d ; Then, for the words sharing the same radical in the medical text referring to the same type of entity, a radical embedding layer is designed to model this information, denoted as S ∈ R n*d ; Finally, the embedding representation E i of the short text x i = E + P + S; The feature extraction backbone network in this method consists of a topic-sensitive attention mechanism and a point-wise feed-forward network. The topic-sensitive attention mechanism is used to extract important information in the short text x under a given topic, and the corresponding calculation formula is as follows: i The important information in the short text x under a given topic, and the corresponding calculation formula is as follows: TopicAwareAttn(F l ) = Attn * W O Attn=Attention(QW Q ,F l W K ,F l W V ) Among them, F l is the input of the l-th layer network. When l = 0, the framework takes the sequence word embedding representation obtained by the embedding representation layer as the input, that is, F 0 = E i ; Q is the semantic representation vector q i of the topic string after being broadcast to obtain an n*d matrix, W Q , W K , W V , W O ∈R d*d is the learnable projection matrix parameter, d is the dimension of the embedding representation vector space, is the scaling factor to prevent the product of the attention mechanism from being too large; The point-wise feed-forward network in the feature extraction backbone network is to add non-linear fitting ability to the self-attention module, and the corresponding calculation formula is as follows: FFN(x) = (ReLU(xW1 + b1))W2 + b2 Among them, W1, b1, W2, b2 are learnable parameters; In the encoding model for the short text X i And its theme Y i After encoding, the CRF layer is used as the final prediction output layer. The encoded result is input into the CRF layer to obtain the short text X i The label of each character in M=[m1,m2,…m l ], where l is the short text X i The length of the entity is calculated, and then the entity extraction task is completed according to the label.
2. The entity extraction method in the field of clinical anesthesia according to claim 1, wherein The knowledge sources in Step 1 include clinical anesthesia textbooks, emergency guidelines, and the oral experience of clinical anesthesiologists.
3. The method for entity extraction in the field of clinical anesthesia according to claim 2, wherein For the clinical anesthesia textbooks and emergency guidelines in Step 1, text chunking is performed based on chapters, that is, the original long text is divided into discrete short texts according to the smallest chapters in the book, and the topic of the corresponding short text is recorded as the chapter name where it is located; for the oral experience in Step 1, its data is not chunked, and the corresponding topic is recorded as the problem in clinical anesthesia corresponding to the oral experience.
4. The method for entity extraction in the field of clinical anesthesia according to claim 3, characterized in that, The short text data X = [X1, X2..., X n obtained after the data preprocessing in step 1, and the theme Y = [Y1, Y2..., Y n , where n is the number of entries in the chunked data.
5. The entity extraction method in the field of clinical anesthesia according to claim 1, wherein The entity types in Step 2 include emergency event entities, physical sign entities, diagnosis entities, emergency call entities, immediate treatment entities, and treatment measure entities.
6. A clinical anesthesia field entity extraction device for the clinical anesthesia field entity extraction method according to any one of claims 1-5, characterized in that, The device includes: A segmentation unit, configured to obtain long text data in the clinical anesthesia field and segment it into multiple short texts and their corresponding topics. An extraction unit, configured to use the trained model based on BERT and CRF to extract entities in the text in the clinical anesthesia field.
7. The entity extraction device in the field of clinical anesthesia according to claim 6, wherein The segmentation unit is configured to obtain the original text data in the field of clinical anesthesia through external input or web crawler; among them, For textbooks and emergency guidelines, they are divided into multiple short texts according to the smallest chapters therein, and the corresponding theme is the chapter name; for physician oral texts, no text segmentation is performed, and the corresponding theme is defined as the problems in clinical anesthesia corresponding to the oral experience.
8. The entity extraction device in the field of clinical anesthesia according to claim 6, wherein The extraction unit is configured to pre-train an extraction model based on BERT and CRF, input the short text in the field of clinical anesthesia and its corresponding theme into the model, and the model outputs the label M = [m1, m2, … m l for each character in the short text, and then complete the task of entity extraction according to the labels; According to the labels output by the model, the entities in the short text are output and saved to the local database at the same time.
9. An entity storage medium in the field of clinical anesthesia, the storage medium stores instructions, characterized in that, When the instruction runs, it controls the device where the storage medium is located to execute the steps of the entity extraction method in the field of clinical anesthesia described in any one of claims 1-5.
10. A clinical anesthesia field entity electronic device for the clinical anesthesia field entity extraction method as described in any one of claims 1-5, comprising a memory and one or more instructions, characterized in that, The instruction is stored in the memory and is configured to be executed by one or more processors to perform the following by the one or more instructions: Obtain the long text data in the field of clinical anesthesia and segment it into multiple short texts and their corresponding themes; Use the trained model based on BERT and CRF to extract the entities in the text in the field of clinical anesthesia.
Citation Information
Patent Citations
Named entity identification method and device, storage medium and electronic equipment
CN112749562A
Word segmentation and capsule network law named entity recognition method fusing radical vectors
CN113312918A