Large model fusion knowledge enhanced illness reasoning and medical record generation method and system
By constructing a patient state subgraph and graph neural network multi-hop reasoning, combined with information entropy and adaptive confidence gating network algorithms, the problems of retrieval noise, logical chain breaks and knowledge conflicts in the medical field of large language models are solved, generating logically rigorous and interpretable medical record texts, thus improving the accuracy and credibility of diagnosis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CENT SOUTH UNIV
- Filing Date
- 2026-03-18
- Publication Date
- 2026-06-02
AI Technical Summary
When applying large language models to the medical field, existing technologies suffer from problems such as retrieval noise interference, broken logical reasoning chains, inability to arbitrate knowledge conflicts, and lack of interpretability in medical record generation, making it difficult to meet the rigorous requirements of clinical diagnosis and treatment.
By constructing a patient state subgraph and performing multi-hop reasoning using graph neural networks, combined with information entropy and adaptive confidence gating network algorithms, dual-track parallel disease reasoning is performed to generate medical record text with accompanying evidence tracing identifiers, achieving dynamic fusion of internal and external knowledge sources and logical rigor.
It significantly improves the logical rigor and accuracy of disease reasoning and diagnosis, enhances the system's decision robustness and reliability in complex clinical scenarios, and generates medical record texts with rigorous evidence-based basis and interpretability.
Smart Images

Figure CN121862294B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and medical image analysis technology, and in particular to a method and system for disease reasoning and medical record generation based on large-scale model fusion and knowledge enhancement. Background Technology
[0002] With the rapid development of artificial intelligence technology, large language models based on the Transformer architecture have shown excellent performance in general natural language processing tasks. Currently, large language models are also being explored in the medical field to assist in disease analysis, medical record writing, and the generation of treatment suggestions. However, directly applying general large models to rigorous clinical environments still faces severe technical bottlenecks and security risks, and their application effects are difficult to meet the rigorous requirements of clinical diagnosis and treatment.
[0003] To address the above problems, existing technologies have proposed various technical solutions, but all of them have obvious drawbacks:
[0004] The first technical solution is the traditional retrieval enhancement generation technology based on vector similarity. This technology divides medical literature into text fragments and stores them in a quantized manner. When querying, it retrieves semantically similar fragments as context input to a large language model to generate answers. However, its retrieval relies on semantic matching rather than medical logical association, which can easily introduce a lot of irrelevant information, interfere with the model's attention, and the retrieval results are mostly isolated knowledge fragments, which cannot support chain reasoning from symptoms to diagnosis, resulting in insufficient logicality of the generated content.
[0005] The second technical solution relies on a large model finely tuned from massive amounts of medical data for end-to-end generation. Although it can generate fluent text, the model is essentially a probabilistic prediction, which is prone to factual errors when faced with rare diseases or complex situations, i.e., the knowledge illusion problem. At the same time, given the rapid updates in medical knowledge, the knowledge fixed in the model parameters of this solution is difficult to update in real time, resulting in a lag in diagnostic criteria.
[0006] The third technical solution uses static knowledge graphs for auxiliary queries. However, static knowledge graphs usually require structured input, making it difficult to directly understand complex natural language descriptions of illnesses. Furthermore, when external evidence retrieved from the knowledge graph conflicts with the parameterized knowledge stored within the large language model, there is a lack of effective arbitration mechanisms. Simply splicing the two together can lead to contradictory outputs, significantly reducing clinical credibility.
[0007] Therefore, how to construct a medical record generation method that can perform rigorous logical reasoning like a knowledge graph and adaptively handle conflicts between external evidence and internal knowledge is a key problem that urgently needs to be solved in the field of medical artificial intelligence. Summary of the Invention
[0008] In view of the shortcomings of the prior art, the present invention provides a method and system for disease reasoning and medical record generation based on large model fusion and knowledge enhancement, in order to solve the problems of large retrieval noise interference, broken logical reasoning chain, inability to arbitrate knowledge conflicts, and lack of interpretability in the medical record generation process in the prior art.
[0009] To achieve the above objectives, the present invention adopts the following technical solution:
[0010] In a first aspect, the present invention provides a method for large-scale model fusion knowledge-enhanced disease reasoning and medical record generation, including:
[0011] Acquire the patient's multimodal medical data and preprocess the medical data;
[0012] Based on a pre-built medical entity recognition model, feature extraction is performed on pre-processed medical data to obtain word vectors of the medical data, and medical entity recognition is performed based on the word vectors. The recognized entities are linked to a predefined medical knowledge base to establish a patient state subgraph.
[0013] Topological analysis and multi-hop reasoning are performed on the patient state subgraph based on graph neural networks to obtain a set of diagnostic candidates and a corresponding set of reasoning evidence chains.
[0014] Based on the preprocessed medical data and the set of inference evidence chains, dual-track parallel disease inference is performed to generate an inner track disease probability distribution and an outer track disease probability distribution, and the inner track disease probability distribution and the outer track disease probability distribution are weighted and fused to obtain an optimized disease inference probability distribution.
[0015] The parallel disease reasoning includes internal disease reasoning based on preprocessed medical data using a large language model and external disease reasoning based on the set of reasoning evidence chains.
[0016] Based on the optimized disease inference probability distribution and the inference evidence chain set, a patient medical record text with an evidence tracing identifier is generated.
[0017] In one optional implementation, based on a pre-built medical entity recognition model, feature extraction is performed on the preprocessed medical data to obtain word vectors of the medical data. Medical entity recognition is then performed based on the word vectors, and the identified entities are linked to a predefined medical knowledge base to establish a patient state subgraph. Specifically, this includes the following steps:
[0018] Based on a pre-built medical entity recognition model, pre-processed medical data is encoded to obtain word vectors of the medical data, and medical entity recognition is performed based on the word vectors to establish a set of medical entities.
[0019] Calculate the query vector of each medical entity in the medical entity set, and the semantic similarity and type matching degree with the standard concept vector in the predefined medical knowledge base, and generate a link confidence score based on the semantic similarity and type matching degree;
[0020] Based on the link confidence score corresponding to each medical entity in the medical entity set, the target standard concept linked to the medical entity is determined, the target standard concept is mapped to the global medical knowledge graph of the medical knowledge base, the anchor node corresponding to the medical entity is obtained, and the anchor node set is constructed.
[0021] The anchor node is the corresponding node of the target standard concept in the global medical knowledge graph; the anchor node includes symptom nodes, examination result nodes, drug nodes, and disease nodes;
[0022] Starting with each symptom node and examination result node in the anchor node set, a multi-hop traversal is performed in the global medical knowledge graph to obtain candidate associated nodes and relationship edges.
[0023] Calculate the semantic affinity between each candidate associated node and the word vector of the medical data, and filter them based on the semantic affinity and the preset weight of the relation edges to obtain the filtered candidate associated nodes and relation edges, so as to establish a patient state subgraph.
[0024] In one optional implementation, based on a pre-built medical entity recognition model, the preprocessed medical data is encoded to obtain word vectors of the medical data, and medical entity recognition is performed based on the word vectors to establish a medical entity set, specifically including the following steps:
[0025] The pre-processed medical data is then input into a pre-built medical entity recognition model.
[0026] The medical entity recognition model includes an encoder and a decoder; the decoder includes a feature extraction layer and a label decoding layer.
[0027] According to the encoder, the preprocessed medical data is vectorized to obtain word vectors of the medical data, and a context-related word vector sequence is established.
[0028] Based on the feature extraction layer, the context features of each word vector position are extracted from the word vector sequence, and an enhanced feature sequence is generated;
[0029] Based on the label decoding layer, a transition probability distribution between medical entity labels is constructed to globally decode the enhanced feature sequence and output the medical entity category label sequence with the optimal probability.
[0030] Based on the category label sequence, medical entities are extracted from the medical data, medical entity vectors are generated based on the medical entities, and a set of medical entities is established.
[0031] In an optional implementation, topological analysis and multi-hop reasoning are performed on the patient state subgraph based on a graph neural network to obtain a diagnostic candidate set and a corresponding set of reasoning evidence chains, specifically including the following steps:
[0032] Based on the word vectors of the medical data, the attention weights of each relation edge in the patient state subgraph are adjusted through a graph neural network to obtain a weighted patient state subgraph.
[0033] On the weighted patient state subgraph, starting with the symptom node in the patient state subgraph, multi-hop reasoning is performed based on the beam search strategy to obtain candidate diagnostic entities and the reasoning path corresponding to the candidate diagnostic entities.
[0034] Based on the structure-semantic dual verification scoring algorithm, the comprehensive confidence of each candidate diagnostic entity relative to the starting node is calculated respectively;
[0035] Candidate diagnostic entities are screened and sorted based on the comprehensive confidence level to generate a diagnostic candidate set, and the complete reasoning path of each candidate diagnostic entity in the diagnostic candidate set is extracted to form a set of reasoning evidence chains.
[0036] In an optional implementation, based on the preprocessed medical data and the set of inference evidence chains, dual-track parallel disease inference is performed to generate an inner-track disease probability distribution and an outer-track disease probability distribution, respectively. The inner-track disease probability distribution and the outer-track disease probability distribution are then weighted and fused to obtain an optimized disease inference probability distribution. The specific steps include the following:
[0037] Based on a predefined large language model, disease inference is performed on preprocessed medical data to obtain the probability distribution of the disease within the framework, and the corresponding first context semantic vector is extracted.
[0038] The set of reasoning evidence chains is converted into natural language, and the converted set of reasoning evidence chains is input into a pre-trained evidence encoder for disease reasoning to obtain the outer path disease probability distribution and extract the corresponding second context semantic vector.
[0039] Based on the information entropy algorithm, the uncertainty entropy values of the probability distribution of the disease in the inner track and the probability distribution of the disease in the outer track are calculated respectively to obtain the first uncertainty entropy value and the second uncertainty entropy value.
[0040] Based on the adaptive confidence-gated network algorithm, the dynamic fusion weight coefficients are calculated according to the first context semantic vector, the second context semantic vector, the first uncertainty entropy value, and the second uncertainty entropy value.
[0041] Based on the dynamic fusion weight coefficient, the probability distributions of the inner track and the outer track are fused to obtain the optimized probability distribution for disease inference.
[0042] In an optional implementation, the functional expression of the dynamic fusion weight coefficients is:
[0043] ;
[0044] In the formula, For dynamic fusion weighting coefficients; Use the Sigmoid activation function; This is the first uncertainty entropy value; This is the second uncertainty entropy value; This is a temperature coefficient used to adjust the sensitivity of the gating network to entropy differences; This is the gated weight matrix; This is the first context semantic vector; This is the second context semantic vector.
[0045] In an optional implementation, based on the optimized disease inference probability distribution and the set of inference evidence chains, a patient medical record text with an evidence tracing identifier is generated, specifically including the following steps:
[0046] A1. Based on a pre-built medical record template library, retrieve and match the corresponding standard medical record template according to the department information in the medical data;
[0047] A2. The reasoning paths in the set of reasoning evidence chains are pre-filled and organized according to the structure of the standard medical record template, and a structured generation prompt is constructed based on the pre-filled content.
[0048] A3. Based on the optimized disease inference probability distribution and structured generation prompts, decode according to the attention-guided anchor injection decoding method to generate medical record text, and insert reference identifiers for key medical entities during the generation process;
[0049] A4. Based on a pre-trained discriminant model, verify whether there is a logical contradiction between the semantics of the text fragments with reference identifiers and the anchor nodes they reference in the medical record text.
[0050] If a logical contradiction exists, return to step A3 and regenerate the corresponding medical record text;
[0051] If there is no logical contradiction, proceed to step A5;
[0052] A5. Process the verified medical record text to generate both a visual medical record document and machine-readable data.
[0053] In an optional implementation, step A3 involves decoding according to the attention-guided anchor injection decoding method, specifically including the following steps:
[0054] Based on the optimized disease inference probability distribution and structured generation prompts, the text is decoded using a preset text decoder to generate medical record text.
[0055] During the generation of the medical record text, the attention weight distribution of the text decoder to the anchor nodes in the inference evidence chain set is obtained in real time. When it is detected that the currently generated word sequence constitutes a key medical entity, the source tracing verification mechanism is triggered.
[0056] The source tracing and verification mechanism includes the following steps:
[0057] Calculate the cumulative attention of the key medical entity to each anchor node;
[0058] Determine whether the accumulated attention exceeds a preset attention threshold:
[0059] If the number of references exceeds the limit, a reference identifier pointing to the corresponding anchor node will be forcibly inserted after the text position corresponding to the key medical entity to form a text fragment with a reference anchor.
[0060] If the number of terms does not exceed the limit, the insertion of the reference identifier will not be performed, and the generation of subsequent lexical sequences will continue.
[0061] Secondly, this invention provides a large-scale model-integrated knowledge-enhanced disease reasoning and medical record generation system, comprising:
[0062] The data sensing module is used to acquire the patient's multimodal medical data and preprocess the medical data;
[0063] The graph construction module is used to extract features from preprocessed medical data based on a pre-built medical entity recognition model, obtain word vectors of the medical data, and perform medical entity recognition based on the word vectors. The recognized entities are then linked to a predefined medical knowledge base to establish a patient state subgraph.
[0064] The diagnostic reasoning module is used to perform topological analysis and multi-hop reasoning on the patient state subgraph based on a graph neural network to obtain a set of diagnostic candidates and a corresponding set of reasoning evidence chains.
[0065] The dual-track fusion module is used to perform dual-track parallel disease reasoning based on preprocessed medical data and the set of reasoning evidence chains, so as to generate an inner track disease probability distribution and an outer track disease probability distribution respectively, and to perform weighted fusion of the inner track disease probability distribution and the outer track disease probability distribution to obtain an optimized disease reasoning probability distribution.
[0066] The dual-track parallel disease reasoning includes inner-track disease reasoning based on preprocessed medical data using a large language model and outer-track disease reasoning based on the set of reasoning evidence chains.
[0067] The medical record generation module is used to generate patient medical record text with evidence tracing identifiers based on the optimized disease inference probability distribution and the inference evidence chain set.
[0068] The beneficial effects of the embodiments provided by the present invention include:
[0069] This invention constructs a patient state subgraph and performs multi-hop reasoning using a graph neural network, enabling the extraction of a complete chain of evidence consistent with pathophysiology from discrete symptoms. This overcomes the shortcomings of traditional vector retrieval, which relies solely on semantic similarity, resulting in high retrieval noise and broken logical chains. It significantly improves the logical rigor and accuracy of disease reasoning and diagnosis.
[0070] This invention introduces an information entropy-based knowledge conflict resolution algorithm and an adaptive confidence gating network algorithm, which can dynamically evaluate and integrate the probability distribution of knowledge within a large language model and the probability distribution of external graph evidence. This effectively solves the problem of lack of intelligent arbitration when internal and external knowledge sources conflict, thereby significantly suppressing knowledge illusions in diagnostic conclusions and improving the robustness and reliability of the system in complex clinical scenarios.
[0071] The evidence-based generation and anchor constraint mechanism adopted in this invention can constrain the model to synchronously associate and annotate supporting anchor nodes in the underlying knowledge graph when generating key medical diagnostic conclusions. Moreover, the generated medical records support interactive evidence tracing, effectively realizing the transparency of the generation process and the verifiability of the conclusions. This fundamentally improves the black box problem of the opaque and difficult-to-trace generation process of traditional large models, enabling the generated medical record text to have rigorous evidence-based basis, and significantly improving the interpretability, credibility, and doctors' willingness to adopt the output results in the clinical environment. Attached Figure Description
[0072] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings.
[0073] Figure 1 A flowchart illustrating the cross-site brain imaging disease diagnosis method based on multimodal fusion in the embodiments of this specification is shown.
[0074] Figure 2 A schematic diagram of the structure of a cross-site brain imaging disease diagnosis system based on multimodal fusion, as shown in an embodiment of this specification, is illustrated. Detailed Implementation
[0075] The features and exemplary embodiments of various aspects of the present invention will now be described in detail. In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the invention. However, it will be apparent to those skilled in the art that the invention may be practiced without requiring some of these specific details. The following description of embodiments is merely intended to provide a better understanding of the invention by illustrating examples of the invention.
[0076] In some of the processes described in the specification, claims, and accompanying drawings of this invention, multiple operations appear in a specific order. However, it should be clearly understood that these operations may not be performed in the order they appear herein, or they may be performed in parallel. The operation numbers, such as S1, S2, etc., are merely used to distinguish different operations and do not themselves represent any execution order. Furthermore, these processes may include more or fewer operations, and these operations may be performed sequentially or in parallel.
[0077] Example 1
[0078] like Figure 1 As shown, this embodiment provides a method for disease diagnosis reasoning and medical record generation based on large-scale model fusion and knowledge enhancement, including:
[0079] S1. Acquire the patient's multimodal medical data and preprocess the medical data;
[0080] In some embodiments, a patient’s multimodal medical data includes structured medical data and unstructured medical data;
[0081] Structured medical data includes, but is not limited to, basic patient information, vital sign records, and electronic medical records.
[0082] Unstructured medical data includes, but is not limited to, patient complaints, text information transcribed from doctors' dictated recordings, and examination reports after OCR recognition;
[0083] Specifically, the preprocessing process includes noise reduction, standardization, data anonymization, and data cleaning.
[0084] For example, irrelevant symbols and garbled characters are removed from text data, image data is normalized and enhanced, time-series data is interpolated and smoothed, and privacy entity recognition models are used to mask or generalize sensitive information such as names and ID numbers to ensure data quality and security compliance.
[0085] S2. Based on the pre-built medical entity recognition model, feature extraction is performed on the pre-processed medical data to obtain word vectors of the medical data, and medical entity recognition is performed based on the word vectors. The recognized entities are linked to a predefined medical knowledge base to establish a patient state subgraph.
[0086] For example, step S2 specifically includes the following steps:
[0087] S201. Based on a pre-built medical entity recognition model, the pre-processed medical data is encoded to obtain word vectors of the medical data, and medical entity recognition is performed based on the word vectors to establish a medical entity set.
[0088] In some embodiments, step S201 specifically includes the following steps:
[0089] S2011. Input the preprocessed medical data into the pre-built medical entity recognition model;
[0090] The medical entity recognition model includes an encoder based on the Transformer architecture and a decoder based on the bidirectional long short-term memory network-conditional random field architecture; the decoder includes a feature extraction layer built on the bidirectional long short-term memory network and a label decoding layer built on the conditional random field.
[0091] S2012. According to the encoder, the preprocessed medical data is vectorized to obtain word vectors of the medical data, and a context-related word vector sequence is established.
[0092] In order to capture long-distance dependencies in medical text data, this embodiment introduces a relative position encoding mechanism to ensure that the generated word vectors can accurately reflect the modification relationship between negative words and symptoms, providing high-fidelity feature representation for subsequent entity extraction.
[0093] S2013. Based on the feature extraction layer, extract the context features of each word vector position from the word vector sequence and generate an enhanced feature sequence;
[0094] S2014. Based on the label decoding layer, construct the transition probability distribution between medical entity labels to globally decode the enhanced feature sequence and output the medical entity category label sequence with the optimal probability.
[0095] In this embodiment, the label decoding layer models the transition probabilities between label states using conditional random fields. By solving for the global optimal path, it achieves global optimization decoding of the label sequence. It can effectively identify and extract complex nested entities by synergistically utilizing the semantic information of the context and the structural constraints between labels. It then parses these entities into structured semantic units such as attributes, locations, properties, and core symptoms, forming a medical entity set. This significantly improves the completeness and accuracy of entity extraction, providing a high-quality entity information foundation for subsequent medical relationship extraction, knowledge graph construction, and clinical decision support.
[0096] For example, persistent retrosternal squeezing pain, a medical entity with a complex nested structure and long-distance dependencies, can be resolved sequentially by attribute, location, nature, and core symptom as persistent (attribute), retrosternal (location), squeezing (nature), and pain (core symptom).
[0097] In some embodiments, the Conditional Random Field model mathematically models the log-likelihood function of the label sequence using the following conditional probability function. By maximizing this log-likelihood function, the medical entity recognition model can automatically learn the complex patterns of medical entity composition from the labeled data, thereby significantly improving the recognition accuracy and structural consistency of long entities and nested entities.
[0098] Given an input augmented feature sequence S and its corresponding ground truth label sequence The functional expression for its conditional probability is:
[0099] ;
[0100] In the formula, is the conditional probability function of the conditional random field model; These are real medical entity label sequences; To enhance the feature sequence; The set of all possible label sequences; is the candidate tag sequence; n is the sequence length; i is the current position index of the word in the sequence; The i-th word is predicted as a label The launch score; The i-th word is predicted as a label The launch score; For from the tag Transfer to label The transition probability score; For from the tag Transfer to label The transition probability score; It is a natural exponential function.
[0101] S2015. Based on the category label sequence, extract medical entities from the medical data, generate medical entity vectors based on the medical entities, and establish a medical entity set;
[0102] S202. Calculate the query vector of each medical entity in the medical entity set, and the semantic similarity and type matching degree with the standard concept vector in the predefined medical knowledge base, and generate a link confidence score based on the semantic similarity and type matching degree.
[0103] Among them, the predefined medical knowledge base is a large-scale authoritative medical knowledge base, such as the Unified Medical Language System UMLS or the Systematic Medical Clinical Terminology SNOMED CT;
[0104] Specifically, for each medical entity, the local context word vectors at the corresponding positions of the medical entity are extracted based on the word vector sequence, and a query vector for the medical entity is generated based on the medical entity vector and the corresponding context word vectors.
[0105] In this embodiment, the functional expression for the link confidence score is:
[0106] ;
[0107] In the formula, is the confidence scoring function for entity links; m is the medical entity; c is the standard concept in the medical knowledge base; The query vector for medical entities; β is the definition vector of the standard concept c; β is an adjustable type constraint factor. (·) is a type matching indicator function, which takes the value of 1 when the predicted type of the medical entity matches the semantic type of the standard concept, and 0 otherwise; To calculate the query vector Compared with standard concept vectors The cosine semantic similarity between them is used to measure the semantic closeness between them in the vector space; The semantic type of the medical entity; The semantic type of the standard concept;
[0108] Among them, the link confidence score effectively solves the common problems of abbreviation ambiguity and polysemy in medical texts by integrating deep semantic information and strong type constraints. For example, for the English abbreviation AP, in the cardiovascular context, it will be accurately linked to the standard concept of angina pectoris because its type matches the symptoms of angina pectoris and has a high semantic similarity; while in the physiological context, it will be linked to the standard concept of action potential because its type matches the electrophysiological phenomenon and has a high semantic similarity.
[0109] S203. Based on the link confidence score corresponding to each medical entity in the medical entity set, determine the target standard concept linked to the medical entity, map the target standard concept to the global medical knowledge graph of the medical knowledge base, obtain the anchor node corresponding to the medical entity, and construct the anchor node set.
[0110] Anchor nodes are the corresponding nodes of the target standard concept in the global medical knowledge graph; the anchor nodes include symptom nodes, examination result nodes, drug nodes, and disease nodes.
[0111] S204. Starting from each symptom node and examination result node in the anchor node set, perform a multi-hop traversal in the global medical knowledge graph to obtain candidate associated nodes and relationship edges.
[0112] S205. Calculate the semantic relevance of each candidate associated node to the word vector of the medical data, and filter them based on the semantic relevance and the preset weight of the relation edge to obtain the filtered candidate associated nodes and relation edges, so as to establish a patient state subgraph.
[0113] Specifically, to avoid blindly expanding the entire graph and causing the subgraph to explode in size and introduce too much noise, this embodiment adopts a relevance pruning strategy. That is, during the expansion process, the preset weight of the graph relation edges is considered. The semantic relevance of the candidate associated nodes to the word vectors of the patient's chief complaint information is calculated, and a relevance threshold is set to filter the nodes so as to retain the associated nodes that are highly semantically relevant to the current medical context.
[0114] The expression for the patient state subgraph is:
[0115] ;
[0116] ;
[0117] In the formula, This is a subgraph representing the patient's state. The set of nodes in the patient state subgraph; The set of edges of the patient state subgraph; Candidate nodes in the global knowledge graph; For a predefined global medical knowledge graph; Anchor node; For the set of anchor nodes; For nodes The shortest path distance to node u in the graph; The preset maximum number of extended jumps; This is a function for calculating semantic similarity. For nodes The embedding vector; Word vectors for patient chief complaint information; This is the semantic relevance threshold; These are logical operators.
[0118] In this embodiment, the patient state subgraph includes not only the patient's explicit symptoms and examination indicator nodes, but also potentially implicitly related nodes that are highly semantically and logically related, such as potential diseases corresponding to symptoms, commonly used treatment drugs, and complications that need to be investigated. At the same time, it effectively eliminates medical noise that is irrelevant to the current patient's condition context. The patient-specific state subgraph with high signal-to-noise ratio and rich semantic information provides a solid data foundation for subsequent dynamic graph reasoning and dual-track knowledge fusion.
[0119] S3. Perform topological analysis and multi-hop reasoning on the patient state subgraph based on graph neural network to obtain a diagnostic candidate set and a corresponding set of reasoning evidence chains;
[0120] For example, step S3 specifically includes the following steps:
[0121] S301. Based on the word vectors of the medical data, the attention weights of each relation edge in the patient state subgraph are adjusted through a graph neural network to obtain a weighted patient state subgraph.
[0122] Specifically, in this embodiment, the word vector of the patient's chief complaint information is used as the query vector, and the relation vector corresponding to each relation edge in the patient state subgraph is used as the key vector. The attention weight of each edge under the current diagnostic task is dynamically calculated and adjusted through a context-aware graph attention network to achieve dynamic alignment between the graph logical focus and the current condition.
[0123] S302. On the weighted patient state subgraph, taking the symptom node in the patient state subgraph as the starting node, multi-hop reasoning is performed based on the beam search strategy to obtain the candidate diagnostic entity and the reasoning path corresponding to the candidate diagnostic entity.
[0124] Specifically, this embodiment starts with all symptom nodes in the patient state subgraph and performs multi-hop energy propagation and path search on the weighted patient state subgraph. In order to deal with the path combination explosion problem, this embodiment adopts a beam search strategy, which retains only the top k intermediate nodes with the highest cumulative scores when expanding each hop, so as to significantly reduce the computational complexity while ensuring the inference accuracy.
[0125] In some embodiments, a logic loop detection mechanism may be introduced to automatically identify and remove circular reasoning paths, ensuring that the generated reasoning paths conform to the structure of a directed acyclic graph.
[0126] S303. Based on the structure-semantic dual verification scoring algorithm, calculate the comprehensive confidence of each candidate diagnostic entity relative to the starting node;
[0127] The functional expression for the overall confidence level is as follows:
[0128] ;
[0129] In the formula, This is the comprehensive confidence score function for candidate diagnostic entities; Candidate diagnostic nodes; Description of the patient's condition; Hyperparameters used to balance semantic relevance and structural reachability weights; Candidate diagnostic nodes Vector representation of; Description of the patient's condition Vector representation of; For symptoms or test results; This is the collection of all symptom and examination result nodes extracted from the patient's description; This is a reasoning path from node s to node d; It is the set of all feasible paths; Length of the reasoning path The normalization function; The symbol for multiplication; For path One edge on; For the edge The weight.
[0130] S304. Based on the comprehensive confidence level, the candidate diagnostic entities are screened and sorted to generate a diagnostic candidate set, and the complete reasoning path of each candidate diagnostic entity in the diagnostic candidate set is extracted to form a set of reasoning evidence chains.
[0131] Specifically, in this embodiment, after screening and sorting, a diagnostic candidate set is generated, and one or more key reasoning paths are extracted from each candidate diagnostic entity in the diagnostic candidate set to form a set of reasoning evidence chains. This allows each reasoning evidence chain to be formatted as a complete directed path from symptoms through intermediate medical concepts to diagnosis, serving as a structured external knowledge context to support subsequent decision generation and result interpretation.
[0132] S4. Based on the preprocessed medical data and the set of inference evidence chains, perform dual-track parallel disease inference to generate an inner track disease probability distribution and an outer track disease probability distribution respectively. Then, perform weighted fusion of the inner track disease probability distribution and the outer track disease probability distribution to obtain an optimized disease inference probability distribution.
[0133] In this embodiment, a dual-track game and fusion mechanism based on uncertainty measurement is designed to dynamically adjust the weight of internal and external information sources in the final decision based on their real-time confidence levels, thereby achieving evidence-based and accurate diagnostic conclusions and solving the potential knowledge conflict problem between the internal parameter knowledge of the large language model and the external graph retrieval evidence.
[0134] For example, step S4 specifically includes the following steps:
[0135] S401. Based on a predefined large language model, perform disease reasoning on the preprocessed medical data to obtain the internal disease probability distribution and extract the corresponding first context semantic vector.
[0136] Among them, the predefined large language model is a large language model with frozen relevant parameters;
[0137] Specifically, this embodiment freezes the relevant parameters of the large language model, inputs only the patient's original description of the condition, and uses the model's powerful language understanding and common sense reasoning ability to generate a prior probability distribution based on the hidden layer state, namely the inner orbit condition probability distribution, to reflect the large language model's intuitive judgment of the condition based solely on its own parameter knowledge. Furthermore, the first context semantic vector corresponding to the inner orbit condition probability distribution is extracted based on a specific network layer of the large language model.
[0138] S402. Perform natural language conversion on the set of reasoning evidence chains, input the converted set of reasoning evidence chains into a pre-trained evidence encoder for disease reasoning, obtain the outer path disease probability distribution, and extract the corresponding second context semantic vector.
[0139] Specifically, in this embodiment, the set of reasoning evidence chains is transformed into a natural language description, which is then input into a specially pre-trained evidence encoder. The evidence encoder maps the structured evidence into a high-dimensional vector representation and generates a posterior probability distribution based on external evidence, namely the external path disease probability distribution. At the same time, the second context semantic vector corresponding to the external path disease probability distribution is obtained.
[0140] S403. Based on the information entropy algorithm, calculate the uncertainty entropy values of the inner track disease probability distribution and the outer track disease probability distribution respectively, so as to obtain the first uncertainty entropy value and the second uncertainty entropy value.
[0141] Specifically, this embodiment introduces information entropy as a benchmark for measuring the uncertainty of probability distribution. For a probability distribution on a vocabulary, its information entropy is defined as the flatness of the distribution; that is, the higher the entropy value, the more uniform the distribution and the more uncertain the information source; the lower the entropy value, the more concentrated the distribution and the higher the confidence of the information source. The system calculates the entropy values of the inner track disease probability distribution and the outer track disease probability distribution respectively to obtain the first uncertainty entropy value and the second uncertainty entropy value.
[0142] S404. Based on the adaptive confidence gating network algorithm, calculate the dynamic fusion weight coefficient according to the first context semantic vector, the second context semantic vector, the first uncertainty entropy value and the second uncertainty entropy value;
[0143] Specifically, this embodiment uses a differentiable adaptive confidence gating network, taking the difference between the first and second uncertainty entropy values and the first and second context semantic vectors as inputs, to dynamically calculate a scalar gating coefficient, which is used to control the proportion of external evidence adopted in the final output conclusion;
[0144] In this embodiment, the adaptive confidence gating network algorithm ensures that subsequent decisions are not only based on the statistical uncertainty of the information source, but also incorporate specific semantic context information, thereby simulating a more intelligent arbitration logic.
[0145] In some embodiments, the functional expression for the dynamically fused weight coefficients is:
[0146] ;
[0147] ;
[0148] In the formula, Use the Sigmoid activation function; For dynamic fusion weighting coefficients; This is the first uncertainty entropy value; This is the second uncertainty entropy value; This is a temperature coefficient used to adjust the sensitivity of the gating network to entropy differences; This is the gated weight matrix; This is the first context semantic vector; This is the second context semantic vector; The information entropy function; It is a probability distribution; These are the lexical units in the vocabulary list; A vocabulary for a language model; as a word element In distribution The probability of it.
[0149] S405. Based on the dynamic fusion weight coefficient, the probability distribution of the inner track disease and the probability distribution of the outer track disease are fused to obtain the optimized disease inference probability distribution.
[0150] Specifically, after calculating the dynamic fusion weight coefficients, this embodiment performs weighted fusion at the probability distribution level to generate the final optimized disease inference probability distribution, thereby achieving adaptive resolution of knowledge conflicts. When the internal knowledge of the model is certain but the external evidence is chaotic, it tends to rely on the internal disease probability distribution; when the internal knowledge of the model is uncertain but the external evidence is conclusive, it can force the adoption of the external disease probability distribution.
[0151] The optimized function expression for the probability distribution of disease inference is as follows:
[0152] ;
[0153] In the formula, This represents the final probability distribution after fusion. t represents the lexical units of the candidate diagnostic entities predicted at the current time step; t represents the time step. This refers to the inference context that was generated before the current moment.
[0154] S5. Generate patient medical record text with evidence tracing identifier based on the optimized disease inference probability distribution and the inference evidence chain set;
[0155] This embodiment uses a structured decoding framework based on anchor point constraints, which forces the decoder to generate reference tags pointing to the supporting nodes of the knowledge graph when outputting key medical entities. This ensures that the generated medical records meet the requirements of evidence-based medicine, where every word and sentence has a source and is supported by evidence.
[0156] For example, step S5 specifically includes the following steps:
[0157] S501. Based on the pre-built medical record template library, retrieve and match the corresponding standard medical record template according to the department information in the medical data;
[0158] Specifically, in this embodiment, based on the input patient's basic information, a standard medical record template that conforms to the department's document specifications is retrieved and matched from a pre-built medical record template library. Among them, medical records from different departments have completely different structures and usually follow clinical record principles such as SOAP (Subjective, Objective, Assessment, Plan). For example, medical records include subjective information, objective information, assessment, and plan to ensure the structural compliance of the generated medical records.
[0159] S502. The reasoning paths in the set of reasoning evidence chains are pre-filled and organized according to the structure of the standard medical record template, and a structured generation prompt is constructed based on the pre-filled content.
[0160] Specifically, in this embodiment, the set of high-confidence reasoning evidence chains is pre-filled and organized according to the logical chapters of the standard medical record template. Simultaneously, based on the pre-filled content, this embodiment constructs a structured generation prompt containing special instruction control characters to explicitly instruct the large language model to associate corresponding citation tags at appropriate positions when generating descriptions based on specific evidence. This process pre-organizes the disordered reasoning results into a sequence with a clear logical framework, significantly reducing structural errors in the subsequent decoding process.
[0161] S503. Based on the optimized disease inference probability distribution and structured generation prompts, decode according to the attention-guided anchor injection decoding method to generate medical record text, and insert reference identifiers for key medical entities during the generation process.
[0162] In some embodiments, step S503 specifically includes the following steps:
[0163] Based on the optimized disease inference probability distribution and structured generation prompts, the text is decoded using a preset text decoder to generate medical record text.
[0164] During the generation of the medical record text, the attention weight distribution of the text decoder on the anchor nodes in the inference evidence chain set is obtained in real time. When the generated word sequence is detected to constitute a key medical entity, the source tracing verification mechanism is triggered.
[0165] Specifically, the traceability and verification mechanism includes the following steps:
[0166] Calculate the cumulative attention of the key medical entity to each anchor node;
[0167] Determine whether the accumulated attention exceeds a preset attention threshold;
[0168] If the number of references exceeds the limit, a reference identifier pointing to the corresponding anchor node will be forcibly inserted after the text position corresponding to the key medical entity to form a text fragment with a reference anchor.
[0169] If the number of terms does not exceed the limit, the insertion of the reference identifier will not be performed, and the generation of subsequent lexical sequences will continue.
[0170] In this embodiment, the source tracing verification mechanism essentially calculates the alignment between the generated content and the original evidence nodes. If the alignment exceeds a preset threshold, a reference identifier is automatically inserted, thus achieving fine-grained evidence tracing without additional training.
[0171] The function for calculating cumulative attention is as follows:
[0172] ;
[0173] In the formula, This is the attention weight accumulation function; Medical entities generated for the model; For example, the evidence node j in the knowledge graph; To generate entities The set of all corresponding decoding time steps; In the decoding step l, the large language model analyzes the evidence nodes. The attention weight is f; the summation index is f; and the total number of candidate evidence nodes is F.
[0174] S504. Based on a pre-trained discriminant model, verify whether there is a logical contradiction between the semantics of the text fragment with the citation identifier and the anchor node it cites in the medical record text.
[0175] If a logical contradiction exists, return to step S503 and regenerate the corresponding medical record text;
[0176] If there is no logical contradiction, proceed to step S505;
[0177] Specifically, after generating a complete text fragment, this embodiment will start a pre-trained discriminant model to verify whether the generated text content and the attributes of the graph nodes pointed to by its reference markers are logically consistent. For example, if the generated text content states that the patient has no chest pain, but the node's attribute in the graph is chest pain (positive), the discriminant model will identify a contradiction.
[0178] S505. Process the verified medical record text to generate a visual medical record document and machine-readable data respectively.
[0179] In this embodiment, the verified medical record text is post-processed to generate two forms of data;
[0180] In a preferred embodiment, the visualized medical record document is rendered and displayed through an interactive front-end interface. In the default display mode, the reference identifier is hidden, so that the medical record text maintains a concise format that conforms to clinical reading habits. When the user triggers an interactive operation on a specific diagnostic conclusion or medical entity in the text, the front-end interface responds to the operation, dynamically highlights the corresponding text fragment, and displays the reference identifier it points to and the complete background evidence path map, thereby realizing the visualization and transparency of the diagnostic reasoning process.
[0181] In a preferred embodiment, machine-readable data is output through a preset application programming interface. The format of the output is a structured data object containing complete metadata. In this data object, each key medical entity field in the medical record text is nested and associated with a corresponding standardized medical ontology code and a knowledge graph evidence node identifier, which facilitates the hospital information system to directly perform data entry, statistical analysis and subsequent integration and utilization.
[0182] Example 2
[0183] like Figure 2 As shown, this invention provides a large-scale model fusion knowledge-enhanced disease reasoning and medical record generation system, comprising:
[0184] The data sensing module 101 is used to acquire the patient's multimodal medical data and preprocess the medical data;
[0185] The graph construction module 102 is used to extract features from preprocessed medical data based on a pre-built medical entity recognition model to obtain word vectors of the medical data, and to perform medical entity recognition based on the word vectors, linking the recognized entities to a predefined medical knowledge base to establish a patient state subgraph.
[0186] The diagnostic reasoning module 103 is used to perform topological analysis and multi-hop reasoning on the patient state subgraph based on a graph neural network to obtain a diagnostic candidate set and a corresponding set of reasoning evidence chains.
[0187] The dual-track fusion module 104 is used to perform dual-track parallel disease reasoning based on the preprocessed medical data and the inference evidence chain set, so as to generate an inner track disease probability distribution and an outer track disease probability distribution respectively, and to perform weighted fusion of the inner track disease probability distribution and the outer track disease probability distribution to obtain an optimized disease reasoning probability distribution.
[0188] The parallel disease reasoning includes internal disease reasoning based on preprocessed medical data using a large language model and external disease reasoning based on the set of reasoning evidence chains.
[0189] The medical record generation module 105 is used to generate patient medical record text with evidence tracing identifiers based on the optimized disease inference probability distribution and the inference evidence chain set.
[0190] In a specific embodiment, the complete implementation process of the diagnostic task parsing system in a specific and complex clinical application scenario—the diagnosis of complex clinical cases—is provided to clearly and concretely illustrate the collaborative working mechanism and final effect of each technical module;
[0191] In this embodiment, the system is deployed in a high-performance computing server cluster equipped with multiple NVIDIA A100 graphics processors to support real-time computation of large-scale knowledge graph reasoning and deep neural network models. The medical knowledge graph preloaded by the system integrates UMLS and CMeKG, and contains more than 5 million standardized medical entity nodes and 23 million well-defined relation edges.
[0192] Let's take a set of hypothetical emergency room patient data as an example:
[0193] Input the virtual patient's emergency medical record data into the data perception module;
[0194] The emergency room medical record data of the virtual patient included: male, 58 years old, chief complaint of persistent dull pain behind the sternum for 3 hours, accompanied by profuse sweating, hypertension for 10 years, smoking for 20 years, electrocardiogram showed ST segment elevation of 0.2mV in leads II, III, and aVF, and the initial value of troponin T (TnT) was 0.5ng / mL.
[0195] The graph construction module extracts key entities from the medical record data through a pre-trained medical entity recognition model, including retrosternal tightness and pain, hypertension, ST segment elevation, and elevated troponin T. Then, based on the pre-trained medical knowledge graph, the identified entities are linked to standard concept nodes, and the linked nodes are used as anchors to perform 2-hop expansion in the global graph. A dynamic patient state subgraph is constructed through relevance pruning.
[0196] The patient status subgraph includes candidate diagnostic nodes such as acute myocardial infarction, angina pectoris, and aortic dissection. For example, the ST segment elevation evidence node is connected to the inferior myocardial injury node, and the inferior myocardial injury node is further connected to the acute inferior myocardial infarction node, forming a complete reasoning path.
[0197] The diagnostic reasoning module initiates graph attention-based multi-hop reasoning on the patient state subgraph:
[0198] In the first round of reasoning, the system starts with ST segment elevation and troponin T elevation, and uses beam search to find high-weighted paths pointing to acute myocardial infarction.
[0199] In the second round of reasoning, the system calculates the structure-semantic comprehensive score of each candidate diagnostic node. The acute myocardial infarction node received a high score of 0.92 due to its closed-loop verified pathological chain, while the aortic dissection node received only 0.35 points due to the lack of key supporting paths.
[0200] In the process of path exploration and scoring, the system dynamically adjusts the edge weights through a graph attention network, so that the reasoning focuses on the medical logic most relevant to the current condition.
[0201] The dual-track fusion module executes the inner and outer track disease reasoning in parallel. In the inner track disease reasoning, a general large language model is used to generate a probability distribution based on the patient's original description. However, due to training data bias, its output has high uncertainty in common diseases such as gastroesophageal reflux disease. In the outer track disease reasoning, a dedicated evidence encoder generates a deterministic probability distribution strongly pointing to acute myocardial infarction based on the aforementioned reasoning evidence chain.
[0202] The system calculates the information entropy of the probability distribution of the disease in the inner track and the probability distribution of the disease in the outer track. The adaptive gating network dynamically calculates the dynamic fusion weight coefficient of 0.95, and finally generates an optimized probability distribution dominated by external evidence. When making the final decision, the system assigns 95% of the weight to the external graph evidence, thereby effectively suppressing the misdiagnosis of stomach disease generated by the internal reasoning of the large language model.
[0203] The medical record generation module generates structured medical records based on the optimized probability distribution and evidence chain. When generating the text "Preliminary diagnosis: Acute inferior wall myocardial infarction", the module detects that the decoder's cumulative attention to the acute myocardial infarction node and ST segment elevation node in the atlas exceeds the threshold, and automatically inserts a reference identifier. After the counterfactual consistency check verifies that there are no errors, the module outputs an accurate medical record with an accurate diagnosis of acute inferior wall myocardial infarction, along with complete reasoning and examination suggestions.
[0204] The medical records include hidden reference markers, interactive documents that are easy for clinical reading, and structured data containing complete SNOMEDCT codes and evidence node IDs, which can be directly integrated into hospital information systems.
[0205] Example 3
[0206] This embodiment provides an electronic device, including at least one control processor and a memory for communicatively connecting to the at least one control processor;
[0207] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0208] The non-transient software program and instructions required to implement the large-model fusion knowledge-enhanced disease reasoning and medical record generation method of the above embodiments are stored in memory. When executed by the processor, the large-model fusion knowledge-enhanced disease reasoning and medical record generation method of the above embodiments is executed. For example, the method described above is executed. Figure 1 Method steps S1 to S5;
[0209] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0210] Example 4
[0211] This embodiment provides a computer-readable storage medium storing computer-executable instructions for causing a computer to execute a method for large-model fusion knowledge-enhanced disease reasoning and medical record generation as described in Embodiment 1.
[0212] It should be noted that the computer-readable storage medium in this embodiment may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof.
[0213] More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0214] In this 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, apparatus, or device. In this embodiment, the computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable program. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof.
[0215] The computer-readable signal medium may also be any computer-readable storage medium other than a computer-readable storage medium, which can send, propagate or transmit a program for use by or in connection with an instruction execution system, apparatus or device.
[0216] The computer program contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof. The aforementioned computer-readable storage medium can be used to write a computer program for performing this embodiment in one or more programming languages or combinations thereof. These programming languages include object-oriented programming languages—such as Python, Java, and C++—and conventional procedural programming languages—such as C or similar programming languages. The program can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0217] The above description is merely a preferred embodiment of the present invention. It will be apparent to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects. The scope of the present invention is defined by the appended claims rather than the foregoing description, and thus all variations falling within the meaning and scope of the equivalents of the claims are intended to be included within the present invention.
Claims
1. A method for disease diagnosis reasoning and medical record generation based on a large-scale model fusion and knowledge enhancement, characterized in that, include: Acquire the patient's multimodal medical data and preprocess the medical data; Based on a pre-built medical entity recognition model, feature extraction is performed on pre-processed medical data to obtain word vectors of the medical data, and medical entity recognition is performed based on the word vectors. The recognized entities are linked to a predefined medical knowledge base to establish a patient state subgraph. Topological analysis and multi-hop reasoning are performed on the patient state subgraph based on graph neural networks to obtain a set of diagnostic candidates and a corresponding set of reasoning evidence chains. Based on the preprocessed medical data and the set of inference evidence chains, dual-track parallel disease inference is performed to generate an inner track disease probability distribution and an outer track disease probability distribution, and the inner track disease probability distribution and the outer track disease probability distribution are weighted and fused to obtain an optimized disease inference probability distribution. The dual-track parallel disease reasoning includes inner-track disease reasoning based on preprocessed medical data using a large language model and outer-track disease reasoning based on the set of reasoning evidence chains. Based on the optimized disease inference probability distribution and the inference evidence chain set, generate patient medical record text with evidence tracing identifier; Based on the preprocessed medical data and the set of inference evidence chains, a dual-track parallel disease inference is performed to generate an inner-track disease probability distribution and an outer-track disease probability distribution, respectively. The inner-track disease probability distribution and the outer-track disease probability distribution are then weighted and fused to obtain an optimized disease inference probability distribution. The specific steps include the following: Based on a predefined large language model, disease inference is performed on preprocessed medical data to obtain the probability distribution of the disease within the framework, and the corresponding first context semantic vector is extracted. The set of reasoning evidence chains is converted into natural language, and the converted set of reasoning evidence chains is input into a pre-trained evidence encoder for disease reasoning to obtain the outer path disease probability distribution and extract the corresponding second context semantic vector. Based on the information entropy algorithm, the uncertainty entropy values of the probability distribution of the disease in the inner track and the probability distribution of the disease in the outer track are calculated respectively to obtain the first uncertainty entropy value and the second uncertainty entropy value. Based on the adaptive confidence-gated network algorithm, the dynamic fusion weight coefficients are calculated according to the first context semantic vector, the second context semantic vector, the first uncertainty entropy value, and the second uncertainty entropy value. Based on the dynamic fusion weight coefficient, the probability distributions of the inner track and the outer track are fused to obtain the optimized probability distribution for disease inference.
2. The method according to claim 1, characterized in that, Based on a pre-built medical entity recognition model, feature extraction is performed on preprocessed medical data to obtain word vectors for the medical data. Medical entity recognition is then performed based on the word vectors, and the identified entities are linked to a predefined medical knowledge base to establish a patient state subgraph. The specific steps include the following: Based on a pre-built medical entity recognition model, pre-processed medical data is encoded to obtain word vectors of the medical data, and medical entity recognition is performed based on the word vectors to establish a set of medical entities. Calculate the query vector of each medical entity in the medical entity set, and the semantic similarity and type matching degree with the standard concept vector in the predefined medical knowledge base, and generate a link confidence score based on the semantic similarity and type matching degree; Based on the link confidence score corresponding to each medical entity in the medical entity set, the target standard concept linked to the medical entity is determined, the target standard concept is mapped to the global medical knowledge graph of the medical knowledge base, the anchor node corresponding to the medical entity is obtained, and the anchor node set is constructed. The anchor node is the corresponding node of the target standard concept in the global medical knowledge graph; the anchor node includes symptom nodes, examination result nodes, drug nodes, and disease nodes; Starting with each symptom node and examination result node in the anchor node set, a multi-hop traversal is performed in the global medical knowledge graph to obtain candidate associated nodes and relationship edges. Calculate the semantic affinity between each candidate associated node and the word vector of the medical data, and filter them based on the semantic affinity and the preset weight of the relation edges to obtain the filtered candidate associated nodes and relation edges, so as to establish a patient state subgraph.
3. The method according to claim 2, characterized in that, Based on a pre-built medical entity recognition model, preprocessed medical data is encoded to obtain word vectors for the medical data. Medical entity recognition is then performed based on these word vectors to establish a medical entity set. Specifically, this includes the following steps: The pre-processed medical data is then input into a pre-built medical entity recognition model. The medical entity recognition model includes an encoder and a decoder; the decoder includes a feature extraction layer and a label decoding layer. According to the encoder, the preprocessed medical data is vectorized to obtain word vectors of the medical data, and a context-related word vector sequence is established. Based on the feature extraction layer, the context features of each word vector position are extracted from the word vector sequence, and an enhanced feature sequence is generated; Based on the label decoding layer, a transition probability distribution between medical entity labels is constructed to globally decode the enhanced feature sequence and output the medical entity category label sequence with the optimal probability. Based on the category label sequence, medical entities are extracted from the medical data, medical entity vectors are generated based on the medical entities, and a set of medical entities is established.
4. The method according to claim 1, characterized in that, The patient state subgraph is subjected to topological analysis and multi-hop reasoning based on a graph neural network to obtain a diagnostic candidate set and a corresponding set of reasoning evidence chains. The specific steps include the following: Based on the word vectors of the medical data, the attention weights of each relation edge in the patient state subgraph are adjusted through a graph neural network to obtain a weighted patient state subgraph. On the weighted patient state subgraph, starting with the symptom node in the patient state subgraph, multi-hop reasoning is performed based on the beam search strategy to obtain candidate diagnostic entities and the reasoning path corresponding to the candidate diagnostic entities. Based on the structure-semantic dual verification scoring algorithm, the comprehensive confidence of each candidate diagnostic entity relative to the starting node is calculated respectively; Candidate diagnostic entities are screened and sorted based on the comprehensive confidence level to generate a diagnostic candidate set, and the complete reasoning path of each candidate diagnostic entity in the diagnostic candidate set is extracted to form a set of reasoning evidence chains.
5. The method according to claim 1, characterized in that, The functional expression for the dynamic fusion weight coefficient is: ; In the formula, For dynamic fusion weighting coefficients; Use the Sigmoid activation function; This is the first uncertainty entropy value; This is the second uncertainty entropy value; This is a temperature coefficient used to adjust the sensitivity of the gating network to entropy differences; This is the gated weight matrix; This is the first context semantic vector; This is the second context semantic vector.
6. The method according to claim 1, characterized in that, Based on the optimized disease inference probability distribution and the inference evidence chain set, a patient medical record text with evidence tracing identifier is generated, specifically including the following steps: A1. Based on a pre-built medical record template library, retrieve and match the corresponding standard medical record template according to the department information in the medical data; A2. The reasoning paths in the set of reasoning evidence chains are pre-filled and organized according to the structure of the standard medical record template, and a structured generation prompt is constructed based on the pre-filled content. A3. Based on the optimized disease inference probability distribution and structured generation prompts, decode according to the attention-guided anchor injection decoding method to generate medical record text, and insert reference identifiers for key medical entities during the generation process; A4. Based on a pre-trained discriminant model, verify whether there is a logical contradiction between the semantics of the text fragments with reference identifiers and the anchor nodes they reference in the medical record text. If a logical contradiction exists, return to step A3 and regenerate the corresponding medical record text; If there is no logical contradiction, proceed to step A5; A5. Process the verified medical record text to generate both a visual medical record document and machine-readable data.
7. The method according to claim 6, characterized in that, Step A3 involves decoding using the attention-guided anchor injection decoding method, specifically including the following steps: Based on the optimized disease inference probability distribution and structured generation prompts, the text is decoded using a preset text decoder to generate medical record text. During the generation of the medical record text, the attention weight distribution of the text decoder to the anchor nodes in the inference evidence chain set is obtained in real time. When it is detected that the currently generated word sequence constitutes a key medical entity, the source tracing verification mechanism is triggered. The source tracing and verification mechanism includes the following steps: Calculate the cumulative attention of the key medical entity to each anchor node; Determine whether the accumulated attention exceeds a preset attention threshold; If the number of references exceeds the limit, a reference identifier pointing to the corresponding anchor node will be forcibly inserted after the text position corresponding to the key medical entity to form a text fragment with a reference anchor. If the number of terms does not exceed the limit, the insertion of the reference identifier will not be performed, and the generation of subsequent lexical sequences will continue.
8. A large-scale model-integrated knowledge-enhanced disease reasoning and medical record generation system, characterized in that, include: The data sensing module is used to acquire the patient's multimodal medical data and preprocess the medical data; The graph construction module is used to extract features from preprocessed medical data based on a pre-built medical entity recognition model, obtain word vectors of the medical data, and perform medical entity recognition based on the word vectors. The recognized entities are then linked to a predefined medical knowledge base to establish a patient state subgraph. The diagnostic reasoning module is used to perform topological analysis and multi-hop reasoning on the patient state subgraph based on a graph neural network to obtain a set of diagnostic candidates and a corresponding set of reasoning evidence chains. The dual-track fusion module is used to perform dual-track parallel disease reasoning based on preprocessed medical data and the set of reasoning evidence chains, so as to generate an inner track disease probability distribution and an outer track disease probability distribution respectively, and to perform weighted fusion of the inner track disease probability distribution and the outer track disease probability distribution to obtain an optimized disease reasoning probability distribution. The dual-track parallel disease reasoning includes inner-track disease reasoning based on preprocessed medical data using a large language model and outer-track disease reasoning based on the set of reasoning evidence chains. The medical record generation module is used to generate patient medical record text with evidence tracing identifiers based on the optimized disease inference probability distribution and the inference evidence chain set. Based on the preprocessed medical data and the set of inference evidence chains, a dual-track parallel disease inference is performed to generate an inner-track disease probability distribution and an outer-track disease probability distribution, respectively. The inner-track disease probability distribution and the outer-track disease probability distribution are then weighted and fused to obtain an optimized disease inference probability distribution. The specific steps include the following: Based on a predefined large language model, disease inference is performed on preprocessed medical data to obtain the probability distribution of the disease within the framework, and the corresponding first context semantic vector is extracted. The set of reasoning evidence chains is converted into natural language, and the converted set of reasoning evidence chains is input into a pre-trained evidence encoder for disease reasoning to obtain the outer path disease probability distribution and extract the corresponding second context semantic vector. Based on the information entropy algorithm, the uncertainty entropy values of the probability distribution of the disease in the inner track and the probability distribution of the disease in the outer track are calculated respectively to obtain the first uncertainty entropy value and the second uncertainty entropy value. Based on the adaptive confidence-gated network algorithm, the dynamic fusion weight coefficients are calculated according to the first context semantic vector, the second context semantic vector, the first uncertainty entropy value, and the second uncertainty entropy value. Based on the dynamic fusion weight coefficient, the probability distributions of the inner track and the outer track are fused to obtain the optimized probability distribution for disease inference.