Method for symptom information missing detection and related product
By integrating the semantic vectors of medical records and the latent symptom vectors of symptomatic drug information, and using the BERT and Transformer models, the problem of missing symptom information in traditional Chinese medicine medical records was solved, the integrity detection and supplementation of medical record documents were achieved, and the accuracy of diagnosis, treatment and scientific research data was improved.
Patent Information
- Application Number
- CN202510702154.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-10-17
AI Technical Summary
The lack of symptom information in TCM clinical records leads to decreased accuracy of diagnosis and treatment, affecting the integrity and reliability of medical quality assessment and scientific research data.
By extracting the semantic vectors of medical records and the potential symptom vectors of symptomatic medication information, the BERT and Transformer models are used to fuse the symptom information, combined with the knowledge graph embedding model, to predict the missing symptom information in the medical record documents.
Accurately detect and supplement missing symptom information in medical records, improve the completeness of medical records and the accuracy of diagnosis and treatment, and support medical quality assessment and the reliability of scientific research data.
Smart Images

Figure CN120809033A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application generally relates to the field of medical information technology. More particularly, the present application relates to a method, processing device and computer readable storage medium for symptom information missing detection. BACKGROUND
[0002] In the traditional Chinese medicine (TCM) clinical diagnosis and treatment system, "differential diagnosis and treatment" as the core theory and practice method, highly depends on the patient's symptoms. The patient's complaint, history of present illness, symptoms and symptoms in the course of disease record are the key basis for the clinician to assess the disease and judge the syndrome type, and are also the important basis for precise prescription and implementation of individualized treatment plan. The completeness and accuracy of the symptom information directly determine the quality and effect of TCM clinical diagnosis and treatment. Therefore, high-quality medical records can provide reliable basis for subsequent clinical research and medical decision-making by recording the patient's condition changes and the whole process of diagnosis and treatment completely, in detail and clearly.
[0003] However, in the real world of TCM clinical practice, the completeness of symptom recording in medical records is facing severe challenges. Influenced by the factors such as complicated clinical business management process, time pressure of diagnosis and treatment, and subjective judgment difference of doctors, there is a large degree of symptom missing problem in TCM clinical medical records, especially in electronic medical records. Taking the inpatient course text as an example, the first course text record often only records part of the obvious symptoms due to time constraints, and the hidden or secondary symptoms are easily ignored. For example, the patient's first course text only records "fever" and "chest tightness", but the subsequent course text describes "fatigue has improved". It can be inferred that the "fatigue" symptom was missing in the first record. This symptom information missing problem widely exists in each course record of electronic medical records, not only interferes with the accuracy of TCM differential diagnosis and treatment, but also hinders the scientific research work based on clinical data, and reduces the overall level of diagnosis and treatment of the hospital and damages the service image of the hospital.
[0004] Therefore, it is urgent to provide a method, processing device and computer readable storage medium for symptom information missing detection to identify the missing symptom information in medical records. SUMMARY
[0005] In order to at least solve one or more of the above-mentioned technical problems, the present application proposes a method, processing device and computer readable storage medium for symptom information missing detection in multiple aspects to at least solve the above problems.
[0006] In a first aspect, the present application provides a method for symptom information missing detection, comprising: obtaining a medical record document to be detected, wherein the medical record document comprises at least two course records, and each course record comprises symptom description information and symptomatic drug information; extracting a semantic vector of a first course record which fuses semantic information of other course records; extracting a latent symptom vector corresponding to the symptomatic drug information in the course record; fusing the semantic vector of the first course record and the latent symptom vector of the course record to obtain a feature vector of the course record; and determining symptom information missing in the medical record document according to the feature vectors of all the course records in the medical record document.
[0007] In some embodiments, the extracting a semantic vector of a first course record which fuses semantic information of other course records comprises: inputting the course record into a trained BERT model to obtain a context vector sequence of the course record; extracting a CLS vector in the context vector sequence as an overall semantic vector of the course record; inputting the overall semantic vector of each course record into a trained Transformer model to obtain a semantic vector of each course record which fuses semantic information of other course records; and extracting the semantic vector of the first course record from the overall semantic vector of each course record.
[0008] In some embodiments, after the inputting the overall semantic vector of each course record into a trained Transformer model to obtain a semantic vector of each course record which fuses semantic information of other course records, the method further comprises: performing average pooling on the semantic vectors of all the course records in the medical record document to obtain a joint semantic vector of the medical record document; and the fusing the semantic vector of the first course record and the latent symptom vector of the course record to obtain a feature vector of the course record comprises: fusing the semantic vector of the first course record, the latent symptom vector of the course record, and the joint semantic vector of the medical record document to obtain a feature vector of the course record.
[0009] In some embodiments, the extracting a latent symptom vector corresponding to the symptomatic drug information in the course record comprises: performing named entity recognition on the symptomatic drug information in the course record to obtain a drug entity set; inputting the drug entity set into a trained knowledge graph embedding model to obtain an embedding vector of each drug entity in the drug entity set; and calculating a mean value of the embedding vectors of the drug entities in the drug entity set to obtain the latent symptom vector corresponding to the symptomatic drug information in the course record.
[0010] In some embodiments, the method further comprises: constructing a drug-symptom knowledge graph, wherein the drug-symptom knowledge graph comprises entities and relationships, the entities comprising symptoms and drugs, and the relationships comprising corresponding relationships and / or treatment relationships between the symptoms and the drugs; inputting the drug-symptom knowledge graph into a preset knowledge graph embedding model for training to obtain the trained knowledge graph embedding model.
[0011] In some embodiments, determining the missing symptom information of the medical record document according to the feature vectors of all the course records in the medical record document comprises: inputting the feature vectors of all the course records in the medical record document into a trained target classifier to predict the missing symptom information of the medical record document.
[0012] In some embodiments, after determining the missing symptom information of the medical record document according to the feature vectors of all the course records in the medical record document, the method further comprises: adding the missing symptom information of the medical record document to the medical record document.
[0013] In some embodiments, the BERT model, the Transformer model and the target classifier are regarded as an integral model, and the method further comprises: training the integral model; wherein the training of the integral model comprises the following steps: obtaining a medical record document to be trained, wherein a specific course record in the medical record document is labeled with missing symptoms; inputting the course records of the medical record document to be trained into the BERT model to obtain context vector sequences of the course records; extracting a CLS vector in the context vector sequences as the integral semantic vector of the course record; inputting the integral semantic vector of each course record into the Transformer model to obtain a semantic vector of each course record fused with semantic information of other course records; extracting a semantic vector of the first course record from the semantic vectors of each course record; extracting a latent symptom vector corresponding to the symptomatic drug information in the course record; fusing the semantic vector of the first course record and the latent symptom vector of the course record to obtain a feature vector of the course record; and inputting the feature vectors of all the course records in the medical record document into the target classifier to predict the missing symptoms labeled by the specific course record.
[0014] In some embodiments, the target classifier comprises a linear layer, which is represented as:
[0015]
[0016] wherein, wherein, represents the probability that the i-th candidate symptom is missed, represents a Sigmoid activation function, W represents a weight matrix of a linear classifier, g represents a feature vector of a medical record, b represents a bias, i represents an index of a candidate symptom, and K represents a number of candidate symptom classes;
[0017] The loss function of the overall model is:
[0018]
[0019] wherein, represents a loss value, K represents a number of candidate symptom classes, y i = 1 represents that the i-th symptom in a medical record is “missing but actually exists” y i = 0 represents that the i-th symptom in a medical record is “no missing”, represents the probability that the i-th candidate symptom is missed.
[0020] In some embodiments, the method further comprises performing the following preprocessing operations on the specific medical record: performing named entity recognition on the specific medical record to extract an explicit positive symptom entity set in the specific medical record; and masking the explicit positive symptoms in the specific medical record based on the explicit positive symptoms in the explicit positive symptom entity set, wherein the explicit positive symptoms in the specific medical record that are masked are taken as the missing symptoms marked in the specific medical record.
[0021] In a second aspect, the present application provides a processing device, comprising: a processor configured to execute program instructions; and a memory configured to store the program instructions, when the program instructions are loaded and executed by the processor, the processor executes the method described in the above first aspect and any one of its embodiments.
[0022] In a third aspect, the present application provides a computer readable storage medium, wherein the program instructions are stored, and the program instructions, when loaded and executed by a processor, cause the processor to execute the method described in the above first aspect and any one of its embodiments.
[0023] By the method for detecting missing symptom information provided above, a medical record document to be detected is acquired, wherein the medical record document includes at least two course records, and each course record includes symptom description information and symptomatic drug information. A semantic vector of a first course record is extracted and fused with semantic vectors of other course records, and a potential symptom vector corresponding to the symptomatic drug information in the course record is extracted. Then, the semantic vector of the first course record and the potential symptom vector of the course record are fused to obtain a feature vector containing information associated with the symptoms in the course record. Therefore, when detecting missing symptom information in the medical record document according to the feature vectors of all course records in the medical record document, the missing symptom information in the medical record document can be accurately detected. BRIEF DESCRIPTION OF DRAWINGS
[0024] The above and other objects, features and advantages of the present application will become more apparent from the following detailed description read in conjunction with the accompanying drawings. In the drawings, several embodiments of the present application are illustrated by way of example and not limitation in which like reference numerals refer to like elements, wherein:
[0025] Figure 1 An exemplary flowchart of a method for detecting missing symptom information according to some embodiments of the present application is shown;
[0026] Figure 2 An exemplary flowchart of a method for detecting missing symptom information according to some embodiments of the present application is shown;
[0027] Figure 3 An exemplary flowchart of a method for detecting missing symptom information according to some embodiments of the present application is shown;
[0028] Figure 4 An exemplary flowchart of a method for detecting missing symptom information according to some embodiments of the present application is shown;
[0029] Figure 5 An exemplary flowchart of a method for detecting missing symptom information according to some embodiments of the present application is shown;
[0030] Figure 6 An exemplary flowchart of a method for detecting missing symptom information according to some embodiments of the present application is shown;
[0031] Figure 7 An exemplary structural block diagram of a processing device according to some embodiments of the present application is shown. DETAILED DESCRIPTION
[0032] With reference to the drawings, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only some of the embodiments of the present application, but not all of them. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts are within the scope of the present application.
[0033] It should be understood that the terms "comprise" and "include" used in the specification and claims of the present application indicate the presence of the described features, integers, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0034] It should also be understood that the terms used in the specification of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. As used in the specification and claims of the present application, the singular forms "a", "an" and "the" are intended to include the plural forms, unless the context clearly indicates otherwise. It should be further understood that the term "and / or" used in the specification and claims of the present application means any combination of one or more of the associated listed items and all possible combinations thereof, and includes these combinations.
[0035] As used in the specification and claims of the present application, the term "if" can be interpreted as "when" or "upon" or "in response to a determination" or "in response to detecting" depending on the context. Similarly, the phrase "if it is determined" or "if [a described condition or event] is detected" can be interpreted as meaning "upon determining" or "in response to determining" or "upon detecting [a described condition or event]" or "in response to detecting [a described condition or event]" depending on the context.
[0036] The specific embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0037] Exemplary application scenarios
[0038] Under the background of rapid development of medical informatization, electronic medical record system (EMR) gradually replaces traditional paper medical record and becomes the core support tool for clinical diagnosis and treatment work due to its efficiency, convenience and data integration capability. Electronic medical record system realizes the collection, storage, management and sharing of patient diagnosis and treatment information through digital means, greatly improves the efficiency and standardization of medical work, and lays a solid foundation for optimizing medical resource allocation and promoting medical cooperation.
[0039] However, in practical application, the electronic medical record system exposes significant problems in the symptom information input link. Clinicians face heavy clinical tasks and are affected by multiple factors such as time pressure, work negligence, and professional cognitive differences. When inputting patient symptom information, it is easy to miss some information. For example, the first course text record often only records some obvious symptoms due to time constraints, and hidden or secondary symptoms are easily overlooked. For example, a patient's first course text only records "fever" and "chest tightness", but the subsequent course text describes "fatigue has improved". It can be inferred that the "fatigue" symptom was missed in the first record. These missing symptom information may contain details that are critical to disease diagnosis, and once missed, it will directly interfere with the doctor's accurate judgment of the patient's condition, and then affect the scientific formulation of the subsequent treatment plan, which poses a potential threat to the diagnosis and treatment effect and medical safety of the patient.
[0040] At the same time, in the field of medical quality evaluation and scientific research data management, the value of the electronic medical record system needs to be deeply explored. Medical quality evaluation relies on comprehensive and accurate medical record data to find weaknesses and potential risks in the diagnosis and treatment process; clinical scientific research needs complete and reliable data support to ensure the scientificity and universality of research results. If the historical medical record data is incomplete and the symptom information is missing, it will lead to selective bias in the research sample, making it difficult for the research conclusion to reflect the true situation.
[0041] Exemplary application scheme
[0042] Therefore, the present application provides a method for detecting missing symptom information, which fuses the semantic vector of the first course record with the potential symptom vector extracted from the course record and the information of the symptomatic drug to obtain a feature vector containing the information associated with the symptoms in the course record. Therefore, when detecting missing symptom information according to the feature vector, the missing symptom information in the medical record document can be accurately detected.
[0043] Figure 1 An exemplary flowchart of a method 100 for detecting missing symptom information according to some embodiments of the present application is shown. As shown in Figure 1 The method 100 includes steps S101 to S105.
[0044] First, in step S101, a medical record document to be detected is obtained, wherein the medical record document includes at least two course records, and the course record includes symptom description information and information of a symptomatic drug. In some embodiments, the medical record document can be obtained by any means such as an electronic medical record system. For ease of description, the medical record document can be represented as D = {d1, d2, …, dn}, where each d n}} represents a course record. i
[0045] It should be noted that the symptomatic drug information in the disease course record in this embodiment refers to the therapeutic traditional Chinese medicine prescribed by the doctor according to the patient's symptoms and using the theory of traditional Chinese medicine.
[0046] For example, assume that the symptom description information in a certain disease course record d i is "patient fever, cough for three days, accompanied by chest tightness and headache, …", and the symptomatic drug information is "Bupleurum, Astragalus, …".
[0047] Next, in step S102, the semantic vector of the first disease course record is extracted, which fuses the semantic information of other disease course records.
[0048] It can be understood that the first disease course record is the earliest disease course record of the patient. The semantic vector of the first disease course record contains its own semantic information and fuses the semantic information of all other disease course records in the medical record document except the first disease course record. In the first disease course record, the recorder may have missed some symptoms of the patient due to time pressure or subjective factors, and these symptoms are mentioned in the subsequent disease course records. Therefore, by combining the logic of the semantic information before and after the multiple disease course records, it can be inferred which symptoms are missing. Therefore, using the cross-disease course Transformer model to model the semantic vectors of multiple disease course records can effectively improve the accuracy of symptom information missing detection.
[0049] In step S103, the latent symptom vector corresponding to the symptomatic drug information in the disease course record is extracted. In the theory of traditional Chinese medicine, traditional Chinese medicine corresponds to certain specific symptoms or pathogenesis, which indicates that the symptomatic drug information contains potential symptom correspondence. Moreover, in the disease course record, the symptomatic drug information is usually recorded completely. Therefore, extracting the latent symptom vector corresponding to the symptomatic drug information in the disease course record can significantly improve the precision and accuracy of symptom information missing detection.
[0050] For example, the symptom description information of a certain disease course record is "patient cough for three days, accompanied by chest tightness and headache", in which the "fever" symptom is missing. However, the "Bupleurum" is contained in the symptomatic drug information. "Bupleurum" treats the "fever" symptom, so it can be inferred that the disease course record misses the "fever" symptom.
[0051] It can be seen that the above steps S103 and S104 are independent of each other and have no association, so they can be executed synchronously or sequentially, and this embodiment does not make specific limitations.
[0052] Then, in step S104, the semantic vector of the first medical record and the latent symptom vector of the medical record are fused to obtain a feature vector for the medical record. In some embodiments, fusion can be achieved by concatenating the semantic vector of the first medical record and the latent symptom vector of the medical record to obtain the feature vector of the medical record. It will be understood that the latent symptom vector of each medical record needs to be fused with the semantic vector of the first medical record to obtain the feature vector of each medical record.
[0053] Finally, in step S105, the symptom information missing from the medical record is determined based on the feature vectors of all medical records in the medical record. In some embodiments, the feature vectors of all medical records in the medical record can be input into a trained target classifier to predict the symptom information missing from the medical record. In this embodiment, the feature vector of the medical record, obtained by fusing the semantic vector of the first medical record and the potential symptom vector of the medical record, contains semantic information associated with the disease course and symptoms. Therefore, based on this feature vector of each medical record in the medical record, all symptom information missing from the medical record can be accurately predicted.
[0054] It should be noted that this embodiment does not limit the type, structure and implementation of the target classifier used for prediction, which is not the focus of this embodiment.
[0055] In some embodiments, after detecting all missing symptom information in the medical record document, the missing symptom information can be further added to the medical record document to improve the completeness of the medical record document.
[0056] Combination of the above Figure 1 In summary, a method 100 for detecting missing symptom information in some embodiments of the present application is described. This method extracts a semantic vector from the first medical record that incorporates semantic information from other medical records and extracts a latent symptom vector corresponding to the symptomatic medication information in the medical record. This fusion of the latent symptom vector and the semantic vector of the first medical record yields a feature vector containing information associated with the symptoms in the medical record. This allows for accurate detection of missing symptom information in the medical record when the feature vectors of all medical records in the medical record are used.
[0057] However, it should be understood by those skilled in the art that Figure 1The method 100 shown is exemplary and not limiting, and those skilled in the art can adjust it as needed. For example, in some embodiments, the symptomatic drug information can also refer to the therapeutic Western medicine prescribed by the doctor according to the patient's symptoms. In some embodiments, weighted summation, mean pooling or maximum pooling can be used to fuse the semantic vector of the first medical record and the potential symptom vector of the medical record. Each of the above fusion methods has the characteristics of adapting to different feature distributions.
[0058] The following will be described in conjunction with Figure 2 The extraction of the semantic vector of the first medical record fused with the semantic information of other medical records will be described. It can be understood that Figure 2 The method 200 for detecting missing symptom information shown in some embodiments of the present application is a specific implementation of step S102 in the method 100 described above, so the description of the foregoing Figure 1 may be similarly applied here. As Figure 2 shown, the method 200 includes steps S201 and S204.
[0059] In step S201, the medical record is input into the trained BERT model to obtain a context vector sequence of the medical record. It can be understood that the symptom description information and the symptomatic drug information in the medical record are input into the trained BERT (Bidirectional Encoder Representations from Transformers) model, and the BERT model outputs a context vector sequence of the medical record.
[0060] Specifically, the BERT model dynamically calculates the semantic association between Tokens (the smallest semantic unit) in the medical record through a bidirectional self-attention mechanism, fuses left and right context information, and realizes bidirectional modeling and global interaction of the medical record semantics. The context vector sequence generated after multi-layer Transformer encoding contains global semantics, diagnosis and treatment time sequence logic and medical field features.
[0061] Next, in step S202, the CLS vector in the context vector sequence is extracted as the overall semantic vector of the medical record. The CLS vector is the vector corresponding to the special token [CLS] added at the front end of the context vector sequence, which contains the overall semantic information of the medical record.
[0062] Furthermore, in step S203, the overall semantic vector of each medical record is input into the trained Transformer model to obtain a semantic vector for each medical record that incorporates the semantic information of other medical records. It should be noted that the overall semantic vectors of all medical records must be input into the trained Transformer model at once. The Transformer model then fuses the overall semantic vectors of all input medical records to output a semantic vector for each medical record that incorporates the semantic information of other medical records.
[0063] For ease of understanding, the process of extracting semantic information from each medical record by integrating other medical records can be expressed as:
[0064] c1,c2,…,c n = Transformer([h1,h2,…,h n ])
[0065] Among them, Transformer, as the name implies, represents the Transformer model, h1~h n Represents the overall semantic vector of each medical record, c1~c n Represents the semantic vector of each medical record that incorporates the semantic information of other medical records.
[0066] Finally, in step S204, the semantic vector of the first medical record is extracted from the semantic vectors of each medical record. It is understood that step S203 above obtains the semantic vectors of all medical records, in other words, it includes the semantic vector of the first medical record. Therefore, the semantic vector of the first medical record can be directly obtained from the output of the Transformer model.
[0067] Combination of the above Figure 2 The paper provides a detailed description of the extraction of semantic vectors for the first medical record that incorporates semantic information from other medical records. It first uses the BERT model to generate a sequence of context vectors for the medical record, then extracts the CLS vector from the context vector sequence as the overall semantic vector for the medical record. This is followed by a Transformer model that generates semantic vectors for each medical record that incorporates semantic information from other medical records based on the overall semantic vectors of all input medical records. Finally, the semantic vector for the first medical record is extracted from this vector, thereby facilitating the detection of missing symptom information in medical records. Furthermore, the above approach offers the advantages of low computational cost and high migration efficiency.
[0068] Next, combine Figure 3 The extraction of potential symptom vectors corresponding to symptomatic drug information in medical records can be explained. Figure 3The method 300 for symptom information missing detection of some embodiments of the present application is a specific implementation of step S103 in the foregoing method 100, and thus the foregoing description in conjunction with Figure 1 the method 100 can be similarly applied. As shown in Figure 3 the method 300, the method 300 includes steps S301 to S303.
[0069] First, in step S301, named entity recognition is performed on the symptomatic drug information in the medical record to obtain a set of drug entities. In some embodiments, the symptomatic drug information in the medical record is relatively standardized, and thus regular expressions or self-defined dictionaries can be used to perform named entity recognition on the symptomatic drug information in the medical record to obtain the set of drug entities.
[0070] Subsequently, in step S302, the set of drug entities is input into a trained knowledge graph embedding model to obtain an embedding vector of each drug entity in the set of drug entities. In the present embodiment, the knowledge graph embedding model is pre-trained based on a drug-symptom knowledge graph containing drug-symptom association relationships, so that the generated embedding vector of the drug entity contains semantic information of the drug itself and potential association semantic information of the drug and the symptom. The potential association semantic information of the drug and the symptom is reflected in that the sum of the embedding vector of the drug entity and the embedding vector of the relationship is approximately equal to the embedding vector of the symptom.
[0071] The training of the knowledge graph embedding model is described next. First, a drug-symptom knowledge graph is constructed based on Chinese classic literature, modern teaching materials, electronic medical records, and the like. The drug-symptom knowledge graph includes entities and relationships, and the entities include symptoms and drugs, and the relationships include corresponding relationships (a traditional Chinese medicine has relevance with a symptom) and / or treatment relationships (a traditional Chinese medicine can treat a symptom) between the symptoms and the drugs.
[0072] For ease of description, the drug-symptom knowledge graph can be represented as G = (E, R), where E represents entities and R represents relationships. E includes entities such as symptoms and traditional Chinese medicines, and R includes relationships such as “treatment” and “correspondence”. Further, a triple in the drug-symptom knowledge graph can be represented as (i, r, j), where i represents a traditional Chinese medicine entity, j represents a symptom entity, and r represents the relationship between the traditional Chinese medicine entity i and the symptom entity j. For example, for a triple (traditional Chinese medicine A, treatment, symptom B) and (traditional Chinese medicine C, correspondence, symptom D) in the drug-symptom knowledge graph.
[0073] The constructed drug-symptom knowledge graph is then further input into a knowledge graph embedding model for training to obtain the trained knowledge graph embedding model described above. In the training, the knowledge graph embedding model takes as the training target, is the embedding vector of the traditional Chinese medicine, and er is the embedding vector of the relation, is the embedding vector of the symptom. After training this knowledge graph embedding model on the drug-symptom knowledge graph, the generated embedding vector of the drug entity can contain the semantic information of the drug itself (such as clearing heat, detoxifying, and replenishing qi) as well as the potential semantic information of the association between the drug and the symptom.
[0074] Finally, in step S303, the mean of the embedding vectors of the drug entities in the drug entity set is calculated to obtain the latent symptom vector corresponding to the symptomatic drug information in the medical record. In this embodiment, the mean of the embedding vector can be either an average or a weighted mean, which is not limited here. It will be understood that this latent symptom vector contains both the semantic information of the drug itself and the semantic information of its potential association with the symptoms.
[0075] Combination of the above Figure 3 The extraction of latent symptom vectors for symptomatic medication information from medical records is described in detail. This method generates embedding vectors for each medication entity by inputting the medication entity set from the medical records into a knowledge graph embedding model pre-trained on a medication-symptom knowledge graph containing medication-symptom relationships. The model then calculates the mean of the embedding vectors for each medication entity in the medication entity set to obtain the latent symptom vector corresponding to the symptomatic medication information in the medical records. This latent symptom vector incorporates both the semantic information of the medication itself and the semantic information underlying its association with the symptoms, significantly improving the precision and accuracy of symptom information omission detection.
[0076] Next, combine Figure 4 The method 400 for detecting symptom information omission in some embodiments of the present application is described. Figure 4 The method 400 shown can be used as a supplement or extension of the above method 100 to further improve the completeness and accuracy of symptom information detection. Figure 1 The description of can be applied here similarly. Figure 4 As shown, the method 400 includes steps S401 to S406.
[0077] First, in step S401, a medical record document to be tested is obtained, where the medical record document includes at least two medical records, each of which includes symptom description information and appropriate medication information. Then, in step S402, a semantic vector of the first medical record is extracted, which is integrated with the semantic information of other medical records.
[0078] It should be noted that the above steps S401 and S402 are similar to or identical to the steps S101 and S102 in the above method 100. Therefore, the above steps S401 and S402 are not repeated in this embodiment. For details, please refer to the detailed description of the above steps S101 and S102.
[0079] Subsequently, in step S403, the joint semantic vector of the medical record document is extracted. The joint semantic vector is a global semantic fusion representation of each medical record. It should be noted that the semantic vector of the first medical record integrates the semantic information of other medical records through the attention mechanism, and its focus is still on the semantic information of the first medical record. The joint semantic vector here is a global semantic fusion representation of each patient's medical records. Relying on this joint semantic vector, the semantic information of all medical records can be better understood from a global perspective. It is an important supplement to the former, thereby further improving the precision and accuracy of symptom information omission detection.
[0080] In step S404, the potential symptom vector corresponding to the symptomatic medication information in the medical history record is extracted. This step is similar to or the same as step S103 in the above method 100. Its specific implementation can refer to the description of step S103 above and will not be repeated here.
[0081] Then, in step S405, the semantic vector of the first medical record, the latent symptom vector of the medical record, and the joint semantic vector of the medical record document are fused to obtain a feature vector for the medical record. In some embodiments, fusion can be achieved by concatenating the semantic vector of the first medical record, the latent symptom vector of the medical record, and the joint semantic vector of the medical record document to obtain the feature vector of the medical record. It will be understood that the latent symptom vector of each medical record needs to be fused with the semantic vector of the first medical record and the joint semantic vector of the medical record document to obtain the feature vector of each medical record.
[0082] Finally, in step S406, the missing symptom information in the medical record is determined based on the feature vectors of all medical records in the medical record. In this embodiment, the feature vector obtained by fusing the semantic vector of the first medical record, the latent symptom vector of the medical record, and the joint semantic vector of the medical record contains all semantic information associated with the medical course and symptoms. Therefore, based on this feature vector of each medical record in the medical record, all missing symptom information in the medical record can be accurately detected.
[0083] It should be noted that the specific implementation of the above step S406 can refer to the relevant description of step S105 of method 100 above, and will not be repeated here.
[0084] Combination of the above Figure 4In general, a method 400 for detecting missing symptom information in some embodiments of the present application is described. The method extracts the semantic vector of the first medical record, the potential symptom vector corresponding to the symptomatic medication information in the medical record, and the joint semantic vector of the medical record document. The semantic vector of the first medical record, the potential symptom vector of the medical record, and the joint semantic vector of the medical record document are then fused to obtain a feature vector containing all semantic information associated with the symptoms in the medical record. When the missing symptom information in the medical record document is finally detected based on the feature vectors of all medical records in the medical record document, the missing symptom information in the medical record document can be detected more accurately.
[0085] Next, combine Figure 5 Further explanation of the extraction of joint semantic vectors of medical records can be understood Figure 5 The method 500 shown is a specific implementation of step S403 in the method 400 above, so the above is combined with Figure 4 The description of can be applied here similarly. Figure 5 As shown, the method 500 includes steps S501 to S504.
[0086] First, in step S501, the medical records are fed into a trained BERT model to obtain a sequence of context vectors for each medical record. Next, in step S502, the CLS vectors from the context vector sequence are extracted as the overall semantic vector for each medical record. Furthermore, in step S503, the overall semantic vector for each medical record is fed into a trained Transformer model to obtain a semantic vector for each medical record that incorporates the semantic information from other medical records.
[0087] It should be noted that the above steps S501 to S503 are similar to or identical to steps S201 to S203 in the above method 200, respectively. For details, please refer to the relevant description above and will not be repeated here.
[0088] Finally, in step S504 , the semantic vectors of all medical records in the medical record document are average pooled to obtain a joint semantic vector of the medical record document.
[0089] For ease of understanding, average pooling can be expressed as:
[0090] c global =MeanPooling([c1,c2,…,c n ])
[0091] Among them, c global Represents the joint semantic vector of the medical record document. MeanPooling, as the name implies, means average pooling. c1~c nRepresents the semantic vector of each medical record that incorporates the semantic information of other medical records.
[0092] Combination of the above Figure 5 The extraction of joint semantic vectors of medical records is explained in detail. By averaging the semantic vectors of each medical record that integrates the semantic information of other medical records, the joint semantic vector of the medical record is obtained, which can further improve the completeness and accuracy of detecting missing symptom information in medical records.
[0093] Next, combine Figure 6 Explain the training of the model so that you can understand Figure 6 The method 600 for detecting symptom information omission in some embodiments of the present application is a supplement or extension of the above method 100, so the above method 600 is combined with the above method 100. Figure 1 The description of can be applied here similarly. Figure 5 As shown, method 600 includes step S601 and step S608.
[0094] It should be noted that the embodiments of this application train the BERT model, Transformer model, and target classifier as a whole model, rather than training them separately. Its role is to enhance the consistency of the various semantic vector representations, improve the generalization ability and robustness of the model, and optimize training efficiency and convergence speed.
[0095] The method 600 of this embodiment is the training step of the overall model.
[0096] First, in step S601, a medical record document to be trained is obtained, wherein a specific medical record in the medical record document is annotated with missing symptoms. In some embodiments, the specific medical record is the first medical record in the medical record document. In other embodiments, the specific medical record may be another medical record in the medical record document, such as the second medical record. This embodiment does not limit this, and those skilled in the art may select the specific medical record at their discretion.
[0097] To further identify missing symptoms in a specific medical record, the following preprocessing operations can be performed: Named Entity Recognition is performed on the specific medical record to extract the entity set of explicit positive symptoms in the specific medical record. The explicit positive symptoms in the specific medical record are then masked, using the explicit positive symptoms in this entity set as a benchmark. The masked explicit positive symptoms in the specific medical record are then marked as missing symptoms in the specific medical record. This annotation method employed in this embodiment eliminates the tedious manual annotation process and the resulting annotation errors.
[0098] In some embodiments, the proportion of the mask for a specific course record can be preset, and then the explicit positive symptoms in the specific course record are randomly masked.
[0099] It should be noted that the explicit positive symptom entity set is taken as a benchmark here, aiming to ensure that only the explicit positive symptoms in the specific course record are masked, avoiding the misclassification of non-symptom content into the mask range.
[0100] Subsequently, in step S602, the course records of the medical record documents to be trained are input into the BERT model to obtain the context vector sequence of the course records. In step S603, the CLS vector in the context vector sequence is extracted as the overall semantic vector of the course record. Further in step S604, the overall semantic vector of each course record is input into the Transformer model to obtain the semantic vector of each course record fused with the semantic information of other course records. In step S605, the semantic vector of the first course record is extracted from the semantic vector of each course record. Then in step S606, the latent symptom vector corresponding to the drug information for the symptom in the course record is extracted. The extraction of the latent symptom vector can refer to the description of the method 300 described above, which will not be repeated here. Further in step S607, the semantic vector of the first course record and the latent symptom vector of the course record are fused to obtain the feature vector of the course record. Similarly, the specific implementation of this step S607 can also refer to the corresponding description above, which will not be repeated here. Finally in step S608, the feature vectors of all course records in the medical record document are input into the target classifier to predict the missing symptoms labeled by the specific course record. Thus, the joint training of the BERT model, the Transformer model and the target classifier is realized. It can be understood that the training of the overall model can be performed in a loop of the above steps S601 to S608 until the overall model converges or meets the requirements of accurately detecting the missing symptom information in the medical record document.
[0101] In some embodiments, the target classifier can adopt a linear layer, which is represented as:
[0102]
[0103] wherein, represents the probability that the i-th candidate symptom of the prediction output is missed, σ represents the Sigmoid activation function, W represents the weight matrix of the linear classifier, g represents the feature vector of the course record, b represents the bias, i represents the index of the candidate symptom, and K represents the number of candidate symptom categories.
[0104] Further, in some embodiments, the loss function of the overall model adopts:
[0105]
[0106] wherein, represents a loss value, K represents a number of candidate symptom categories, y i = 1 indicates that the ith symptom in the medical record is "missing but actually exists" y i = 0 indicates that the ith symptom in the medical record is "no missing", represents the probability that the ith candidate symptom is missing.
[0107] It can be understood that if the detection method of the method 400 is used, the training step needs to be performed after step S604 of the method 600, and further average pooling is performed on the semantic vectors of all medical records in the medical record document to obtain a joint semantic vector of the medical record document. In addition, step S607 is modified as follows: the semantic vector of the first medical record, the latent symptom vector of the medical record, and the joint semantic vector of the medical record document are fused to obtain the feature vector of the medical record.
[0108] The above is combined Figure 6 The training of the model is described in detail in general. The BERT model, the Transformer model and the target classifier are trained as a whole model, without separate training, thereby enhancing the consistency of various semantic vector representations, improving the generalization ability and robustness of the model, optimizing the training efficiency and convergence speed, and finally further improving the completeness and accuracy of the detection of missing symptom information in the medical record document.
[0109] Some embodiments of the present application also provide an example structure block diagram of a processing device for a method of detecting missing symptom information as shown in Figure 7 As shown in Figure 7 The processing device 700 can include a processor 701 and a memory 702. The memory 702 stores an executable program, and the processor 701 can load and execute the executable program, so that the processing device 700 implements any method step described above.
[0110] In one example scenario, the memory 702 can be controlled by using the processor 701. Further, the processor 701 can be a central processing unit (CPU), an application processor (AP), etc. integrated in the processing device 700; and the memory 702 as hardware for realizing the storage function can be a read-only memory (ROM), a dynamic RAM (DRAM), etc.
[0111] The embodiments of the present application also provide a computer readable storage medium, which stores program instructions. When the program instructions are executed by a processor of an electronic device, the processor executes at least part of each step of the above method of the present application.
[0112] In some embodiments of the present application, a computer program product is also provided, which includes a computer program or instructions, which, when executed by a processor, implement the method described in any embodiment of the present application.
[0113] The computer readable storage medium provided in some embodiments of the present application may, for example, be a U disk, but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination thereof. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more conductive wires, 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 thereof. In the present embodiment, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer readable storage medium can be transmitted in any suitable medium, including but not limited to electrical wires, optical cables, RF (Radio Frequency), and the like, or any suitable combination thereof.
[0114] The above computer readable storage medium can be embedded in or external to the processing device for the method of symptom information missing detection.
[0115] Although the embodiments of the present application have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided only by way of example. Many modifications, changes and substitutions can be made by those skilled in the art without departing from the spirit and scope of the present application. It should be understood that various alternatives to the embodiments of the present application described herein can be employed in practicing the present application. The appended claims are intended to define the scope of protection of the present application and thus cover equivalents or alternatives within the scope of these claims.
Claims
1. A method for detecting missing symptom information, characterized in that: include: Obtaining a medical record document to be tested, wherein the medical record document includes at least two medical records, and the medical records include symptom description information and symptomatic medication information; Extracting the semantic vector of the first medical record that integrates the semantic information of other medical records; Extracting the potential symptom vector corresponding to the symptomatic drug information in the medical record; fusing the semantic vector of the first medical record and the potential symptom vector of the medical record to obtain a feature vector of the medical record; The symptom information missing from the medical record document is determined based on the feature vectors of all the medical records in the medical record document.
2. The method for detecting symptom information omission according to claim 1, characterized in that: The extraction of the overall semantic vector of the first medical record that integrates the semantic information of other medical records includes: Inputting the medical record into a trained BERT model to obtain a context vector sequence of the medical record; Extracting the CLS vector from the context vector sequence as the overall semantic vector of the medical record; Inputting the overall semantic vector of each medical record into the trained Transformer model to obtain the semantic vector of each medical record that integrates the semantic information of other medical records; The semantic vector of the first medical record is extracted from the overall semantic vectors of each medical record.
3. The method for detecting symptom information omission according to claim 2, characterized in that: After inputting the overall semantic vector of each medical record into the trained Transformer model to obtain the semantic vector of each medical record that integrates the semantic information of other medical records, the method further includes: Performing average pooling on the semantic vectors of all the medical records in the medical record document to obtain a joint semantic vector of the medical record document; The fusing of the semantic vector of the first medical record and the potential symptom vector of the medical record to obtain a feature vector of the medical record includes: The semantic vector of the first medical record, the potential symptom vector of the medical record, and the joint semantic vector of the medical history document are fused to obtain a feature vector of the medical record.
4. The method for detecting symptom information omission according to claim 2, wherein: The step of extracting the potential symptom vector corresponding to the symptomatic drug information in the medical record includes: Performing named entity recognition on the symptomatic drug information in the medical record to obtain a drug entity set; Inputting the drug entity set into a trained knowledge graph embedding model to obtain an embedding vector for each drug entity in the drug entity set; The mean of the embedding vectors of the drug entities in the drug entity set is calculated to obtain the potential symptom vector corresponding to the symptomatic drug information in the medical record.
5. The method for detecting symptom information omission according to claim 4, characterized in that: The method further comprises: Constructing a drug-symptom knowledge graph, wherein the drug-symptom knowledge graph includes entities and relationships, the entities include symptoms and drugs, and the relationships include correspondences and / or therapeutic relationships between symptoms and drugs; The drug-symptom knowledge graph is input into a preset knowledge graph embedding model for training to obtain the trained knowledge graph embedding model.
6. The method for detecting symptom information omission according to claim 5, characterized in that: Determining the missing symptom information of the medical record document based on the feature vectors of all the medical records in the medical record document includes: The feature vectors of all the medical records in the medical record document are input into the trained target classifier to predict the symptom information missing from the medical record document.
7. The method for detecting symptom information omission according to claim 1, characterized in that: After determining the symptom information missing from the medical record document based on the feature vectors of all the medical records in the medical record document, the method further includes: The symptom information missing from the medical record document is added to the medical record document.
8. The method for detecting symptom information omission according to claim 6, characterized in that: The BERT model, the Transformer model, and the target classifier are regarded as an overall model, and the method further comprises: training the overall model; wherein, The training of the overall model requires the following steps: Obtaining a medical record document to be trained, wherein a specific medical course record in the medical record document is annotated with missing symptoms; Inputting the medical record of the medical record document to be trained into the BERT model to obtain a context vector sequence of the medical record; Extracting a CLS vector from the context vector sequence as the overall semantic vector of the medical record; Inputting the overall semantic vector of each medical record into the Transformer model to obtain the semantic vector of each medical record that integrates the semantic information of other medical records; Extracting the semantic vector of the first medical record from the semantic vectors of each medical record; Extracting the potential symptom vector corresponding to the symptomatic drug information in the medical record; fusing the semantic vector of the first medical record and the potential symptom vector of the medical record to obtain a feature vector of the medical record; The feature vectors of all the medical records in the medical history document are input into the target classifier to predict the missing symptoms annotated in the specific medical record.
9. The method for detecting symptom information omission according to claim 8, characterized in that: The target classifier includes a linear layer, which is expressed as: in, represents the probability that the i-th candidate symptom in the predicted output is omitted, σ represents the Sigmoid activation function, W represents the weight matrix of the linear classifier, g represents the feature vector of the medical record, b represents the bias, i represents the index of the candidate symptom, and K represents the number of candidate symptom categories; The loss function of the overall model is: in, represents the loss value, K represents the number of candidate symptom categories, y i =1 means that the ith symptom in the medical record is "missing but actually exists" i =0 means that the ith symptom in the medical record is "not missing", represents the probability that the i-th candidate symptom is omitted.
10. The method for detecting symptom information omission according to claim 8, characterized in that: The method further includes performing the following pre-processing operations on the specific medical record: performing named entity recognition on the specific medical record to extract an explicit positive symptom entity set in the specific medical record; The explicit positive symptoms in the explicit positive symptom entity set are used as a benchmark, and the explicit positive symptoms in the specific medical record are masked, wherein the masked explicit positive symptoms in the specific medical record are used as the missing symptoms marked in the specific medical record.