Medical document analysis method, device, equipment and storage medium
By constructing hierarchical relationships and feature fusion layers for disease label classification, the problem of inaccurate disease classification in existing medical document analysis methods is solved, and more accurate disease classification and analysis results are achieved.
Patent Information
- Application Number
- CN202210177860.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-25
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-02-25
AI Technical Summary
Existing medical document analysis methods cannot provide precise disease classification, resulting in poor analysis results, especially when it is difficult to achieve fine-grained distinction among specialist diseases.
By constructing the hierarchical relationship of disease label classification, first determine the first classification label of the medical document, and then determine the second classification label from the sub-labels of the label. Use the pre-trained model to combine the named entity recognition and feature fusion layers to improve the model's performance. Training effectiveness and classification accuracy.
It achieves more accurate disease classification and improves the analysis effect of medical documents. In particular, it improves the accuracy of the model and the feature extraction ability of long texts in the diagnosis of specialist diseases.
Smart Images

Figure CN114880462B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, in particular to the field of deep learning, and specifically to an analysis method, device, equipment and storage medium for medical documents. Background Art
[0002] The clinical decision support system assists doctors in analyzing the condition and making treatment decisions based on the information recorded by doctors in medical documents. Automatic disease diagnosis is the core component of the clinical support system, which can provide strong support for doctors' diagnosis.
[0003] The current medical document analysis method mainly divides the corresponding disease categories according to the preliminary classification of medical documents, which cannot provide accurate disease classification, and therefore the analysis effect of medical documents is not good. Summary of the invention
[0004] The present disclosure provides a medical document analysis method, apparatus, device and storage medium.
[0005] According to one aspect of the present disclosure, a method for analyzing a medical document is provided, comprising:
[0006] Acquire a medical document, and extract at least one first medical condition information in the medical document;
[0007] Determining a first classification label corresponding to the medical document according to the medical document and the first medical condition information;
[0008] According to at least one sub-tag corresponding to the first classification tag and preset classification basis information of each sub-tag, a second classification tag corresponding to the medical document is determined from the sub-tags.
[0009] According to another aspect of the present disclosure, a model training method is provided, comprising:
[0010] Acquire training samples from historical medical documents, where the training samples include sample medical documents and confirmed classification labels corresponding to the sample medical documents;
[0011] extracting at least one first medical condition information from a sample medical document;
[0012] Inputting the sample medical document and the first medical condition information into the model, and having the model output a first classification label corresponding to the sample medical document;
[0013] The confirmed classification label and the first classification label are compared, and the parameters of the model are adjusted based on the comparison results to obtain a trained model.
[0014] According to one aspect of the present disclosure, there is provided a medical document analysis device, comprising:
[0015] A first acquisition module, used to acquire a medical document and extract at least one first medical condition information in the medical document;
[0016] A first classification module, used to determine a first classification label corresponding to the medical document according to the medical document and the first medical condition information;
[0017] The correction module is used to determine the second classification label corresponding to the medical document from the sub-labels according to at least one sub-label corresponding to the first classification label and the preset classification basis information of each sub-label.
[0018] According to another aspect of the present disclosure, a model training device is provided, comprising:
[0019] A first extraction module is used to obtain training samples from historical medical documents, where the training samples include sample medical documents and confirmed classification labels corresponding to the sample medical documents;
[0020] A second extraction module, used to extract at least one first medical condition information from the sample medical document;
[0021] A second classification module, used for inputting the sample medical document and the first disease condition information into the model, and the model outputs a first classification label corresponding to the sample medical document;
[0022] The adjustment module is used to compare the confirmed classification label and the first classification label, and adjust the parameters of the model based on the comparison result to obtain a trained model.
[0023] According to another aspect of the present disclosure, there is provided an electronic device, comprising:
[0024] at least one processor; and
[0025] a memory communicatively connected to the at least one processor; wherein,
[0026] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned medical document analysis method or the above-mentioned model training method.
[0027] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the above-mentioned medical document analysis method or the above-mentioned model training method.
[0028] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, which implements the above-mentioned medical document analysis method or the above-mentioned model training method when executed by a processor.
[0029] The present invention constructs a hierarchical relationship of disease label classification, first determines the first classification label corresponding to the medical document, and then determines the second classification label corresponding to the medical document from the sub-labels corresponding to the first classification label, thereby achieving more accurate disease classification and improving the analysis effect of medical documents.
[0030] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0032] Figure 1 is a schematic diagram of an application scenario according to the present disclosure;
[0033] Figure 2 is a schematic diagram of an implementation flow of a method for analyzing medical documents according to an embodiment of the present disclosure;
[0034] Figure 3 is a schematic diagram of the structure of a model in a method for analyzing medical documents according to an embodiment of the present disclosure;
[0035] Figure 4 is a schematic structural diagram of a feature fusion layer in a model of a method for analyzing medical documents according to an embodiment of the present disclosure;
[0036] Figure 5 is a schematic diagram of an implementation flow of a model training method according to another embodiment of the present disclosure;
[0037] Figure 6 is a schematic structural diagram of a medical document analysis device 600 according to an embodiment of the present disclosure;
[0038] Figure 7 is a schematic structural diagram of a medical document analysis device 700 according to another embodiment of the present disclosure;
[0039] Figure 8 is a structural schematic diagram of a model training device 800 according to an embodiment of the present disclosure;
[0040] Fig. 9 is a schematic block diagram of an example electronic device 900 that may be used to implement embodiments of the present disclosure. DETAILED DESCRIPTION
[0041] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0042] The present disclosure provides a method for analyzing medical documents, which can be applied to a data processing device, for example, the device can be deployed in a terminal or a server or other processing device to perform the analysis of medical documents. Figure 1 The application scenarios shown are as follows: Figure 1 As shown, the application scenario may include a terminal 110 and an analysis server 120. Taking the case where the device to which the method is applied is deployed in the analysis server as an example, the user may send a request to use the analysis method to the server 120 through the terminal 110, and the analysis server 120 may obtain the target medical document in the request from its own storage storing the electronic medical document data, or may obtain the target medical document from any third-party server 130 storing the electronic medical document data with permission, or may obtain the medical document from the terminal 110. After the analysis server 120 analyzes the medical document using the analysis method, it feeds back the analysis result to the terminal 110, and the terminal 110 may receive and display the analysis result.
[0043] The terminal 110 is connected to the analysis server 120 via a wireless network or a wired network. Optionally, the terminal 110 is a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart watch, a vehicle terminal, etc., but is not limited thereto. The terminal 110 is installed and runs an application that supports medical document analysis.
[0044] The analysis server 120 and the third-party server 130 can be independent servers, or server clusters or distributed systems, or cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, as well as big data and artificial intelligence platforms.
[0045] Figure 2 The present invention is a schematic diagram of a method for implementing a medical document according to an embodiment of the present invention, wherein the method comprises at least the following steps:
[0046] S201: Acquire a medical document, and extract at least one first medical condition information in the medical document;
[0047] S202: Determine a first classification label corresponding to the medical document according to the medical document and the first medical condition information;
[0048] S203: According to at least one sub-tag corresponding to the first classification tag and preset classification basis information of each sub-tag, determine a second classification tag corresponding to the medical document from the sub-tags.
[0049] It should be noted that the medical document can come from the patient's electronic medical document, or it can be input through the terminal 110. The medical document may include medical record information, which may include patient information and free text formed by the medical consultation. The free text refers to the textual expression in the medical record. The free text may include: the chief complaint formed by the content expressed by the patient during the medical consultation, the doctor's diagnosis record of the patient, the medical history data, the physical examination data or at least one of the test data, which is not limited in the embodiment of the present disclosure. Among them, the chief complaint is a description of the patient or the patient's most important symptoms and / or signs. For example, the medical record will write "the patient coughed for 3 days, had a fever for two days, and was accompanied by a mild headache." For some specialized diseases, such as psychiatry, the free text in the medical document is extremely long, and there will be a very large length to describe the patient's daily behavior and feelings. Compared with the general length of internal medicine, gynecology and pediatrics medical records, which range from dozens to hundreds of words, psychiatric medical records can reach thousands of words.
[0050] In some possible implementations, the extracting at least one first medical condition information from the medical document includes:
[0051] Perform named entity recognition on medical documents to identify disease symptoms with the same meaning that appear in medical documents;
[0052] Count the occurrence frequency of each disease symptom, and use the disease symptoms whose occurrence frequency is higher than the second threshold as the first disease condition information, and\or
[0053] The disease symptoms appearing in the chief complaint part of the medical document are taken as the first disease condition information.
[0054] The second threshold value can be any value among 1, 2, 3, 4, or any integer greater than or equal to 0, and is not limited here.
[0055] Named Entity Recognition (NER) refers to the identification of entity words with specific meanings in texts. In general fields, they mainly include names of people, places, institutions, proper nouns, etc. In the medical field, they include disease symptoms, conditions, diagnosis names, surgery names, drug names, anatomical parts, etc. in electronic medical records.
[0056] Named entity recognition can unify the symptoms described in different forms in medical documents, facilitate the statistics of the occurrence of different conditions, and take the disease symptoms with a frequency higher than the second threshold as the patient's typical condition. Therefore, the patient's typical condition can include multiple disease symptoms. For example, fever and fever are counted as the same symptom, and manic episode and being in a manic state are counted as the same symptom.
[0057] In some possible implementations, determining the first classification label corresponding to the medical document according to the medical document and the first medical condition information includes:
[0058] The medical document and the first medical condition information are input into a pre-trained model, and the model outputs a first classification label corresponding to the medical document.
[0059] In the related technology, when the neural network model is applied in the field of clinical decision support, historical medical documents can be used as samples for model training, so as to achieve classification prediction results for the medical documents to be classified. However, for many specialized diseases, there is often a more fine-grained distinction between the disease conditions in diagnosis, and compared with general medical document data, there are fewer sample medical document types, which results in insufficient training samples for each disease, and the use of more complex deep learning algorithms cannot obtain a model with better results.
[0060] In addition, some specialties have their own particularities in the content of medical records. For example, psychiatric specialties involve many diseases, and there are very fine distinctions between diseases. Traditional scales or machine learning cannot make accurate predictions. The writing of psychiatric medical records is quite different from that of internal medicine, surgery, gynecology and pediatrics. Internal medicine, gynecology and pediatrics mainly determine the patient's disease through symptoms, signs or related results of examinations and tests, while psychiatric medical records mainly describe the patient's mood and daily behavior, often only some of the patient's symptoms, such as irritability, impatience, depression, etc., lacking typical symptoms such as fever and cough, as well as the patient's signs, examinations and tests, making it impossible to reuse the general disease model in the analysis of medical records for some specialties.
[0061] To address this problem, the medical document analysis method proposed in the embodiment of the present disclosure first uses a pre-trained model to distinguish between major disease categories (i.e., outputs the first classification label corresponding to the medical document), and then distinguishes the corresponding subcategories of diseases within the major disease categories (i.e., determines the second classification label corresponding to the medical document). This approach can ensure that the model has more training samples for each major disease category during the training process. Therefore, when the overall number of samples is limited, the training effect of the model can be improved, the accuracy of the model can be improved, and the effect of analyzing medical documents can be improved.
[0062] Figure 3 is a schematic diagram of the structure of a model according to an embodiment of the present disclosure, such as Figure 3 As shown, in some possible implementations, the medical document and the first condition information are input into a pre-trained model, and the model outputs a first classification label corresponding to the medical document, including:
[0063] Inputting the medical document into the first branch of the model to obtain the medical document feature, wherein the first branch includes a first embedding layer and a first encoding layer, the input end of the first embedding layer is the input end of the first branch, the output end of the first embedding layer is connected to the input end of the first encoding layer, and the output end of the first encoding layer is the output end of the first branch;
[0064] Inputting the first medical condition information into the second branch of the model to obtain at least one medical condition information feature, wherein the second branch includes a second embedding layer and a second encoding layer, an input end of the second embedding layer is an input end of the second branch, an output end of the second embedding layer is connected to an input end of the second encoding layer, and an output end of the second encoding layer is an output end of the second branch;
[0065] The feature fusion layer of the model uses an attention mechanism to fuse medical document features and at least one disease information feature to obtain a fused feature; classification processing is performed based on the fused feature to obtain a first classification label.
[0066] In some possible implementations, the above-mentioned inputting the medical document into the first branch of the model to obtain the medical document features includes:
[0067] Inputting the medical document into the first embedding layer, the first embedding layer performs word vector encoding (Embedding) on the medical document to obtain a vector representation of the medical document;
[0068] The medical document is decomposed into a data structure with words (tokens) as the unit, and then all tokens are input into the first embedding layer. The first embedding layer performs word vector encoding (Embedding) on the medical document to obtain the vector representation of the medical document X = {x1, ...x i ,…}, each x represents the vector corresponding to a word.
[0069] The bidirectional long short-term memory (BiLSTM) network in the first encoding layer extracts features from the vector representation of the medical document to obtain a medical document feature query.
[0070] The output end of the BiLSTM network is connected to the max pooling layer to extract features from the vector representation of medical documents, as follows:
[0071] h init =MaxPool(BiLstm(Dropout(X)))
[0072] The output of the maximum pooling layer is connected to a fully connected layer to obtain the final free text representation of the medical document:
[0073] h seq =σ(Wh init +b)
[0074] Where W and b represent the parameters to be learned by the fully connected layer model, σ represents the activation function used by the fully connected layer, which is the Sigmoid function. The mathematical form is as follows:
[0075] σ(x)=1 / 1+e -x
[0076] This embodiment uses a BiLSTM network to extract features from the vector representation of medical documents, which can improve the accuracy of feature extraction for long texts.
[0077] In some possible implementations, the first medical condition information is input into the second branch of the model to obtain at least one medical condition information feature, including:
[0078] At least one first medical condition information is input into the second embedding layer, and the second embedding layer performs word vector encoding on the first medical condition information to obtain a vector representation matrix value of the first medical condition information, wherein the vector representation matrix of the first medical condition information includes the vector representation value of each first medical condition information i ;
[0079] The text classification convolutional neural network (Text Convolutional Naural Networks, TextCNN) in the second encoding layer performs feature extraction on the vector representation matrix of the first medical condition information to obtain a feature key of the medical condition information.
[0080] In this embodiment, feature extraction of the first medical condition information is performed through TextCNN, which can provide a target for the attention mechanism in the model to focus on, and can improve classification accuracy when facing long texts.
[0081] Figure 4 is a schematic diagram of the structure of the feature fusion layer in the model according to an embodiment of the present disclosure, such as Figure 4 As shown, in some possible implementations, the feature fusion layer of the above model uses an attention mechanism to fuse the medical document features and at least one condition information feature to obtain a fused feature, including:
[0082] The medical document feature query is respectively matched with each disease information feature key i Perform similarity calculation to obtain the medical condition similarity feature s between the medical document and each first medical condition information. The calculation method of s is as follows:
[0083] s(key,query)=w T tanh(Wkey i +bquery)
[0084] where w T , W and b are parameters learned by the model.
[0085] All the similarity features of the disease conditions are normalized by softmax to obtain the weight coefficient a corresponding to each similarity feature of the disease condition. The calculation method of a is as follows;
[0086]
[0087] For each weight coefficient a i and the vector representation value of the first condition information corresponding to the weight coefficient i Perform feature fusion to obtain the fused feature att, and the calculation method of att is as follows.
[0088]
[0089] The feature fusion layer of the model in this embodiment adopts the above-mentioned attention mechanism to enable the model to focus on the part of the disease information that is more meaningful for diagnosis when processing the ultra-long text of the medical document, thereby improving the accuracy of classification.
[0090] In some possible implementations, the method of determining the second classification label corresponding to the medical document from the sub-labels according to at least one sub-label corresponding to the first classification label and preset classification basis information of each sub-label includes:
[0091] According to the first medical condition information, at least one sub-tag corresponding to the first classification tag, and preset classification basis information of each sub-tag, a second classification tag corresponding to the medical document is determined from the sub-tags.
[0092] In this embodiment, according to the preset classification basis information, the first classification label initially determined is further divided, and the second classification label corresponding to the first classification label is distinguished to obtain a specific diagnosis result.
[0093] In some possible implementations, the method further includes:
[0094] For each first classification label, obtaining at least one sub-label corresponding to the first classification label; wherein the first classification label represents a major disease category, and the sub-label represents a minor disease category belonging to the major disease category;
[0095] For each sub-tag, obtaining the medical document and / or disease-related information corresponding to the sub-tag; extracting at least one second disease condition information from the medical document and / or disease-related information;
[0096] At least one second medical condition information is used as preset classification basis information of the sub-label.
[0097] The first classification label and the corresponding at least one sub-label are determined by the hierarchical relationship of the pre-constructed diagnostic space. There are two methods for constructing the hierarchical relationship: the first method is to combine the ICD-10 code. The ICD-10 code is the tenth edition of the International Classification of Diseases, Injuries and Causes of Death. It is a system that the World Health Organization (WHO) classifies diseases according to certain characteristics of the disease and uses codes to represent them. The current version includes 155,000 codes and records a variety of new diagnoses and predictions. The codes in ICD-10 have a hierarchical relationship, which is used to indicate the upper and lower relationships between corresponding diseases. The 6-digit codes under the same 3-digit code in ICD-10 represent similar concepts or belong to a certain large concept, while the differences between different 6-digit codes are more fine-grained concept differences. Therefore, the first three digits of the same code indicate that the diagnoses are relatively close and can be classified into one large category; the second method is to combine the key conditions of the disease. There are two ways to obtain the key conditions. The first is to refer to the knowledge in the relevant medical diagnosis books to obtain the key conditions of each disease. The second is to combine the previous medical records to mine the typical conditions in the medical records corresponding to the disease.
[0098] Table 1 shows some hierarchical relationships of psychiatric diagnoses constructed in the medical document analysis method proposed by the embodiment of the present disclosure, and the table is as follows:
[0099] Table 1
[0100]
[0101]
[0102] The 28 diagnoses in the table are constructed hierarchically and converted into five major category labels, which greatly simplifies the difficulty of subsequent model training and the requirements for the volume of medical records.
[0103] In some possible implementations, extracting at least one second medical condition information from the medical document and / or disease-related information includes:
[0104] Performing named entity recognition processing on at least one of the medical documents and / or disease-related information to identify disease symptoms with the same meaning;
[0105] The occurrence frequency of each disease symptom is counted, and the disease symptoms whose occurrence frequency is higher than the first threshold are used as the second disease condition information.
[0106] The first threshold value can be any value among 1, 2, 3, 4, or any integer greater than or equal to 0, and is not limited here.
[0107] In this embodiment, typical disease conditions are extracted by extracting disease-related information such as previous relevant medical documents and external books, thereby providing a classification basis for correcting the classification results.
[0108] In some possible implementations, the method of determining the second classification label corresponding to the medical document from the sub-labels according to the first medical condition information, at least one sub-label corresponding to the first classification label, and preset classification basis information of each sub-label includes:
[0109] Determine the matching degree between the first medical condition information and the second medical condition information of each sub-label, and determine the sub-label with the highest matching degree as the second classification label, wherein the matching degree is positively correlated with the number of the same disease symptoms in the first medical condition information and the second medical condition information.
[0110] The preset classification basis information of each sub-label includes at least one second medical condition information, i.e., disease symptoms. The first medical condition information can be compared with the disease symptoms of the corresponding second medical condition information of each sub-label, and the corresponding sub-label with the largest number of identical disease symptoms or the highest proportion of identical number can be used as the second classification label. For example, the first medical condition information includes 5 disease symptoms, and the first classification label has 2 corresponding sub-labels. The preset classification basis information of sub-label 1 includes 4 disease symptoms, of which 3 disease symptoms are the same as the disease symptoms in the first medical condition information, and the proportion of the number of identical disease symptoms is 75%; the preset classification basis information of sub-label 2 has 6 disease symptoms, of which 4 disease symptoms are the same as the disease symptoms in the first medical condition information, and the proportion of the number of identical disease symptoms is 66.6%; if the number of identical disease symptoms is used, sub-label 2 is used as the second classification label. If the number of identical disease symptoms is used, sub-label 1 is used as the second classification label.
[0111] In this embodiment, by comparing the first medical condition information with the second medical condition information, the first classification label can be corrected to the second classification label according to the matching degree, thereby obtaining a specific diagnosis result of the medical document.
[0112] Figure 5 is a flow chart of an implementation of a model training method according to an embodiment of the present disclosure, including:
[0113] S501: Acquire training samples from historical medical documents, where the training samples include sample medical documents and confirmed classification labels corresponding to the sample medical documents;
[0114] S502: extracting at least one first medical condition information from a sample medical document;
[0115] S503: Inputting the sample medical document and the first medical condition information into the model, and having the model output a first classification label corresponding to the sample medical document;
[0116] S504: Compare the confirmed classification label and the first classification label, and adjust the parameters of the model based on the comparison result to obtain a trained model.
[0117] The structure of the model trained in this embodiment can be as follows Figure 3 As shown, no further description is given here.
[0118] In some possible implementations, the inputting of the sample medical document and the first medical condition information into the model, and the outputting of the first classification label corresponding to the sample medical document by the model, includes:
[0119] Inputting a sample medical document into a first branch of the model, and determining features of the medical document by the first branch of the model;
[0120] Inputting the first medical condition information into a second branch of the model, and determining at least one medical condition information feature by the second branch of the model;
[0121] The feature fusion layer of the model uses an attention mechanism to fuse the medical document feature and at least one disease condition information feature to obtain a fused feature; and performs classification processing based on the fused feature to obtain a first classification label.
[0122] In some possible implementations, the inputting of the sample medical document into the first branch of the model and determining the features of the medical document by the first branch of the model include:
[0123] Inputting the sample medical document into the first embedding layer of the first branch, the first embedding layer performs word vector encoding on the sample medical document after word segmentation, and obtains a vector representation of the sample medical document;
[0124] The bidirectional long short-term memory BiLSTM network in the first encoding layer of the first branch extracts features from the vector representation of the sample medical document to obtain medical document features.
[0125] In some possible implementations, the inputting of the first medical condition information into the second branch of the model, and determining at least one medical condition information feature by the second branch of the model, includes:
[0126] Inputting at least one first medical condition information into a second embedding layer of a second branch, and performing word vector encoding on the at least one first medical condition information by the second embedding layer to obtain a vector representation matrix of the first medical condition information, wherein the vector representation matrix of the first medical condition information includes vector representations of each first medical condition information;
[0127] The text classification convolutional neural network TextCNN in the second encoding layer of the second branch performs feature extraction on the vector representation matrix of the first medical condition information to obtain medical condition information features.
[0128] In some possible implementations, the feature fusion layer of the above model uses an attention mechanism to fuse the medical document feature and at least one condition information feature to obtain a fused feature, including:
[0129] Calculate similarity between the medical document feature and at least one medical condition information feature respectively to obtain a medical condition similarity feature between the sample medical document and each first medical condition information;
[0130] Normalizing all the disease condition similarity features to obtain a weight coefficient corresponding to each disease condition similarity feature;
[0131] Feature fusion is performed on the weight coefficient and the vector representation of the first disease condition information corresponding to the weight coefficient to obtain a fused feature.
[0132] In some possible implementations, the confirmed classification label and the first classification label are compared, and the parameters of the model are adjusted based on the comparison result. The parameters include:
[0133] The first weight transfer matrix W and the first bias matrix b to be learned by the above fully connected layer;
[0134] The transposed matrix w to be learned in the above disease similarity feature s calculation formula is T , the second weight transfer matrix W and the third weight transfer b.
[0135] Figure 6 FIG. 1 is a schematic diagram of a medical document analysis device according to another embodiment of the present disclosure. Figure 6 The medical document analysis device 600 comprises:
[0136] A first acquisition module 610 is used to acquire a medical document and extract at least one first medical condition information in the medical document;
[0137] A first classification module 620, configured to determine a first classification label corresponding to the medical document according to the medical document and the first medical condition information;
[0138] The correction module 630 is used to determine a second classification label corresponding to the medical document from the sub-labels according to at least one sub-label corresponding to the first classification label and preset classification basis information of each sub-label.
[0139] Figure 7 FIG. 1 is a schematic diagram of a medical document analysis device according to another embodiment of the present disclosure. Figure 7 The medical document analysis device 700 comprises:
[0140] The first acquisition module 610, the first classification module 620, the correction module 630 and the second acquisition module 740, wherein the first acquisition module 610, the first classification module 620, the correction module 630 are the same as the corresponding modules mentioned above and are not described in detail here.
[0141] In some possible implementations, the first classification module 620 is used to input the medical document and the first medical condition information into a pre-trained model, and the model outputs a first classification label corresponding to the medical document.
[0142] In some possible implementations, the first classification module 620 further includes:
[0143] A first input submodule 621 is used to input a medical document into a first branch of the model to obtain a feature of the medical document, wherein the first branch includes a first embedding layer and a first encoding layer, an input end of the first embedding layer is an input end of the first branch, an output end of the first embedding layer is connected to an input end of the first encoding layer, and an output end of the first encoding layer is an output end of the first branch;
[0144] A second input submodule 622 is used to input the first medical condition information into a second branch of the model to obtain at least one medical condition information feature, wherein the second branch includes a second embedding layer and a second encoding layer, the input end of the second embedding layer is the input end of the second branch, the output end of the second embedding layer is connected to the input end of the second encoding layer, and the output end of the second encoding layer is the output end of the second branch;
[0145] The fusion submodule 623 is used to use the attention mechanism to fuse the medical document feature and at least one disease condition information feature to obtain a fused feature; and perform classification processing according to the fused feature to obtain a first classification label.
[0146] In some possible implementations, the first input submodule 621 is used to:
[0147] Inputting the medical document into the first embedding layer, the first embedding layer performs word vector encoding on the medical document to obtain a vector representation of the medical document;
[0148] The bidirectional long short-term memory BiLSTM network in the first encoding layer extracts features from the vector representation of the medical document to obtain medical document features.
[0149] In some possible implementations, the second input submodule 622 is used to:
[0150] Inputting at least one first medical condition information into a second embedding layer, and performing word vector encoding on the at least one first medical condition information by the second embedding layer to obtain a vector representation matrix of the first medical condition information, wherein the vector representation matrix of the first medical condition information includes vector representations of each first medical condition information;
[0151] The text classification convolutional neural network TextCNN in the second encoding layer performs feature extraction on the vector representation matrix of the first medical condition information to obtain medical condition information features.
[0152] In some possible implementations, the fusion submodule 623 is used to:
[0153] Calculate similarity between the medical document feature and at least one medical condition information feature respectively to obtain a medical condition similarity feature between the medical document and each first medical condition information;
[0154] Normalizing all the disease condition similarity features to obtain a weight coefficient corresponding to each disease condition similarity feature;
[0155] Feature fusion is performed on the weight coefficient and the vector representation of the first disease condition information corresponding to the weight coefficient to obtain a fused feature.
[0156] In some possible implementations, the second acquisition module 740 is used to:
[0157] For each first classification label, obtaining at least one sub-label corresponding to the first classification label; wherein the first classification label represents a major disease category, and the sub-label represents a minor disease category belonging to the major disease category;
[0158] For each sub-tag, obtaining the medical document and / or disease-related information corresponding to the sub-tag; extracting at least one second disease condition information from the medical document and / or disease-related information;
[0159] At least one second medical condition information is used as preset classification basis information of the sub-label.
[0160] In some possible implementations, the second acquisition module 740 is used to:
[0161] Performing named entity recognition processing on at least one of the medical documents and / or disease-related information to identify disease symptoms with the same meaning;
[0162] The occurrence frequency of each disease symptom is counted, and the disease symptoms whose occurrence frequency is higher than the first threshold are used as the second disease condition information.
[0163] In some possible implementations, the first acquisition module 610 is used to:
[0164] Perform named entity recognition on medical documents to identify disease symptoms with the same meaning that appear in medical documents;
[0165] Count the occurrence frequency of each disease symptom, and use the disease symptoms whose occurrence frequency is higher than the second threshold as the first disease condition information, and\or
[0166] The disease symptoms appearing in the chief complaint part of the medical document are taken as the first disease condition information.
[0167] In some possible implementations, the correction module 630:
[0168] The matching degree between the first medical condition information and the second medical condition information of each sub-label is determined, and the sub-label with the highest matching degree is determined as the second classification label, wherein the matching degree is positively correlated with the number of the same disease symptoms in the first medical condition information and the second medical condition information.
[0169] For the description of specific functions and examples of each module and submodule of the medical document analysis device 600, 700 of the disclosed embodiment, reference can be made to the relevant description of the corresponding steps in the above data processing method embodiment, which will not be repeated here.
[0170] Figure 8 Schematic diagram of the structure of a model training device according to an embodiment of the present disclosure. Figure 8 The model training device 800 comprises:
[0171] A first extraction module 810 is used to obtain training samples from historical medical documents, where the training samples include sample medical documents and confirmed classification labels corresponding to the sample medical documents;
[0172] A second extraction module 820, for extracting at least one first medical condition information from the sample medical document;
[0173] A second classification module 830, for inputting the sample medical document and the first disease condition information into the model, and the model outputs a first classification label corresponding to the sample medical document;
[0174] The adjustment module 840 is used to compare the confirmed classification label with the first classification label, and adjust the parameters of the model based on the comparison result to obtain a trained model.
[0175] In some possible implementations, the second classification module 830 is used to:
[0176] Inputting a sample medical document into a first branch of the model, and determining features of the medical document by the first branch of the model;
[0177] Inputting the first medical condition information into a second branch of the model, and determining at least one medical condition information feature by the second branch of the model;
[0178] The feature fusion layer of the model uses an attention mechanism to fuse the medical document feature and at least one disease condition information feature to obtain a fused feature; and performs classification processing based on the fused feature to obtain a first classification label.
[0179] In some possible implementations, the first extraction module 810 is used to:
[0180] Inputting the sample medical document into the first embedding layer of the first branch, the first embedding layer performs word vector encoding on the sample medical document after word segmentation, and obtains a vector representation of the sample medical document;
[0181] The bidirectional long short-term memory BiLSTM network in the first encoding layer of the first branch extracts features from the vector representation of the sample medical document to obtain medical document features.
[0182] In some possible implementations, the second extraction module 820 is used to:
[0183] Inputting at least one first medical condition information into a second embedding layer, and performing word vector encoding on the at least one first medical condition information by the second embedding layer to obtain a vector representation matrix of the first medical condition information, wherein the vector representation matrix of the first medical condition information includes vector representations of each first medical condition information;
[0184] The text classification convolutional neural network TextCNN in the second encoding layer performs feature extraction on the vector representation matrix of the first medical condition information to obtain medical condition information features.
[0185] In some possible implementations, the second classification module 830 is used to:
[0186] Calculate similarity between the medical document feature and at least one medical condition information feature respectively to obtain a medical condition similarity feature between the sample medical document and each first medical condition information;
[0187] Normalizing all the disease condition similarity features to obtain a weight coefficient corresponding to each disease condition similarity feature;
[0188] Feature fusion is performed on the weight coefficient and the vector representation of the first disease condition information corresponding to the weight coefficient to obtain a fused feature.
[0189] For the description of specific functions and examples of each module and sub-module of the model training device 800 of the embodiment of the present disclosure, please refer to the relevant description of the corresponding steps in the above-mentioned data processing method embodiment, which will not be repeated here.
[0190] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0191] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0192] Fig. 9 A schematic block diagram of an example electronic device 900 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0193] like Fig. 9 As shown, the device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0194] A number of components in the device 900 are connected to the I / O interface 905, including: an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0195] The computing unit 901 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 901 performs the various methods and processes described above, such as the analysis method or model training method of medical documents. For example, in some embodiments, the analysis method or model training method of medical documents may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the analysis method or model training method of the medical document described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to execute the medical document analysis method or model training method in any other appropriate manner (eg, by means of firmware).
[0196] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0197] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0198] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0199] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0200] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0201] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0202] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0203] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method for analyzing medical documents, comprising: Acquiring a medical document, and extracting at least one first medical condition information from the medical document; Inputting the medical document into a first branch of a pre-trained model to obtain a medical document feature, wherein the first branch includes a first embedding layer and a first encoding layer, an input end of the first embedding layer is an input end of the first branch, an output end of the first embedding layer is connected to an input end of the first encoding layer, and an output end of the first encoding layer is an output end of the first branch; Inputting the first condition information into the second branch of the model to obtain at least one condition information feature, wherein the second branch includes a second embedding layer and a second encoding layer, the input end of the second embedding layer is the input end of the second branch, the output end of the second embedding layer is connected to the input end of the second encoding layer, and the output end of the second encoding layer is the output end of the second branch; The feature fusion layer of the model uses an attention mechanism to fuse the medical document feature and the at least one disease information feature to obtain a fusion feature; and performs classification processing according to the fusion feature to obtain a first classification label corresponding to the medical document; According to at least one sub-tag corresponding to the first classification tag and preset classification basis information of each of the sub-tags, a second classification tag corresponding to the medical document is determined from the sub-tags.
2. The method according to claim 1, wherein: The step of inputting the medical document into the first branch of the pre-trained model to obtain medical document features includes: Inputting the medical document into the first embedding layer, and performing word vector encoding on the medical document by the first embedding layer to obtain a vector representation of the medical document; The bidirectional long short-term memory BiLSTM network in the first encoding layer performs feature extraction on the vector representation of the medical document to obtain the medical document features.
3. The method according to claim 1 or 2, wherein: The step of inputting the first medical condition information into the second branch of the model to obtain at least one medical condition information feature comprises: Inputting the at least one first medical condition information into the second embedding layer, and performing word vector encoding on the at least one first medical condition information by the second embedding layer to obtain a vector representation matrix of the first medical condition information, wherein the vector representation matrix of the first medical condition information includes vector representations of each first medical condition information; The text classification convolutional neural network TextCNN in the second encoding layer performs feature extraction on the vector representation matrix of the first medical condition information to obtain the medical condition information features.
4. The method according to claim 3, wherein: The feature fusion layer of the model uses an attention mechanism to fuse the medical document feature and the at least one condition information feature to obtain a fusion feature, including: Calculating similarity between the medical document feature and the at least one medical condition information feature respectively, to obtain a medical condition similarity feature between the medical document and each of the first medical condition information; Normalizing all the disease condition similarity features to obtain a weight coefficient corresponding to each disease condition similarity feature; The weight coefficient and the vector representation of the first disease condition information corresponding to the weight coefficient are subjected to feature fusion to obtain a fusion feature.
5. The method according to claim 1 or 2, wherein: The determining, based on at least one sub-tag corresponding to the first classification tag and preset classification basis information of each sub-tag, a second classification tag corresponding to the medical document from the sub-tags includes: According to the first medical condition information, at least one sub-tag corresponding to the first classification tag and preset classification basis information of each of the sub-tags, a second classification tag corresponding to the medical document is determined from the sub-tags.
6. The method according to claim 5, further comprising: For each first classification label, obtaining at least one sub-label corresponding to the first classification label; wherein the first classification label represents a major disease category, and the sub-label represents a minor disease category belonging to the major disease category; For each of the sub-tags, obtaining the medical document and / or disease-related information corresponding to the sub-tag; extracting at least one second disease condition information from the medical document and / or disease-related information; The at least one second medical condition information is used as preset classification basis information of the sub-label.
7. The method according to claim 6, wherein: The extracting at least one second medical condition information from the medical document and / or disease-related information comprises: Performing named entity recognition processing on at least one of the medical documents and / or disease-related information to identify disease symptoms with the same meaning; The occurrence frequency of each disease symptom is counted, and the disease symptoms whose occurrence frequency is higher than the first threshold are used as the second disease condition information.
8. The method according to claim 6, wherein: The extracting at least one first medical condition information from the medical document comprises: Performing named entity recognition processing on the medical documents to identify disease symptoms with the same meaning appearing in the medical documents; The occurrence frequency of each disease symptom is counted, and the disease symptoms with an occurrence frequency higher than a second threshold are used as the first disease condition information, and / or, the disease symptoms appearing in the chief complaint part of the medical document are used as the first disease condition information.
9. The method according to claim 8, wherein: The determining, based on the first medical condition information, at least one sub-tag corresponding to the first classification tag, and preset classification basis information of each sub-tag, from the sub-tags a second classification tag corresponding to the medical document comprises: Determine the matching degree between the first medical condition information and the second medical condition information of each sub-tag, and determine the sub-tag with the highest matching degree as the second classification tag, wherein the matching degree is positively correlated with the number of the same disease symptoms in the first medical condition information and the second medical condition information.
10. A model training method, comprising: Acquire training samples from historical medical documents, wherein the training samples include sample medical documents and confirmed classification labels corresponding to the sample medical documents; extracting at least one first medical condition information from the sample medical document; Inputting the sample medical document into a first branch of a model, and determining a feature of the medical document by the first branch of the model; inputting the first medical condition information into a second branch of the model, and determining at least one medical condition information feature by the second branch of the model; The feature fusion layer of the model uses an attention mechanism to fuse the medical document feature and the at least one condition information feature to obtain a fusion feature; and performs classification processing according to the fusion feature to obtain a first classification label corresponding to the sample medical document; The confirmed classification label and the first classification label are compared, and the parameters of the model are adjusted based on the comparison result to obtain a trained model.
11. The method according to claim 10, wherein: The step of inputting the sample medical document into the first branch of the model and determining the features of the medical document by the first branch of the model comprises: Inputting the sample medical document into the first embedding layer of the first branch, and performing word vector encoding on the sample medical document after word segmentation by the first embedding layer to obtain a vector representation of the sample medical document; The bidirectional long short-term memory BiLSTM network in the first encoding layer of the first branch performs feature extraction on the vector representation of the sample medical document to obtain the medical document features.
12. The method according to claim 10 or 11, wherein: The step of inputting the first medical condition information into the second branch of the model and determining at least one medical condition information feature by the second branch of the model comprises: Inputting the at least one first medical condition information into a second embedding layer of the second branch, and performing word vector encoding on the at least one first medical condition information by the second embedding layer to obtain a vector representation matrix of the first medical condition information, wherein the vector representation matrix of the first medical condition information includes vector representations of each first medical condition information; The text classification convolutional neural network TextCNN in the second encoding layer of the second branch performs feature extraction on the vector representation matrix of the first medical condition information to obtain the medical condition information features.
13. The method according to claim 12, wherein: The feature fusion layer of the model uses an attention mechanism to fuse the medical document feature and the at least one condition information feature to obtain a fusion feature, including: Calculating similarity between the medical document feature and the at least one medical condition information feature respectively, to obtain a medical condition similarity feature between the medical document and each of the first medical condition information; Normalizing all the disease condition similarity features to obtain a weight coefficient corresponding to each disease condition similarity feature; The weight coefficient and the vector representation of the first disease condition information corresponding to the weight coefficient are subjected to feature fusion to obtain a fusion feature.
14. A medical document analysis device, comprising: A first acquisition module, used to acquire a medical document and extract at least one first medical condition information in the medical document; A first classification module is used to input the medical document into the first branch of a pre-trained model to obtain medical document features, wherein the first branch includes a first embedding layer and a first encoding layer, the input end of the first embedding layer is the input end of the first branch, the output end of the first embedding layer is connected to the input end of the first encoding layer, and the output end of the first encoding layer is the output end of the first branch; the first disease information is input into the second branch of the model to obtain at least one disease information feature, wherein the second branch includes a second embedding layer and a second encoding layer, the input end of the second embedding layer is the input end of the second branch, the output end of the second embedding layer is connected to the input end of the second encoding layer, and the output end of the second encoding layer is the output end of the second branch; the feature fusion layer of the model adopts an attention mechanism to fuse the medical document features and the at least one disease information feature to obtain a fusion feature; classification processing is performed according to the fusion feature to obtain a first classification label corresponding to the medical document; A correction module is used to determine a second classification label corresponding to the medical document from the sub-labels according to at least one sub-label corresponding to the first classification label and preset classification basis information of each sub-label.
15. A model training device, comprising: A first extraction module is used to obtain training samples from historical medical documents, wherein the training samples include sample medical documents and confirmed classification labels corresponding to the sample medical documents; A second extraction module, used to extract at least one first medical condition information from the sample medical document; The second classification module is used to input the sample medical document into the first branch of the model, and determine the medical document features by the first branch of the model; input the first disease information into the second branch of the model, and determine at least one disease information feature by the second branch of the model; use the attention mechanism by the feature fusion layer of the model to fuse the medical document features and the at least one disease information feature to obtain a fusion feature; perform classification processing according to the fusion feature to obtain a first classification label; The adjustment module is used to compare the confirmed classification label with the first classification label, and adjust the parameters of the model based on the comparison result to obtain a trained model.
16. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-9 or 10-13.
17. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-9 or 10-13.
18. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1-9 or 10-13.
Citation Information
Patent Citations
Hierarchical multi-label medical problem classification method based on CNN-DBN
CN110287317A
Data classification method and device, model training method and device and electronic equipment
CN111783861A
