A method and device for detecting abnormal cases
By combining symptom extraction, text sentiment analysis and abnormal detection models in case abnormal detection, the problem of lack of universality and misdiagnosis identification in the existing technology is solved, and accurate detection and misdiagnosis reduction of case abnormalities is achieved, and medical research and Medical level.
Patent Information
- Application Number
- CN202210664662.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-13
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-06-13
AI Technical Summary
The prior art lacks universality in case abnormality detection, cannot accurately identify pathogenic factors, and it is difficult to accurately judge the causes of doctors' misdiagnosis, resulting in possible misdiagnosis.
By extracting the symptom collection from the case based on the symptom extraction model, text sentiment analysis and abnormal detection are performed, and combined with the discriminant model to compare the diagnostic results, the most supported interpretability sequence is obtained and the knowledge graph is compared, and the model is reconstructed to improve detection accuracy .
Accurate detection of abnormal cases has been achieved, the misdiagnosis rate has been reduced, the credibility and medical level of medical research have been improved, and the development of "Internet + Medical".
Smart Images

Figure CN115019958B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of case abnormality detection, and in particular to a case abnormality detection method and device. Background Art
[0002] On May 21, 2021, the National Telemedicine and Internet Medicine Center and Health World jointly released the "2021 China Internet Hospital Development Report", which pointed out that in recent years, my country's Internet hospitals have developed rapidly, service models have gradually become richer, and the integration of the two major elements of "Internet" and "hospital" has further accelerated.
[0003] Whether it is heart disease, gastric cancer or other high-incidence diseases, they all have high research value. With the development of the Internet, hospitals tend to be more intelligent. Electronically stored medical records are a very valuable resource. The content of electronic medical records can be reused. Certain anomaly detection and interpretability analysis can help doctors diagnose the disease and conduct in-depth research on pathology. In the past, the judgment of abnormal cases relied more on the professional ability of doctors. They analyzed the symptoms and gave their own judgments to the patients who came for consultation based on their own professional knowledge. For cases with complex pathogenic factors, they need to discuss and give explanations. When inexperienced doctors face conditions that they are not fully sure of or when doctors are tired and face a physical examination report that the patient has just completed, the diagnosis of the condition may be biased, resulting in misdiagnosis of varying degrees. The electronic records used for archiving, including the diagnosis results and symptoms given by doctors, can be verified through artificial intelligence methods and specific processing procedures.
[0004] The existing technology has the following defects: first, the existing technology can only predict the injured part or disease condition of a specific disease and is not universal; second, the explainability schemes given by the existing technology are not specific and accurate enough, such as lack of time series characteristics; finally, the existing technology cannot accurately determine which part of the disease caused the doctor's misdiagnosis of the case. Summary of the invention
[0005] The purpose of the present invention is to provide a method and device for detecting abnormal cases in view of the deficiencies in the prior art.
[0006] To achieve the above object, in a first aspect, the present invention provides a case abnormality detection method, comprising:
[0007] Extracting a symptom set given by a doctor from a case based on a symptom extraction model, the symptom set includes a number of symptoms, and identifying the symptoms into symptom entities and their corresponding symptom states;
[0008] Text sentiment analysis is performed on the symptom status of each symptom entity to obtain the positive and abnormal tendency results of each symptom entity;
[0009] Based on the abnormality detection model, the indicators in the physical examination report are detected for abnormality to obtain the abnormality detection results of each symptom;
[0010] Determine whether the positive abnormal tendency result of each symptom entity is consistent with the abnormal detection result;
[0011] Based on the discriminant model, various indicators of the physical examination report are discriminated to obtain the discriminant results;
[0012] Determine whether the discrimination result is consistent with the diagnosis result in the case;
[0013] If the positive abnormal tendency result of any symptom entity is inconsistent with the abnormal detection result or the discrimination result is inconsistent with the diagnosis result in the case, the output detection result is that the case is abnormal, otherwise the output detection result is that the case is normal.
[0014] Furthermore, the interpretable sequence with the highest support is obtained from each symptom entity based on the anomaly detection model;
[0015] The explainable sequence with the highest support is compared with the knowledge graph pre-constructed using expert knowledge to determine whether the explainable sequence with the highest support is consistent with the knowledge graph. If not, the anomaly detection model is reconstructed and anomaly detection is performed again on each symptom entity.
[0016] Furthermore, if the explainability sequence with the highest support is consistent with the knowledge graph, and the best explainability sequence of the symptom entity is confirmed to be reliable by experts, knowledge fusion is performed on the knowledge graph.
[0017] Furthermore, the method for obtaining the explainable sequence with the highest support is as follows:
[0018] Import a single case sample predicted as abnormal by the random forest model decision tree path set paths ab , where paths ab =[path0,path1,……path m ], each path path x Different decision trees from random forest, 0≤x≤m, m is a natural number greater than 1;
[0019] Paths abThe FP-Growth algorithm is used to mine frequent item sets fre_items based on the features. The frequent item sets fre_items include information such as support, specific itemsets, and length, and the prototype of the interpretable sequence is obtained.
[0020] Sort fre_items by the specified priority, use shap to predict the sample, and obtain the features of each feature y The importance of the features, y is the sequence number of the features, the subsets in fre_items that do not contain the most important features are filtered out, and then the range of each feature value in fre_items is updated according to the strong and weak connections between the abnormal paths, and then the PrefixSpan algorithm in the frequent mode is used to extract the frequent subsequence fre_subseqs from the case sample, and compare the features in fre_subseqs and fre_items. If there are no common features, the fre_items remain in the original order; otherwise, the common features between the two are traversed in the order of the features in fre_subseqs and put into the newly created sort_index list. If the length of sort_index is 1, the fre_items remain in the original order; otherwise, the order of each feature in fre_items is adjusted according to the sort_index.
[0021] Furthermore, the range of each characteristic value in fre_items is updated according to the strong and weak connections between abnormal paths, including:
[0022] Initialize several top-ranked fre_items respectively;
[0023] Determine whether each fre_items is in the corresponding path. If not, filter this path directly. If it is, determine whether the feature in the fre_items appears multiple times in the corresponding path. If so, take the intersection of different values of the feature in this path as the feature range of the feature. Otherwise, take the union of the initialized feature range and the feature range obtained last time. If this process produces a conflict, filter this path directly.
[0024] Furthermore, the text sentiment analysis of the symptom status of each symptom entity includes:
[0025] Define two word lists of attitude polarity according to the symptom status of each symptom entity;
[0026] Identify the attitudinal polarity of each symptom state for each symptom entity;
[0027] Calculate the number of times the two attitude polarities of all symptom states of each symptom entity appear. If the number of positive words appears is greater than the number of negative words, the positive abnormal tendency result of the symptom entity is judged to be normal. Otherwise, the positive abnormal tendency result of the symptom entity is judged to be abnormal.
[0028] In a second aspect, the present invention provides a case abnormality detection device, comprising:
[0029] An extraction module, for extracting a symptom set given by a doctor from a case based on a symptom extraction model, wherein the symptom set includes a plurality of symptoms, and identifying the symptoms into symptom entities and their corresponding symptom states;
[0030] Sentiment analysis module, used to perform text sentiment analysis on the symptom status of each symptom entity to obtain the positive and abnormal tendency results of each symptom entity;
[0031] An anomaly detection module is used to perform anomaly detection on various indicators of the physical examination report based on the anomaly detection model to obtain an anomaly detection result for each indicator;
[0032] The first comparison module is used to determine whether the positive abnormal tendency result of each symptom entity is consistent with the abnormal detection result;
[0033] A discrimination module is used to discriminate various indicators of the physical examination report based on the discrimination model to obtain a discrimination result;
[0034] A second comparison module is used to determine whether the discrimination result is consistent with the diagnosis result in the case;
[0035] The output module is used to output the detection result as abnormal case when the positive abnormal tendency result of any symptom entity is inconsistent with the abnormal detection result or the discrimination result is inconsistent with the diagnosis result in the case, otherwise the detection result is output as normal case.
[0036] Furthermore, the anomaly detection module is also used to obtain the interpretable sequence with the highest support from each symptom entity based on the anomaly detection model;
[0037] It also includes a third comparison module, which is used to compare the explainable sequence with the highest support with the knowledge graph pre-constructed using expert knowledge to determine whether the explainable sequence with the highest support is consistent with the knowledge graph. If not, it triggers the reconstruction of the anomaly detection model and re-performs anomaly detection on each symptom entity.
[0038] Furthermore, if the explainability sequence with the highest support is consistent with the knowledge graph, and the best explainability sequence of the symptom entity is confirmed to be reliable by experts, knowledge fusion of the knowledge graph is triggered.
[0039] Furthermore, the method for obtaining the explainable sequence with the highest support is as follows:
[0040] Import a single case sample predicted as abnormal by the random forest model decision tree path set paths ab , where paths ab =[path0,path1,……path m ], each path path x Different decision trees from random forest, 0≤x≤m, m is a natural number greater than 1;
[0041] Paths ab The FP-Growth algorithm is used to mine frequent item sets fre_items based on the features. The frequent item sets fre_items include information such as support, specific itemsets, and length, and the prototype of the interpretable sequence is obtained.
[0042] Sort fre_items by the specified priority, use shap to predict the sample, and obtain the features of each feature y The importance of the features, y is the sequence number of the features, the subsets in fre_items that do not contain the most important features are filtered out, and then the range of each feature value in fre_items is updated according to the strong and weak connections between the abnormal paths, and then the PrefixSpan algorithm in the frequent mode is used to extract the frequent subsequence fre_subseqs from the case sample, and compare the features in fre_subseqs and fre_items. If there are no common features, the fre_items remain in the original order; otherwise, the common features between the two are traversed in the order of the features in fre_subseqs and put into the newly created sort_index list. If the length of sort_index is 1, the fre_items remain in the original order; otherwise, the order of each feature in fre_items is adjusted according to the sort_index.
[0043] Furthermore, the range of each characteristic value in fre_items is updated according to the strong and weak connections between abnormal paths, including:
[0044] Initialize several top-ranked fre_items respectively;
[0045] Determine whether each fre_items is in the corresponding path. If not, filter this path directly. If it is, determine whether the feature in the fre_items appears multiple times in the corresponding path. If so, take the intersection of different values of the feature in this path as the feature range of the feature. Otherwise, take the union of the initialized feature range and the feature range obtained last time. If this process produces a conflict, filter this path directly.
[0046] Furthermore, the text sentiment analysis of the symptom status of each symptom entity includes:
[0047] Define two word lists of attitude polarity according to the symptom status of each symptom entity;
[0048] Identify the attitudinal polarity of each symptom state for each symptom entity;
[0049] Calculate the number of times the two attitude polarities of all symptom states of each symptom entity appear. If the number of positive words appears is greater than the number of negative words, the positive abnormal tendency result of the symptom entity is judged to be normal. Otherwise, the positive abnormal tendency result of the symptom entity is judged to be abnormal.
[0050] Beneficial effects: The present invention extracts a symptom set containing several symptoms from the case given by the doctor, identifies the symptoms into symptom entities and their corresponding symptom states, and then performs text sentiment analysis on each symptom entity and symptom state to obtain positive abnormal tendency results, and compares them with the abnormal detection results of each indicator obtained based on the abnormal detection model, so as to detect whether there is a small misdiagnosis. And by comparing the training results of the physical examination report through a deep neural network with the diagnosis results of the doctor in the case, the abnormal discrimination results of the large misdiagnosis can be given, and finally the discrimination results of the small misdiagnosis and the large misdiagnosis are combined to judge whether the case is normal. At the same time, the credibility of the abnormal detection model is improved by comparing the interpretable sequence with the knowledge graph with the highest support. If there is no small misdiagnosis and the interpretable sequence with the highest support is recognized, that is, it is accurate and reasonable enough, knowledge fusion is performed, and the knowledge graph is continuously updated and iterated, thereby obtaining a valuable medical research resource. The present invention can deepen the research on the pathology of this disease in the field of medical science in my country, improve the level of medical construction in my country, and thus enhance the satisfaction and happiness of the people with medical treatment; it can lay a theoretical and technical foundation for abnormal detection of misdiagnosis of different diseases, and has important and far-reaching significance for improving my country's diagnosis and treatment level, promoting the concept of "Internet + Medical Care", and improving the health of the people. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 This is a flowchart of NER-based disease extraction;
[0052] Figure 2It is a flow chart of abnormality detection of symptoms;
[0053] Figure 3 It is a flowchart of interpretable sequence extraction based on FP-Growth;
[0054] Figure 4 It is a flowchart for adding temporal attributes to frequent itemsets;
[0055] Figure 5 It is a flowchart for updating the range of each eigenvalue in the frequent item set according to the strong and weak connections between abnormal paths;
[0056] Figure 6 It is a flow chart for judging the diagnosis results;
[0057] Figure 7 It is a flowchart for text sentiment analysis of symptom states separately;
[0058] Figure 8 It is a principle block diagram of a case abnormality detection device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0059] The present invention is further explained below in conjunction with the accompanying drawings and specific embodiments. The embodiments are implemented based on the technical solution of the present invention. It should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention.
[0060] like Figures 1 to 7 As shown, an embodiment of the present invention provides a case abnormality detection method, characterized by comprising:
[0061] Based on the symptom extraction model, the symptom set given by the doctor is extracted from the case. The symptom set includes several symptoms, and the symptoms are identified as symptom entities and their corresponding symptom states. The symptoms written by doctors in electronic medical records are often presented in text (i.e., unstructured data form). Therefore, a symptom extraction model is needed to mine the available information entities in the case. This method can make full use of the unstructured data resource of the case, without missing any abnormal detection in the medical field, and provide data support for the subsequent detection of whether the symptom entity is abnormal.
[0062] For details, please refer to Figure 1First, a named-entity recognition (NER) method based on the Attention method is used, that is, a BERT+BiLSTM+CRF model is used to train a NER model. The pre-trained model BERT (Bidirectional Encoder Representation from Transformers) with stronger text feature representation capabilities is used as the feature representation layer. Large-scale text data is trained to deeply mine the potential features between text sequences. The BiLSTM (Bi-directional Long Short-Term Memory) is combined to extract the global and local features of the text. A linear layer, namely CRF (Conditional Random Fields), is added after the hidden layer of the BiLSTM network to consider the global information of the label sequence and select the entity with the highest probability. The NER based on the Attention method helps to focus on the representation and extract entities with high probability, and finally converts the case from unstructured data to structured data. The specific presentation form is: the symptom set includes several symptoms, and each symptom is identified as a symptom entity and a symptom state. Original data format: symptom set = {symptom 1, symptom 2,…, symptom n}; target data format: symptom i—>{symptom entity i+symptom state 1+symptom state 2+…+symptom state g}, 1≤i≤n, n and g are both natural numbers greater than 2.
[0063] See also Figure 2 , perform text sentiment analysis on the symptom status of each symptom entity to obtain the positive and abnormal tendency results of each symptom entity. There are two types of positive and abnormal tendency results, one is normal and the other is abnormal. Figure 7 The present invention adopts rule-based sentiment analysis. Specifically, the text sentiment analysis of the symptom state of each symptom entity includes: defining two word lists of attitude polarities (positive and negative) according to the symptom state of each symptom entity, and identifying the attitude polarity of each symptom state of each symptom entity. The number of occurrences of the two attitude polarities of all symptom states of each symptom entity is calculated. If the number of occurrences of positive words is greater than the number of occurrences of negative words, the positive abnormal tendency result of the symptom entity is judged to be normal, otherwise, the positive abnormal tendency result of the symptom entity is judged to be abnormal.
[0064] Based on the anomaly detection model, anomaly detection is performed on each indicator of the physical examination report to obtain the anomaly detection result of each indicator. The anomaly detection results include abnormal and normal. Specifically, an anomaly detection model based on random forest (RF) is independently constructed for each symptom using the physical examination report as a sample, and finally the training results and paths of each tree in the forest are obtained. If the detection result of the tree is abnormal, the path predicted to be abnormal is taken out and put into the abnormal path set of the case sample; otherwise, it is not considered.
[0065] Determine whether the positive abnormal tendency result of each symptom entity is consistent with the abnormal detection result. When the positive abnormal tendency result and the abnormal detection result are both normal or both abnormal, they are judged to be consistent, otherwise they are judged to be inconsistent. When inconsistency occurs, it can be regarded as a small misdiagnosis.
[0066] Even if the doctor's diagnosis of all symptoms in the symptom set is correct, it does not mean that there is no misdiagnosis. It is also necessary to determine whether a more serious misdiagnosis has occurred, that is, misdiagnosis of the diagnosis result, which is the most fatal error. Therefore, the present invention also detects the diagnosis results given by the doctor in the case, so as to avoid the risk of major misdiagnosis to a certain extent. For details, please refer to Figure 6 , input the various indicators of the physical examination report in the case into the discriminant model, and discriminate the various indicators of the physical examination report based on the discriminant model to obtain the discrimination result. Then compare the output result of the discriminant model with the diagnosis result in the case to determine whether the discrimination result is consistent with the diagnosis result in the case. Specifically, in order to make full use of structured data, that is, the archived physical examination report, including a finite number of indicator items {indicator 1, indicator 2, indicator 3, ..., indicator j}, j is a natural number greater than 3, use the Sigmoid activation function + cross entropy loss function + random gradient descent algorithm to train a deep neural network (Deep Neural Networks, DNN) as a discriminant model, and define DNN output greater than 0.7 as abnormal, input the new physical examination report into it, and obtain a discrimination result. Then, the discrimination of major misdiagnosis is performed. Specifically, compare the diagnosis result in the case with the discrimination result given by DNN. If they are consistent, the doctor's judgment on the diagnosis result is correct; otherwise, the judgment is wrong and a major misdiagnosis occurs.
[0067] The test results are output based on the above judgment results of minor misdiagnosis and major misdiagnosis. Specifically, if the positive abnormal tendency result of any symptom entity is inconsistent with the abnormal detection result or the discrimination result is inconsistent with the diagnosis result in the case, the test result is output as abnormal case, otherwise the test result is output as normal case. When the test result is abnormal case, the best explainable sequence and the explanation of the cause of the disease made by the doctor can be fed back to the relevant personnel at the same time, so as to facilitate their timely correction and deepen their accumulation of knowledge of related diseases, so as to attract enough attention and reduce the misdiagnosis rate of the disease.
[0068] In order to improve the credibility of the anomaly detection model and prepare for the improvement of the knowledge graph, as a preferred embodiment, the present invention also obtains the interpretable sequence with the highest support for each symptom entity based on the anomaly detection model, and compares the interpretable sequence with the knowledge graph pre-constructed using expert knowledge to determine whether the interpretable sequence with the highest support is consistent with the knowledge graph. If not, the anomaly detection model is reconstructed and anomaly detection is performed again on each symptom entity. If the interpretable sequence with the highest support is consistent with the knowledge graph, and it is confirmed by experts that the best interpretable sequence of the symptom entity is reliable, the knowledge graph is fused. The above process is repeated until the symptom entities in the case are detected, thereby continuously updating the iterative knowledge graph.
[0069] See also Figure 3 and Figure 4 The above-mentioned interpretable sequences with the highest support are preferably extracted based on FP-Growth, and a series of accurate, specific, and time-series interpretable sequences are first obtained. Then, the interpretable sequence with the highest support is taken as the best interpretable sequence to prepare for the judgment of model credibility and knowledge fusion. Specifically, it includes: importing a single case sample predicted as an abnormal decision tree path set paths by the random forest model ab , where paths ab =[path0,path1,……path m ], each path path x Different decision trees from random forest, 0≤x≤m, m is a natural number greater than 1. ab The features of the FP-Growth algorithm are used to mine frequent item sets fre_items, which include support, specific itemsets, length, and other information to obtain the prototype of the interpretable sequence. Sort fre_items by the specified priority to ensure that the number of interpretable features is prioritized and to weaken the interference of multiple decision trees in the random forest on interpretability. Use shap to predict the sample and obtain the features of each feature yThe importance of the feature, y is the sequence number of the feature, and the value is a natural number greater than 0. According to the importance of the feature, a most important feature can be obtained, and the subsets in fre_items that do not contain the most important feature are filtered out. Then, the range of each feature value in fre_items is updated according to the strong and weak connections between abnormal paths, and then the PrefixSpan algorithm in the frequent mode is used to extract the frequent subsequence fre_subseqs from the case sample, and the features in fre_subseqs and fre_items are compared. If there are no common features, fre_items remain in the original order; otherwise, the common features between the two are traversed in the order of features in fre_subseqs and put into the newly created sort_index list. If the length of sort_index is 1, fre_items remain in the original order; otherwise, the order of each feature in fre_items is adjusted according to sort_index. At this point, the temporal properties of the frequent substructure can be given to the frequent item set fre_items, and the originally disordered frequent item set features can be sorted by time, which is more in line with the consistent understanding of the order of occurrence of symptoms in the medical field. The last step is to optimize the interpretability solution.
[0070] See also Figure 5 The above updating of the range of each characteristic value in fre_items according to the strong and weak connections between abnormal paths specifically includes:
[0071] Initialize the top ranked fre_items. Determine whether each fre_items is in the corresponding path. If not, filter this path directly. If it is, determine whether the feature in the fre_items appears multiple times in the corresponding path. If so, take the intersection of the different values of the feature in this path as the feature range of the feature. Otherwise, take the union of the initialized feature range and the feature range obtained last time. If there is a conflict in this process, filter this path directly. Take fre_items[0] = [feature0, feature1, feature2] as an example. After initialization, the range of the frequent item set scope0 = {feature0: [0, inf], feature1: [0, inf], feature2: [0, inf]}, inf is the preset upper limit of the range, and the value can be infinite. Then determine whether fre_items[0] is in path0. If not, filter this path directly; if it is, take feature feature0 as an example, determine whether feature0 appears multiple times in path0. If yes, then the intersection of the different values of the feature in this path is taken to get the new feature scope of feature0 scope0_feature0_new; otherwise, the union is taken with the feature scope of feature0 obtained last time scope0_feature0_old (if it is the first iteration, the initialization value of feature0 scope0_feature0 is taken). If the process produces a conflict, the path path0 is directly filtered. Similarly, each feature in fre_items[0] is traversed and judged. Each time the path path is filtered x After that, you need to update fre_items again. Repeat the above steps until all abnormal paths are traversed. ab .
[0072] Combination Figures 1 to 8 Based on the above embodiments, those skilled in the art can easily understand that the present invention also provides a case anomaly detection device, including an extraction module 1, a sentiment analysis module 2, an anomaly detection module 3, a first comparison module 4, a discrimination module 5, a second comparison module 6 and an output module 7.
[0073] Among them, the extraction module 1 is used to extract the symptom set given by the doctor from the case based on the symptom extraction model. The symptom set includes several symptoms, and the symptoms are identified as symptom entities and their corresponding symptom states. The symptoms written by doctors in electronic medical records are often presented in text (i.e., in the form of unstructured data). Therefore, a symptom extraction model is needed to mine the available information entities in the case. This method can make full use of the unstructured data resource of the case, without missing any abnormal detection in any medical aspect, and provide data support for the subsequent detection of whether the disease entity is abnormal.
[0074] For details, please refer to Figure 1 First, a named-entity recognition (NER) method based on the Attention method is used, that is, a BERT+BiLSTM+CRF model is used to train a NER model. The pre-trained model BERT (Bidirectional Encoder Representation from Transformers) with stronger text feature representation capabilities is used as the feature representation layer. Large-scale text data is trained to deeply mine the potential features between text sequences. The BiLSTM (Bi-directional Long Short-Term Memory) is combined to extract the global and local features of the text. A linear layer, namely CRF (Conditional Random Fields), is added after the hidden layer of the BiLSTM network to consider the global information of the label sequence and select the entity with the highest probability. The NER based on the Attention method helps to focus on the representation and extract entities with high probability, and finally converts the case from unstructured data to structured data. The specific presentation form is: the symptom set includes several symptoms, and each symptom is identified as a symptom entity and a symptom state. Original data format: symptom set = {symptom 1, symptom 2,…, symptom n}; target data format: symptom i—>{symptom entity i+symptom state 1+symptom state 2+…+symptom state g}, 1≤i≤n, n and g are both natural numbers greater than 2.
[0075] See also Figure 2 , the sentiment analysis module 2 is used to perform text sentiment analysis on each symptom entity and symptom state to obtain positive and abnormal tendency results. There are two types of positive and abnormal tendency results, one is normal and the other is abnormal. Figure 7The present invention adopts rule-based sentiment analysis. Specifically, the text sentiment analysis of the symptom state of each symptom entity includes: defining two word lists of attitude polarities (positive and negative) according to the symptom state of each symptom entity, and identifying the attitude polarity of each symptom state of each symptom entity. The number of occurrences of the two attitude polarities of all symptom states of each symptom entity is calculated. If the number of occurrences of positive words is greater than the number of occurrences of negative words, the positive abnormal tendency result of the symptom entity is judged to be normal, otherwise, the positive abnormal tendency result of the symptom entity is judged to be abnormal.
[0076] The anomaly detection module 3 is used to perform anomaly detection on each indicator of the physical examination report based on the anomaly detection model to obtain the anomaly detection result of each indicator. The anomaly detection results include abnormal and normal. Specifically, an anomaly detection model based on a random forest (RF) is independently constructed for each symptom using the physical examination report as a sample, and finally the training results and paths of each tree in the forest are obtained. If the tree detection result is abnormal, the path predicted to be abnormal is taken out and placed in the abnormal path set of the case sample; otherwise, it is not considered.
[0077] The first comparison module 4 is used to determine whether the positive abnormal tendency result of each symptom entity is consistent with the abnormal detection result. When the positive abnormal tendency result and the abnormal detection result are both normal or both abnormal, they are judged to be consistent, otherwise they are judged to be inconsistent. When inconsistency occurs, it can be regarded as a minor misdiagnosis.
[0078] Even if the doctor's diagnosis of all symptoms in the symptom set is correct, it does not mean that there is no misdiagnosis. It is also necessary to determine whether a more serious misdiagnosis has occurred, that is, misdiagnosis of the diagnosis result, which is the most fatal error. Therefore, the present invention also detects the diagnosis results given by the doctor in the case, so as to avoid the risk of major misdiagnosis to a certain extent. For details, please refer to Figure 6, input each index of the physical examination report in the case into the discrimination model, and the discrimination module 5 discriminates each index of the physical examination report based on the discrimination model to obtain a discrimination result. Then the second comparison module 6 compares the output result of the discrimination model with the diagnosis result in the case, so as to determine whether the discrimination result is consistent with the diagnosis result in the case. Specifically, in order to make full use of structured data, that is, the archived physical examination report, including a finite number of index items {index 1, index 2, index 3, ..., index j}, j is a natural number greater than 3, and a deep neural network (Deep Neural Networks, DNN) is trained as a discriminant model using the Sigmoid activation function + cross entropy loss function + random gradient descent algorithm. It can be defined that the DNN output is greater than 0.7 as abnormal, and the new physical examination report is input therein to obtain a discrimination result. Then, a discrimination of a major misdiagnosis is performed. Specifically, the diagnosis result in the case is compared with the discrimination result given by the DNN. If they are consistent, the doctor's judgment on the diagnosis result is correct; otherwise, the judgment is wrong and a major misdiagnosis occurs.
[0079] The output module 7 is used to synthesize the judgment results of the above minor misdiagnosis and major misdiagnosis, and output the test results. Specifically, if the positive abnormal tendency result of any symptom entity is inconsistent with the abnormal detection result or the discrimination result is inconsistent with the diagnosis result in the case, the output test result is that the case is abnormal, otherwise the output test result is that the case is normal. When the test result is abnormal, the best interpretable sequence and the doctor's explanation of the symptoms can be fed back to the relevant personnel at the same time, so as to facilitate their timely correction and error correction, deepen their accumulation of knowledge of related diseases, and attract enough attention, thereby reducing the misdiagnosis rate of the disease.
[0080] In order to improve the credibility of the anomaly detection model and prepare for the improvement of the knowledge graph, as a preferred embodiment, the anomaly detection module 3 of the present invention also obtains the most supported explainable sequence from each symptom entity based on the anomaly detection model, and also includes a third comparison module 8. The third comparison module 8 is used to compare the most supported explainable sequence with the knowledge graph pre-constructed using expert knowledge to determine whether the most supported explainable sequence is consistent with the knowledge graph. If not, the anomaly detection model is reconstructed and anomaly detection is performed on each symptom entity again. If the most supported explainable sequence is consistent with the knowledge graph, and it is confirmed by experts that the best explainable sequence of the symptom entity is reliable, the knowledge graph is fused. The above process is repeated until the disease entities in the case are detected, thereby continuously updating the iterative knowledge graph.
[0081] See also Figure 3 and Figure 4The above-mentioned interpretable sequences with the highest support are preferably extracted based on FP-Growth, and a series of accurate, specific, and time-series interpretable sequences are first obtained. Then, the interpretable sequence with the highest support is taken as the best interpretable sequence to prepare for the judgment of model credibility and knowledge fusion. Specifically, it includes: importing a single case sample predicted as an abnormal decision tree path set paths by the random forest model ab , where paths ab =[path0,path1,……path m ], each path path x Different decision trees from random forest, 0≤x≤m, m is a natural number greater than 1. ab The features of the FP-Growth algorithm are used to mine frequent item sets fre_items, which include support, specific itemsets, length, and other information to obtain the prototype of the interpretable sequence. Sort fre_items by the specified priority to ensure that the number of interpretable features is prioritized and to weaken the interference of multiple decision trees in the random forest on interpretability. Use shap to predict the sample and obtain the features of each feature y The importance of the feature, y is the sequence number of the feature, and the value is a natural number greater than 0. According to the importance of the feature, a most important feature can be obtained, and the subsets in fre_items that do not contain the most important feature are filtered out. Then, the range of each feature value in fre_items is updated according to the strong and weak connections between abnormal paths, and then the PrefixSpan algorithm in the frequent mode is used to extract the frequent subsequence fre_subseqs from the case sample, and the features in fre_subseqs and fre_items are compared. If there are no common features, fre_items remain in the original order; otherwise, the common features between the two are traversed in the order of features in fre_subseqs and put into the newly created sort_index list. If the length of sort_index is 1, fre_items remain in the original order; otherwise, the order of each feature in fre_items is adjusted according to sort_index. At this point, the temporal properties of the frequent substructure can be given to the frequent item set fre_items, and the originally disordered frequent item set features can be sorted by time, which is more in line with the consistent understanding of the order of occurrence of symptoms in the medical field. The last step is to optimize the interpretability solution.
[0082] See also Figure 5 The above updating of the range of each characteristic value in fre_items according to the strong and weak connections between abnormal paths specifically includes:
[0083] Initialize the top ranked fre_items. Determine whether each fre_items is in the corresponding path. If not, filter this path directly. If it is, determine whether the feature in the fre_items appears multiple times in the corresponding path. If so, take the intersection of the different values of the feature in this path as the feature range of the feature. Otherwise, take the union of the initialized feature range and the feature range obtained last time. If there is a conflict in this process, filter this path directly. Take fre_items[0] = [feature0, feature1, feature2] as an example. After initialization, the range of the frequent item set scope0 = {feature0: [0, inf], feature1: [0, inf], feature2: [0, inf]}, inf is the preset upper limit of the range, and the value can be infinite. Then determine whether fre_items[0] is in path0. If not, filter this path directly; if it is, take feature feature0 as an example, determine whether feature0 appears multiple times in path0. If yes, then the intersection of the different values of the feature in this path is taken to get the new feature scope of feature0 scope0_feature0_new; otherwise, the union is taken with the feature scope of feature0 obtained last time scope0_feature0_old (if it is the first iteration, the initialization value of feature0 scope0_feature0 is taken). If the process produces a conflict, the path path0 is directly filtered. Similarly, each feature in fre_items[0] is traversed and judged. Each time the path path is filtered x After that, you need to update fre_items again. Repeat the above steps until all abnormal paths are traversed. ab .
[0084] The above is only a preferred embodiment of the present invention. It should be noted that for ordinary technicians in this technical field, other parts not specifically described belong to the prior art or common knowledge. Several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered as the protection scope of the present invention.
Claims
1. A case abnormality detection method, characterized in that: include: Extracting a symptom set given by a doctor from a case based on a symptom extraction model, the symptom set includes a number of symptoms, and identifying the symptoms into symptom entities and their corresponding symptom states; Text sentiment analysis is performed on the symptom status of each symptom entity to obtain the positive and abnormal tendency results of each symptom entity; Based on the abnormality detection model, the indicators in the physical examination report are detected for abnormality to obtain the abnormality detection results of each symptom; Determine whether the positive abnormal tendency result of each symptom entity is consistent with the abnormal detection result; Based on the discriminant model, various indicators of the physical examination report are discriminated to obtain the discriminant results; Determine whether the discrimination result is consistent with the diagnosis result in the case; If the positive abnormal tendency result of any symptom entity is inconsistent with the abnormal detection result or the discrimination result is inconsistent with the diagnosis result in the case, the output detection result is that the case is abnormal, otherwise the output detection result is that the case is normal; The explainable sequences with the highest support are also obtained from each symptom entity based on the anomaly detection model; Comparing the explainable sequence with the highest support with the knowledge graph pre-built using expert knowledge to determine whether the explainable sequence with the highest support is consistent with the knowledge graph. If not, reconstructing the anomaly detection model and re-performing anomaly detection on each symptom entity; If the explainability sequence with the highest support is consistent with the knowledge graph, and the best explainability sequence of the symptom entity is confirmed to be reliable by experts, knowledge fusion is performed on the knowledge graph; The method for obtaining the explainable sequence with the highest support is as follows: Import a single case sample predicted as abnormal by the random forest model decision tree path set paths ab , where paths ab =[path0,path1……path x ……path m ], each path path x The x-th decision tree from the random forest, 0≤x≤m, m is a natural number greater than 1; Paths ab The features of are used to mine frequent item sets fre_items using the FP-Growth algorithm. The frequent item sets fre_items include support, specific itemsets, and length, and the prototype of the interpretable sequence is obtained. Sort fre_items by the specified priority, use shap to predict the sample, and obtain the features of each feature y The importance of the features, y is the sequence number of the features, the subsets in fre_items that do not contain the most important features are filtered out, and then the range of each feature value in fre_items is updated according to the strong and weak connections between the abnormal paths, and then the PrefixSpan algorithm in the frequent mode is used to extract the frequent subsequence fre_subseqs from the case sample, and the features in fre_subseqs and fre_items are compared. If there are no common features, the fre_items remain in the original order; otherwise, the common features between the two are traversed in the order of the features in fre_subseqs and put into the newly created sort_index list. If the length of sort_index is 1, the fre_items remain in the original order; otherwise, the order of each feature in fre_items is adjusted according to sort_index; The text sentiment analysis of the symptom status of each symptom entity includes: Define two word lists of attitude polarity according to the symptom status of each symptom entity; Identify the attitudinal polarity of each symptom state for each symptom entity; Calculate the number of times the two attitude polarities of all symptom states of each symptom entity appear. If the number of positive words appears is greater than the number of negative words, the positive abnormal tendency result of the symptom entity is judged to be normal. Otherwise, the positive abnormal tendency result of the symptom entity is judged to be abnormal.
2. The case abnormality detection method according to claim 1, characterized in that: According to the strong and weak connections between abnormal paths, the range of each characteristic value in fre_items is updated, including: Initialize several top-ranked fre_items respectively; Determine whether each fre_items is in the corresponding path. If not, filter this path directly. If it is, determine whether the feature in the fre_items appears multiple times in the corresponding path. If so, take the intersection of different values of the feature in this path as the feature range of the feature. Otherwise, take the union of the initialized feature range and the feature range obtained last time. If a conflict occurs in the process, filter this path directly.
3. A case abnormality detection device, characterized in that: include: An extraction module, for extracting a symptom set given by a doctor from a case based on a symptom extraction model, wherein the symptom set includes a plurality of symptoms, and identifying the symptoms into symptom entities and their corresponding symptom states; Sentiment analysis module, used to perform text sentiment analysis on the symptom status of each symptom entity to obtain the positive and abnormal tendency results of each symptom entity; An anomaly detection module is used to perform anomaly detection on various indicators of the physical examination report based on the anomaly detection model to obtain an anomaly detection result for each indicator; The first comparison module is used to determine whether the positive abnormal tendency result of each symptom entity is consistent with the abnormal detection result; A discrimination module is used to discriminate various indicators of the physical examination report based on the discrimination model to obtain a discrimination result; A second comparison module is used to determine whether the discrimination result is consistent with the diagnosis result in the case; An output module, for outputting the detection result as abnormal case when the positive abnormal tendency result of any symptom entity is inconsistent with the abnormal detection result or the discrimination result is inconsistent with the diagnosis result in the case, otherwise outputting the detection result as normal case; The anomaly detection module is also used to obtain the interpretable sequence with the highest support from each symptom entity based on the anomaly detection model; It also includes a third comparison module, which is used to compare the explainable sequence with the highest support with the knowledge graph pre-built using expert knowledge to determine whether the explainable sequence with the highest support is consistent with the knowledge graph. If not, it triggers the reconstruction of the anomaly detection model and re-performs anomaly detection on each symptom entity; If the explainability sequence with the highest support is consistent with the knowledge graph, and the best explainability sequence of the symptom entity is confirmed to be reliable by experts, then the knowledge fusion of the knowledge graph is triggered; The method for obtaining the explainable sequence with the highest support is as follows: Import a single case sample predicted as abnormal by the random forest model decision tree path set paths ab , where paths ab =[path0,path1……path x ……path m ], each path path x The x-th decision tree from the random forest, 0≤x≤m, m is a natural number greater than 1; Paths ab The features of are used to mine frequent item sets fre_items using the FP-Growth algorithm. The frequent item sets fre_items include support, specific itemsets, and length, and the prototype of the interpretable sequence is obtained. Sort fre_items by the specified priority, use shap to predict the sample, and obtain the features of each feature y The importance of the features, y is the sequence number of the features, the subsets in fre_items that do not contain the most important features are filtered out, and then the range of each feature value in fre_items is updated according to the strong and weak connections between the abnormal paths, and then the PrefixSpan algorithm in the frequent mode is used to extract the frequent subsequence fre_subseqs from the case sample, and the features in fre_subseqs and fre_items are compared. If there are no common features, the fre_items remain in the original order; otherwise, the common features between the two are traversed in the order of the features in fre_subseqs and put into the newly created sort_index list. If the length of sort_index is 1, the fre_items remain in the original order; otherwise, the order of each feature in fre_items is adjusted according to sort_index; The text sentiment analysis of the symptom status of each symptom entity includes: Define two word lists of attitude polarity according to the symptom status of each symptom entity; Identify the attitudinal polarity of each symptom state for each symptom entity; Calculate the number of times the two attitude polarities of all symptom states of each symptom entity appear. If the number of positive words appears is greater than the number of negative words, the positive abnormal tendency result of the symptom entity is judged to be positive. Otherwise, the positive abnormal tendency result of the symptom entity is judged to be abnormal.
4. The case abnormality detection device according to claim 3, characterized in that: According to the strong and weak connections between abnormal paths, the range of each characteristic value in fre_items is updated, including: Initialize several top-ranked fre_items respectively; Determine whether each fre_items is in the corresponding path. If not, filter this path directly. If it is, determine whether the feature in the fre_items appears multiple times in the corresponding path. If so, take the intersection of different values of the feature in this path as the feature range of the feature. Otherwise, take the union of the initialized feature range and the feature range obtained last time. If a conflict occurs in the process, filter this path directly.
