Medical knowledge graph assisted decision system
Patent Information
- Application Number
- CN202611079982.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-21
- Publication Date
- 2026-10-09
AI Technical Summary
这种语义偏移在跨域推理(如从症状域跃迁至治疗域)时尤为严重,因缺乏有效的跨段语义约束机制,导致推理过程中出现难以察觉的“概念断崖”
本发明在面对症状复杂多变的疑难病例时,能够获得始终保持语义一致性的推理支持,即使是横跨症状、诊断与治疗等多个医学领域的长链推理,也能保持与原始临床问题的紧密关联。这减轻了医生在复杂推理过程中的认知负担,使其能够更专注于患者的个体化特征评估。本发明提供的决策支持透明可解释,医生能够清晰理解每一条推理路径的来龙去脉及其可靠程度,从而增强了对系统建议的信任与采纳意愿。这种高质量的决策支持能够协助医生迅速锁定关键诊疗方向,避免因逻辑偏移导致的诊断延误或治疗偏差。在多学科会诊场景中,本发明为不同专科医生提供共同的推理基础和证据支撑,促进了综合性治疗方案的形成。
Smart Images

Figure CN122889333A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical knowledge graph technology, and more specifically, to a medical knowledge graph-assisted decision-making system. Background Technology
[0002] In complex medical scenarios, existing knowledge graph-based decision support systems face the problem of logical drift, especially when the reasoning path is long, making them prone to "semantic drift." In clinical practice, doctors often need to trace the complete reasoning chain from initial symptoms to the final treatment plan. However, existing technologies often struggle to maintain semantic consistency and logical coherence when constructing such long-chain reasoning. As the reasoning steps deepen, the system's understanding of the original query intent gradually deviates, potentially leading to conclusions completely unrelated to the initial clinical problem. For example, diagnostic reasoning starting with a patient's chest pain symptoms may, after multiple transformations, veer towards digestive system diseases, ignoring the more relevant cardiovascular causes. This semantic shift is particularly severe in cross-domain reasoning (such as leaps from the symptom domain to the treatment domain), where the lack of effective cross-segment semantic constraint mechanisms results in imperceptible "conceptual cliffs" during the reasoning process. Existing systems lack two-way verification mechanisms and cannot verify the rationality of the reasoning path through reverse semantic tracing, making it difficult to identify and correct logical drift in a timely manner. This cumulative drift effect is particularly dangerous in real-time clinical decision support, potentially leading to inappropriate medication recommendations or incorrect surgical indications, posing a potential threat to patient safety. Furthermore, existing technologies lack the ability to adaptively adjust to different types of logical drift patterns, failing to dynamically adjust inference strategies based on drift density and distribution characteristics. This is especially problematic when dealing with complex patient cases involving multiple coexisting diseases, severely limiting the reliable application of knowledge graph technology in high-risk medical decision-making scenarios.
[0003] In view of this, the present invention proposes a medical knowledge graph-assisted decision-making system to solve the above problems. Summary of the Invention
[0004] To overcome the aforementioned deficiencies of the prior art and to achieve the above objectives, the present invention provides the following technical solution: a medical knowledge graph-assisted decision-making system, comprising: The intent parsing module is used to obtain patients' clinical characteristic data and diagnosis and treatment query intent, and extract the core medical entities and constraints in the diagnosis and treatment query intent; The network construction module is used to construct a multi-layer semantic anchor network based on the semantic hierarchy of core medical entities in the knowledge graph. The multi-layer semantic anchor network includes disease domain anchors, symptom domain anchors, and treatment domain anchors. The path generation module is used to generate multiple candidate reasoning paths from the core medical entity to the target decision node based on a multi-layer semantic anchor network, and to calculate the initial confidence value of each candidate reasoning path. The semantic consistency constraint module is used to segment each candidate reasoning path and construct a segmented semantic consistency constraint matrix based on the semantic association strength between adjacent path segments. The attenuation calculation module is used to calculate the confidence attenuation coefficient of each path segment along the reasoning direction of the candidate inference path, and generate the path confidence attenuation curve based on the confidence attenuation coefficient and the segment semantic consistency constraint matrix. The risk identification module is used to set multiple semantic verification anchors in the candidate inference path and identify the logical drift risk path segment by calculating the semantic backtracking deviation value at the semantic verification anchor. The adjustment module is used to dynamically adjust the pruning threshold and path expansion depth limit of candidate inference paths based on the distribution characteristics of logical drift risk path segments. The decision integration module is used to filter effective inference paths based on the endpoint confidence value of the path confidence decay curve and the adjusted pruning threshold, and integrate the evidence nodes in the effective inference paths to generate decision support conclusions. The output module is used to calculate the multi-source evidence consistency index of decision support conclusions and output the multi-source evidence consistency index as the decision credibility to the clinical decision interface.
[0005] The technical effects and advantages of the medical knowledge graph-assisted decision-making system of this invention are as follows: This invention provides semantically consistent reasoning support for complex and varied cases, maintaining a close connection to the original clinical problem even in long-chain reasoning that spans multiple medical fields such as symptoms, diagnosis, and treatment. This reduces the cognitive burden on physicians during complex reasoning processes, allowing them to focus more on assessing the individual characteristics of patients. The decision support provided by this invention is transparent and interpretable, enabling physicians to clearly understand the origin and reliability of each reasoning path, thereby enhancing their trust in and willingness to adopt the system's recommendations. This high-quality decision support helps physicians quickly identify key diagnostic and treatment directions, avoiding diagnostic delays or treatment deviations caused by logical deviations. In multidisciplinary consultation scenarios, this invention provides a common reasoning basis and evidence support for physicians from different specialties, promoting the formation of comprehensive treatment plans. Attached Figure Description
[0006] Figure 1 This is a schematic diagram of the medical knowledge graph-assisted decision-making system of the present invention. Detailed Implementation
[0007] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0008] This application provides a medical knowledge graph-based decision support system. The implementing entities of this system include, but are not limited to, clinical decision support platforms, intelligent diagnosis and treatment systems, medical knowledge management centers, and remote consultation systems, which can be considered general computing nodes in this application. The decision support system includes, but is not limited to, at least one of the following: a knowledge graph-based inference engine, a clinical evidence analysis system, and a multi-source medical knowledge integration platform.
[0009] Please see Figure 1 In this embodiment of the invention, a medical knowledge graph-assisted decision-making system includes: The intent parsing module is used to acquire patients' clinical characteristic data and treatment query intent, extracting core medical entities and constraints from the query intent. Clinical characteristic data includes key medical information such as patients' physiological indicators, symptom descriptions, past medical history, and examination results, acquired in real time through structured electronic medical records or natural language processing interfaces. Treatment query intent includes specific medical questions of concern to doctors or patients, such as disease diagnosis, treatment plan selection, medication recommendations, or prognostic assessment. This module first performs semantic decomposition on the natural language query, identifying key medical terms; then, it maps these terms to standardized medical concepts based on medical ontology; finally, it extracts query constraints, such as time constraints, demographic constraints, and treatment effect constraints, through dependency parsing. This data provides the foundation for subsequent reasoning, ensuring the targeted and personalized nature of decision support.
[0010] The network construction module is used to build a multi-layer semantic anchor network based on the semantic hierarchy of core medical entities in the knowledge graph. This multi-layer semantic anchor network includes disease domain anchors, symptom domain anchors, and treatment domain anchors. The module first retrieves directly related nodes of core medical entities from the knowledge graph, statistically analyzes the type distribution of these nodes, and identifies disease-related, symptom-related, and treatment-related nodes. Then, based on the organizational structure of medical knowledge, it clusters and selects these nodes to determine the key anchors for each domain. Disease domain anchors are determined through hierarchical clustering based on the disease classification system, symptom domain anchors are selected based on their matching degree with clinical feature data, and treatment domain anchors are filtered based on the level of evidence in evidence-based medicine. These multi-dimensional anchors together constitute a structured semantic network, providing rich starting points and intermediate control points for subsequent path reasoning.
[0011] The path generation module generates multiple candidate reasoning paths from the core medical entity to the target decision node based on a multi-layer semantic anchor network, and calculates the initial confidence value for each candidate path. This module uses a graph traversal algorithm to expand the initial path expansion tree starting from the core medical entity along the associated edges of the semantic anchor network. During the expansion process, nodes matching the constraints are identified as intermediate control nodes, further guiding the path towards the target node with decision attributes, forming a complete reasoning path. For each generated candidate path, the system comprehensively considers structural characteristics, clinical support, and literature evidence to calculate its initial confidence value. This multi-dimensional path generation strategy ensures the breadth and depth of the reasoning process, enabling the exploration of potential diagnostic and treatment correlations and providing multi-faceted analytical perspectives for medical decision-making.
[0012] The semantic consistency constraint module is used to segment each candidate reasoning path and construct a segmented semantic consistency constraint matrix based on the semantic association strength between adjacent path segments. To improve the semantic coherence of the reasoning path, this module first identifies points of change in node type within the path, such as shifting from symptom description to disease diagnosis, or from disease diagnosis to treatment plan, using these points as segmentation boundaries. Then, it calculates the semantic association strength between adjacent path segments, evaluating the rationality and fluency of inter-segment transitions. Finally, it constructs a formalized constraint matrix to guide subsequent confidence adjustments. This segmentation method can capture semantic transitions in medical reasoning, ensuring that the reasoning process conforms to clinical thinking patterns and avoiding unreasonable cross-domain jumps.
[0013] The attenuation calculation module calculates the confidence attenuation coefficient for each path segment along the reasoning direction of the candidate inference path, and generates a path confidence attenuation curve based on the confidence attenuation coefficient and the segmented semantic consistency constraint matrix. To reflect the impact of increased inference depth on confidence, this module comprehensively considers the structural complexity and positional depth of the path segments to calculate the basic attenuation coefficient; simultaneously, it applies additional attenuation penalties to path segments crossing weak consistency connections in conjunction with the semantic consistency constraint matrix; finally, it accumulates the calculations along the reasoning direction to generate a complete attenuation curve. This curve visually demonstrates the trend of confidence as reasoning deepens, providing a quantitative basis for judging the reliability of the inference conclusion.
[0014] The risk identification module sets multiple semantic verification anchors in candidate inference paths and identifies path segments at risk of logical drift by calculating the semantic backtracking deviation value at these anchors. To prevent logical deviations during inference, this module periodically sets checkpoints along the path, calculating the semantic backtracking deviation value by comparing the current accumulated semantics with the original query semantics and performing reverse backtracking verification. When the deviation value exceeds a threshold, the corresponding path segment is marked as having a risk of logical drift. This two-way verification mechanism effectively identifies potential concept drift or logical jumps during inference, ensuring the consistency and reliability of decision support.
[0015] The adjustment module dynamically adjusts the pruning threshold and path expansion depth limit of candidate inference paths based on the distribution characteristics of logical drift risk path segments. For different logical drift patterns, this module employs differentiated adjustment strategies: for concentrated drift, the pruning threshold is increased and the expansion depth is reduced; for dispersed drift, a local pruning strategy is introduced; and for low drift cases, the threshold is appropriately relaxed. This adaptive adjustment mechanism allows the system to flexibly control the breadth and depth of path exploration based on actual inference quality, balancing the comprehensiveness and accuracy of inference.
[0016] The decision integration module filters valid inference paths based on the endpoint confidence value of the path confidence decay curve and an adjusted pruning threshold, and integrates the evidence nodes within these valid inference paths to generate decision support conclusions. This module first eliminates low-confidence inference paths based on the endpoint confidence value, retaining valid paths that meet the threshold requirements. Then, it extracts evidence nodes from these paths, including diagnostic, treatment, and prognostic evidence, aggregating them by evidence strength to form evidence clusters. Finally, based on the strength and mutual support relationships of these evidence clusters, it generates a comprehensive conclusion including decision recommendations, supporting evidence, and uncertainty statements. This multi-path evidence integration-based decision support approach fully utilizes distributed evidence in the knowledge graph, providing reliable and comprehensive clinical decision references.
[0017] The output module calculates the multi-source evidence consistency index for decision support conclusions and outputs this index as the confidence level of the decision to the clinical decision-making interface. To quantify the reliability of decision support, this module statistically analyzes the distribution of evidence sources cited in the conclusions, calculates the support level of different sources for the conclusions, constructs a knowledge source consistency matrix, and finally calculates the multi-source evidence consistency index based on the matrix properties. This index intuitively reflects the strength and consistency of the evidence base for decision support, helping physicians judge the confidence level of conclusions and improving the transparency and rationality of clinical decisions.
[0018] The modules are connected via wired and / or wireless means to enable data transmission between them.
[0019] In this embodiment of the invention, the detailed implementation steps for constructing a multi-layer semantic anchor network include: The process retrieves directly related nodes of core medical entities within the knowledge graph, statistically analyzes the type distribution of these nodes, and identifies disease-related, symptom-related, and treatment-related nodes. The retrieval process utilizes a graph database indexing mechanism to efficiently obtain first-order neighbor nodes directly connected to the core entity. The obtained node set is then classified using predefined ontology category mapping rules, categorizing each node as a disease, symptom, treatment, or other type. This initial semantic-type-based screening is a fundamental step in constructing a multi-layered anchor network, ensuring that subsequent network construction employs differentiated strategies for different medical domains. Node type identification accuracy typically exceeds 95%, providing a clear classification foundation for subsequent anchor selection.
[0020] Disease-related nodes are clustered according to the hierarchical depth of the disease classification system, and cluster centers are selected as anchor points for the disease domain. Disease classification systems are typically based on the International Classification of Diseases (ICD) or disease ontology, reflecting the hierarchical relationship and semantic organization of disease concepts. The clustering process first extracts the location information of each disease node within the classification system, including hierarchical coordinates such as its department, disease category, subclass, and specific type. Then, a hierarchical clustering algorithm is used to group disease nodes based on a similarity metric of hierarchical depth. Finally, the centroid of each cluster (usually the node with the smallest average semantic distance to other nodes) is selected as the representative anchor point for that disease domain. This hierarchical clustering method ensures that anchor points cover disease concepts of different granularities, including both highly specific diseases and broadly generalized disease categories, providing a multi-layered disease perspective for reasoning.
[0021] The feature matching degree between symptom nodes and clinical feature data is calculated, and the top N symptom nodes in terms of feature matching degree are marked as symptom domain anchors. Feature matching degree calculation is a crucial step in linking abstract symptom concepts with specific patient manifestations. The calculation process first standardizes the patient's clinical feature data, mapping it to a unified symptom expression space; then, it calculates the similarity between each symptom node and these feature data, using the following formula: ; in, Symptom nodes With clinical feature set The degree of matching, For semantic similarity, For clinical co-occurrence frequency, For symptom specificity score, , , These are the weighting coefficients, and .
[0022] Based on the calculation results, the system selects the N symptom nodes with the highest matching degree as symptom domain anchors. These anchors directly reflect the patient's clinical manifestations and serve as a bridge connecting the patient's specific situation with the medical knowledge system, providing a highly targeted starting point for subsequent personalized reasoning.
[0023] This process extracts the evidence-based medicine (EPY) levels of treatment nodes and designates those with EPI levels above a preset threshold as treatment domain anchors. EPI emphasizes that medical decisions should be based on the best available evidence, with evidence levels typically categorized into multiple levels, such as I (systematic reviews of randomized controlled trials), II (single randomized controlled trials), and III (non-randomized controlled studies). The extraction process first obtains the EPI attributes of each treatment node from the knowledge graph, including indicators such as the type of study supporting the treatment, sample size, effect size, and recommendation strength. Then, it calculates a standardized EPI score by combining these indicators. Finally, it selects high-quality treatment nodes as anchors based on a preset threshold (usually corresponding to Level II evidence or higher). This evidence-based selection strategy ensures that treatment domain anchors have reliable scientific basis, reduces the influence of empirical or low-quality evidence, and provides a high-quality treatment option foundation for decision support.
[0024] Cross-domain semantic association edges are established between disease domain anchors, symptom domain anchors, and treatment domain anchors. The weights of these cross-domain semantic association edges are jointly determined by semantic similarity and clinical co-occurrence frequency, forming a multi-layer semantic anchor network. Cross-domain association is key to connecting knowledge from different medical domains, reflecting important clinical relationships such as symptom-disease, disease-treatment, and symptom-treatment. The process of establishing association edges first retrieves direct and indirect paths between anchor nodes in the knowledge graph and evaluates their semantic association strength; then, it extracts concept co-occurrence statistics from the clinical database to quantify the association frequency in clinical practice; finally, these two measures are combined into a unified edge weight. The edge weight calculation formula is as follows: ; in, anchor point and The weight of the associated edges between them For standardized semantic similarity, To standardize clinical co-occurrence frequencies, This is a balancing parameter, and its value range is [0,1].
[0025] Through this multi-level, multi-domain anchor network construction method, a structured medical knowledge reasoning foundation is formed. This network not only respects the domain division of medical knowledge, but also establishes cross-domain connection bridges, providing rich semantic path selection for complex medical reasoning.
[0026] In this embodiment of the invention, the detailed implementation steps for generating candidate inference paths and calculating the initial confidence value of each candidate inference path include: Starting with the core medical entity as the inference point, the system expands outwards from the disease domain anchors, symptom domain anchors, and treatment domain anchors in a multi-layer semantic anchor network to construct an initial path expansion tree. The expansion process employs an improved breadth-first search (BFS) algorithm, but introduces a domain preference and edge weight guidance mechanism. First, the system uses the core medical entity as the root node to create an initial empty path. Then, it expands according to the anchors of the disease, symptom, and treatment domains, prioritizing adjacent nodes with higher edge weights in each expansion. Simultaneously, it maintains an access history and a depth counter to control the breadth and depth of the expansion. The construction of the initial expansion tree follows the basic patterns of medical inference, such as the diagnostic path from symptoms to disease, the path from disease to treatment plan selection, and the path from treatment to prognosis evaluation, forming multiple preliminary inference branches. This multi-starting point, multi-directional expansion strategy ensures broad coverage of the inference space and can capture medical associations from different perspectives.
[0027] In the initial path expansion tree, nodes matching the constraints are identified as intermediate control nodes. The system then expands from these intermediate control nodes to target decision nodes with decision-making attributes. Constraint matching is a crucial step guiding the reasoning direction, transforming the specific requirements of the query intent into control points for path selection. The matching process first parses the constraints in the query, such as patient demographics, treatment contraindications, and time requirements. Then, it searches the expansion tree for nodes that satisfy these constraints, such as treatment plans suitable for a specific age group or drugs without specific side effects. These nodes are marked as intermediate control nodes, and expansion is prioritized from these nodes. Target decision nodes are graph nodes with clear decision-making attributes, such as diagnostic conclusions, treatment recommendations, and prognostic predictions. The system guides the path from the control nodes to these target nodes, forming a complete decision path. This constraint-guided path generation method makes the reasoning process more targeted, focusing on the medical associations most relevant to the query intent.
[0028] The system extracts complete path sequences from the core medical entity through intermediate control nodes to the target decision node, serving as candidate inference paths. Complete path extraction integrates previously expanded branches into valid inference paths. The extraction process employs a backtracking algorithm, starting from each target decision node and tracing upwards along the parent node pointer, passing through intermediate control nodes, until reaching the core medical entity, recording the nodes and edges along the way to form a complete path. To improve efficiency, the system uses dynamic programming to optimize the backtracking process and avoid redundant computation. Each complete path represents a reasoning chain from a clinical problem to a medical decision, containing a series of interrelated medical concepts and reasoning steps, providing a candidate set for subsequent confidence assessment and path selection.
[0029] The geometric mean of the weights of all relation edges in the candidate inference path is calculated and denoted as the path structure confidence. The path structure confidence reflects the overall semantic coherence and structural reliability of the path. A geometric mean is used instead of an arithmetic mean to more sensitively reflect the impact of individual weak connections on the overall path reliability. The calculation formula is: ; in, For path Structural confidence, For the nodes on the path To the node edge weights, This represents the path length (number of nodes).
[0030] The structural confidence score typically ranges from [0,1]. A higher score indicates stronger semantic coherence of the path, closer connections between nodes, and stronger logical reasoning. This metric provides the basis for evaluating the structural dimension in subsequent initial confidence score fusion.
[0031] The normalized frequency of nodes in candidate inference paths within a clinical medical record database is statistically analyzed, and the average frequency is calculated and denoted as the path's clinical confidence score. Path clinical confidence score reflects the degree to which the inference path supports actual clinical practice and is an empirical indicator based on real case statistics. The calculation process first extracts the frequency of each node from a large-scale clinical database, performs normalization processing to eliminate differences in the base frequencies of different concepts, and then calculates the weighted average of the normalized frequencies of all nodes on the path as the overall clinical confidence score. This statistical analysis based on large clinical data provides a quantitative measure of the practical support for inference paths, reflecting the degree to which the path fits real-world medical scenarios.
[0032] The process retrieves supporting medical literature evidence for candidate reasoning paths, weights these evidences according to their level of evidence-based validity, and sums the results to derive the path evidence confidence score. The path evidence confidence score is a theoretical indicator based on the strength of scientific literature support, reflecting the quality of the scientific basis of the reasoning path. The calculation process first retrieves relevant medical literature for each pair of adjacent nodes in the path; then, weight coefficients are assigned according to the evidence level of the literature (e.g., levels I-VI); finally, the weighted sum is calculated as the overall evidence confidence score. This evidence-based medicine-based evaluation method provides a scientific literature-level measure of support for reasoning paths, ensuring that decision recommendations have a reliable research foundation.
[0033] The initial confidence score is obtained by weighted fusion of the confidence scores of the path structure, clinical confidence, and evidence. Multi-dimensional confidence fusion is the final step in comprehensively evaluating the reliability of the reasoning path, integrating information from different perspectives through reasonable weight allocation. The fusion uses a weighted average method, with the formula: ; in, For path The initial confidence level, , and These are structural confidence, clinical confidence, and evidence confidence, respectively. , , These are the weighting coefficients, and .
[0034] The weighting coefficients can be adjusted according to specific application scenarios and user preferences. For example, the weight of evidence can be increased for research applications, while the weight of clinical confidence can be increased for clinical applications. The initial confidence value provides a benchmark for subsequent decay calculations and pathway selection, and is a comprehensive indicator for pathway quality assessment.
[0035] In this embodiment of the invention, the detailed implementation steps for constructing the segmented semantic consistency constraint matrix include: The process traverses the node sequence in the candidate reasoning path, identifying locations where node types change as segmentation boundary points. Changes in node type typically reflect conceptual domain shifts in medical reasoning, such as a shift from symptom description to disease diagnosis, or from diagnostic conclusion to treatment recommendation. The identification process is based on the semantic category labels of nodes; when adjacent nodes have different categories, their positions are marked as boundary points. This semantic type-based segmentation method aligns with the natural hierarchy of medical reasoning, decomposing complex reasoning paths into semantically homogeneous segments, facilitating subsequent consistency analysis.
[0036] The candidate reasoning path is divided into multiple path segments based on segmentation boundary points. Each path segment contains a semantically homogeneous set of nodes. Path segmentation is a fundamental step in constructing the semantic consistency matrix, transforming continuous reasoning paths into discrete semantic units. The segmentation process divides the node sequence according to boundary points, and the nodes within each path segment belong to the same semantic type, such as all being symptom nodes or all being treatment nodes. Each path segment is assigned a unique identifier and type label, and its position information and the list of nodes it contains in the original path are recorded. This semantically homogeneous segmentation method allows subsequent cross-segment analysis to focus on the transformation relationships between different conceptual domains, which aligns with the thinking patterns of medical reasoning.
[0037] The cross-segment semantic association strength between adjacent path segments is calculated using both the number of shared attributes of the cross-segment nodes and the semantic distance in the medical ontology. Cross-segment semantic association strength is a key indicator for evaluating the rationality of transitions between different conceptual domains, reflecting the logical coherence in the reasoning process. The calculation process first extracts node pairs at the boundaries of adjacent path segments, i.e., the end node of the previous segment and the first node of the next segment; then, their semantic association is evaluated from three dimensions: the number of shared attributes reflects the degree of conceptual overlap, semantic distance reflects the closeness of the relationship between concepts in the medical ontology, and clinical relevance reflects the frequency of association in practice.
[0038] A path segment adjacency matrix is constructed, where the rows and columns represent the path segments in the candidate inference path, and the matrix elements represent the cross-segment semantic association strength. The adjacency matrix is a structured representation of the relationships between path segments, providing a mathematical model for subsequent consistency constraints. The construction process first creates an n×n square matrix, where n is the number of path segments; then, the calculated semantic association strength between each pair of adjacent path segments is filled into the corresponding matrix position; for non-adjacent path segments, the matrix element value is set to 0, indicating no direct semantic association. This adjacency matrix representation method fully records the inter-segment transformation characteristics in the inference path, facilitating subsequent mathematical processing and analysis.
[0039] The adjacency matrix of path segments is normalized, and a semantic drift penalty factor is introduced. This penalty factor increases incrementally based on the sequence position of the path segments, generating a segmented semantic consistency constraint matrix. Normalization and the introduction of the penalty factor are key steps in improving the effectiveness of the constraint matrix, enabling it to more accurately reflect semantic changes during the reasoning process. Normalization uses row normalization to ensure the sum of elements in each row is 1, facilitating cross-path comparisons. The semantic drift penalty factor considers the impact of reasoning depth on semantic stability, increasing the penalty strength as the path position deepens, reflecting the cumulative effect of semantic drift risk in long-distance reasoning. The final calculation formula for the constraint matrix elements is: ; in, The element values of the constraint matrix, For semantic association strength, This is the drift penalty coefficient. This is the sequence position index of the path segment.
[0040] The generated semantic consistency constraint matrix fully encodes the inter-segment transformation characteristics and positional effects in the reasoning path, providing structured constraints for subsequent attenuation calculations and helping to identify and quantify semantic drift risks in the reasoning process.
[0041] In this embodiment of the invention, the detailed implementation steps for calculating the confidence decay coefficient and generating a path confidence decay curve based on the confidence decay coefficient and the segmented semantic consistency constraint matrix include: The length and average degree of each node in the candidate inference paths are extracted, and the structural complexity of each path segment is calculated. Structural complexity is a quantitative indicator for evaluating the information density and connectivity of a path segment, reflecting the complexity of the inference steps. The calculation process first extracts two basic features: the path segment length (including the number of nodes) reflects the absolute length of the inference steps, and the average degree of a node (the average number of connections a node has in the original knowledge graph) reflects the information density and association complexity of the nodes; then, these two features are compared with standard values to calculate the relative complexity score. The formula for calculating structural complexity is: ; in, For path segment The structural complexity, The path segment length, This is the standard value for average length. The average degree of the nodes. This is the standard value for the average degree.
[0042] Structural complexity reflects the difficulty of reasoning and information density. Path segments with high complexity usually contain more reasoning steps or more complex conceptual relationships, and require a higher decay coefficient in confidence decay calculation.
[0043] Based on structural complexity and the depth position of the path segment within the inference path, the basic confidence decay coefficient for each path segment is calculated. The basic decay coefficient considers the impact of inference depth and complexity on confidence and serves as the initial value for decay calculation. The calculation process comprehensively considers two factors: structural complexity reflects the inherent complexity of a single path segment, and depth position reflects the impact of accumulated inference steps on reliability. The depth position effect is modeled using an exponential function, reflecting the cumulative characteristics of confidence decay. The formula for calculating the basic decay coefficient is: ; in, For path segment The basic attenuation coefficient, For structural complexity, This represents the sequence position of the path segment. and To adjust the parameters, the influence intensity of complexity and depth is controlled separately.
[0044] The base attenuation coefficient has a range of (0,1). The lower the value, the more severe the attenuation, i.e., the greater the confidence loss. This coefficient provides a benchmark value for subsequent attenuation adjustments, ensuring that confidence attenuation takes into account both the characteristics of the path itself and the impact of inference depth.
[0045] The semantic consistency scores of adjacent path segments are extracted from the segmented semantic consistency constraint matrix. Path segment pairs with semantic consistency scores below a preset consistency threshold are marked as weakly consistent connections. Weakly consistent connections are semantically weak links in the reasoning path, usually reflecting logical jumps or insufficient associations in concept domain transitions. The identification process directly utilizes the previously constructed semantic consistency constraint matrix to extract the matrix element values corresponding to each pair of adjacent path segments as semantic consistency scores. Then, the scores are compared with a preset threshold (usually the lower quartile of the matrix element distribution) to identify connections significantly below the threshold. These weakly consistent connections are potential risk points in the reasoning process and require special attention in the decay calculation.
[0046] Additional confidence decay penalties are applied to path segments containing weak consistency connections, updating the confidence decay coefficient. This additional penalty is a risk adjustment for semantically weak links, ensuring that confidence decay reflects the impact on semantic coherence. The adjustment process first identifies path segments associated with weak consistency connections, i.e., the path segments at both ends of the connection; then, it calculates the additional penalty coefficient based on the deviation of the consistency score; finally, it multiplies the base decay coefficient by the additional penalty to obtain the updated decay coefficient. The decay coefficient update formula is:
[0047] in, The updated attenuation coefficient, Based on the attenuation coefficient, and For path segment Adjacent consistency score, This is the consistency threshold. This is the penalty intensity parameter.
[0048] This semantic consistency-based decay adjustment mechanism enables the system to pay special attention to weak semantic connections in the reasoning process, thereby improving the semantic sensitivity of confidence calculation.
[0049] Along the candidate inference path from start to finish, the confidence decay value of each path segment is cumulatively calculated, and a path confidence decay curve is plotted with path depth on the horizontal axis and cumulative confidence decay value on the vertical axis. The decay curve is a tool for visualizing confidence changes during inference, intuitively showing the trend of reliability changes from the inference start point to the end point. The plotting process begins with the inference start point (usually with a confidence level of 1), applying decay coefficients sequentially according to the path segments, and calculating the cumulative confidence after each step; then, a continuous decay curve is plotted with path depth on the horizontal axis and cumulative confidence on the vertical axis. The cumulative calculation formula is: ; in, For depth Cumulative confidence level at the location, This is the initial confidence level. For the first The attenuation coefficient of each path segment.
[0050] The generated decay curve comprehensively reflects the dynamic changes in confidence during the inference process, helping to identify key decay points and areas of sharp confidence drops, providing an intuitive reference for path evaluation and selection. The endpoint value of the curve (the cumulative confidence at the end of inference) is a comprehensive indicator of overall path quality and is directly used for subsequent effective path selection.
[0051] In this embodiment of the invention, the detailed implementation steps for identifying logical drift risk path segments include: A semantic verification anchor point is set every preset number of nodes in the candidate inference path. These anchor points act as checkpoints during the inference process, monitoring semantic drift. An evenly spaced strategy is employed, typically setting an anchor point every 5-10 nodes to ensure comprehensive monitoring of the inference process. Each anchor point records its position in the path, the path segment it belongs to, the cumulative number of inference steps, and links to the original query intent, providing a reference point for subsequent semantic comparison. This periodic checkpoint strategy enables the system to promptly detect semantic deviations during inference, avoiding the risk of logical drift caused by long-distance unsupervised inference.
[0052] For each semantic verification anchor point, a cumulative semantic vector is extracted from the inference starting point to that anchor point. This cumulative semantic vector is obtained by weighted summation of the semantic embeddings of each node along the path. The cumulative semantic vector is a quantitative representation of the semantic state during the inference process, reflecting the semantic change trajectory from the starting point to the current position. The extraction process first obtains the semantic embedding vector of each node along the path, typically using pre-trained word embedding models from the medical field or knowledge graph embedding techniques. Then, weights are assigned based on the node's position and importance in the path, with more recent nodes usually having higher weights. Finally, a weighted summation is calculated to generate a comprehensive cumulative semantic vector. This vector captures the semantic evolution state during the inference process, providing a computational basis for detecting semantic shifts.
[0053] The cosine distance between the cumulative semantic vector and the initial semantic vector of the diagnostic query intent is calculated and denoted as the forward bias value. The forward bias value is a measure of the semantic difference between the current inference state and the original query target, reflecting whether the inference process has deviated from the initial query intent. Cosine distance is used instead of Euclidean distance to focus more on the consistency of semantic direction rather than absolute magnitude. The calculation formula is: ; in, anchor point The forward deviation value, For cumulative semantic vectors, As the initial semantic vector, It is the vector norm.
[0054] The forward bias value ranges from [0, 2]. A higher value indicates a greater semantic deviation between the current inference state and the original query intent, potentially indicating logical drift. This metric directly reflects the semantic alignment between the inference process and the query target, providing an important reference for subsequent risk identification.
[0055] Reverse semantic tracing is performed from the semantic verification anchor point towards the inference starting point. The cosine distance between the semantic vector obtained from the reverse tracing and the initial semantic vector is calculated and denoted as the backtracking deviation value. Reverse semantic tracing is a bidirectional verification mechanism that evaluates the reversibility and consistency of the semantic path by looking back from the current position to the starting point. This verification mechanism can detect semantic shifts that are difficult to detect in unidirectional inference, improving the reliability and sensitivity of drift detection.
[0056] The absolute value of the difference between the forward bias and the backward bias is calculated as the semantic backward bias value. The semantic backward bias value is a unified indicator that comprehensively considers both forward and backward verification, reflecting the bidirectional consistency of the reasoning process. The calculation uses the absolute value of the difference instead of a simple average to more sensitively capture inconsistencies between the forward and backward verification results; such inconsistencies are usually a strong signal of logical drift. The calculation formula is: ; in, anchor point The semantic backtracking deviation value, This is the forward deviation value. This represents the backtracking deviation value.
[0057] A higher backtracking deviation value indicates poorer semantic consistency between the forward and backward reasoning processes, and a greater risk of logical drift. This comprehensive indicator provides an important basis for accurately identifying risky path segments.
[0058] Path segments containing semantic verification anchors whose semantic backtracking deviation values exceed a preset deviation threshold are marked as logical drift risk path segments. Risk path segment marking is the final output of drift detection, clearly indicating high-risk areas in the inference path. The marking process first compares the backtracking deviation value of each anchor with a preset threshold (usually determined based on historical data distribution statistics); then, for anchors exceeding the threshold, the path segment to which they belong is determined, and the entire path segment is marked as a risk area; finally, adjacent risk path segments are merged to avoid excessive fragmentation of risk areas. These marked risk path segments reflect potential semantic breaks or logical jumps in the inference process and are the focus of subsequent path adjustments. Through this risk identification method based on semantic verification anchors and two-way verification, the system can accurately locate quality problems in the inference process, providing technical assurance for improving the reliability of decision support.
[0059] In this embodiment of the invention, the detailed implementation steps for dynamically adjusting the pruning threshold and path expansion depth limit include: The percentage of path segments at risk of logical drift in candidate reasoning paths is denoted as path drift density. Drift density is a macro-level indicator for evaluating reasoning quality, reflecting the prevalence of logical problems. The calculation process first counts the number of path segments marked as risk segments in each reasoning path; then, it divides this number by the total number of path segments to obtain the drift density as a percentage. This indicator intuitively reflects the concentration of logical problems during reasoning, providing a basis for distinguishing different drift patterns. High drift density usually indicates poor overall reasoning quality, requiring more aggressive adjustment strategies; low density indicates relatively localized problems, allowing for more moderate adjustment methods.
[0060] The variance of the positional distribution of logical drift risk path segments within the inference path is calculated. This variance characterizes the concentration of logical drift. Positional distribution variance is a crucial indicator for assessing risk distribution patterns, distinguishing between concentrated and dispersed drift. The calculation process first records the relative position of each risk path segment within the overall path (typically represented as a normalized position from 0 to 1); then, the statistical variance of these positions is calculated, reflecting the degree of concentration or dispersion. Low variance indicates that risk segments are located close together, concentrated in a specific area of the path, potentially reflecting a systemic problem at a particular inference stage; high variance indicates that risk segments are dispersed throughout the path, possibly representing a combination of multiple independent problems. This indicator provides an important reference for developing differentiated adjustment strategies.
[0061] When the path drift density exceeds the first density threshold and the location distribution variance is less than the concentration threshold, it is identified as a concentrated drift pattern. In this case, the pruning threshold is increased and the path expansion depth restriction is reduced. Concentrated drift is a structured risk pattern that typically reflects a systemic problem in the inference process at a specific stage. The response strategy employs a dual constraint: increasing the pruning threshold to select higher-quality inference paths; and simultaneously reducing the expansion depth restriction to prevent excessive expansion of the problem area. In practice, the pruning threshold is typically increased by 10%-20%, and the expansion depth restriction is reduced by 20%-30%. This strategy effectively controls the impact range of high-risk areas, guiding the system to bypass the problem area and find more reliable alternative paths.
[0062] When the path drift density exceeds the second density threshold and the location distribution variance exceeds the dispersion threshold, it is identified as a dispersed drift pattern. While maintaining the pruning threshold, a path segment-level local pruning strategy is introduced. Dispersed drift is a distributed risk pattern, indicating that the problem is scattered across multiple independent regions. The response strategy maintains the global pruning threshold unchanged to avoid overly restricting the inference space; simultaneously, local strategies are introduced to implement targeted adjustments for specific risk segments. Local pruning strategies include: setting separate high pruning thresholds for risky path segments, limiting the branch expansion of risky segments, and increasing the search for alternative paths for risky segments. This refined adjustment method can address dispersed problem regions in a targeted manner while maintaining the breadth of inference, improving the system's adaptability and robustness.
[0063] When the path drift density is less than the second density threshold, it is identified as a low-drift mode, and the pruning threshold is relaxed to retain more inference paths. A low-drift mode reflects a generally good quality inference process with only a few localized problems. The strategy focuses on maintaining the breadth of inference, appropriately relaxing the pruning threshold (usually by 5%-10%) to allow more diverse inference paths to participate in decision integration. Simultaneously, for individual risky segments, a labeling rather than pruning approach is used to reduce their weight in the final decision rather than completely excluding them. This lenient strategy maximizes knowledge utilization and inference diversity while ensuring basic quality, which is beneficial for discovering innovative medical connections and unconventional decision-making paths.
[0064] Through this adaptive adjustment strategy based on risk distribution characteristics, the system can take differentiated measures for different logic drift patterns. It can effectively control the decision quality in high-risk situations and maintain the flexibility and diversity of reasoning in low-risk situations, providing intelligent support for medical decision-making in different scenarios.
[0065] In this embodiment of the invention, the detailed implementation steps for generating decision support conclusions include: The cumulative confidence decay value of each path segment in the candidate inference paths is extracted to determine the endpoint confidence value of each candidate inference path on the path confidence decay curve. The endpoint confidence value is a comprehensive indicator for evaluating the overall quality of the inference path, reflecting the cumulative inference reliability from the starting point to the endpoint. The extraction process first reads the cumulative confidence value at the endpoint of each inference path from the previously generated confidence decay curve; then, it is standardized according to the specific characteristics of the path (such as length and complexity) to ensure the comparability of confidence values between different paths. This endpoint value is directly used for subsequent path selection and is a key basis for judging the overall quality of the inference path.
[0066] The endpoint confidence value is compared with an adjusted pruning threshold. Inference paths with endpoint confidence values below the pruning threshold are eliminated, while valid inference paths are retained. Path selection is a crucial step in controlling decision quality. Setting a minimum quality threshold ensures that decision recommendations are based on reliable reasoning. The selection process is simple and direct: the endpoint confidence value of each path is compared with a dynamically adjusted pruning threshold, and only paths with confidence values above the threshold are retained as valid paths. These valid paths have passed multiple quality checks by the system, possessing sufficient semantic consistency and logical coherence, and serve as a reliable foundation for subsequent decision integration.
[0067] All evidence nodes in valid reasoning paths are extracted, including diagnostic, treatment, and prognostic evidence nodes. Evidence nodes provide specific medical evidence supporting the final decision and form the factual basis of the conclusion. The extraction process first traverses all valid reasoning paths, identifying nodes with evidentiary attributes; then, based on their semantic type, they are categorized as diagnostic, treatment, or prognostic evidence; finally, identical or similar evidence from different paths is integrated to form a preliminary evidence set. Each evidence node records its source path, confidence contribution, and the type of decision it supports, providing a complete context for subsequent evidence aggregation.
[0068] Evidence nodes of the same type are aggregated for evidence strength. Evidence strength aggregation is achieved by calculating the weighted product of the frequency of occurrence of each evidence node in different valid reasoning paths and the path confidence, resulting in evidence node clusters. Evidence strength aggregation is a key step in integrating scattered evidence into structured evidence, reflecting the support strength of specific evidence in overall decision-making. The aggregation process first calculates the weighted strength score of each evidence node, considering the dual impact of evidence frequency and the quality of the path it belongs to; then, based on semantic similarity, similar evidence is grouped into evidence clusters, each cluster representing a relevant type of medical evidence; finally, the overall strength score of each evidence cluster is calculated for subsequent decision support. The formula for calculating evidence strength is: ; in, For evidence nodes Intensity score, To include evidence The set of all valid paths, As evidence In the path Frequency of occurrence in For path The endpoint confidence value.
[0069] Through this weighted aggregation method, the system can identify key evidence that appears repeatedly in multiple high-quality reasoning paths, providing a strong support basis for decision-making.
[0070] A support relationship graph is constructed among evidence nodes to identify mutually supporting evidence node clusters and contradictory evidence node pairs. The support relationship graph is a structured representation revealing the inherent connections between evidence, helping to identify points of consistency and conflict. The construction process first builds an association matrix between evidence nodes, and then infers the support or contradiction relationships between node pairs through co-occurrence analysis and medical knowledge. Next, a directed graph structure is constructed based on these relationships, where the direction of the edges represents the direction of the support relationship, and the weight of the edges represents the strength of the relationship. Finally, a community detection algorithm is used to identify highly mutually supporting evidence clusters, while simultaneously marking evidence pairs with significant contradictions. This relationship graph not only demonstrates the structured connections between evidence but also provides a basis for handling evidence conflicts, ensuring that the final decision is based on a consistent evidence system.
[0071] Based on the aggregation strength of evidence node clusters and the degree of conflict between contradictory evidence node pairs, a decision support conclusion is generated, including decision recommendations, supporting evidence, and uncertainty statements. The decision support conclusion is the system's final output, providing clinicians with structured decision-making references. The generation process first sorts the evidence by strength to identify the strongest supporting decision direction; then it constructs multi-level decision recommendations, including main recommendations and alternatives; simultaneously, it lists key supporting evidence, categorized by strength and type; finally, based on evidence conflicts and uncertainties, it generates risk statements and constraints. A complete decision support conclusion typically includes four parts: a summary of decision recommendations, a detailed chain of supporting evidence, uncertainty and risk analysis, and personalized considerations. This structured decision support approach provides both clear action recommendations and a complete evidence base and potential risks, helping physicians make comprehensive clinical decisions.
[0072] In this embodiment of the invention, the detailed implementation steps for calculating the multi-source evidence consistency index include: This process involves extracting evidence nodes cited in the decision support conclusions and statistically analyzing the knowledge source types from which these nodes originate. Knowledge source types include clinical guidelines, case databases, and medical literature. Knowledge source analysis is a fundamental step in assessing the diversity of evidence, reflecting the breadth of the knowledge base for decision support. The analysis process first extracts all cited evidence from the decision conclusions; then traces the original source information of each piece of evidence within the knowledge graph; and finally, classifies and statistically analyzes it according to a predefined type system (typically including authoritative clinical guidelines, real case databases, peer-reviewed medical literature, etc.). This knowledge source distribution analysis visually demonstrates the composition of the knowledge base for decision support and is crucial for evaluating the comprehensiveness and balance of the conclusions.
[0073] The support level of evidence nodes from different knowledge source types for the decision-making conclusion is calculated. Support is determined by multiplying the semantic relevance of the evidence node to the decision recommendation by the strength of the evidence. Support calculation is a crucial step in quantifying the contribution of evidence from different sources, reflecting the weight of various knowledge roles in decision formation. The calculation process first assesses the semantic relevance of each evidence node to the core decision recommendation, typically calculated using cosine similarity or topic modeling. Then, the relevance is multiplied by the previously calculated strength of evidence to obtain the support score for individual evidence. Finally, statistics are grouped by knowledge source type to derive the overall support for each knowledge source. This multi-dimensional support calculation method considers both the relevance of evidence to the decision and the reliability of the evidence itself, providing a quantitative basis for subsequent consistency analysis.
[0074] A knowledge source consistency matrix is constructed, where each element represents the difference in support for the same decision recommendation among different knowledge source types. The consistency matrix is a structured representation for assessing the consistency of multi-source evidence, reflecting the degree of agreement among different knowledge systems on the same medical issue. The construction process first creates an n×n square matrix, where n is the number of knowledge source types; then, the support difference between each pair of knowledge sources is calculated and used as the matrix element value; the smaller the difference, the higher the consistency; finally, the matrix is normalized to standardize the range of element values. This matrix representation method comprehensively captures the consistency relationships between knowledge sources, providing a mathematical foundation for subsequent comprehensive evaluation.
[0075] The ratio of the trace to the determinant of the knowledge source consistency matrix is denoted as the matrix consistency coefficient. The matrix consistency coefficient is a mathematical method that compresses multi-dimensional consistency relationships into a single indicator, reflecting the overall coordination degree of knowledge sources. The calculation employs eigenvalue correlation techniques from matrix theory, using the ratio of the trace (the sum of diagonal elements, reflecting the consistency of each knowledge source itself) to the determinant (reflecting the overall structural characteristics of the matrix) to comprehensively evaluate the consistency characteristics of the matrix. The calculation formula is: ; in, The matrix consistency coefficient, For matrix traces, Let be the determinant of the matrix. Use small constants to avoid zero denominators.
[0076] This coefficient is a core technical indicator of the consistency of multi-source evidence. It directly reflects the degree of coordination between different knowledge systems in supporting decision-making and provides the main basis for calculating the final consistency index.
[0077] The multi-source evidence consistency index is obtained by normalizing the matrix consistency coefficient with the logarithm of the total number of evidence nodes. This index is the final quantitative representation of decision credibility, comprehensively considering both the coordination of knowledge sources and the breadth of the evidence base. The normalization process takes into account the evidence size factor, and by adjusting the logarithm function, it avoids the biased impact of a large amount of homogeneous evidence on the consistency assessment. The final index calculation formula is: ; in, As a multi-source evidence consistency index, The matrix consistency coefficient, The total number of evidence nodes. The number of theoretical knowledge source types, This represents the number of knowledge source types actually used.
[0078] The first term reflects the balance between matrix consistency and evidence size, while the second term reflects the completeness of knowledge source coverage. The final consistency index is typically mapped to the [0,1] interval and is intuitively represented as a percentage. It is output as the decision credibility to the clinical decision-making interface to help physicians assess the reliability of the system's recommendations and improve the transparency and rationality of clinical decisions.
[0079] In this embodiment of the invention, the detailed implementation steps for calculating the cross-segment semantic association strength include: Node pairs are extracted at the boundaries of adjacent path segments. Each node pair includes the terminating node of the preceding path segment and the starting node of the following path segment. Boundary node pairs are key points for evaluating the rationality of path segment transitions, reflecting semantic shifts in the reasoning process. The extraction process is directly based on the preceding path segmentation results, identifying the connection points of each pair of adjacent path segments, recording the last node of the preceding segment and the first node of the following segment to form boundary node pairs. These node pairs represent conceptual transition points in the reasoning process, such as shifting from symptom description to disease diagnosis, or from disease diagnosis to treatment plan, and are key observation points for evaluating cross-segment semantic coherence.
[0080] The retrieval process finds the shortest semantic path between node pairs within the medical ontology, and calculates the length of this shortest semantic path as the semantic distance. Semantic distance is a fundamental indicator for measuring the tightness of association between concepts, reflecting the semantic proximity of nodes within the knowledge system. The retrieval process, based on medical ontologies (such as UMLS and SNOMED CT), uses graph search algorithms to find the shortest path connecting two nodes; path length is typically represented by the number of edges, with smaller values indicating tighter conceptual association. For directly connected nodes, the semantic distance is 1; for nodes requiring connection through multiple intermediate concepts, a larger distance value indicates a weaker semantic association. This objective indicator provides an ontological quantitative basis for evaluating the rationality of cross-segment transitions.
[0081] The statistical nodes assign different weights to the co-occurrence frequency of concepts in the clinical medical record database based on the length of the co-occurrence time window, thus obtaining the clinical relevance. Clinical relevance is an empirical indicator based on real medical practice, reflecting the frequency of occurrence of concept combinations in actual clinical work. The statistical process is based on large-scale electronic medical record data, calculating the frequency of co-occurrence of two concepts in the same clinical context; it also considers the time window factor, giving higher weight to close co-occurrence within short time windows and lower weight to loose co-occurrence within long time windows. The relevance calculation formula is: ; in, The clinical relevance of the node pairs. In the time window Co-occurrence count within, For window Total number of records in the database The time decay coefficient, A set of time windows of different sizes.
[0082] This indicator supplements the ontological semantic distance by incorporating the experiential dimension of clinical practice, making the assessment more relevant to actual medical scenarios.
[0083] Extract the attribute sets of each node pair, and calculate the ratio of the intersection to the union of these attribute sets as the attribute overlap. Attribute overlap is a refined indicator of similarity at the conceptual feature level, reflecting the proportion of shared characteristics between nodes. The extraction process first obtains the attribute information of each node in the knowledge graph, including multi-dimensional features such as function, classification, indications, and contraindications; then, it calculates the intersection size (number of shared attributes) and union size (total number of unique attributes) of the attribute sets of two nodes; finally, it takes the ratio of these two as the overlap index. The calculation formula is the standard Jaccard coefficient: ; in, This represents the attribute overlap between node pairs. For nodes The set of attributes Represents the cardinality of a set.
[0084] The overlap value ranges from [0,1]. A higher value indicates a higher similarity in attributes between nodes and a stronger semantic coherence in concept transformation. This micro-indicator provides a fine-grained feature-level basis for evaluating cross-segment associations.
[0085] The cross-segment semantic association strength is obtained by weighting and summing the inverse of semantic distance, clinical relevance, and attribute overlap. Association strength fusion is the final step in comprehensive multidimensional assessment, integrating information from different perspectives through reasonable weight allocation.
[0086] Through this multi-dimensional association strength calculation method, the system can comprehensively evaluate the rationality and fluency of the transition between path segments, quantify semantic association from three dimensions: ontology, clinical practice, and feature similarity, and provide a reliable numerical basis for constructing a semantic consistency constraint matrix.
[0087] In this embodiment of the invention, the detailed implementation steps for performing reverse semantic tracing include: Starting from the semantic verification anchor point, the preceding node sequence is extracted by tracing back along the reasoning path, with the window length for backward tracing set to a preset number of nodes. The preceding node sequence is the foundational data for backtracking analysis, providing a partial view of the reasoning history. The extraction process is simple and direct: starting from the verification anchor point, the process traces back along the path towards the starting point, collecting a preset number of preceding nodes (usually 5-10). These nodes are arranged in reverse order of the original reasoning sequence, forming a reverse node sequence, providing a starting set for subsequent semantic expansion. The window size for selecting the preceding sequence balances locality and information content; a window that is too small may lack sufficient context, while a window that is too large may introduce irrelevant information and dilute the core semantics.
[0088] For each node in the preceding node sequence, its generalization relation edges pointing to higher-level concepts in the knowledge graph are extracted, and a reverse semantic extension tree is constructed. Generalization extension is the core step of semantic backtracking. By extending to the higher-level categories of concepts, it explores a more abstract and general semantic space. The extension process is based on generalization relations such as IsA and SubClassOf in the knowledge graph, constructing an upward concept tree for each preceding node to capture the hierarchical structure of nodes in the knowledge system. The construction of the generalization tree is usually limited to a depth of 2-3 levels to avoid excessive abstraction that could lead to semantic defocus. This upward semantic extension strategy can discover potential high-level semantic connections between nodes, providing an important tool for detecting implicit semantic drift.
[0089] In the reverse semantic expansion tree, the most similar generalized node to the initial semantic vector is searched, and the semantic consistency score between this generalized node and the inference starting point is calculated. The optimal generalized node search is a crucial step in finding the semantic regression path, aiming to find the abstract concept that best connects the current state with the original query intent. The search process employs a greedy strategy, traversing all nodes in the expansion tree, calculating their similarity to the initial query semantic vector, and selecting the node with the highest similarity as the optimal generalized point. The consistency score is calculated based on vector similarity, typically using the cosine similarity method, reflecting the alignment between the generalized node and the original semantics. This step achieves semantic regression from the current concrete inference state to the initial abstract query intent, providing an important reference point for evaluating the semantic coherence of the overall inference path.
[0090] Nodes with semantic consistency scores below a preset consistency threshold are marked as semantic deviation nodes, and the proportion of semantic deviation nodes in the reverse tracing path is calculated. Semantic deviation nodes are problem points in the backtracking path, reflecting possible semantic breaks or deviations during the reasoning process. The marking process first compares the consistency score of each node with a preset threshold (usually the lower quartile of the consistency distribution); then, nodes significantly below the threshold are marked as deviation nodes, and their proportion in the entire backtracking path is calculated. A high proportion indicates a large number of semantic deviations in the backtracking path, and the original reasoning path may have serious semantic drift problems; a low proportion indicates that the deviation is relatively localized, and the overall semantic coherence is good. This statistical indicator provides a quality control basis for generating the final backtracking semantic vector.
[0091] A semantic vector is generated based on a weighted combination of the proportion of semantic offset nodes and the semantic consistency score, used for calculating the backtracking deviation value. The backtracking semantic vector is the final output of the backtracking, integrating information from path quality and the optimal generalization point. The generation process first calculates a quality coefficient based on the proportion of offset nodes, reflecting the overall reliability of the backtracking path; then, this coefficient is weighted and combined with the semantic vector of the optimal generalization node to form the final backtracking semantic vector.
[0092] This quality-weighted vector generation method considers both the semantic information of generalized nodes and the quality of the backtracking path, providing a reliable semantic basis for calculating the backtracking deviation value. The difference between the backtracking semantic vector and the initial semantic vector is directly used to calculate the backtracking deviation value, which, together with the forward deviation value, constitutes a complete two-way verification mechanism, significantly improving the accuracy and reliability of logic drift detection.
[0093] This invention achieves highly reliable medical decision support based on knowledge graphs through intent parsing, multi-layer semantic anchor network construction, candidate inference path generation, semantic consistency constraints, confidence decay calculation, logical drift risk identification, and decision integration. The innovation of this invention lies in constructing a complete inference quality monitoring system. Through decay curves and logical drift detection, it achieves full-process quality control of the inference process, significantly improving the reliability and interpretability of medical decision support.
[0094] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
[0095] It should be noted that all formulas in this manual are calculated by removing dimensions and taking their numerical values. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters and thresholds in the formulas are set by those skilled in the art according to the actual situation.
[0096] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims
1. A medical knowledge graph-assisted decision-making system, characterized in that, include: The intent parsing module is used to obtain the patient's clinical characteristic data and diagnosis and treatment query intent, and extract the core medical entities and constraints in the diagnosis and treatment query intent; The network construction module is used to construct a multi-layer semantic anchor network based on the semantic hierarchy of the core medical entities in the knowledge graph. The path generation module is used to generate multiple candidate reasoning paths from the core medical entity to the target decision node based on the multi-layer semantic anchor network, and to calculate the initial confidence value of each candidate reasoning path. The semantic consistency constraint module is used to perform path segmentation processing on each candidate reasoning path and construct a segmented semantic consistency constraint matrix based on the semantic association strength between adjacent path segments. The attenuation calculation module is used to calculate the confidence attenuation coefficient of each path segment along the reasoning direction of the candidate inference path, and generate a path confidence attenuation curve based on the confidence attenuation coefficient and the segmented semantic consistency constraint matrix. The risk identification module is used to set multiple semantic verification anchors in the candidate reasoning path and identify the logical drift risk path segment by calculating the semantic backtracking deviation value at the semantic verification anchor. The adjustment module is used to dynamically adjust the pruning threshold and path expansion depth limit of the candidate inference path based on the distribution characteristics of the logical drift risk path segment. The decision integration module is used to filter effective inference paths based on the endpoint confidence value of the path confidence decay curve and the adjusted pruning threshold, and to integrate the evidence nodes in the effective inference paths to generate decision support conclusions. The output module is used to calculate the multi-source evidence consistency index of the decision support conclusion and output the multi-source evidence consistency index as the decision credibility to the clinical decision interface.
2. The system according to claim 1, characterized in that, The step of constructing a multi-layer semantic anchor network based on the semantic hierarchy of the core medical entities in the knowledge graph includes: Retrieve the directly associated nodes of the core medical entity in the knowledge graph, statistically analyze the type distribution of the directly associated nodes, and identify disease-related nodes, symptom-related nodes, and treatment-related nodes; The disease-related nodes are clustered according to the hierarchical depth of the disease classification system, and the cluster centers are selected as the anchor points of the disease domain. Calculate the feature matching degree between the symptom-type nodes and the clinical feature data, and mark the top N symptom-type nodes with the highest feature matching degree as the symptom domain anchor points; Extract the evidence-based medicine evidence level of the treatment nodes, and set the treatment nodes with evidence levels higher than a preset level threshold as the treatment domain anchor points; Establish cross-domain semantic association edges between the disease domain anchor, the symptom domain anchor, and the treatment domain anchor to form the multi-layer semantic anchor network.
3. The system according to claim 1, characterized in that, The step of segmenting each candidate inference path and constructing a segmented semantic consistency constraint matrix based on the semantic association strength between adjacent path segments includes: Traverse the node sequence in the candidate inference path and identify the locations where the node type changes as segmentation boundary points; The candidate reasoning path is divided into multiple path segments based on the segmentation boundary points; Calculate the cross-segment semantic association strength between adjacent path segments; Construct a path segment adjacency matrix, wherein the rows and columns of the path segment adjacency matrix represent each path segment in the candidate inference path, and the matrix element values are the cross-segment semantic association strengths; The adjacency matrix of the path segments is normalized, and a semantic drift penalty factor is introduced. The semantic drift penalty factor is set incrementally according to the sequence position of the path segments to generate the segment semantic consistency constraint matrix.
4. The system according to claim 1, characterized in that, The calculation of the confidence decay coefficient for each path segment, and the generation of a path confidence decay curve based on the confidence decay coefficient and the segmented semantic consistency constraint matrix, includes: Extract the length of each path segment and the average degree of each node in the candidate inference path, and calculate the structural complexity of each path segment; Based on the structural complexity and the depth position of the path segment in the inference path, calculate the basic confidence decay coefficient of each path segment; Extract the semantic consistency scores of adjacent path segments from the segmented semantic consistency constraint matrix, and mark the path segment pairs with semantic consistency scores lower than a preset consistency threshold as weakly consistent connections; Apply additional confidence decay penalty to the path segment containing the weakly consistent connection, and update the confidence decay coefficient; Along the candidate inference path from the start point to the end point, the confidence decay value of each path segment is accumulated and calculated, and the confidence decay curve of the path is plotted with the path depth as the horizontal axis and the accumulated confidence decay value as the vertical axis.
5. The system according to claim 1, characterized in that, The step of setting multiple semantic verification anchor points in the candidate inference path and identifying logical drift risk path segments by calculating the semantic backtracking deviation value at the semantic verification anchor points includes: In the candidate inference path, a semantic verification anchor point is set every preset number of nodes; For each of the semantic verification anchor points, extract the cumulative semantic vector from the inference starting point to that anchor point; Calculate the cosine distance between the cumulative semantic vector and the initial semantic vector of the diagnostic query intent, and denote it as the forward deviation value; Perform reverse semantic tracing from the semantic verification anchor point toward the inference starting point, calculate the cosine distance between the semantic vector obtained from the reverse tracing and the initial semantic vector, and record it as the backtracking deviation value; The absolute value of the difference between the forward bias value and the backtracking bias value is calculated as the semantic backtracking bias value; The path segment containing the semantic verification anchor point whose semantic backtracking deviation value is greater than the preset deviation threshold is marked as the logical drift risk path segment.
6. The system according to claim 1, characterized in that, The step of dynamically adjusting the pruning threshold and path expansion depth limit of the candidate inference path based on the distribution characteristics of the logical drift risk path segment includes: The proportion of the number of logical drift risk path segments in the candidate reasoning paths is counted and denoted as the path drift density. Calculate the variance of the positional distribution of the logical drift risk path segment in the inference path; When the path drift density is greater than the first density threshold and the location distribution variance is less than the concentration threshold, it is determined to be a concentrated drift mode, and the pruning threshold is increased and the path expansion depth limit is reduced. When the path drift density is greater than the second density threshold and the location distribution variance is greater than the dispersion threshold, it is determined to be a dispersion drift mode, and a path segment-level local pruning strategy is introduced while maintaining the pruning threshold. When the path drift density is less than the second density threshold, it is determined to be a low drift mode, and the pruning threshold is relaxed.
7. The system according to claim 1, characterized in that, The process of filtering effective inference paths based on the endpoint confidence value of the path confidence decay curve and the adjusted pruning threshold, and integrating the evidence nodes in the effective inference paths to generate decision support conclusions, includes: Extract the cumulative confidence decay value of each path segment in the candidate inference path, and determine the endpoint confidence value of each candidate inference path on the path confidence decay curve; The endpoint confidence value is compared with the adjusted pruning threshold, and inference paths with endpoint confidence values lower than the pruning threshold are eliminated, while the valid inference paths are retained. Extract all evidence nodes from the valid reasoning path, including diagnostic evidence nodes, treatment evidence nodes, and prognostic evidence nodes; Evidence nodes of the same type are aggregated by evidence strength to obtain evidence node clusters; Establish a support relationship graph among evidence nodes to identify mutually supporting clusters of evidence nodes and contradictory pairs of evidence nodes; Based on the aggregation strength of the evidence node cluster and the degree of conflict between contradictory evidence node pairs, a decision support conclusion is generated, which includes decision suggestions, supporting evidence, and uncertainty explanations.
8. The system according to claim 1, characterized in that, The calculation of the multi-source evidence consistency index of the decision support conclusion includes: Extract the evidence nodes cited in the decision support conclusions and statistically analyze the knowledge source types from which the evidence nodes originate. Calculate the support level of evidence nodes of different knowledge source types for the decision support conclusion; Construct a knowledge source consistency matrix, and calculate the ratio of the trace to the determinant of the knowledge source consistency matrix, denoted as the matrix consistency coefficient; The consistency coefficient of the matrix is normalized to the logarithm of the total number of evidence nodes to obtain the multi-source evidence consistency index.
9. The system according to claim 3, characterized in that, The calculation of the cross-segment semantic association strength between adjacent path segments includes: Extract the node pairs at the boundary of adjacent path segments, wherein the node pairs include the terminating node of the previous path segment and the starting node of the next path segment. Retrieve the shortest semantic path of the node pair in the medical ontology, and calculate the length of the shortest semantic path as the semantic distance; The co-occurrence frequency of the node pairs in the clinical medical record database is statistically analyzed, and different weights are assigned according to the length of the co-occurrence time window to obtain the clinical relevance. Extract the attribute sets of the node pairs, and calculate the ratio of the intersection to the union of the attribute sets as the attribute overlap. The cross-segment semantic association strength is obtained by weighted summing of the reciprocal of the semantic distance, the clinical relevance, and the attribute overlap.
10. The system according to claim 5, characterized in that, The reverse semantic tracing from the semantic verification anchor point to the inference starting point includes: Starting from the semantic verification anchor point, the sequence of preceding nodes is extracted in reverse along the reasoning path, and the window length for reverse tracing is set to a preset number of nodes; For each node in the preceding node sequence, extract its generalized relation edges in the knowledge graph that point to higher-level concepts, and construct a reverse semantic extension tree; Search for the generalized node in the reverse semantic expansion tree that is most similar to the initial semantic vector, and calculate the semantic consistency score between the generalized node and the inference starting point; Nodes whose semantic consistency scores are lower than a preset consistency threshold are marked as semantic offset nodes, and the proportion of semantic offset nodes in the reverse tracing path is calculated. The semantic vector obtained by reverse tracing is generated by weighting the proportion of semantic offset nodes and the semantic consistency score.