A standard symptom extraction method based on multiple rounds of medical consultation

Through the multi-round consultation technology based on the BERT model, combined with the medical standard symptom term database, data cleaning, symptom information extraction and yin-positive identification are carried out, and the problems of low coverage and high noise in the standard symptom extraction in the existing technology are solved, and the problem of low coverage and high noise in the standard symptom extraction is realized. More efficient symptom extraction and diagnostic effects.

CN113921149BActive Publication Date: 2024-11-08HANGZHOU QIJING TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202111247799.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-26
Publication Date
2024-11-08
Estimated Expiration
2041-10-26

AI Technical Summary

Technical Problem

The existing standard symptom extraction methods have low coverage and high noise in online consultations, which affects the diagnostic effect. They rely on manual sorting of medical standardized control dictionaries, which has a large workload and low coverage.

Method used

Using multi-round consultation technology based on BERT model, through data cleaning, symptom information extraction, standardization and yin-yang identification, combined with medical standard symptom term database, a multi-layer model is constructed for symptom extraction and standardization, reducing manual intervention, improving coverage and accuracy.

Benefits of technology

It improves the accuracy and coverage of standard symptom extraction, reduces noise, enhances the consultation effect, reduces dependence on manual labeling, and improves the reliability of diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113921149B_ABST
    Figure CN113921149B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for extracting standard symptoms based on multiple rounds of medical consultation. 1) Obtain historical online medical consultation dialogue texts; 2) Extract all symptoms in the medical consultation text based on a medical information extraction model; 3) Obtain standard symptoms corresponding to the symptoms based on a medical standard symptom terminology library; 4) Obtain the probability that the current symptom is positive based on a symptom positive / negative identification model; 5) Splice the medical consultation texts containing symptoms belonging to the same standard symptom; 6) Determine whether the standard symptom is currently suffered by the patient based on a pre-established standard symptom positive / negative identification model; 7) Integrate the prediction results of the symptom and the standard symptom positive / negative identification model to determine the standard symptom currently suffered by the patient. Based on the characteristics of multiple rounds of medical consultation, the present invention respectively constructs a medical information extraction model, a symptom standardization model, a symptom positive / negative identification model, and a standard symptom positive / negative identification model, thereby realizing the extraction of standard symptoms from medical consultation dialogues, with a high extraction success rate and accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of medical natural language processing, and specifically refers to a standard symptom extraction method based on multiple rounds of medical interviews. Background Art

[0002] Online consultation refers to doctors communicating with patients about their condition through online dialogue and providing relevant medical advice. With the rapid development of "Internet + Healthcare", the demand for online consultation is growing rapidly, but doctor resources are scarce. Therefore, automated medical consultation technology is particularly important. Automated medical consultation can realize human-computer dialogue to assist the consultation process, and standard symptom extraction is an important module. By extracting structured standard symptom information from unstructured dialogue text, it can help doctors quickly understand patient information and then give relevant diagnoses.

[0003] At present, the method of extracting standard symptoms from the text of medical consultation dialogues is usually to use an entity recognition model to identify the symptom information contained in the text, and then standardize the symptoms through a manually compiled medical standard reference dictionary. However, the above method assumes that the symptoms mentioned in the text are all the symptoms currently suffered by the patient. This premise leads to a large amount of information irrelevant to the current diagnosis in the standard symptom information extracted by the above method, which affects the effect of online consultation. At the same time, relying on medical professionals to manually compile medical standard reference dictionaries is a large workload and has a low coverage rate. Summary of the invention

[0004] In order to solve the problems of poor coverage and excessive noise in the extraction results of existing standard symptom extraction methods, the present invention provides a standard symptom extraction method based on multiple rounds of medical consultation.

[0005] The technical solution adopted by the present invention comprises the following steps:

[0006] Step 1) obtaining online multiple rounds of medical consultation texts of the standard symptoms to be extracted, and performing data cleaning on the multiple rounds of medical consultation text data to obtain an initial text; the data cleaning includes unifying uppercase and lowercase letters, removing stop words, removing special symbols (emoticons and HTML tags), removing redundant data, etc.;

[0007] Step 2) Using a medical information extraction model based on the BERT model to extract symptom information from each consultation text in the initial text obtained in step 1), and obtain all symptoms mentioned in the initial text;

[0008] Step 3) The symptom standardization model based on the BERT model standardizes each symptom extracted from each consultation text in step 2) to obtain the standard symptom corresponding to each symptom;

[0009] Step 4) Input each extracted symptom in step 2) and the medical consultation text paragraph in which it is located into the symptom positive-negative identification model based on the BERT model to determine whether the symptom is currently suffered by the patient;

[0010] Step 5) For each symptom obtained in step 2), all the medical consultation texts of the symptoms belonging to the same standard symptom are concatenated into a new text with semicolons as separators, which is recorded as the concatenated medical consultation text of the standard symptom;

[0011] Step 6) Input the concatenated medical consultation text and the corresponding standard symptoms obtained in step 5) into the standard symptom positive-negative identification model based on the BERT model to determine whether the input standard symptoms are currently suffered by the patient;

[0012] Step 7) combines the positive and negative identification probabilities of the symptoms in steps 4) and 6) to determine whether the patient suffers from the standard symptoms extracted from multiple rounds of online consultations.

[0013] The step 2) specifically comprises the following steps:

[0014] 2.1) Input each consultation text into the medical information extraction model and organize the input into the following BERT format;

[0015] The input of TOKEN is: [CLS] consultation text [SEP];

[0016] For example, the medical inquiry text "bacterial infection, requiring antibiotics" is organized as "[CLS] bacterial infection, requiring antibiotics [SEP]";

[0017] The input of SEGMENT is: the code corresponding to each character in the medical consultation text is 1, and the codes corresponding to [CLS] and [SEP] are both 1;

[0018] The input of POSITION is: position code each character in the medical consultation text in Arabic numeral order, with the starting code being 0; the position codes of [CLS] and [SEP] are both 0;

[0019] For example, if you input "[CLS] Bacterial infection, antibiotics are required [SEP]", then the position code of "[CLS]" is 0, "bacteria" is 0, the position code of "bacteria" is 1, and the position code of "[SEP]" is 0;

[0020] 2.2) Using BERT to perform text semantic encoding on the medical consultation text input in step 2.1) to obtain the semantic feature vector corresponding to each character in the medical consultation text after integrating the semantic information of the entire text;

[0021] 2.3) Multiplying the semantic feature vector obtained in step 2.2) by the classification parameter matrix and adding a bias parameter, so that each character generates a classification vector with a dimension equal to the number of preset character type labels;

[0022] The preset character type tags are composed of entity type tags, "B-" and "I-", and the entity type tags include symptoms (Symptom), diseases (Disease), examinations (Exam), drugs (Drug), drug categories (Drug Category) and body parts (Body Parts), etc. The preset character type tags in the present invention include B-Symptom, I-Symptom, B-Disease, I-Disease, B-Exam, I-Exam, B-Drug, I-Drug, B-Drug_Category, I-Drug_Category, B-Body_Parts and I-Body_Parts, etc.

[0023] 2.4) Convert the classification vector generated in step 2.3) into a probability output through the Softmax function; select the character type label corresponding to the classification vector with the largest probability as the prediction result of each character;

[0024] For example, the predicted label for “bacterial infection, requiring antibiotics” is “B-Symptom I-Symptom I-Symptom I-Symptom I-Symptom OOOO B-Drug_Category I-Drug_Category I-Drug_Category OOO”;

[0025] Among them, "B-Symptom" means that the character is the beginning of a certain entity symptom, "I-Symptom" means that the character is a character that constitutes a certain entity symptom but not the beginning, "B-Drug_Category" means that the character is the beginning of a certain entity drug category, "I-Drug_Category" means that the character is a character that constitutes a certain entity drug category but not the beginning, and "O" means that the character at this position does not participate in the formation of the entity;

[0026] 2.5) Combining consecutive characters of the same type of entity type labels in the medical inquiry text to obtain one or more medical entities, and recording the entity type labels corresponding to the medical entities;

[0027] Medical entities include symptoms, diseases, tests, drugs, drug classes, and body parts;

[0028] 2.6) Performing the operations of steps 2.1) to 2.5) for each medical inquiry text in the initial text, obtaining the medical entity and its corresponding entity type label of each medical inquiry text;

[0029] 2.7) Filter out the medical entities whose entity type labels are not symptoms in each consultation text. The filtered medical entities are all the symptoms contained in each consultation text.

[0030] For example, "bacterial infection, requiring antibiotics" extracts the medical entity and filters it, resulting in "bacterial infection".

[0031] Among them, the medical information extraction model is trained based on medical text data with annotated information on the basis of pre-trained BERT.

[0032] The step 3) specifically comprises the following steps:

[0033] 3.1) Obtain a preset medical standard symptom term library, input each symptom extracted in step 2) and a medical standard symptom term in the medical standard symptom term library into the symptom standardization model, and organize the input into the following BERT format:

[0034] Among them, the medical standard symptom terminology library includes but is not limited to: ICD-10, medical knowledge graph, standardized medical terminology set, etc.;

[0035] The input of TOKEN is: [CLS] extracted symptoms [SEP] medical standard symptoms in the medical standard symptom terminology library [SEP];

[0036] The extracted symptoms are those obtained from each consultation text in step 2);

[0037] For example: "[CLS] bacterial infection [SEP] bacterial infection [SEP]" or "[CLS] bacterial infection [SEP] cough [SEP]";

[0038] The input of SEGMENT is: the extracted symptoms are coded as 0, the medical standard symptoms in the medical standard symptom terminology are coded as 1, the symbol [CLS] and the first [SEP] are coded as 0, and the second [SEP] is coded as 1;

[0039] The input of POSITION is: the extracted symptoms and the medical standard symptoms in the medical standard symptom terminology library are positionally coded in Arabic numeral order, and the starting code of each symptom is 0, and the codes corresponding to [CLS] and [SEP] are both 0;

[0040] For example, in the positional coding of “[CLS] bacterial infection [SEP] bacterial infection [SEP]”, “[CLS]” and “[SEP]” are 0, “bacterial infection” is “0 1 2 3 4”, and “bacterial infection” is “0 1 2 3” respectively;

[0041] 3.2) Using BERT to perform text semantic encoding on the input text of step 3.1), and obtaining a vector corresponding to each character of the input after integrating the semantic information of the full text, wherein the vector is a semantic feature vector containing the similarity between the extracted symptoms and the medical standard symptoms;

[0042] 3.3) Input the semantic feature vector corresponding to [CLS] obtained in step 3.2) into a single-layer fully connected layer, and activate it with the Sigmoid function to obtain the similarity between the extracted symptoms and the medical standard symptoms, with the similarity ranging from 0 to 1;

[0043] 3.4) For each extracted symptom in each medical consultation text, perform the operations of steps 3.1) to 3.3) on the extracted symptom and each medical standard symptom in the medical standard symptom terminology library to obtain the semantic similarity between the extracted symptom and all medical standard symptoms in the medical standard symptom terminology library; take the medical standard symptom with the highest semantic similarity to the extracted symptom as the result of standardization, that is, the standard symptom corresponding to each extracted symptom;

[0044] For example, "bacterial infection" and "bacterial infection" have the highest similarity, so the standardized result of "bacterial infection" is "bacterial infection";

[0045] 3.5) Apply the operation of step 3.4) to all the symptoms extracted in step 2) to obtain the standard symptoms corresponding to each extracted symptom.

[0046] The step 4) specifically comprises the following steps:

[0047] 4.1) Integrate the information of the person who inputs the medical consultation text into the medical consultation text where the symptoms are located: if the person who inputs the medical consultation text is a patient, add "patient:" before the medical consultation text; if the person who inputs the text is a doctor, add "doctor:" before the medical consultation text;

[0048] For example, if "bacterial infection, antibiotics are needed" is the text entered by the doctor, it should be processed as "doctor: bacterial infection, antibiotics are needed", otherwise it should be processed as "patient: bacterial infection, antibiotics are needed";

[0049] 4.2) Organize the model’s input information into the following BERT format:

[0050] The input of TOKEN is: [CLS] symptom [SEP] the consultation text where the symptom is located [SEP];

[0051] For example, the medical consultation text “Doctor: Bacterial infection, antibiotics are needed” is organized as “[CLS] Bacterial infection [SEP] Doctor: Bacterial infection, antibiotics are needed [SEP]”;

[0052] The input of SEGMENT is: the corresponding code of the symptom is 0, and the corresponding code of the medical consultation text where the symptom is located is 1;

[0053] The input of POSITION is: the symptom and each character in the medical consultation text where the symptom is located are coded in Arabic numeral order, with the starting code being 0;

[0054] 4.3) Use BERT to perform text semantic encoding on the input information, and obtain the vector corresponding to each character of the input after integrating the semantic information of the full text. The vector is a semantic feature vector containing whether the symptom is positive.

[0055] 4.4) Input the semantic feature vector corresponding to [CLS] obtained in step 4.3) into a single-layer fully connected layer, and activate it with the Sigmoid function to obtain the probability of the symptom being positive through semantic judgment; when the probability that the symptom is positive predicted by the symptom positive and negative recognition model is greater than or equal to 0.5, the current symptom is judged to be positive, otherwise it is negative.

[0056] Among them, positive means that the patient currently suffers from the symptom, and negative means that the patient does not currently suffer from the symptom. For example, in the medical consultation text "Patient: I ordered takeout with my roommate yesterday, and now we both have diarrhea. My roommate is in a worse condition and keeps vomiting", "diarrhea" is positive and "vomiting" is negative;

[0057] The symptom yin-yang recognition model is trained based on the pre-trained BERT and medical text data with yin-yang annotation information.

[0058] The step 5) specifically comprises the following steps:

[0059] 5.1) For the symptoms obtained in step 2), the text inputter information is integrated into the medical consultation text where the symptoms are located to obtain the medical consultation text integrated with the text inputter information: if the text inputter is a patient, "patient:" is added before the medical consultation text; if the text inputter is a doctor, "doctor:" is added before the medical consultation text;

[0060] 5.2) The medical consultation texts that incorporate the text inputter information of the symptoms belonging to the same standard symptom are concatenated into a new text using semicolons as separators as the context information of the standard symptom, which is recorded as the concatenated medical consultation text of the standard symptom.

[0061] For example, the "bacterial infection" in "Patient: Her previous blood test showed an infection caused by bacteria" and the "bacterial infection" in "Doctor: It is a bacterial infection, and antibiotics are needed" can both be standardized as "bacterial infection". The text can then be organized as "Patient: Her previous blood test showed an infection caused by bacteria; Doctor: It is a bacterial infection, and antibiotics are needed".

[0062] The step 6) specifically comprises the following steps:

[0063] 6.1) The information input into the standard symptom positive and negative identification model is formed into the following BERT format, and the text inputter information TYPE is added:

[0064] The input of TOKEN is: [CLS] standard symptoms [SEP] the consultation text where the standard symptoms are located [SEP];

[0065] like Figure 5 As shown: the standard symptoms in step 5.2) and the medical consultation text where the standard symptoms are located should be organized as "[CLS] Bacterial infection [SEP] Patient: Her previous blood test showed an infection caused by bacteria; Doctor: Bacterial infection, antibiotics are required [SEP]";

[0066] The input of SEGMENT is: the standard symptom is coded as 0, and the concatenated medical consultation text containing the standard symptom is coded as 1;

[0067] The input of POSITION is as follows: all characters in the standard symptoms are coded in Arabic numeral order, with the starting code being 0; all characters in the concatenated consultation text where the standard symptoms are located are coded using the unconcatenated text as the coding unit (including semicolons and [SEP]), and each coding unit is coded in Arabic numeral order with 0 as the starting code;

[0068] For example, in the position code of "[CLS] Bacterial infection [SEP] Patient: Her previous blood test showed that the infection was caused by bacteria; Doctor: Bacterial infection, antibiotics are needed [SEP]", "Bacterial infection" is "0 1 2 3", "Patient" is 0, "Doctor" is 0, and [CLS] and [SEP] are both 0;

[0069] The input of TYPE is: the corresponding code of standard symptoms is 0; the corresponding code of the text of the concatenated consultation text containing standard symptoms is 1 if the inputter is a doctor, 2 if the inputter is a patient, and 0 if [CLS] and [SEP];

[0070] For example, in the TYPE code of "[CLS] bacterial infection [SEP] patient: her previous blood test showed that the infection was caused by bacteria; doctor: bacterial infection, antibiotics are needed [SEP]", "bacterial infection" is coded as 0, "patient: her previous blood test showed that the infection was caused by bacteria" is coded as 2, "doctor: bacterial infection, antibiotics are needed" is coded as 1, and [CLS] and [SEP] are both 0;

[0071] 6.2) Using BERT to perform text semantic encoding on the input of TOKEN, SEGMENT and POSITION, and obtaining a vector corresponding to each character of the input after integrating the semantic information of the full text, wherein the vector is a semantic feature vector containing whether the standard symptom is positive;

[0072] 6.3) The TYPE input is mapped to the TYPE vector through the TYPE embedding layer; the TYPE embedding layer is a trainable parameter matrix that can be obtained by self-learning of the model according to the loss function;

[0073] 6.4) concatenating the semantic feature vector obtained in step 6.2) with the TYPE vector obtained in step 6.3), and passing the concatenated vector through a fully connected layer whose activation function is a Relu function to obtain a semantic feature vector that incorporates the TYPE information;

[0074] 6.5) The semantic feature vector corresponding to [CLS] that incorporates TYPE information is input into the fully connected layer, and after activation by the Sigmoid function, the probability of the standard symptom being positive is obtained.

[0075] Among them, the standard symptom positive and negative identification model is trained based on the pre-trained BERT and the medical text data with positive and negative annotation information processed in step 5.2).

[0076] The step 7) specifically includes the following steps: for each standard symptom:

[0077] 7.1) If the probability of judging the standard symptom to be positive in step 6) is greater than or equal to the set threshold, then judging the current standard symptom to be the one currently suffered by the patient;

[0078] 7.2) If the probability of judging the standard symptom to be positive in step 6) is less than the set threshold: then count the number of extracted symptoms corresponding to the current standard symptom predicted as positive by the symptom positive-negative identification model in step 4); if the number predicted as positive exceeds or equals the median of all predictions, then the current standard symptom is judged to be what the patient currently suffers from; otherwise, the current standard symptom is judged not to be what the patient currently suffers from.

[0079] Beneficial effects of the present invention:

[0080] 1) Compared with the conventional standard symptom extraction method of multiple rounds of medical consultation, the present invention adds the task of symptom positive and negative identification, prevents negative symptoms from affecting the results of standard symptom extraction, and enhances the reliability of the extraction results. At the same time, for the symptom positive and negative identification in the special scenario of multiple rounds of medical consultation, models are constructed based on symptoms and standard symptoms to perform symptom positive and negative identification, integrate local and global information to predict the final positive and negative results, and enhance the recognition accuracy.

[0081] 2) The present invention models the standardization task into a text similarity task based on a pre-trained deep language learning model. By comparing the symptoms to be standardized with the standard symptoms in a preset medical standard symptom terminology library, the standardized term names corresponding to the symptoms are obtained, which effectively reduces the dependence of the standardization task on manual labeling and improves the coverage and generalization of standardization. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] Figure 1 is a flow chart of the present invention;

[0083] Figure 2 A schematic diagram of the basic structure of the medical information extraction model provided by the present invention;

[0084] Figure 3 A schematic diagram of the basic structure of the symptom standardization model provided by the present invention;

[0085] Figure 4 A schematic diagram of the basic structure of the symptom positive and negative identification model provided by the present invention;

[0086] Figure 5 This is a schematic diagram of the basic structure of the standard symptom positive and negative identification model provided by the present invention. DETAILED DESCRIPTION

[0087] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0088] like Figure 1 As shown, the present invention is a standard symptom extraction method based on multiple rounds of medical consultation, comprising the following steps:

[0089] Step 1): obtaining online multiple rounds of medical consultation texts of the standard symptoms to be extracted, and performing data cleaning on the medical consultation text data to obtain an initial text;

[0090] Data cleaning includes but is not limited to: unifying upper and lower case, removing stop words, removing special symbols, and removing redundant data;

[0091] Step 2): Based on Figure 2The pre-established BERT-based medical information extraction model shown extracts symptom information from each consultation text in the initial text described in step 1) to obtain all symptoms mentioned in the text, specifically including the following steps:

[0092] 2.1) Organize the input into Figure 2 The BERT form shown;

[0093] The input of TOKEN is: [CLS] consultation text [SEP];

[0094] For example, the medical inquiry text "bacterial infection, requiring antibiotics" is organized as "[CLS] bacterial infection, requiring antibiotics [SEP]";

[0095] The input of SEGMENT is: the corresponding code of the consultation text is 1;

[0096] The input of POSITION is: position code each character in the medical consultation text in Arabic numeral order, starting with 0; for example, if you input "[CLS] Bacterial infection, antibiotics required [SEP]", then the position code of "[CLS]" is 0, "micro" is 0, "bacteria" is 1, and "[SEP]" is 0;

[0097] 2.2) Use the BERT model to perform text semantic encoding on the input text, and obtain the semantic feature vector corresponding to each input character after integrating the semantic information of the full text;

[0098] 2.3) Multiply the semantic feature vector obtained in step 2.2) by the classification parameter matrix, and add a bias parameter, so that each character generates a classification vector with the same dimension as the number of preset character type labels;

[0099] 2.4) Convert the classification vector generated in step 2.3) into a probability output through the Softmax function;

[0100] 2.5) For each character, the character type label with the highest probability is selected as the prediction result, and consecutive characters of the same entity type label in the medical consultation text are combined to obtain the medical entity and its corresponding entity type label.

[0101] For example, the predicted label for “bacterial infection, requiring antibiotics” is “B-Symptom I-Symptom I-Symptom I-Symptom I-Symptom OOOO B-Drug_Category I-Drug_Category I-Drug_Category OOO”;

[0102] Among them, "B-Symptom" means that the character is the beginning of a certain entity symptom, "I-Symptom" means that the character is a character that constitutes a certain entity symptom but not the beginning, "B-Drug_Category" means that the character is the beginning of a certain entity drug category, "I-Drug_Category" means that the character is a character that constitutes a certain entity drug category but not the beginning, and "O" means that the character at this position does not participate in the formation of the entity;

[0103] 2.6) Performing the operations of steps 2.1) to 2.5) for each medical inquiry text in the initial text, obtaining the medical entity and its corresponding entity type label of each medical inquiry text;

[0104] 2.7) Filter out the medical entities whose entity type labels are not symptoms in each medical consultation text, and obtain all symptoms contained in each medical consultation text;

[0105] For example, "bacterial infection, requiring antibiotics" extracts the entity and filters it to get "bacterial infection";

[0106] Step 3) Based on Figure 3 The pre-established BERT-based symptom standardization model shown in the figure standardizes each symptom obtained from each medical consultation text to obtain the standard symptom corresponding to each symptom, specifically including the following steps:

[0107] 3.1) Obtaining a preset medical standard symptom terminology library;

[0108] Among them, the medical standard symptom terminology library includes but is not limited to: ICD-10, medical knowledge graph, standardized medical terminology set, etc.;

[0109] 3.2) Organize each symptom and each standard symptom term in the medical standard symptom terminology library into Figure 3 The BERT form shown;

[0110] The input of TOKEN is: [CLS] extracted symptoms [SEP] standard symptoms in the medical standard symptom terminology library [SEP];

[0111] The extracted symptoms are the symptoms obtained in step 2)

[0112] For example: “[CLS] bacterial infection [SEP] bacterial infection [SEP]” and “[CLS] bacterial infection [SEP] cough [SEP]”;

[0113] The input of SEGMENT is: the extracted symptoms are coded as 0, the standard symptoms in the medical standard symptom terminology are coded as 1, the symbol [CLS], the first [SEP] are coded as 0, and the second [SEP] is coded as 1;

[0114] The input of POSITION is: the extracted symptoms and the standard symptoms in the medical standard symptom terminology library are positionally coded in Arabic numeral order, and the starting code of each character is 0;

[0115] For example, in the positional coding of “[CLS] bacterial infection [SEP] bacterial infection [SEP]”, “[CLS]” and “[SEP]” are 0, “bacterial infection” is “0 1 2 3 4”, and “bacterial infection” is “0 1 2 3” respectively;

[0116] 3.3) BERT performs text semantic encoding on the input text and obtains the vector representation corresponding to each character of the input after integrating the semantic information of the entire text;

[0117] 3.4) Inputting the semantic feature vector corresponding to [CLS] obtained in step 3.3) into a single-layer fully connected layer, and activating it with a Sigmoid function to obtain the similarity between the extracted symptoms and the standard symptoms in the medical standard symptom terminology library, where the similarity is between 0 and 1;

[0118] 3.5) Perform the above operation on each extracted symptom and each standard symptom in the medical standard symptom terminology library to obtain the semantic similarity between the two;

[0119] 3.6) taking the medical standard symptom term with the highest semantic similarity to the symptom as the standardization result, that is, obtaining the standard symptom corresponding to each extracted symptom;

[0120] For example, "bacterial infection" and "bacterial infection" have the highest similarity, so the standardized result of "bacterial infection" is "bacterial infection".

[0121] Step 4) Input each symptom and its text obtained in step 2) into Figure 4 The pre-established symptom positive-negative identification model based on the BERT model shown in the figure determines whether the symptom is currently suffered by the patient, specifically including the following steps:

[0122] 4.1) Integrate the information of the person who inputs the medical consultation text into the medical consultation text where the symptoms are located: if the person who inputs the text is a patient, then add "patient:" before the medical consultation text; if the person who inputs the text is a doctor, then add "doctor:" before the medical consultation text;

[0123] For example, if "bacterial infection, antibiotics are needed" is the text entered by the doctor, it should be processed as "doctor: bacterial infection, antibiotics are needed", otherwise it should be processed as "patient: bacterial infection, antibiotics are needed";

[0124] 4.2) Organize the input into Figure 4 The BERT form shown;

[0125] The input of TOKEN is: [CLS] symptom [SEP] the consultation text where the symptom is located [SEP];

[0126] For example, the medical consultation text “Doctor: Bacterial infection, antibiotics are needed” is organized as “[CLS] Bacterial infection [SEP] Doctor: Bacterial infection, antibiotics are needed [SEP]”;

[0127] The input of SEGMENT is: the corresponding code of the symptom is 0, and the corresponding code of the medical consultation text where the symptom is located is 1;

[0128] The input of POSITION is: the symptom and each character in the medical consultation text where the symptom is located are positionally coded in Arabic numeral order, and the starting code of each character is 0;

[0129] 4.3) BERT performs text semantic encoding on the input text and obtains the vector representation corresponding to each input character after integrating the semantic information of the entire text;

[0130] 4.4) Inputting the semantic feature vector corresponding to [CLS] obtained in step 4.3) into a single-layer fully connected layer, and activating it with a Sigmoid function to obtain the probability of the symptom being positive through semantic judgment;

[0131] Step 5) For all symptoms in step 2), the medical consultation texts of the symptoms belonging to the same standard symptom are concatenated into a new text with semicolons as separators as the context information of the standard symptom, which specifically includes the following steps:

[0132] 5.1) Integrate the text inputter information into the medical consultation text where the symptoms are located, and obtain the medical consultation text integrated with the text inputter information: if the text inputter is a patient, then add "patient:" before the text; if the text inputter is a doctor, then add "doctor:" before the text;

[0133] 5.2) The medical consultation texts integrated with the text inputter information of the symptoms belonging to the same standard symptom are concatenated into a new text with a semicolon as a separator as the context information of the standard symptom, which is recorded as the concatenated medical consultation text of the standard symptom;

[0134] For example, "Infection caused by bacteria" in "Patient: Her previous blood test showed an infection caused by bacteria" and "Bacterial infection" in "Doctor: Bacterial infection, antibiotics are needed" can both be standardized as "Bacterial infection". Then the text can be organized as "Patient: Her previous blood test showed an infection caused by bacteria; Doctor: Bacterial infection, antibiotics are needed".

[0135] Step 6) Based on the spliced ​​medical consultation text containing the standard symptoms obtained in step 5) and the standard symptoms corresponding to the text, a pre-established standard symptom positive and negative identification model is used to identify whether the standard symptom is currently suffered by the patient, specifically including the following steps:

[0136] 6.1) Organize the input into Figure 5 The BERT format shown above is used, and the text inputter information TYPE is added;

[0137] The input of TOKEN is: [CLS] standard symptoms [SEP] the consultation text where the standard symptoms are located [SEP];

[0138] like Figure 5 As shown: the standard symptoms in step 5.2) and the medical consultation text where the standard symptoms are located should be organized as "[CLS] Bacterial infection [SEP] Patient: Her previous blood test showed an infection caused by bacteria; Doctor: Bacterial infection, antibiotics are required [SEP]"

[0139] The input of SEGMENT is: the standard symptom is coded as 0, and the consultation text containing the standard symptom is coded as 1;

[0140] The input of POSITION is as follows: the characters in the standard symptoms are coded in Arabic numeral order, with the starting code being 0; all characters in the concatenated consultation text where the standard symptoms are located are coded using the unconcatenated text as the coding unit, and each coding unit is coded in Arabic numeral order with 0 as the starting code;

[0141] For example, in the position code of "[CLS] Bacterial infection [SEP] Patient: Her previous blood test showed that the infection was caused by bacteria; Doctor: Bacterial infection, antibiotics are needed [SEP]", "Bacterial infection" is "0 1 2 3", "Patient" is 0, "Doctor" is 0, and [CLS] and [SEP] are both 0;

[0142] The input of TYPE is: the standard symptom is coded as 0, the text of the concatenated medical consultation text containing the standard symptom is coded as 1 if the inputter is a doctor, and the text of the inputter is coded as 2 if the inputter is a patient;

[0143] For example, in the TYPE code of "[CLS] bacterial infection [SEP] patient: her previous blood test showed that the infection was caused by bacteria; doctor: bacterial infection, antibiotics are needed [SEP]", "bacterial infection" is coded as 0, "patient: her previous blood test showed that the infection was caused by bacteria" is coded as 2, "doctor: bacterial infection, antibiotics are needed" is coded as 1, and [CLS] and [SEP] are both 0;

[0144] 6.2) BERT performs text semantic encoding on the input text and obtains the vector representation corresponding to each character of the input after integrating the semantic information of the entire text;

[0145] 6.3) The TYPE input is mapped to the TYPE vector through the TYPE embedding layer;

[0146] The TYPE embedding layer is a trainable parameter matrix that can be obtained through self-learning of the model according to the loss function;

[0147] 6.4) concatenate the semantic feature vector obtained in 6.2) with the TYPE vector, and pass the concatenated vector through a fully connected layer whose activation function is the Relu function to obtain the semantic feature vector representation that incorporates the TYPE information;

[0148] 6.5) Obtain the semantic feature vector corresponding to [CLS] and incorporate the TYPE information into the fully connected layer, and obtain the probability of the standard symptom being positive after activation using the Sigmoid function;

[0149] Step 7) integrates the symptom information obtained in step 4) and step 6) to output the standard symptoms of the current patient, which specifically includes the following steps:

[0150] 7.1) If the probability that the standard symptom is positive is determined by the standard symptom positive / negative identification model in step 6) to be greater than or equal to the set threshold, then the standard symptom is determined to be the current symptom suffered by the patient;

[0151] 7.2) If the probability that the standard symptom is positive is judged by the standard symptom positive and negative identification model in step 6) is less than the set threshold, the number of extracted symptoms belonging to the standard symptom in step 4) predicted as positive by the symptom positive and negative identification model is counted. If the number predicted as positive exceeds or equals the median, the standard symptom is judged to be the patient's current symptom, otherwise it is judged that the patient does not currently suffer from the standard symptom.

Claims

1. A standard symptom extraction method based on multiple rounds of medical consultation, comprising the following steps: Step 1) Obtain online multiple rounds of medical consultation texts of the standard symptoms to be extracted, and perform data cleaning on the multiple rounds of medical consultation text data to obtain the initial text; Step 2) Use the medical information extraction model based on the BERT model to extract symptom information from each consultation text in the initial text obtained in step 1) to obtain all the symptoms mentioned in the initial text; Step 3) The symptom standardization model based on the BERT model standardizes each symptom extracted from each consultation text in step 2) to obtain the standard symptom corresponding to each symptom; Step 4) Input each extracted symptom in step 2) and the medical consultation text paragraph in which it is located into the symptom positive-negative identification model based on the BERT model to determine whether the symptom is currently suffered by the patient; Step 5) For all symptoms obtained in step 2), all the medical consultation texts of the symptoms belonging to the same standard symptom are concatenated into a new text with semicolons as separators, which is recorded as the concatenated medical consultation text of the standard symptom; Step 6) Input the concatenated medical consultation text and the corresponding standard symptoms obtained in step 5) into the standard symptom positive-negative identification model based on the BERT model to determine whether the input standard symptoms are currently suffered by the patient; Step 7) Combining the positive and negative identification probabilities of the symptoms in Step 4) and Step 6), determine whether the patient suffers from the standard symptoms extracted from the online multiple rounds of consultations; The step 2) specifically includes the following steps: 2.1) Input each consultation text into the medical information extraction model and organize the input into the following BERT format; The input of TOKEN is: [CLS] consultation text [SEP]; The input of SEGMENT is: the code corresponding to each character in the medical consultation text is 1; The input of POSITION is: position code each character in the medical consultation text in Arabic numeral order, with the starting code being 0; the position codes of [CLS] and [SEP] are both 0; 2.2) Use BERT to perform text semantic encoding on the medical consultation text input in step 2.1) to obtain the semantic feature vector corresponding to each character in the medical consultation text after integrating the semantic information of the entire text; 2.3) Multiply the semantic feature vector obtained in step 2.2) by the classification parameter matrix and add a bias parameter, so that each character generates a classification vector with the same dimension as the number of preset character type labels; 2.4) Convert the classification vector generated in step 2.3) into a probability output through the Softmax function; select the character type label corresponding to the classification vector with the largest probability as the prediction result of each character; 2.5) Combine consecutive characters of the same type of entity type labels in the medical inquiry text to obtain one or more medical entities, and record the entity type labels corresponding to the medical entities; 2.6) Perform the operations of steps 2.1) to 2.5) for each medical consultation text in the initial text to obtain the medical entity and its corresponding entity type label of each medical consultation text; 2.7) Filter out the medical entities whose entity type labels are not symptoms in each medical consultation text. The filtered medical entities are all the symptoms contained in each medical consultation text; The step 3) specifically includes the following steps: 3.1) Obtain a preset medical standard symptom term library, input each symptom extracted in step 2) and a medical standard symptom term in the medical standard symptom term library into the symptom standardization model, and organize the input into the following BERT format: The input of TOKEN is: [CLS] extracted symptoms [SEP] medical standard symptoms in the medical standard symptom terminology library [SEP]; The input of SEGMENT is: the extracted symptoms are coded as 0, the medical standard symptoms in the medical standard symptom terminology are coded as 1, the symbol [CLS] and the first [SEP] are coded as 0, and the second [SEP] is coded as 1; The input of POSITION is: the extracted symptoms and the medical standard symptoms in the medical standard symptom terminology library are positionally coded in Arabic numeral order, and the starting code of each symptom is 0, and the codes corresponding to [CLS] and [SEP] are both 0; 3.2) Using BERT to perform text semantic encoding on the input text of step 3.1), and obtaining a vector corresponding to each character of the input after integrating the semantic information of the full text, wherein the vector is a semantic feature vector containing the similarity between the extracted symptoms and the medical standard symptoms; 3.3) Input the semantic feature vector corresponding to [CLS] obtained in step 3.2) into the fully connected layer, and activate it with the Sigmoid function to obtain the similarity between the extracted symptoms and the medical standard symptoms; 3.4) For each extracted symptom in each medical consultation text, perform the operations of step 3.1) to step 3.3) on the extracted symptom and each medical standard symptom in the medical standard symptom terminology library to obtain the semantic similarity between the extracted symptom and all medical standard symptoms in the medical standard symptom terminology library; take the medical standard symptom with the highest semantic similarity to the extracted symptom as the result of standardization, that is, the standard symptom corresponding to each extracted symptom; 3.5) Apply the operation of step 3.4) to all the symptoms extracted in step 2) to obtain the standard symptoms corresponding to each extracted symptom; The step 4) specifically includes the following steps: 4.1) Integrate the information of the person who inputs the medical consultation text into the medical consultation text where the symptoms are located: if the person who inputs the medical consultation text is a patient, add the word “patient” plus a colon before the medical consultation text; if the person who inputs the text is a doctor, add the word “doctor” plus a colon before the medical consultation text; 4.2) Organize the model’s input information into the following BERT format: The input of TOKEN is: [CLS] symptom [SEP] the consultation text where the symptom is located [SEP]; The input of SEGMENT is: the corresponding code of the symptom is 0, and the corresponding code of the medical consultation text where the symptom is located is 1; The input of POSITION is: the symptom and each character in the medical consultation text where the symptom is located are coded in Arabic numeral order, with the starting code being 0; 4.3) Use BERT to perform text semantic encoding on the input information, and obtain the vector corresponding to each character of the input after integrating the semantic information of the full text. The vector is a semantic feature vector containing whether the symptom is positive. 4.4) Input the semantic feature vector corresponding to [CLS] obtained in step 4.3) into the fully connected layer, and activate it with the Sigmoid function to obtain the probability of the symptom being positive through semantic judgment; when the probability of the symptom being positive predicted by the symptom positive and negative recognition model is greater than or equal to 0.5, the current symptom is judged to be positive, otherwise it is negative; The step 5) specifically includes the following steps: 5.1) For the symptoms obtained in step 2), the text inputter information is integrated into the medical consultation text where the symptoms are located, and the medical consultation text integrated with the text inputter information is obtained: if the text inputter is a patient, the patient plus a colon is spliced ​​before the medical consultation text; if the text inputter is a doctor, the doctor plus a colon is spliced ​​before the medical consultation text; 5.2) The medical consultation texts incorporating the text inputter information of the symptoms belonging to the same standard symptom are concatenated into a new text using a semicolon as a separator as the context information of the standard symptom, which is recorded as the concatenated medical consultation text of the standard symptom; The step 6) specifically includes the following steps: 6.1) The information input into the standard symptom positive and negative recognition model is formed into the following BERT form: The input of TOKEN is: [CLS] standard symptoms [SEP] the consultation text where the standard symptoms are located [SEP]; The input of SEGMENT is: the standard symptom is coded as 0, and the concatenated medical consultation text containing the standard symptom is coded as 1; The input of POSITION is as follows: all characters in the standard symptoms are positionally coded in Arabic numeral order, with the starting code being 0; all characters in the concatenated consultation text where the standard symptoms are located are coded using the unconcatenated text as the coding unit, with 0 as the starting code in each coding unit and positionally coded in Arabic numeral order; The input of TYPE is: the corresponding code of standard symptoms is 0; the corresponding code of the text of the concatenated consultation text containing standard symptoms is 1 when the inputter is a doctor, and the corresponding code of the text of the text inputter is 2 when the inputter is a patient; 6.2) Using BERT to perform text semantic encoding on the input of TOKEN, SEGMENT and POSITION, a vector corresponding to each character of the input after integrating the semantic information of the full text is obtained, wherein the vector is a semantic feature vector including whether the standard symptom is positive; 6.3) The TYPE input is mapped to a TYPE vector through a TYPE embedding layer; the TYPE embedding layer is a trainable parameter matrix; 6.4) Concatenate the semantic feature vector obtained in step 6.2) with the TYPE vector obtained in step 6.3), and pass the concatenated vector through a fully connected layer whose activation function is a Relu function to obtain a semantic feature vector that incorporates the TYPE information; 6.5) The semantic feature vector corresponding to [CLS] that incorporates TYPE information is input into the fully connected layer, and after activation through the Sigmoid function, the probability of the standard symptom being positive is obtained.

2. A method for extracting standard symptoms based on multiple rounds of medical consultation according to claim 1, characterized in that: The step 7) specifically includes the following steps: for each standard symptom: 7.1) If the probability of judging the standard symptom to be positive in step 6) is greater than or equal to the set threshold, then the current standard symptom is judged to be the one currently suffered by the patient; 7.2) If the probability of judging the standard symptom to be positive in step 6) is less than the set threshold: then count the number of extracted symptoms corresponding to the current standard symptom predicted as positive by the symptom positive-negative identification model in step 4). If the number predicted as positive exceeds or equals the median of all predictions, then the current standard symptom is judged to be what the patient currently suffers from; otherwise, the current standard symptom is judged not to be what the patient currently suffers from.

Citation Information

Cited By

  • A Guided Assisted Assessment Information Processing Method and System

    CN120413093B