Method for constructing and semantic reasoning of multi-level knowledge graph facing medical decision

By constructing a multi-level knowledge graph and using a recursive deep search algorithm, combined with attention mechanisms and medical diagnosis and treatment rules, the problem of insufficient expressive power and inference path reliability of medical knowledge graphs in existing technologies is solved, thus achieving efficient and reliable medical decision support.

CN121168681BActive Publication Date: 2026-03-24BEIJING CORE HIGHLAND BIOTECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-13
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing methods for constructing and reasoning medical knowledge graphs have a single-layer planar structure, which cannot effectively express complex hierarchical relationships, lacks a dynamic evaluation mechanism for the reliability of reasoning paths, makes it difficult to provide comprehensive decision-making references, and reduces the reliability and clinical applicability of decision-making suggestions.

Method used

A multi-level knowledge graph construction method is adopted, and reasoning paths are mined through recursive deep search algorithm and attention mechanism. Combined with medical diagnosis and treatment rules and historical case similarity matching, the decision suggestions are validated and optimized.

Benefits of technology

It improves the accuracy and consistency of knowledge representation, significantly enhances the scientific rigor and interpretability of medical decision-making, and ensures the reliability and clinical applicability of decision recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121168681B_ABST
    Figure CN121168681B_ABST
Patent Text Reader

Abstract

The application provides a multi-level knowledge graph construction and semantic reasoning method for medical decision-making, relates to the technical field of knowledge graph, and comprises the following steps: performing semantic segmentation and standardization processing on medical text corpus, extracting medical entities and attributes, and constructing a correlation matrix; based on recursive deep search, mining a reasoning path, and selecting an optimal path by using an attention mechanism; and combining medical rules to verify and optimize the decision-making. The application can improve the accuracy and reliability of medical decision-making, realize efficient mining and application of complex medical knowledge, and provide effective support for clinical diagnosis and treatment.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to knowledge graph technology, and in particular to a multi-level knowledge graph construction and semantic reasoning method for medical decision-making. BACKGROUND

[0002] With the rapid development of medical informatization, the medical field has accumulated a large amount of clinical data, medical literature and professional knowledge. How to efficiently extract valuable information from these complex multi-source medical data and support doctors to make accurate clinical decisions has become a key challenge in the field of medical informatization. As a structured knowledge representation method, knowledge graph can effectively organize the complex relationship network in the medical field and provide knowledge support for medical decision-making.

[0003] Currently, medical knowledge graph construction mainly relies on extracting entities and relationships from medical texts to represent the association between medical concepts in the form of semantic networks. In the aspect of medical decision support, traditional methods are mostly based on rule-based reasoning or statistical learning methods for knowledge derivation to provide auxiliary support for clinical diagnosis and treatment. However, existing medical knowledge graph construction and reasoning methods still face many challenges.

[0004] The existing technology has the following defects in the construction and reasoning of knowledge graph for medical decision-making: First, existing medical knowledge graphs are mostly single-layer flat structures, which cannot effectively express the complex hierarchical relationships between medical concepts, resulting in insufficient knowledge expression ability in complex medical decision-making scenarios. Second, existing reasoning methods often lack a dynamic evaluation mechanism for the reliability of reasoning paths, making it difficult to distinguish the credibility of different reasoning paths and easily producing misleading conclusions. Third, existing decision-making recommendation generation systems usually fail to effectively integrate rule verification and case similarity matching, making it difficult to provide comprehensive decision-making references that combine theoretical guidance and clinical practice support, reducing the reliability and clinical applicability of decision-making recommendations. SUMMARY

[0005] The embodiment of the present application provides a multi-level knowledge graph construction and semantic reasoning method for medical decision-making, which can solve the problems in the prior art.

[0006] In a first aspect, the embodiment of the present application provides a multi-level knowledge graph construction and semantic reasoning method for medical decision-making, comprising:

[0007] Obtaining a medical text corpus, performing semantic segmentation and standardization processing on the medical text corpus to obtain a standardized semantic unit sequence, performing entity extraction and attribute recognition on the standardized semantic unit sequence to obtain a medical entity set and its corresponding attribute features, calculating the semantic association degree between entity pairs according to the attribute features of each entity in the medical entity set, and constructing an association matrix between entities according to the semantic association degree;

[0008] mining potential reasoning paths in the association matrix based on a recursive depth search algorithm, dynamically evaluating the confidence of different reasoning paths through an attention mechanism, and selecting an optimal reasoning path as a decision basis; generating a preliminary decision suggestion based on the optimal reasoning path, and combining medical diagnosis and treatment rules to verify the preliminary decision suggestion; performing reliability evaluation on the decision suggestion verified by the rules, and optimizing and adjusting the decision suggestion according to the verification result based on similarity matching of historical cases and logical deduction based on medical rules.

[0009] According to the attribute characteristics of each entity in the medical entity set, the semantic correlation degree between entity pairs is calculated, and an association matrix between entities is constructed according to the semantic correlation degree, which includes:

[0010] Obtain the attribute characteristics of each entity in the medical entity set, and convert the attribute characteristics into high-dimensional feature vectors through embedding mapping; perform hierarchical coding on the high-dimensional feature vectors, calculate the similarity matrix between feature vectors through an attention mechanism, and calculate the co-occurrence probability distribution based on the context information of the entity, and the similarity matrix and the co-occurrence probability distribution are weighted and fused to obtain the initial semantic correlation degree between entity pairs;

[0011] According to the initial semantic correlation degree and calculating the weight coefficient of each entity pair in the association matrix; based on the recursive depth propagation algorithm, the association matrix is iteratively optimized, the multi-hop semantic path between entities is calculated, and the transmission strength of direct association and indirect association is combined in each iteration to dynamically update the semantic correlation degree in the association matrix; the optimized association matrix is sparsified to retain significant semantic associations, and a final entity association matrix is generated.

[0012] mining potential reasoning paths in the association matrix based on a recursive depth search algorithm, dynamically evaluating the confidence of different reasoning paths through an attention mechanism, and selecting an optimal reasoning path as a decision basis includes:

[0013] Based on the recursive depth search algorithm, the path exploration is performed in the association matrix, the search space is controlled by setting the maximum recursion depth, the cumulative semantic strength of each candidate path is calculated, and the Monte Carlo tree search strategy is adopted to dynamically adjust the search direction, so as to mine a set of potential reasoning paths with significant semantic associations in the association matrix;

[0014] extract a path feature vector for each path in the set of potential reasoning paths, construct a multi-head attention network, input the path feature vector into the multi-head attention network, obtain a path confidence score by calculating a weighted combination of different attention heads, and sort and screen each path in the set of reasoning paths based on the path confidence score, select the path with the highest confidence as the optimal reasoning path, and use the optimal reasoning path for medical decision support.

[0015] Based on the recursive depth search algorithm, path exploration is performed in the association matrix, the search space is controlled by setting the maximum recursion depth, the cumulative semantic strength is calculated for each candidate path, and the Monte Carlo tree search strategy is used to dynamically adjust the search direction, so as to mine a set of potential reasoning paths with significant semantic association in the association matrix, including:

[0016] The entity association matrix is converted into a weighted directed graph structure, and a node access record table is established based on the weighted directed graph structure. Based on the recursive depth search algorithm, path exploration is performed in the node access record table. The maximum recursion depth threshold is set to limit the search depth. The cumulative semantic strength from the starting node to the current node is calculated at each search step. The path with the cumulative semantic strength exceeding the preset semantic threshold is added to the candidate path set.

[0017] The Monte Carlo tree search strategy is used to dynamically adjust the search direction. Based on the candidate path set, a search tree is constructed. At each node of the search tree, multiple rounds of random exploration are performed. The cumulative semantic strength and the access node sequence of the path are recorded in each round of exploration process. The value of different search branches is evaluated through the results of multiple rounds of exploration. According to the value evaluation result, a search probability is assigned to each selectable branch.

[0018] Based on the search probability, branch selection and path exploration are continuously performed. The paths with significant semantic association found are continuously supplemented to the candidate path set. The paths in the candidate path set are sorted in descending order according to the cumulative semantic strength. The paths with the highest semantic strength are selected as the final reasoning path set.

[0019] Based on the optimal reasoning path, a preliminary decision suggestion is generated, and the preliminary decision suggestion is verified according to the medical diagnosis and treatment rules, including:

[0020] Node information and inter-node association relationship are extracted from the optimal reasoning path to construct a decision element set. Based on the decision element set, a matching template is retrieved in a preset decision template library. According to the correspondence between node types and association types, a corresponding decision expression mode is selected. The information in the decision element set is dynamically filled into the corresponding expression template position to generate a structured preliminary decision suggestion.

[0021] extracting a medical diagnosis and treatment rule set related to the preliminary decision suggestion from a rule base, performing semantic matching between structured content of the preliminary decision suggestion and the medical diagnosis and treatment rule set, and calculating a matching degree of each decision content and a corresponding rule;

[0022] based on the result of the semantic matching, identifying content in the preliminary decision suggestion with a matching degree lower than a preset matching threshold and marking it as a to-be-corrected item, adjusting the to-be-corrected item according to a specific rule violated, and ensuring that the decision suggestion conforms to standard medical norms.

[0023] performing reliability evaluation on the decision suggestion verified by rules, based on similarity matching of historical cases and logical deduction based on medical rules, and optimizing and adjusting the decision suggestion according to the verification result, including:

[0024] retrieving similar cases from a historical case base based on feature information of the decision suggestion, calculating a feature vector similarity between the decision suggestion and the similar cases, constructing a case similarity evaluation matrix, extracting diagnosis and treatment effect data and risk factors in the case with the highest similarity, and performing reliability evaluation on the decision suggestion at the case level;

[0025] extracting an associated rule chain from a medical rule base based on the decision suggestion, constructing a diagnosis and treatment reasoning graph using the associated rule chain, performing reliability verification on diagnosis and treatment logic of the decision suggestion in the diagnosis and treatment reasoning graph, calculating a logical strength score of each reasoning path, and marking weak links with a logical strength lower than a preset strength threshold;

[0026] based on the case similarity evaluation result and the reasoning logic verification result, identifying content in the decision suggestion with a reliability score lower than a preset score threshold or with a logical weak link, optimizing and adjusting it in combination with diagnosis and treatment experience of reliable cases, and generating a final medical decision suggestion.

[0027] performing reliability verification on diagnosis and treatment logic of the decision suggestion in the diagnosis and treatment reasoning graph, calculating a logical strength score of each reasoning path, and marking weak links with a logical strength score lower than a preset strength threshold, including:

[0028] locating a diagnosis and treatment path corresponding to the decision suggestion in the diagnosis and treatment reasoning graph, extracting a rule node sequence on the diagnosis and treatment path, verifying diagnosis and treatment logic layer by layer along the rule node sequence in the diagnosis and treatment reasoning graph, calculating a semantic association strength and a rule matching degree between adjacent rule nodes, and taking a weighted sum of the semantic association strength and the rule matching degree as a transfer coefficient between nodes;

[0029] Based on the transfer coefficient, the logical strength score of each diagnosis and treatment path is calculated, the logical strength score is compared with a preset strength threshold, and the path node with a score lower than the preset strength threshold is marked as a weak link.

[0030] In a second aspect, the present application provides an electronic device, comprising:

[0031] a processor;

[0032] a memory for storing processor-executable instructions;

[0033] The processor is configured to invoke the instructions stored in the memory to execute the method described above.

[0034] In a third aspect, the present application provides a computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions are executed by a processor to implement the method described above.

[0035] The present application has the following advantages:

[0036] The present application realizes accurate extraction of medical entities and their attributes by performing semantic segmentation and standardization processing on medical text corpus, effectively solves the problems of unclear entity relationship and inconsistent semantic expression in the traditional knowledge graph construction process, and improves the accuracy and consistency of knowledge representation.

[0037] The present application uses a recursive deep search algorithm combined with an attention mechanism to mine and evaluate inference paths, overcomes the defects of traditional inference methods in grasping complex medical relationships, and can quickly locate key information in massive medical knowledge and form a reasonable inference chain, significantly improving the scientificity and interpretability of medical decision-making.

[0038] The present application verifies and optimizes the decision-making suggestions in combination with medical diagnosis and treatment rules, ensures the reliability and clinical applicability of the decision-making suggestions through historical case similarity matching and medical rule logical deduction, effectively reduces the risk of medical decision-making, and provides more accurate and personalized intelligent support for medical decision-making. BRIEF DESCRIPTION OF DRAWINGS

[0039] Figure 1 A flowchart of the medical decision-oriented multi-level knowledge graph construction and semantic reasoning method of the present application embodiment;

[0040] Figure 2 A flowchart of the medical diagnosis and treatment scheme reliability reasoning verification and optimization of the present application embodiment. DETAILED DESCRIPTION

[0041] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0042] The technical solutions of the present application will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and some embodiments may not be described again for the same or similar concepts or processes.

[0043] Figure 1 The flowchart of the medical decision-oriented multi-level knowledge graph construction and semantic reasoning method of the embodiments of the present application is shown as Figure 1 The method comprises the following steps:

[0044] Obtaining a medical text corpus, performing semantic segmentation and standardization processing on the medical text corpus to obtain a standardized semantic unit sequence, performing entity extraction and attribute recognition on the standardized semantic unit sequence to obtain a medical entity set and corresponding attribute features, calculating the semantic correlation degree between entity pairs according to the attribute features of each entity in the medical entity set, and constructing an association matrix between entities according to the semantic correlation degree;

[0045] Based on the recursive deep search algorithm, potential reasoning paths are mined in the association matrix, the confidence of different reasoning paths is dynamically evaluated through the attention mechanism, and the optimal reasoning path is selected as the decision basis. Based on the optimal reasoning path, a preliminary decision suggestion is generated, and the preliminary decision suggestion is verified according to the medical diagnosis and treatment rules. The reliability of the decision suggestion verified by the rules is evaluated, and the decision suggestion is optimized and adjusted according to the verification result based on the similarity matching of historical cases and the logical deduction based on medical rules.

[0046] In an optional implementation, calculating the semantic correlation degree between entity pairs according to the attribute features of each entity in the medical entity set, and constructing an association matrix between entities according to the semantic correlation degree comprises:

[0047] Obtaining the attribute features of each entity in the medical entity set, converting the attribute features into high-dimensional feature vectors through embedding mapping, performing hierarchical coding on the high-dimensional feature vectors, calculating the similarity matrix between feature vectors through the attention mechanism, calculating the co-occurrence probability distribution based on the context information of the entities, and weighting and fusing the similarity matrix and the co-occurrence probability distribution to obtain the initial semantic correlation degree between entity pairs;

[0048] According to the initial semantic correlation degree and calculating the weight coefficient of each entity pair in the correlation matrix; based on the recursive depth propagation algorithm, the correlation matrix is iteratively optimized, the semantic correlation degree in the correlation matrix is dynamically updated by calculating the multi-hop semantic path between entities, and the transmission strength of direct correlation and indirect correlation is combined in each iteration; the optimized correlation matrix is sparsified to retain significant semantic correlations, and a final entity correlation matrix is generated.

[0049] The semantic feature encoding occupies a 128-dimensional space, and is encoded using a pre-trained medical BERT model or BioBERT model. For structured semantic information such as medical terminology standard encoding, ICD disease classification code, ATC drug classification code, etc., the corresponding pre-trained embedding vector is obtained through a special medical dictionary lookup. For text type semantic information such as drug action mechanism description, a sentence level encoder is used for semantic understanding, and an attention pooling mechanism is used to compress the variable length text into a fixed 128-dimensional vector representation.

[0050] The structural feature encoding occupies a 128-dimensional space, and the Node2Vec algorithm in the graph neural network is used to vectorize the medical ontology hierarchical relationship. The hierarchical position of the entity in the medical ontology tree, the parent-child concept relationship, and the sibling concept relationship are converted into a graph structure representation, a node sequence is generated through biased random walk, and the Skip-gram model is used to learn the structural embedding representation of the node. The return parameter in the walk strategy is set to a small value, and the forward parameter is set to a large value, to preferentially explore the local neighborhood structure.

[0051] The statistical feature encoding occupies a 128-dimensional space, and the numerical statistical features such as occurrence frequency, co-occurrence frequency, document distribution, and time distribution are preprocessed and mapped. First, the frequency data is logarithmically transformed to address the long-tail distribution problem, and then the values are scaled to the interval of zero to one through min-max normalization. The preprocessed statistical features are mapped to a 128-dimensional space through a three-layer multilayer perceptron network, the activation function is ReLU, and the linear activation is used in the last layer to ensure the continuity of the features.

[0052] The context feature encoding occupies a 128-dimensional space, and a bidirectional long short-term memory network is used to process the context word sequence around the entity. The context window is set to 10 words before and after, and the words in the window are converted into word vector sequences through pre-trained medical word vectors. The hidden state dimension of the bidirectional LSTM encoder is set to 64, and the 128-dimensional context representation is obtained by concatenating the forward and backward hidden states. In order to handle the variable length sequence problem, a dynamic pooling strategy based on attention mechanism is used to extract key context information.

[0053] The four 128-dimensional sub-vectors are finally combined into a 512-dimensional complete entity feature vector through a feature concatenation operation, including semantic features, structural features, statistical features, and contextual features. The concatenated vector is processed by layer normalization to ensure numerical stability and add position encoding information to identify the source of different feature dimensions.

[0054] The three-layer abstraction mechanism of hierarchical coding adopts a multi-layer transformer architecture, which performs layer-by-layer semantic abstraction on the input 512-dimensional high-dimensional feature vector through three layers of encoders, each layer focusing on different granularity feature patterns and concept relationships.

[0055] The first layer encoder focuses on fine-grained feature learning, mainly capturing the dependency relationships and interaction patterns between different attribute feature dimensions within the entity. The multi-head self-attention mechanism includes 8 parallel attention heads, each focusing on different feature interaction patterns. The attention heads focus on semantic structural feature interaction, semantic statistical feature interaction, structural contextual feature interaction, and statistical contextual feature interaction, among other cross-dimensional relationships. The feedforward neural network uses a gated linear unit activation function, with the intermediate layer dimension expanded to a higher dimension, which can enhance the ability to capture subtle semantic differences in medical terminology. Residual connections and layer normalization operations ensure effective gradient propagation.

[0056] The second layer encoder focuses on medium-grained pattern recognition, identifying higher-level semantic combination patterns based on the first layer feature interaction. The attention mechanism begins to focus on composite patterns across feature dimensions, such as the treatment regimen pattern of drug classes, indications, and administration routes, and the diagnosis pattern of diseases, symptoms, and signs. This layer's multi-head attention can capture functional relationships, causal relationships, and temporal relationships between medical concepts. The Dropout mechanism is introduced in the feedforward network to prevent overfitting, with a dropout rate set to a low level.

[0057] The third layer encoder implements coarse-grained semantic abstraction, generating the highest level of concept representation, focusing on the semantic role and clinical value of entities in the entire medical knowledge system. This layer's representation vector contains the entity's overall semantic features, clinical importance indicators, and potential association patterns with other entities. The attention mechanism in this layer can identify long-distance semantic dependency relationships, such as the treatment relationship between drugs and diseases, and the diagnosis relationship between symptoms and diseases. The final output of the 512-dimensional vector is the high-level semantic abstract representation of the entity.

[0058] The specific calculation process of each layer encoder includes multi-head attention calculation, where each attention head calculates the attention weights of the query, key, and value matrices. Then, through residual connection and layer normalization, the intermediate output is obtained. Finally, the feedforward network is processed to obtain the final output of this layer, which uses two layers of linear transformation and activation functions.

[0059] The recursive depth search algorithm discovers hidden indirect semantic relationships by mining multi-hop association paths between entities, enhancing the connection strength and reasoning ability of the entity association network. The core idea of the algorithm is based on the transitivity of medical knowledge. If entity A has a semantic association with entity B, and entity B has a semantic association with entity C, then A and C should also have an indirect association. This transitivity is particularly important in the medical field, for example, drugs affect physiological processes by acting on specific biological targets, thereby treating related diseases.

[0060] The initialization of the current association matrix is equal to the original semantic association degree matrix. In each iteration, the association strength of multi-hop paths is calculated through matrix multiplication. The two-hop path matrix is obtained by self-multiplying the association matrix, representing indirect association through one intermediate entity. The three-hop path matrix is obtained by multiplying the two-hop matrix with the original matrix, representing indirect association through two intermediate entities. This process is repeated to calculate the five-hop path matrix.

[0061] The fusion of multi-hop paths adopts a weight decay strategy, where the indirect association strength is equal to the weighted sum of the strength of each hop path, and the weight coefficients decrease in turn, reflecting the impact of path length on reliability. The two-hop path has the highest weight, followed by the three-hop path, and the four-hop and five-hop paths have smaller weights.

[0062] To ensure the reliability of the path, a bottleneck constraint mechanism is introduced. For any multi-hop path, the minimum association strength on the path is taken as the effective strength of the path. This can avoid the weak association path from producing an excessively strong transitive effect.

[0063] The dynamic update of the association matrix adopts a momentum optimization strategy, where the new association strength combines the momentum term and the current update term, with a high momentum coefficient. This update method can smooth the changes in association strength and avoid oscillation in the iteration process.

[0064] The iteration termination condition is based on the matrix convergence judgment. When the change amplitude of the association matrix in two consecutive iterations is less than the preset threshold, the iteration is stopped. The Frobenius norm ensures the convergence of the entire matrix.

[0065] The acquisition and processing of medical entity attribute features are achieved through a multi-dimensional feature extraction mechanism, systematically extracting attribute information from each medical entity in four core dimensions.

[0066] The semantic feature extraction process first maps entities to international standard medical coding systems through a medical terminology standardization module. Disease entities obtain standard classification codes through the ICD coding system, drug entities obtain pharmacological classification information through the ATC classification system, and surgical entities obtain operation classification codes through the corresponding surgical coding. At the same time, standardized semantic information such as UMLS concept unique identifiers, semantic types, etc. of the entity medical ontology path is extracted. For complex concepts such as drug action mechanism description, a pre-trained medical language model is used for semantic coding to generate a fixed-dimensional semantic vector representation.

[0067] The structural feature extraction relies on large-scale medical knowledge graphs such as UMLS, SNOMED CT, etc. authoritative knowledge base, and analyzes the position information of entities in the medical ontology hierarchy. The superior concept relationship is obtained through the parent node path of the ontology tree, the inferior concept relationship is determined through the child node set, and the sibling concept relationship is identified through the brother nodes of the common parent node. Hierarchical depth, branch factor, and concept specificity quantify the status of entities in the knowledge system.

[0068] The statistical feature collection is based on large-scale medical literature corpus such as PubMed, clinical trial database, electronic health records, etc. multi-source data. The entity frequency is obtained through document-level and sentence-level statistics, the co-occurrence frequency analyzes the pattern of entities appearing in the same context with other entities, the document distribution reflects the coverage of entities in different medical fields, and the time distribution reveals the research trend of the entity. The statistical process considers the weight distribution of the data source, and the statistical results of core journals and high-quality databases obtain higher weights.

[0069] The context feature extraction analyzes the usage pattern of entities in real medical text through natural language processing technology, and the previous and subsequent words are extracted through a sliding window mechanism with a window size of 10 words before and after. The syntactic relationship is obtained through dependency syntax analysis, which identifies the syntactic relationship between the entity and the modifier, the predicate verb, the object, etc. Semantic role labeling determines the semantic function of the entity in the sentence, such as subject, object, tool, etc. Modifier words include adjectives, adverbs, and other descriptive words, reflecting the attribute characteristics and usage context of the entity.

[0070] The process of converting the attribute features into high-dimensional feature vectors through embedding mapping adopts a hierarchical coding strategy. Each dimension of the attribute feature is first converted into a 128-dimensional sub-vector representation through a dedicated encoder. The semantic feature encoder is based on a pre-trained medical language model and can understand the professional meaning of medical terminology. The structural feature encoder uses a graph embedding algorithm to encode the hierarchical relationship information into a vector representation. The statistical feature encoder processes numerical features through numerical normalization and nonlinear transformation. The context feature encoder uses a sequence model to capture the temporal dependence of linguistic features.

[0071] The four 128-dimensional sub-vectors are combined into a 512-dimensional complete entity feature vector by a feature fusion module. The fusion process is not a simple concatenation operation, but through an attention mechanism to learn the importance weight of different feature dimensions, and adaptively adjust the contribution proportion of each dimension feature. The fused vector is processed by batch normalization to ensure the stability of the feature distribution, and entity type embedding is added to enhance the model's ability to distinguish different types of medical entities.

[0072] The semantic correlation degree calculation adopts a multi-level similarity measurement mechanism, considering four dimensions of semantic similarity, structural correlation, statistical co-occurrence, and contextual consistency.

[0073] The semantic similarity calculation is based on the 512-dimensional feature vector representation of the entity, and the cosine similarity is used to measure the closeness of the entity pair in the high-dimensional semantic space. The calculation method is the inner product of the two vectors divided by the product of their respective module lengths. In order to enhance the discriminability of semantic similarity, a learned distance measurement function is used instead of a simple cosine similarity, and a neural network is used to learn the most suitable similarity measurement standard for the medical field.

[0074] The structural similarity analysis calculates the structured path similarity between entities in the medical knowledge graph. After encoding the structural information through graph embedding algorithm, the similarity of the structural feature vector is calculated. The semantic distance of entities in the ontology hierarchy is also considered, and the closer the distance, the higher the structural similarity. The path similarity is calculated by the shortest path length, common ancestor node, semantic depth, etc.

[0075] The statistical co-occurrence degree is based on the co-occurrence pattern of entity pairs in medical literature, and point mutual information and conditional probability are used to model the statistical association strength between entities. Point mutual information is calculated by the logarithmic ratio of the joint probability and marginal probability of the entity pair, which measures the statistical independence of the entity pair. Conditional probability reflects the possibility of the occurrence of another entity given the occurrence of a certain entity. In order to deal with the problem of data sparsity, Laplace smoothing technique is used to assign a small non-zero probability value to unobserved entity pairs.

[0076] The contextual consistency analyzes the frequency and pattern of entity occurrence in similar contexts, and calculates the contextual association strength of entity pairs through the similarity of context vectors. The lexical distribution, syntactic pattern, semantic role, etc. in the context window form the context features, and the context vector representation is generated by the sequence encoder. The consistency measure considers the semantic overlap and syntactic pattern matching degree of the context.

[0077] The comprehensive correlation degree is obtained by weighted fusion of the similarity of the four dimensions, and the weight coefficients are determined by optimization of the verification set. The weight of semantic similarity is the highest, the weights of structural similarity and statistical co-occurrence are equal and the second, and the weight of context consistency is the lowest. The weight distribution reflects the importance of different dimensions in medical entity correlation.

[0078] According to the semantic correlation degree, an association matrix between entities is constructed, wherein each element represents the semantic correlation strength between the corresponding entity pair. The association matrix has a symmetric property because the semantic correlation relationship is bidirectional. The diagonal elements of the matrix are set to the maximum value, indicating the complete correlation of an entity with itself. In order to control the density of the matrix, an adaptive threshold filtering mechanism is used, and elements with a correlation strength lower than the dynamic threshold are set to zero. The threshold is automatically determined according to the statistical characteristics of the correlation strength distribution.

[0079] The association matrix is iteratively optimized based on the recursive depth propagation algorithm, which gradually enhances the correlation strength between entities through multiple rounds of propagation process, and mines hidden indirect semantic relationships. In the initialization stage, the iteration parameters and algorithm configuration are set. The maximum number of iterations is set to 50 rounds, the convergence threshold is set to a small value, and the momentum coefficient is set to a high value. The current association matrix and the historical matrix are maintained for calculating the matrix change amplitude and convergence judgment.

[0080] The multi-hop path calculation in each iteration realizes the discovery of indirect correlation through matrix multiplication operation. The two-hop path matrix is obtained by multiplying the association matrix with itself, and each element in the matrix represents the strongest path strength from entity i to entity j through one intermediate entity. The three-hop path matrix is obtained by multiplying the two-hop matrix with the original matrix, and the four-hop and five-hop paths are obtained in the same way. In each matrix multiplication process, a path reliability constraint mechanism is used to ensure the quality of the propagation path.

[0081] The decay weight design of path strength reflects the distance effect in medical reasoning, that is, the longer the reasoning chain, the lower the reliability. The two-hop path weight reflects the high credibility of one-hop intermediary relationship, the three-hop path weight reflects the moderate credibility of two-hop transmission, and the four-hop and five-hop path weights reflect the low credibility of long-distance transmission.

[0082] The calculation of indirect correlation strength adopts a weighted summation strategy, which accumulates the path strength of each hop according to the corresponding weight. In order to avoid the cumulative effect of weak paths, a path strength lower bound constraint is introduced. Only when the correlation strength of all edges on the path is greater than a certain threshold, the path is involved in the calculation of indirect correlation.

[0083] The dynamic update strategy combines direct correlation and indirect correlation, and uses a momentum optimization smoothing update process. The new correlation strength combines the momentum term, direct correlation score and indirect correlation score, with a smaller scaling factor for indirect correlation. The momentum mechanism can maintain the stability of the update and avoid aggressive numerical changes.

[0084] Convergence detection is performed by computing the norm difference of the correlation matrix between successive iterations, using the Frobenius norm to measure the magnitude of change across the entire matrix. When the norm difference is less than the convergence threshold for multiple rounds in a row, the algorithm is considered to have converged and the iterations are terminated.

[0085] The optimized correlation matrix is subjected to a final sparsification process to retain entity pair relationships that are both semantically significant and medically meaningful. Sparsification employs an adaptive threshold strategy, with the threshold dynamically determined based on the statistical distribution of the matrix elements, typically selecting the high quantile as the significance threshold. The sparsification process also takes into account graph connectivity to ensure the topological integrity of the medical concept network, with the associations of key bridging entities and hub entities being prioritized for retention.

[0086] In an alternative embodiment, a recursive depth search algorithm is used to mine potential reasoning paths in the correlation matrix, with an attention mechanism employed to dynamically evaluate the confidence of different reasoning paths, and the optimal reasoning path selected as the basis for decision-making, including:

[0087] A recursive depth search algorithm is used to explore paths in the correlation matrix, with the search space controlled by setting a maximum recursion depth, the cumulative semantic strength of each candidate path calculated, and a Monte Carlo tree search strategy employed to dynamically adjust the search direction, thereby mining a set of potential reasoning paths with significant semantic correlation in the correlation matrix;

[0088] A path feature vector is extracted for each path in the set of potential reasoning paths, a multi-head attention network constructed, the path feature vector input into the multi-head attention network, the path confidence score obtained by calculating the weighted combination of different attention heads, and each path in the set of reasoning paths ranked and filtered based on the path confidence score, with the path with the highest confidence selected as the optimal reasoning path, which is used for medical decision support.

[0089] As shown in Figure 2 the method comprises:

[0090] Based on the recursive depth search algorithm in the association matrix to mine potential reasoning path is a systematic multi-level path discovery process. The algorithm starts from the given starting medical entity, and performs a depth-first search in the semantic network composed of the association matrix, gradually building possible reasoning chains. The core of the recursive search mechanism is the dynamic path construction strategy, which maintains a current path stack to record the sequence of visited entities. Each time, the algorithm selects the neighbor node with the highest association strength as the next hop candidate. To avoid the path falling into a local optimal solution, the algorithm uses a random sampling strategy based on the association strength, which randomly selects the next node according to the probability distribution of the association strength, ensuring the directionality of the search and increasing the diversity of the path. The setting of the maximum recursion depth is based on the actual characteristics of medical reasoning, generally limited within 5 to 7 hops. Too short path cannot capture complex medical association relationship, and too long path will introduce too much noise and reduce the reasoning reliability. The algorithm records the effective paths found at each depth level, and uses corresponding evaluation criteria and weight allocation for paths of different depths.

[0091] The calculation of cumulative semantic strength considers the association strength of each edge in the path and the semantic consistency of the whole path. Instead of simply multiplying or adding the edge weights, the algorithm uses a complex scoring function to consider the smoothness of the path, the rationality of the semantic turning point, and the coherence of the medical logic. For paths containing multiple concept jumps, the algorithm checks whether these jumps conform to medical common sense and clinical practice rules. The introduction of the Monte Carlo tree search strategy enables the algorithm to perform online learning and optimization during the search process. The algorithm maintains a search tree structure, where each node represents a medical entity and the edge represents a possible reasoning step. By simulating a large number of random walk processes, the algorithm evaluates the potential value of different search directions and dynamically adjusts the search strategy. During the search process, the algorithm dynamically maintains a candidate path pool, checks the overlap between the new path and the existing path when a new path is found, and ensures the diversity and representativeness of the final path set through quality comparison and deduplication mechanism.

[0092] The dynamic evaluation of the reasoning path confidence through the attention mechanism is the core link of path optimization. The extraction process of path feature vector comprehensively considers multiple dimensions of information, including path length, average correlation strength, semantic consistency, medical rationality, and other key indicators. The path length feature reflects the complexity of reasoning. Generally, shorter paths have higher credibility, but for some complex medical associations, a moderate path length is needed. The algorithm dynamically adjusts the preference for path length according to the types of the starting and ending entities. The average correlation strength feature measures the average quality of each connection in the path, which is an important indicator of path reliability. The algorithm not only calculates the arithmetic mean, but also calculates the geometric mean and harmonic mean to comprehensively evaluate the overall strength of the path. The semantic consistency feature evaluates the degree of continuity of each entity in the path in the semantic space. By calculating the cosine similarity sequence of adjacent entity vectors in the path, the smoothness of semantic transition is analyzed. If there is a connection with a large semantic jump in the path, it will negatively affect the overall consistency score. The medical rationality feature is evaluated based on type constraints and domain rules in the medical knowledge graph. For example, paths from drugs to diseases should comply with pharmacological principles, and paths from symptoms to diagnoses should follow clinical reasoning logic. The algorithm has built-in common reasoning patterns in the medical field, which can identify and reward paths that comply with these patterns.

[0093] The construction of the multi-head attention network uses an architecture specifically designed for sequence path data. The network contains multiple parallel attention heads, each focusing on different aspects of path features. The first attention head focuses on the structural features of the path, analyzing the topological properties and connection patterns. The second attention head focuses on semantic features, evaluating the semantic coherence and concept correlation of the path. The third attention head focuses on statistical features, considering the co-occurrence patterns and frequency distribution of entities in real medical data. The fourth attention head focuses on context features, analyzing the applicability and effectiveness of the path in different application scenarios. In the calculation process of attention weights, the algorithm considers the similarity between query vectors and key vectors and the importance of the information carried by value vectors. For medical reasoning paths, special attention is paid to the starting and ending nodes, as these nodes often determine the specific goals and constraints of the reasoning task. The calculation of path confidence score uses a weighted fusion strategy to intelligently combine the outputs of multiple attention heads. The algorithm adjusts the weights of different attention heads according to specific medical reasoning tasks, such as giving more importance to structural features for drug discovery tasks and giving more importance to semantic features for disease diagnosis tasks.

[0094] The confidence evaluation also considers the stability and robustness indicators of the paths, and the algorithm performs perturbation tests on each path by slightly modifying certain connections in the path to observe the change in the overall quality of the path. Paths with high stability maintain a high quality score even when faced with small perturbations. The selection of optimal reasoning paths is based not only on the confidence scores but also on the diversity and complementarity of the paths. The algorithm avoids selecting overly similar paths and tends to select a combination of paths that have advantages in different dimensions. This diversity strategy provides more comprehensive medical decision support information. In medical decision support applications, the optimal reasoning paths are converted into interpretable reasoning chains, and the algorithm provides detailed semantic explanations for each reasoning step, explaining why there is an association between two medical concepts and the confidence level of the association. This interpretability is crucial for medical professionals to understand and verify the reasoning process of the AI system. The dynamic updating mechanism of the reasoning paths ensures that the system can continuously improve as new medical knowledge emerges. When the association matrix is updated, the algorithm re-evaluates the effectiveness of existing paths and explores new reasoning possibilities. This adaptive feature enables the system to keep pace with the rapid development of medical knowledge.

[0095] In an optional implementation, path exploration is performed in the association matrix based on a recursive depth search algorithm. The search space is controlled by setting a maximum recursion depth, the cumulative semantic intensity of each candidate path is calculated, and a Monte Carlo tree search strategy is used to dynamically adjust the search direction, thereby mining a set of potential reasoning paths with significant semantic associations in the association matrix, including:

[0096] The entity association matrix is converted into a weighted directed graph structure, and a node access record table is established based on the weighted directed graph structure. Path exploration is performed in the node access record table based on a recursive depth search algorithm. The search depth is limited by setting a maximum recursion depth threshold. The cumulative semantic intensity from the starting node to the current node is calculated at each search step, and paths with cumulative semantic intensity exceeding a preset semantic threshold are added to the candidate path set.

[0097] A Monte Carlo tree search strategy is used to dynamically adjust the search direction. A search tree is constructed based on the candidate path set. Multiple rounds of random exploration are performed at each node of the search tree. The cumulative semantic intensity and the sequence of visited nodes are recorded for each round of exploration. The value of different search branches is evaluated based on the results of multiple rounds of exploration. Each selectable branch is assigned a search probability based on the value evaluation results.

[0098] Based on the search probability, branch selection and path exploration are continuously performed. Paths with significant semantic associations are continuously supplemented to the candidate path set. The paths in the candidate path set are sorted in descending order of cumulative semantic intensity, and the top several paths with the highest semantic intensity are selected as the final reasoning path set.

[0099] The conversion of the entity association matrix into a weighted directed graph structure is achieved through graph data structure mapping. Each entity in the matrix corresponds to a node in the graph structure, and the association strength value in the matrix corresponds to the weight of the edge in the graph structure. The graph structure uses an adjacency list storage method, and each node maintains a set of edges pointing to other nodes. The edge object contains three attributes: target node identifier, weight value, and association type. The weight value is directly taken from the semantic association degree at the corresponding position in the association matrix, and the association type is divided into four categories according to the medical ontology relationship: causal relationship, co-occurrence relationship, hierarchical relationship, and similarity relationship. The node object contains four basic attributes: entity identifier, entity type, medical concept label, and node state. The entity type includes five categories: symptom entity, disease entity, drug entity, examination entity, and treatment entity.

[0100] The node access record table is established using a hash table data structure, with the key value being the node identifier and the storage value being the access state information. The access state information includes four fields: access identifier, access frequency, access timestamp, and access path number. The access identifier is represented by a Boolean value indicating whether the node has been accessed. The access frequency records the cumulative number of times the node has been accessed in the current search process. The access timestamp records the time point of the last access. The access path number identifies the path sequence number of the current access to the node. The record table is initialized at the beginning of each new path exploration. The access identifier of all nodes is set to the unvisited state, the access frequency is cleared, and the timestamp and path number are reset.

[0101] The recursive depth search algorithm uses a depth-first traversal strategy to recursively explore the deep nodes of the graph structure from the specified starting node. The algorithm maintains a current path stack to record the complete path sequence from the starting node to the current node. Each element in the stack contains three pieces of information: node identifier, edge weight, and cumulative strength. The recursive function receives four parameters: current node, target depth, current depth, and cumulative strength. In each recursive call, it traverses all unvisited neighbor nodes of the current node. During the recursive process, the node access record table is used to check the node access state to avoid forming loops and repeated access, ensuring the effectiveness and integrity of the path exploration.

[0102] The maximum recursion depth threshold is set to eight layers. This threshold is determined based on the typical logical hierarchy of medical reasoning, which can cover complex multi-step reasoning paths while controlling the search complexity within an acceptable range. The depth limit is checked through the depth parameter in the recursive function. When the current depth equals the maximum depth, the recursive function stops expanding to deeper nodes and starts backtracking to the previous layer to continue searching other branches. The depth control mechanism effectively prevents the search process from falling into excessively deep invalid paths, improving search efficiency and result quality.

[0103] The accumulated semantic intensity calculation adopts a path weight accumulation method, which accumulates and sums the weight values of each edge in the path direction from the starting node. The calculation process considers the influence of path length on semantic intensity and adjusts the accumulated intensity using a length penalty factor. The penalty factor is set to the path length power of zero point nine, so that shorter paths obtain higher semantic intensity scores under the same edge weight conditions. The accumulated intensity calculation also introduces a node type matching reward mechanism. When the types of adjacent nodes in the path meet the medical logical relationship, an additional intensity reward is given, and the reward value is one tenth of the edge weight.

[0104] The preset semantic threshold is set to two point five, which is determined by analyzing the semantic intensity distribution of a large number of medical reasoning paths, and can effectively filter out valuable paths with significant semantic association. Paths with accumulated semantic intensity exceeding the threshold are added to the candidate path set, which uses a dynamic array structure for storage. Each path object contains four attributes: node sequence, edge weight sequence, accumulated intensity, and path length. The candidate path set dynamically expands during the search process, and newly discovered effective paths are added to the end of the set in real time.

[0105] The Monte Carlo tree search strategy adjusts the search direction dynamically by constructing a search tree structure. Each node of the search tree represents a node state in the graph structure, and the edge represents the transition operation from one node to another. The search tree node contains four attributes: state identifier, access frequency, cumulative reward, and child node list. The state identifier corresponds to the node identifier in the graph structure, the access frequency records the number of times the state is selected in the search process, the cumulative reward records the total semantic intensity obtained through the state, and the child node list stores all next step states.

[0106] The search tree is constructed based on the path information in the candidate path set. Each candidate path provides a feasible search trajectory for the search tree. The tree construction process starts from the root node and expands the tree structure layer by layer according to the node sequence in the path. If a node already exists in the tree, its statistical information is updated; if it does not exist, a new tree node is created. The dynamic adjustment mechanism of the tree structure constantly updates and expands based on newly discovered path information, ensuring that the search strategy can adapt to the changing search space.

[0107] Multiple rounds of random exploration are performed at each node of the search tree. Each round of exploration starts with random path sampling from the current node, and the sampling process is based on the probability selection of the node's outgoing edge weight distribution. The number of exploration rounds is set to fifty rounds, and each round of exploration process records complete path information, including the sequence of visited nodes, the weight of the edge passed, and the final accumulated semantic intensity. The random selection strategy uses the roulette algorithm, and the neighbor nodes with higher edge weights have a higher probability of being selected. Edges with zero weight are excluded from the selection range.

[0108] The exploration result evaluation is based on two dimensions of accumulated semantic intensity and path diversity. The accumulated semantic intensity reflects the semantic correlation degree of the path, and the path diversity reflects the coverage breadth of the search branch. The evaluation process calculates the average semantic intensity and standard deviation of each search branch in multiple rounds of exploration. The branch with high average intensity and small standard deviation is considered to have stable high value. The branch value score is calculated by multiplying the average intensity by the stability coefficient. The stability coefficient is equal to one minus the ratio of standard deviation to average intensity.

[0109] The search probability distribution is dynamically adjusted based on the value evaluation result. The branch with high value score obtains higher search probability, ensuring that the search resources are preferentially invested in high-value directions. The probability distribution is normalized by using a soft maximum value function to avoid a branch obtaining too high search probability and leading to a concentrated search strategy. The probability distribution result is updated in real time to the node attribute of the search tree, guiding the subsequent branch selection process.

[0110] The continuous branch selection and path exploration are based on the dynamically adjusted search probability. Each branch selection is randomly sampled according to the latest probability distribution. The selection process uses a cumulative probability matching method to generate a random number between zero and one. According to the position of the random number in the cumulative probability interval, the selected branch is determined. The newly discovered semantic correlation significant path is added to the candidate path set through the same threshold checking mechanism. The size of the set dynamically expands to accommodate all effective paths.

[0111] The candidate path set sorting uses the quicksort algorithm, and the sorting key value is the accumulated semantic intensity in descending order. The sorting process ensures that the path with the highest semantic intensity is located at the front of the set, facilitating subsequent path selection operations. The sorting result is updated in real time. Whenever a new path is added to the set, a re-sorting operation is triggered to maintain the ordered state of the set.

[0112] The final reasoning path set selection process extracts the top ten paths from the sorted candidate path set. These paths represent the strongest semantic correlation reasoning direction. The number of selected paths can be adjusted according to specific application requirements. More path numbers can provide a more comprehensive reasoning perspective, and fewer path numbers can focus on the core reasoning logic. The selected path set serves as the basis for subsequent reasoning analysis, providing diverse reasoning support for medical decision-making.

[0113] In an optional implementation, generating a preliminary decision suggestion based on the optimal reasoning path and performing rule verification on the preliminary decision suggestion in combination with medical diagnosis and treatment rules includes:

[0114] Extract node information and inter-node association from the optimal reasoning path to construct a decision element set; search for a matching template in a preset decision template library based on the decision element set, select a corresponding decision expression mode according to the correspondence between node types and association types, dynamically fill the information in the decision element set into the corresponding expression template position, and generate a structured preliminary decision suggestion;

[0115] Extract a medical diagnosis and treatment rule set related to the preliminary decision suggestion from the rule library, perform semantic matching between the structured content of the preliminary decision suggestion and the medical diagnosis and treatment rule set, and calculate the matching degree of each decision content and the corresponding rule;

[0116] Based on the results of the semantic matching, identify the content in the preliminary decision suggestion that has a matching degree lower than a preset matching threshold, and mark it as a to-be-corrected item, adjust the to-be-corrected item according to the specific rule violated, and ensure that the decision suggestion conforms to the standard medical norm.

[0117] The extraction of node information and association from the optimal reasoning path is achieved by using a depth-first traversal algorithm. By analyzing the attribute information of each node in the reasoning path, the node type identifier, medical concept label, confidence value, and evidence support information are obtained. The node types include five categories: symptom nodes, examination nodes, diagnosis nodes, treatment nodes, and drug nodes. Each node contains a unique identifier, a medical terminology code, and semantic description information. The association between nodes is obtained through the attribute information of the edge, including association type, association strength, directionality, and time sequence. The association type covers four basic types: causal relationship, concurrent relationship, exclusion relationship, and conditional relationship. The association strength is represented by a value between zero and one. The directionality identifies the characteristics of one-way or two-way association. The time sequence identifies the order of association occurrence.

[0118] The decision element set is constructed by classifying and organizing the extracted node information and association. The symptom element set includes patient complaints, objective signs, and medical history information. Each symptom element records the symptom name, severity, duration, and related description. The examination element set includes laboratory examination items, imaging examination results, and special examination indicators. It records the examination name, examination result, reference range, and abnormality identification.

[0119] The diagnosis element set includes primary diagnosis, secondary diagnosis, and differential diagnosis. It records the diagnosis name, diagnosis basis, diagnosis degree, and disease classification code. The treatment element set includes treatment plan, treatment goal, and expected effect. It records the treatment method, treatment arrangement, precautions, and efficacy evaluation indicators. The drug element set includes drug name, usage, dosage, administration route, and drug contraindication. It records drug classification, mechanism of action, adverse reactions, and interaction information.

[0120] The decision template library retrieval adopts a multi-level matching algorithm to find the best matching template in the pre-set template library according to the feature vector of the decision element set. The template library is organized in three dimensions of disease category, symptom type and treatment method. Each template contains a fixed format decision framework and variable parameter position. The disease category template is designed for different disease systems, such as the cardiovascular disease template containing electrocardiogram analysis, angiography results and cardiac function evaluation, etc. The symptom type template is classified according to the symptom manifestation, such as the pain symptom template containing pain location, nature, degree, inducing factors and relief methods, etc. The treatment method template is classified according to the treatment means, such as the surgical treatment template containing surgical indications, preoperative preparation, surgical plan and postoperative care, etc.

[0121] The correspondence between node type and association type is defined by a mapping table, establishing the matching rules between decision elements and template fields. The symptom node corresponds to the symptom description field in the template, the examination node corresponds to the examination result field, the diagnosis node corresponds to the diagnosis conclusion field, the treatment node corresponds to the treatment plan field, and the drug node corresponds to the drug recommendation field. The causal type of the association relationship corresponds to the reasoning logic field in the template, the concurrent relationship corresponds to the symptom combination field, the exclusion relationship corresponds to the differential diagnosis field, and the conditional relationship corresponds to the indication field. The decision expression mode selection is based on the element complexity and association density, simple element combination selects the basic template, complex element combination selects the extended template, and high association density element combination selects the detailed template.

[0122] The dynamic filling process is realized by a template engine, filling the specific information in the decision element set into the predetermined position of the template according to the corresponding relationship. The filling algorithm automatically selects the appropriate expression format according to the element type, the symptom element adopts the clinical description format, the examination element adopts the numerical result format, the diagnosis element adopts the standard diagnosis format, the treatment element adopts the scheme suggestion format, and the drug element adopts the prescription format. In the filling process, missing information is identified, uncertain information is expressed in probability, and conflicting information is displayed side by side.

[0123] The structured preliminary decision suggestion generation adopts the standard medical report format, including six main parts of patient basic information, symptom performance, examination result, diagnosis conclusion, treatment suggestion and medication guidance. Each part is formatted according to the medical document specification, using uniform terminology standards and coding system. The patient basic information part contains key information such as age, gender, medical history and allergy history. The symptom performance part arranges the symptom description in time sequence and severity. The examination result part displays the abnormal indicators and reference values according to the examination type. The diagnosis conclusion part contains the certainty description of the main diagnosis and the exclusion basis of differential diagnosis. The treatment suggestion part describes the recommended treatment plan and implementation points in detail. The medication guidance part provides specific medication plan and precautions.

[0124] The medical diagnosis and treatment rule set extraction adopts a semantic retrieval algorithm to find all applicable rules related to the preliminary decision suggestion from the rule base. The rule base is organized into four categories: diagnosis rules, treatment rules, medication rules, and nursing rules. Each rule contains three core elements: applicable conditions, execution content, and verification standards. Diagnosis rules define the correspondence between symptom combinations and disease diagnosis, treatment rules specify standard treatment plans for different diseases, medication rules specify the indications and contraindications for drug use, and nursing rules describe the precautions and operation requirements for patient care. The rule extraction process is achieved through keyword matching and semantic similarity calculation to ensure that the extracted rules are highly relevant to the decision content.

[0125] Semantic matching uses natural language processing techniques to compare the structured content of the preliminary decision suggestion with medical diagnosis and treatment rules item by item. The matching process includes three levels: term consistency check, logical relationship verification, and numerical range verification. Term consistency check verifies whether the medical terms used in the decision suggestion conform to standard specifications by comparing them with medical dictionaries and term libraries. Logical relationship verification checks the logical consistency of diagnosis reasoning and treatment selection to ensure that the cause-and-effect relationship between symptoms and diagnosis conforms to medical principles. Numerical range verification verifies whether the numerical values such as drug dosage and treatment parameters are within the safe and effective range by checking against reference value tables and safety thresholds.

[0126] Matching degree calculation uses a weighted scoring method to quantitatively evaluate the degree of conformity between each decision content and the corresponding rule. The term consistency matching weight is 0.4, the logical relationship matching weight is 0.4, and the numerical range matching weight is 0.2. The matching degree score is between zero and one, with a higher score indicating better conformity. For complex decision content, a multi-rule joint matching method is used to calculate the comprehensive matching degree score.

[0127] Threshold comparison is used to identify items that need to be corrected, with decision content having a matching degree below the preset threshold of 0.7 being identified as needing correction. The annotation process records the specific rule number, violation type, and correction suggestion, providing clear guidance for subsequent adjustments. Violation types include non-standard terminology, illogical reasoning, numerical value out of range, and lack of necessary information.

[0128] Based on the specific requirements of the violated rules, the items to be corrected are modified accordingly. Non-standard terminology is replaced according to the standard terminology library, illogical reasoning is reconstructed according to medical principles, numerical values out of range are adjusted according to safety thresholds, and missing necessary information is supplemented according to rule requirements. The adjusted decision suggestion is re-verified to ensure full compliance with standard medical specifications.

[0129] In an alternative embodiment, the reliability of the decision suggestion that has passed the rule verification is evaluated, and the decision suggestion is optimized and adjusted based on the similarity matching of historical cases and the logical derivation based on medical rules, which includes:

[0130] Similar cases are retrieved from the historical case library based on the feature information of the decision suggestion, the similarity of the feature vectors of the decision suggestion and the similar cases is calculated, a case similarity evaluation matrix is constructed, the diagnosis and treatment effect data and risk factors in the case with the highest similarity are extracted, and the reliability of the decision suggestion at the case level is evaluated;

[0131] Based on the decision suggestion, the associated rule chain is extracted from the medical rule library, the diagnosis and treatment reasoning graph is constructed using the associated rule chain, the reliability of the diagnosis and treatment logic of the decision suggestion is verified in the diagnosis and treatment reasoning graph, the logical strength score of each reasoning path is calculated, and the weak link with a logical strength lower than a preset strength threshold is marked.

[0132] According to the case similarity evaluation result and the reasoning logic verification result, the content in the decision suggestion with a reliability score lower than a preset score threshold or a logical weak link is identified, and it is optimized and adjusted in combination with the diagnosis and treatment experience of reliable cases to generate a final medical decision suggestion.

[0133] The reliability evaluation of the decision suggestion is realized based on a double verification mechanism, and the reliability of the decision suggestion is comprehensively evaluated through two parallel paths of historical case similarity matching and medical rule logical derivation. In the case similarity matching path, the system extracts the core feature information from the decision suggestion, including disease symptom features, patient basic information features, diagnosis and treatment scheme features, and prognosis index features. Feature extraction uses a medical ontology feature mapping method to convert the text description in the decision suggestion into a standardized feature vector representation.

[0134] The historical case library retrieval uses a multi-dimensional feature matching algorithm, and a fast retrieval mechanism is established through disease classification index, symptom keyword index and treatment scheme index. The feature vector similarity calculation is based on the weighted Euclidean distance algorithm, and different feature dimensions are assigned weight coefficients according to the clinical importance. The symptom feature weight is zero point four, the treatment scheme feature weight is zero point three, the patient basic information feature weight is zero point two, and the prognosis index feature weight is zero point one. The case similarity evaluation matrix is constructed by similarity score sorting, and the matrix row represents the historical case number, and the column represents the similarity score, case type label and reliability level.

[0135] The highest similarity case diagnosis and treatment effect data extraction includes treatment success rate, side effect incidence, recovery time, and patient satisfaction, and other key indicators. Risk factor extraction covers adverse drug reaction records, surgical complication records, treatment failure cause analysis, and patient individual difference influencing factors. Case level reliability assessment compares the differences between decision recommendations and high similarity case diagnosis and treatment effects, calculates the expected compliance score and risk controllability score in two dimensions, and generates evaluation scores.

[0136] In the medical rule logic derivation path, core elements such as diagnosis conclusion, treatment plan, and medication recommendation are identified from the decision recommendation, and rule chains related to these elements are retrieved in the medical rule base. Rule chain extraction uses a combination of forward reasoning and backward reasoning, with forward reasoning deriving diagnosis conclusions from symptoms and backward reasoning verifying symptom support from diagnosis conclusions. The associated rule chain includes three levels of symptom-diagnosis rule chain, diagnosis-treatment rule chain, and treatment-prognosis rule chain.

[0137] Diagnosis and treatment reasoning graph construction uses a directed graph structure, with nodes representing medical concept entities and edges representing rule relationships, and edge weights reflecting rule strength. In the graph construction process, symptom nodes are used as starting nodes, diagnosis nodes are used as intermediate nodes, and treatment plan nodes are used as target nodes. Each node contains attributes such as concept identification, confidence score, and number of supporting evidence. Edge construction is based on logical relationships in the rule base, including cause-and-effect relationships, association relationships, and exclusion relationships.

[0138] Diagnosis and treatment logic reliability verification is achieved through path analysis algorithms, and all reachable paths from symptom nodes to treatment plan nodes are extracted for analysis. The logic strength score of each reasoning path is calculated by weighted average of all edge weights on the path, with weight allocation considering edge type and evidence support strength. The weight of the cause-and-effect relationship edge is the highest, the weight of the association relationship edge is medium, and the weight of the exclusion relationship edge is negative. Paths with a logic strength score below the preset threshold of zero point six are marked as weak links, and weak link annotations include weak position, weak reason, and improvement suggestions, etc.

[0139] Decision recommendation optimization adjustment is based on the comprehensive analysis of double verification results, and the case similarity evaluation results and reasoning logic verification results are fused by weighted fusion to generate a comprehensive reliability score, with case evaluation weight being zero point six and logic verification weight being zero point four. Decision content with a reliability score below the preset threshold of zero point seven is identified as content to be optimized, including diagnosis uncertainty items, treatment plan risk items, and medication safety hazard items, etc.

[0140] The optimization adjustment process combines the successful diagnosis and treatment experience of reliability cases. For uncertain items in diagnosis, the system extracts auxiliary diagnostic methods and differential diagnosis points from similar cases and supplements them into the decision-making suggestions. For risk items in treatment plan, the system refers to the risk control measures and alternative treatment plans in similar cases to improve the safety of the original plan. For safety hazards in drug use, the system introduces drug monitoring programs and dose adjustment experience from similar cases to optimize the safety of drug use recommendations.

[0141] The final medical decision-making suggestion is generated in a structured output format, including optimized diagnosis conclusion, improved treatment plan, improved drug use suggestion, and detailed risk prompt. Each suggestion is accompanied by reliability score, evidence support strength, and similar case reference information, providing comprehensive decision-making support information for clinicians. The optimization adjustment record is saved in the decision history library for continuous improvement of subsequent decision quality and iterative optimization of algorithm model.

[0142] In an alternative embodiment, the reliability of the decision-making suggestion in the diagnosis and treatment reasoning graph is verified, and the logic strength score of each reasoning path is calculated. The weak links with a logic strength score lower than a preset strength threshold are marked, including:

[0143] The diagnosis and treatment path corresponding to the decision-making suggestion is located in the diagnosis and treatment reasoning graph, and the rule node sequence on the diagnosis and treatment path is extracted. The diagnosis and treatment logic is verified layer by layer along the rule node sequence in the diagnosis and treatment reasoning graph, the semantic association strength and rule matching degree between adjacent rule nodes are calculated, and the weighted sum of the semantic association strength and the rule matching degree is taken as the transfer coefficient between nodes.

[0144] Based on the transfer coefficient, the logic strength score of each diagnosis and treatment path is calculated, and the logic strength score is compared with the preset strength threshold. The path nodes with a score lower than the preset strength threshold are marked as weak links.

[0145] After the construction of the diagnosis and treatment reasoning graph, the reliability of the generated decision-making suggestion is verified. The verification process first locates the diagnosis and treatment path corresponding to the decision-making suggestion. Taking the clinical case of a patient with "headache and fever for three days" as an example, the diagnosis and treatment reasoning graph contains a complete path from symptoms to disease diagnosis and then to treatment plan. For example, the system generates a decision-making suggestion of "suggested to use ibuprofen to relieve pain and control fever". To verify the reliability of the suggestion, the system traces back from the suggestion node and locates the complete diagnosis and treatment path along the connection in the graph: {"symptoms: headache with fever" → "diagnosis: upper respiratory tract infection" → "body temperature 38.5°C" → "suggested medication: ibuprofen"}.

[0146] After positioning the diagnosis and treatment path, the rule node sequence on the path is extracted. In the above example, the rule node sequence is {"R1: Headache with fever suggests upper respiratory tract infection", "R2: Upper respiratory tract infection with fever above 38°C may consider using antipyretic analgesic drugs", "R3: Ibuprofen is suitable for adult fever with pain symptoms"}. These rule nodes represent the reasoning logic from symptoms to diagnosis and then to treatment plan.

[0147] After extracting the rule node sequence, the diagnosis and treatment logic is verified layer by layer along the rule node sequence. During the verification process, the semantic association strength and rule matching degree between adjacent rule nodes are calculated. Semantic association strength is quantified by analyzing the semantic similarity of the content between nodes. In specific implementation, the system converts the content of the rule nodes into vector representation and uses vector similarity calculation method to calculate semantic similarity. For example, for the semantic association strength between rules R1 and R2, the system extracts the key concepts "headache", "fever", "upper respiratory tract infection" of R1 and the key concepts "upper respiratory tract infection", "fever", "antipyretic analgesic drugs" of R2, and calculates the semantic overlap degree between these concepts. In this case, the two rules share the concepts "upper respiratory tract infection" and "fever", and the semantic association strength calculation result is 0.75.

[0148] Rule matching degree evaluates the degree of compliance of the rule node with the existing rules in the medical knowledge base. The rule node is matched with the standard rules in the medical knowledge base, and the matching degree score is calculated. The knowledge base contains standard diagnosis and treatment guidelines, clinical pathways, and rules extracted from medical textbooks. For rule R2 "Upper respiratory tract infection with fever above 38°C may consider using antipyretic analgesic drugs", the system finds the rule "Upper respiratory tract infection patients with body temperature above 38°C are recommended to use antipyretic analgesic drugs to control symptoms" in the knowledge base, and calculates the matching degree as 0.85 through content comparison.

[0149] After calculating the semantic association strength and rule matching degree, the two are combined by setting weights to obtain the transfer coefficient between nodes. Assuming that the weight of semantic association strength is 0.4 and the weight of rule matching degree is 0.6, the transfer coefficient from R1 to R2 is 0.4x0.75+0.6x0.85=0.81. Similarly, the transfer coefficient from R2 to R3 is calculated as 0.78.

[0150] Based on the transfer coefficient, the logic strength score of the entire diagnosis and treatment path is calculated. The calculation method is to multiply the transfer coefficients between all adjacent nodes on the path. In the above example, the logic strength score of the path is 0.81x0.78=0.632. The system compares this score with the preset strength threshold. Assuming that the preset strength threshold is 0.6, the score of this diagnosis and treatment path is higher than the threshold, indicating that the overall logic is reliable.

[0151] If there is a weak link in the diagnosis and treatment path, it is marked, and another path is taken as an example: "symptoms: headache with fever" → "diagnosis: acute attack of migraine" → "recommended medication: ibuprofen". The rule node sequence of this path is {"R4: headache with fever suggests migraine attack", "R5: acute attack of migraine can use ibuprofen to relieve"}. The transfer coefficient from R4 to R5 is calculated to be 0.45, and the logical strength score of the whole path is 0.45, which is lower than the preset threshold 0.6. The system marks R4 as a weak link because the "fever" symptom is not usually a typical manifestation of migraine, and the logical association of directly inferring "acute attack of migraine" from "headache with fever" is weak.

[0152] To improve the weak link, supplementary evidence is provided, such as suggesting that the doctor further inquire about the characteristics of the patient's headache (such as whether it is unilateral pulsatile pain, whether it is accompanied by photophobia, nausea, and other typical migraine symptoms). The system can also provide alternative diagnosis paths, such as considering the possibility of upper respiratory tract infection or other diseases with fever.

[0153] This reliability verification method can be applied to various diagnosis and treatment scenarios. In complex disease diagnosis and treatment, such as the treatment of diabetic complications, the system can verify the reliability of the reasoning path from "persistent elevation of fasting blood glucose" to "diagnosis of type 2 diabetes" to "recommendation of metformin use", identify weak links such as insufficient assessment of the patient's renal function status affecting drug safety, and ensure the scientificity and safety of diagnosis and treatment decision-making recommendations.

[0154] In a second aspect of the embodiments of the present application, an electronic device is provided, comprising:

[0155] a processor;

[0156] a memory for storing processor-executable instructions;

[0157] wherein the processor is configured to invoke the instructions stored in the memory to perform the method described above.

[0158] In a third aspect of the embodiments of the present application, a computer-readable storage medium is provided, which stores computer program instructions, and the computer program instructions are executed by a processor to implement the method described above.

[0159] The present application can be a method, device, system and / or computer program product. The computer program product can include a computer readable storage medium having computer readable program instructions loaded thereon for performing various aspects of the present application.

[0160] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit the present application; although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions recorded in the above embodiments can be modified, or some or all of the technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A multi-level knowledge graph construction and semantic reasoning method for medical decision-making, characterized in that, include: Acquire medical text corpora, perform semantic segmentation and standardization on the medical text corpora to obtain a normalized semantic unit sequence, perform entity extraction and attribute recognition on the normalized semantic unit sequence to obtain a set of medical entities and their corresponding attribute features; calculate the semantic correlation degree between entity pairs based on the attribute features of each entity in the medical entity set, and construct an association matrix between entities based on the semantic correlation degree, including: Based on the attribute characteristics of each entity in the medical entity set, the semantic association degree between entity pairs is calculated, and an association matrix between entities is constructed based on the semantic association degree, including: The attribute features of each entity in the medical entity set are obtained, and the attribute features are converted into high-dimensional feature vectors through embedding mapping. The high-dimensional feature vectors are hierarchically encoded, and the similarity matrix between feature vectors is calculated through an attention mechanism. At the same time, the co-occurrence probability distribution is calculated based on the context information of the entities. The similarity matrix and the co-occurrence probability distribution are weighted and fused to obtain the initial semantic association degree between entity pairs. The weight coefficient of each entity pair in the association matrix is ​​calculated based on the initial semantic association degree; the association matrix is ​​iteratively optimized based on the recursive deep propagation algorithm. By calculating the multi-hop semantic path between entities, the semantic association degree in the association matrix is ​​dynamically updated in each iteration by combining the transmission strength of direct and indirect associations; the optimized association matrix is ​​sparsified to retain significant semantic associations, and the final entity association matrix is ​​generated. The algorithm uses a recursive deep search to mine potential reasoning paths in the association matrix. An attention mechanism is used to dynamically evaluate the confidence of different reasoning paths, and the optimal reasoning path is selected as the basis for decision-making. Preliminary decision suggestions are generated based on the optimal reasoning path, and these suggestions are validated using medical diagnosis and treatment rules. The reliability of the validated decision suggestions is assessed, and the suggestions are optimized and adjusted based on the similarity matching of historical cases and logical deduction based on medical rules, according to the validation results.

2. The method according to claim 1, characterized in that, Based on a recursive deep search algorithm, potential inference paths are mined from the correlation matrix. An attention mechanism is used to dynamically evaluate the confidence of different inference paths, and the optimal inference path is selected as the decision criterion, including: The recursive deep search algorithm is used to explore paths in the association matrix. The search space is controlled by setting the maximum recursion depth, the cumulative semantic strength is calculated for each candidate path, and the search direction is dynamically adjusted by adopting the Monte Carlo tree search strategy, thereby mining a set of potential inference paths with significant semantic associations in the association matrix. For each path in the potential inference path set, a path feature vector is extracted, a multi-head attention network is constructed, the path feature vector is input into the multi-head attention network, a path confidence score is obtained by calculating the weighted combination of different attention heads, and each path in the inference path set is sorted and filtered based on the path confidence score, and the path with the highest confidence is selected as the optimal inference path, which is then used for medical decision support.

3. The method according to claim 2, characterized in that, The recursive deep search algorithm is used to explore paths in the association matrix. By setting a maximum recursion depth to control the search space, the cumulative semantic strength of each candidate path is calculated, and a Monte Carlo tree search strategy is employed to dynamically adjust the search direction. This allows for the discovery of a set of potential inference paths with significant semantic associations within the association matrix, including: The entity association matrix is ​​transformed into a weighted directed graph structure, and a node access record table is established based on the weighted directed graph structure. Path exploration is performed on the node access record table based on the recursive depth search algorithm. A maximum recursion depth threshold is set to limit the search depth. In each search step, the cumulative semantic strength from the starting node to the current node is calculated, and paths with cumulative semantic strength exceeding a preset semantic threshold are added to the candidate path set. The search direction is dynamically adjusted using the Monte Carlo tree search strategy. A search tree is constructed based on the candidate path set. Multiple rounds of random exploration are performed at each node of the search tree. The cumulative semantic strength of the path and the sequence of visited nodes are recorded in each round of exploration. The value of different search branches is evaluated through the results of multiple rounds of exploration. The search probability is assigned to each optional branch according to the value evaluation results. Based on the search probability, branch selection and path exploration are continuously performed. Paths with significant semantic associations are continuously added to the candidate path set. The paths in the candidate path set are sorted in descending order according to their cumulative semantic strength, and the paths with the highest semantic strength are selected as the final inference path set.

4. The method according to claim 1, characterized in that, Based on the optimal reasoning path, preliminary decision suggestions are generated, and the preliminary decision suggestions are validated using medical diagnosis and treatment rules, including: Extract node information and relationships between nodes from the optimal reasoning path to construct a set of decision elements; search for matching templates in a preset decision template library based on the set of decision elements, select the appropriate decision expression method according to the correspondence between node type and relationship type, dynamically fill the information in the set of decision elements into the corresponding expression template position, and generate structured preliminary decision suggestions; Extract a set of medical diagnosis and treatment rules related to the preliminary decision-making suggestions from the rule base, perform semantic matching between the structured content of the preliminary decision-making suggestions and the set of medical diagnosis and treatment rules, and calculate the matching degree between each decision content and the corresponding rule; Based on the semantic matching results, content in the preliminary decision suggestions with a matching degree lower than a preset matching threshold is identified and marked as items to be corrected. The items to be corrected are adjusted according to the specific rules violated to ensure that the decision suggestions comply with standard medical norms.

5. The method according to claim 1, characterized in that, The reliability of rule-verified decision recommendations is assessed, including similarity matching of historical cases and logical deduction based on medical rules. The recommendations are then optimized and adjusted based on the verification results, including: Based on the feature information of the decision-making recommendations, similar cases are retrieved from the historical case database. The feature vector similarity between the decision-making recommendations and the similar cases is calculated. A case similarity evaluation matrix is ​​constructed. The treatment effect data and risk factors in the case with the highest similarity are extracted to evaluate the reliability of the decision-making recommendations at the case level. Based on the decision recommendations, related rule chains are extracted from the medical rule base. A diagnosis and treatment reasoning graph is constructed using the related rule chains. The reliability of the diagnosis and treatment logic of the decision recommendations is verified in the diagnosis and treatment reasoning graph. The logic strength score of each reasoning path is calculated, and weak links with logic strength below a preset strength threshold are marked. Based on the case similarity assessment results and the reasoning logic verification results, the content in the decision-making suggestions that has a reliability score lower than the preset score threshold or has logical weaknesses is identified. The suggestions are then optimized and adjusted in conjunction with the clinical experience of reliable cases to generate the final medical decision-making suggestions.

6. The method according to claim 5, characterized in that, The reliability of the decision-making logic in the diagnostic reasoning graph is verified, and the logic strength score of each reasoning path is calculated. Weak links with logic strength scores below a preset strength threshold are marked as follows: Locate the treatment path corresponding to the decision suggestion in the treatment reasoning graph, and extract the rule node sequence on the treatment path; verify the treatment logic layer by layer along the rule node sequence in the treatment reasoning graph, calculate the semantic association strength and rule matching degree between adjacent rule nodes, and use the weighted sum of the semantic association strength and the rule matching degree as the transmission coefficient between nodes; The logic strength score of each treatment path is calculated based on the transmission coefficient. The logic strength score is compared with a preset strength threshold, and path nodes with scores lower than the preset strength threshold are marked as weak links.

7. A multi-level knowledge graph construction and semantic reasoning system for medical decision-making, used to implement the method of any one of claims 1-6, characterized in that, include: The first unit is used to acquire medical text corpus, perform semantic segmentation and standardization on the medical text corpus to obtain a normalized semantic unit sequence, perform entity extraction and attribute recognition on the normalized semantic unit sequence to obtain a set of medical entities and their corresponding attribute features; calculate the semantic correlation degree between entity pairs based on the attribute features of each entity in the set of medical entities, and construct an association matrix between entities based on the semantic correlation degree. The second unit is used to mine potential inference paths in the association matrix based on a recursive deep search algorithm, dynamically evaluate the confidence of different inference paths through an attention mechanism, select the optimal inference path as the basis for decision-making, generate preliminary decision suggestions based on the optimal inference path, and perform rule verification on the preliminary decision suggestions in conjunction with medical diagnosis and treatment rules. The reliability of the decision recommendations validated by the rules is assessed, and the recommendations are optimized and adjusted based on the similarity matching of historical cases and the logical deduction based on medical rules.

8. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data collection and drug safety signal mining methods and agents for PMS

    CN119786078A

  • Digital human knowledge graph construction method for famous and old traditional Chinese medicine experience active inheritance

    CN119862947A