Search

CN-115545029-B - Medical event extraction method based on generated model

CN115545029BCN 115545029 BCN115545029 BCN 115545029BCN-115545029-B

Abstract

A medical event extraction method based on a generative model comprises the following steps of 1) obtaining text data of an electronic medical record in a database, presetting entity types and event templates to be extracted, 2) marking the entities and events in the medical record in the text of the electronic medical record through a marking tool according to the set templates, 3) converting the text into vector representation by using a transformer model as a text encoder, 4) marking the entities by using a pointer network, 4) classifying the event types by using a pooling layer and a linear layer, 5) generating an event information sequence by using a generative transformer, and 6) extracting argument roles in the event information sequence and summarizing the event information. The invention extracts unstructured data in the medical electronic medical record by a joint extraction algorithm, thereby obtaining structured event information and providing powerful help for subsequent disease analysis of patients.

Inventors

  • LI YONGQIANG
  • TANG JIARUI
  • XUE ZHIHAO
  • YE YANTONG
  • FENG YUANJING
  • ZHAO YONGZHI
  • YAO HUI
  • LI WENWEI
  • LIN DONG
  • FAN CHENQIANG
  • WU BILIANG

Assignees

  • 浙江工业大学

Dates

Publication Date
20260508
Application Date
20220930

Claims (2)

  1. 1. A medical domain event extraction method based on a generative model, the method comprising the steps of: 1) Acquiring text data of electronic medical records in a database, and presetting the types of entities and event schema to be extracted, wherein the entities comprise names, ages, time, sexes, disease parts and symptoms, and the events comprise infectious diseases, parasitic diseases, tumors and endocrine diseases; 2) According to the labeling, the entity and event information in the description text is manually labeled on a labeling platform, and the labeling text is produced according to the format to serve as training and testing data; 3) The training of the event extraction method uses a combined extraction strategy, medical record text and label data are input, a transducer encoder is used as a text encoder, text encoding results are respectively sent to a linear classification layer and a pointer network to obtain event types and entity BIO labels, event types loss1 and entity labels loss2 are calculated, the event types and the entity BIO labels are respectively sent to the event encoder and the entity encoder, the text encoding results, the event encoding results and the entity encoding results are added and then sent to a generation model to generate event argument roles, the argument roles are calculated to generate loss3, loss1, loss2 and loss3 are added to obtain final loss, and back propagation is carried out; 4) After training, saving the model; 5) And inputting a section of text into the model during prediction, and processing a sequence generated by the generated model to obtain final structured event information.
  2. 2. The medical domain event extraction method based on the generative model as set forth in claim 1, wherein the processing procedure of the step 3) is: 3.1 The method includes the steps of) segmenting an input text tokenize, adding special token [ start ] and [ end ] to the head and the tail to obtain a text W= [ W 1 ,w 2 ……w n ], wherein W t is token at the position of t+1, and obtaining a vector representation H= [ H 1 ,h 2 ……h n ] of the text after W is input into a text encoder transducer 1, wherein the process is as follows: H=Transformer1(W) (1) 3.2 The method comprises the steps of) carrying out maximum pooling on H to obtain a vector representation H of an article, reducing the dimension of H to an event classification number by using a linear layer, and obtaining a probability value of each event by using a softmax function, wherein the process is expressed as follows: h=maxpooling(H) (2) p=softmax(fc1(h)) (3) 3.3 According to the event type label, a gold tag g of the event type can be obtained, and then a cross entropy loss function is used for calculating a loss value for the event classification task: Wherein M event represents an event classification number; 3.4 According to BIO labeled entity label, a gold label G= [ G 1 ,g 2 ……g n ] for entity identification can be constructed, the text vector representation H obtained in 3.1) is input into a pointer network, the entity label classification probability P= [ P 1 ,p 2 ……p n ] of the text on each token is obtained, and a loss function of cross entropy is used for calculating a loss value for an entity identification task, wherein the process is expressed as follows: Where n represents the sequence length and M bio represents the number of entity tags; 3.5 Performing argmax calculation on the h' obtained by 3.2) to obtain an event type id, sending the event type id to an event classification Embedding layer to obtain a vector representation t of the event type, performing argmax calculation on the entity label classification probability P obtained by 4.4) to obtain an entity label of each token, sending the entity label to an entity Embedding layer to obtain an entity vector representation E= [ E 1 ,e 2 ……e n ], wherein the process is as follows: t=Embedding1(argmax(h`)) (6) E=Embedding2(argmax(P)) (7) 3.6 Copying the T calculated in 4.5) by n copies to obtain T= [ T 1 ,t 2 ……t n ] so that the dimension and the text vector represent the same H; 3.7 Adding the text coding result H, the event coding result T and the entity coding result E to obtain X= [ X 1 ,x 2 ……x n ], sending the X= [ X ' 1 ,x` 2 ……x` n ] to a generation model transducer 2 to obtain X ' = [ X ' ], reducing the dimension to 1 dimension by using a linear layer, obtaining a probability value P_gen= [ p_gen 1 ,p_gen 2 ……p_gen n ] of each token by using a softmax, selecting an X vector corresponding to the token with the highest probability in the first n tokens, and adding the X vector to the end of X, wherein the process is expressed as follows: X`=Transformer2(X) (8) P_gen=softmax(fc2(X`)) (9) X∶=Xappend argmax(P_gen) (10) 3.8 Repeating 3.7) until the selected token is a special token end, and obtaining the following sequence: [ argument role 1] [ start ] [ argument role 2] [ start ] [ argument role 3] [ start ] Wherein [ start ] represents a separation between two argument roles, and [ end ] represents an end of generation; 3.9 Extracting argument character from the sequence obtained in 3.8) to obtain final argument character information 3.10 Calculating the loss functions of 3.7) and 3.8), masking the ith and subsequent elements of the label sequence when the ith step is generated by the generated complete sequence contained in label extracted by the argument character, and calculating the cross entropy loss by using the label with partial masking, wherein the loss generated by the argument character is expressed as the average loss of each step: where N represents the number of times of generation and N represents the original sequence length 3.11 Adding the Loss1, the Loss2 and the Loss3 to obtain a final Loss, and carrying out back propagation.

Description

Medical event extraction method based on generated model Technical Field The invention belongs to the field of information extraction, medical big data and deep learning, and relates to a medical event extraction method based on a generated model. Background As networks continue to grow rapidly, the growth rate of information in this age is rapidly rising, and tens of thousands of unstructured text data information are generated and updated every day in our lives. However, these text data are only represented in a huge number, and the opportunities for secondary development and utilization are small. In recent years, artificial intelligence technology and cloud computing technology are continuously developed to an unprecedented new height, and the unstructured text can be reused by virtue of the powerful computing power provided by cloud computing and the algorithm support provided by the artificial intelligence field, so that the value of the unstructured text can be discovered and extracted again. The intelligent city intelligent management system has the advantages that the construction of the intelligent city in China is in an exploration period from 2008 to 2014, the adjustment period from 2014 to 2015, the break-through period from 2015 to 2017, the intelligent city is in a fourth stage nowadays, the running condition of each road section is monitored through a city brain in the traffic field, once the local road section congestion condition is met, a driver is automatically guided to select other smooth road sections so as to improve the traffic running efficiency, a smart class is arranged in the education field, centralized intelligent recording, remote interaction and normal live broadcast recording are realized in a soft and hard integrated mode, large data support is provided for teaching decisions, the real-time teaching decision making, evaluation feedback, communication interaction three-dimensional and resource pushing intelligence are realized, intelligent and efficient learning ecological environments are created, and in recent years, powerful nlp models such as transformer, bert are continuously developed due to the rapid development of natural language processing technology, so that the processing capacity of the city brain in the medical field is improved, a written and unstructured electronic medical record is converted into a structured text, the working efficiency of doctors is improved, and the important information is extracted as a medical structure of a medical research database. In the medical field, a great amount of entity information such as name, age, sex, disease type, symptoms and the like exists in an electronic medical record written by a doctor, and the entity information can form event information, but the information is time-consuming and labor-consuming through manual labeling, and medical staff with special expertise and experience are required to label correctly. The neural network combined with the deep learning method can learn the texts in advance, and a large amount of texts can be input subsequently after learning is completed, and the texts are identified and information is extracted. However, limited by the algorithm design and calculation force bottleneck of the current deep learning, only a small amount of algorithm technology is successful in landing, the adaptive scene is very single, complex situations such as long text event extraction, multi-event extraction, entity overlapping and the like are encountered, and the existing pipline-form event extraction algorithm cannot meet the requirements of accuracy and robustness on the extraction effect. Under the condition, the extraction speed and the capability of coping with complex situations of the existing event extraction can be greatly improved by introducing a joint extraction mechanism and a generation model technology, and the information extraction efficiency is greatly improved. Disclosure of Invention In order to solve the problem of medical event extraction in the existing complex scene, the invention provides a medical event extraction method based on a generated model, which extracts structured event information with higher readability from the existing electronic medical record text and plays a role in constructing a high-quality medical database. In order to solve the technical problems, the invention provides the following technical scheme: A medical event extraction method based on a generative model, the method comprising the steps of: 1) Acquiring text data of electronic medical records in a database, and presetting the types of entities to be extracted and event schema, wherein the entities comprise name, age, time, sex, disease parts, symptoms and the like, and the events comprise infectious diseases, parasitic diseases, tumors, endocrine diseases and the like; 2) According to the labeling, the entity and event information in the description text is manually labeled on a labeling platfo