Traditional Chinese medicine chronic disease dialectical treatment optimization method based on graph neural network

By introducing python convolutional units and syndrome semantic tension modulation mechanism into graph neural networks, the problem of insufficient structural order perception in TCM syndrome differentiation tasks is solved, high-dimensional expression and deep modeling are realized, and the accuracy of syndrome differentiation and the rationality of prescription recommendations are improved.

CN120878030AInactive Publication Date: 2025-10-31THE THIRD AFFILIATED CLINICAL HOSPITAL OF CHANGCHUN UNIV OF TRADITIONAL CHINESE MEDICINE
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510896351.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-01
Publication Date
2025-10-31
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing graph neural network models struggle to explicitly express the semantic tension between TCM syndromes, lack a tensor modulation mechanism for syndrome conflicts, and traditional methods lack structural order perception in TCM syndrome differentiation tasks, leading to unclear boundaries of syndrome differentiation results and unreasonable prescription recommendations.

Method used

By integrating the GATv2 model of graph neural network with the structure-aware python convolutional unit, a multi-order spiral adjacency path and syndrome semantic tension modulation mechanism are constructed. High-dimensional expression and deep modeling are achieved through multiple attention propagation, thereby enhancing the accuracy of diagnosis and the ability to understand structure.

Benefits of technology

It improves the accuracy and rationality of TCM syndrome differentiation and reasoning for chronic diseases, enhances the rationality of prescription recommendations, and improves the clinical application value of intelligent TCM auxiliary decision-making system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120878030A_ABST
    Figure CN120878030A_ABST
Patent Text Reader

Abstract

The invention discloses a traditional Chinese medicine chronic disease dialectical treatment optimization method based on a graph neural network, and the method comprises the following steps: S1, collecting electronic medical record text data and traditional Chinese medicine knowledge data of a patient, and constructing an initial dialectical graph; s2, obtaining an initial feature vector of a node; s3, performing multi-order spiral perception processing by using a boa convolution unit, constructing a spiral adjacent path for each target node according to a structure depth and a relation direction, and introducing a structure position coding mode to perform sequential perception modeling on a node neighborhood relation to generate an adjacent feature matrix; s4, constructing a syndrome semantic tension matrix; s5, inputting the adjacency feature matrix and the syndrome semantic tension matrix into a GATv2 model to obtain a final node feature vector; and S6, outputting a syndrome type prediction result corresponding to the patient by using the final feature vector of the node, and generating prescription and drug path recommendation. According to the method, the GATv2 model and the boa convolution unit of structure perception are combined, so that traditional Chinese medicine chronic disease dialectical reasoning and drug recommendation are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of interdisciplinary technology of artificial intelligence and traditional Chinese medicine information technology, and in particular to an optimized method for the diagnosis and treatment of chronic diseases in traditional Chinese medicine based on graph neural networks. Background Technology

[0002] In TCM clinical practice, the diagnosis and treatment of chronic diseases relies on the physician's comprehensive judgment of the patient's subjective symptoms and tongue and pulse conditions, combined with TCM theory to summarize and analyze the syndrome types. With the popularization of electronic medical record systems and the digitization of TCM knowledge, more and more patient medical data and TCM theories are being stored in a structured manner, making data-driven TCM-assisted decision-making possible. In traditional information technology methods, rule systems, decision trees, Naive Bayes, or support vector machines are often used to model and analyze patient information to assist in syndrome type recommendation or prescription generation. These methods rely heavily on feature engineering, making it difficult to automatically capture the complex relationships and contextual semantics in TCM knowledge, and lacking the ability to effectively integrate multi-source heterogeneous medical data, thus limiting the accuracy of diagnosis results and the rationality of recommended solutions.

[0003] In recent years, the development of graph neural network technology has provided new ideas for the modeling and reasoning of TCM knowledge graphs. Some studies have used graph convolutional networks or graph attention networks to learn node representations and applied them to syndrome recognition or prescription recommendation. These methods can model the structured information in TCM knowledge and, to some extent, achieve semantic fusion of multi-hop relationships, thus improving reasoning ability. However, existing graph models are mostly based on static topological structures and do not consider the directionality and structural depth differences of node relationships in the graph. They are difficult to characterize the real medical dependency paths between nodes. Node feature processing usually uses a single embedding model, which fails to integrate multi-dimensional attributes and structural context information, resulting in insufficient graph representation capabilities.

[0004] In the process of TCM syndrome differentiation, there are synergistic and antagonistic relationships between different syndromes, such as the mutual exclusion of cold and heat and the opposition of yin and yang. Existing graph neural network models struggle to explicitly express the semantic tension between syndromes and have not constructed a tensor modulation mechanism for syndrome conflicts, resulting in unclear boundaries in the diagnostic results and even prescription recommendations with contradictory pathogenesis. In the graph representation learning process, although the attention mechanism can highlight the contribution of key nodes, it does not incorporate the adjustment of attention weights by TCM semantic relationships, affecting the model's ability to perceive the constraints of syndrome structure.

[0005] In terms of feature propagation, traditional graph convolution methods are based on average aggregation strategies, which ignore the relative order information between adjacent nodes and the graph path structure. They are not capable of modeling complex topological distributions and heterogeneous relationships in graphs. In TCM diagnostic tasks, there are not only multi-hop dependencies between nodes, but also pathological mechanism evolution processes with strong sequentiality. If there is a lack of structural order perception mechanism, it will be difficult to simulate the real path of diagnostic reasoning.

[0006] Therefore, how to provide an optimized method for TCM chronic disease diagnosis and treatment based on graph neural networks is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0007] One objective of this invention is to propose an optimized method for TCM chronic disease diagnosis and treatment based on graph neural networks. This invention integrates the GATv2 model in graph neural networks with structure-aware python convolutional units to construct multi-order spiral adjacency paths and syndrome semantic tension modulation mechanisms. This enables high-dimensional expression and deep modeling of the TCM chronic disease diagnosis and reasoning process, and has the advantages of high diagnostic accuracy, strong structural understanding ability, and strong rationality of prescription recommendations, thereby enhancing the clinical application value of intelligent TCM auxiliary decision-making systems.

[0008] An optimization method for TCM chronic disease syndrome differentiation and treatment based on graph neural networks according to an embodiment of the present invention includes the following steps: S1. Collect the patient's electronic medical record text data and TCM knowledge data, extract entities based on natural language processing technology, and construct an initial dialectical diagram. The initial dialectical diagram includes symptom, syndrome type, disease, prescription and drug nodes. S2. Encode the features of each node in the initial dialectical diagram to obtain the initial feature vector of the node; S3. Multi-level spiral perception processing is performed using python convolutional units. The python convolutional units construct spiral adjacency paths for each target node according to structural depth and relational direction, and introduce structural position encoding to perform sequential perception modeling of node neighborhood relationships, generating an adjacency feature matrix. S4. Construct a semantic tension matrix of syndromes to represent the semantic co-occurrence relationship or semantic conflict relationship between syndrome nodes, where positive tension values ​​represent co-occurrence syndromes and negative tension values ​​represent conflicting syndromes. S5. Input the adjacency feature matrix and the syndrome semantic tension matrix into the GATv2 model, perform multiple attention propagation, and obtain the final feature vector of the node. S6. Use the final feature vector of the node to output the syndrome prediction result corresponding to the patient, and combine it with TCM knowledge data to generate prescription and drug path recommendations.

[0009] Optionally, S1 specifically includes: S11. Collect the patient's original electronic medical record text data, including chief complaint, present illness, past medical history, and tongue and pulse information; S12. Perform sentence segmentation and word segmentation on the original text data of the patient's electronic medical record to construct a sequence of clinical terms; S13. Apply natural language processing technology to perform named entity recognition on the clinical terminology sequence to extract symptom, disease, syndrome, prescription and drug entities; S14. Obtain TCM knowledge data and extract the correlation information between symptoms-syndrome types, syndrome types-diseases, syndrome types-prescriptions, and prescriptions-drugs; S15. Based on the extracted entity and related information, construct an initial dialectical diagram, which consists of five types of nodes: symptoms, syndrome types, diseases, prescriptions, and drugs.

[0010] Optionally, S2 specifically includes encoding the symptom node using a word vector model based on semantic embedding, encoding the syndrome node using a prior knowledge tag embedding method, encoding the disease node using an ICD-10 mapping encoding method, encoding the prescription node and the drug node using a structured embedding method based on component description, and for each node, fusing category information with text, attributes and structural relationships to generate an initial feature vector of the node with a unified dimension.

[0011] Optionally, S3 specifically includes: S31. Taking each target node in the initial dialectical diagram as the center, set the maximum depth K of adjacency sensing, perform a K-order structural depth search, and obtain the set of all adjacent nodes from order 1 to order K, denoted as the neighborhood set. And retain the structural depth and path information of each adjacent node relative to the target node; S32. For each adjacent node in the neighborhood set, extract the edge type and directionality between it and the target node to construct a directed path sequence. The edge type includes the relationship types of subject, applicable, composition, and belonging. Each type is mapped to a direction encoding vector. S33. The python convolutional unit performs multi-order spiral perception processing on the target node, constructs a K-order neighborhood structure, and executes a path spiral sorting algorithm according to the structure depth from low to high and the edge type sorting rule to construct the spiral adjacency path of the target node. S34. For each node in the spiral adjacency path Calculate the structural location encoding vector: ; in, Represents the structural position encoding vector. Indicates the structural depth. This represents the direction encoding vector for the edge type. This indicates the positional code of the spiral adjacency path. , and Indicates the weighting factor; S35. Initialize the feature vector of each node. With the corresponding structural position encoding vector Feature concatenation is performed, and the data is input into the nonlinear feature transformation module to calculate the structure-aware feature vector. ; in, Represents structure-aware feature vectors. This represents the activation function. Represents the weight matrix. Indicates the bias term. Indicates feature concatenation operation; S36. All structure-aware feature vectors Nodes are constructed by stacking them in the order described in the spiral adjacency path. The corresponding spiral sensing feature matrix: S37. Perform channel normalization and convolution activation processing on the spiral sensing feature matrix to obtain the spiral sensing vector of the target node; S38. Combine the spiral sensing vectors corresponding to all target nodes to generate an adjacency feature matrix.

[0012] Optionally, the path spiral sorting algorithm specifically includes sorting all adjacent nodes of structural depth from 1 to K in layers according to structural depth from low to high. Within each layer of adjacent nodes, the nodes are classified according to the edge type between the adjacent node and the target node. Nodes with the same edge type are grouped together, and a unique directional priority number is assigned to each edge type. Within each edge type group, a secondary sort is performed according to the index order of the topological position of the adjacent nodes in the initial dialectical graph.

[0013] Optionally, S4 specifically includes: S41. Extract all the set of all the dialectical nodes in the initial dialectical diagram and establish pairwise combinations between the dialectical nodes; S42. Based on TCM knowledge data and historical statistical data from electronic medical records, analyze the co-occurrence frequency of each syndrome type node pair in real clinical scenarios, and perform normalization processing to obtain the co-occurrence frequency matrix. ; S43. Based on TCM knowledge graphs and expert experience, set up a conflict matrix. It is used to measure the degree of semantic opposition between evidence-type node pairs, including the existence of semantic opposition relationships such as opposite pathogenesis, opposition between exterior and interior, and incompatibility of yin and yang. S44. Merge the co-occurrence frequency matrix and the conflict matrix: ; in, Indicates the first The certificate type node and the first The tension value between individual certificate nodes Indicates the first The certificate type node and the first Co-occurrence frequency among individual certificate types Indicates the first The certificate type node and the first Conflict values ​​between individual certificate nodes and Represents the weighting coefficients, satisfying ; when When it indicates a coordinated syndrome, When indicates conflict symptoms; This indicates a lack of symptom relationship; S45. Construct a symmetric matrix structure of the tension values ​​of all proof-type node pairs in tensor form, satisfying... Obtain the semantic tension matrix of the syndrome.

[0014] Optionally, S5 specifically includes: S51. Input the adjacency feature matrix and the syndrome semantic tension matrix into the GATv2 model. The adjacency feature matrix contains the spiral sensing vectors of all nodes, and the syndrome semantic tension matrix provides modulation information on the relationship between syndrome node pairs. S52. The GATv2 model performs linear mapping processing on the spiral sensing vector of each node in the input adjacency feature matrix to obtain a node feature representation of a unified dimension. The linear mapping processing adopts a combination of matrix multiplication and vector addition, and is implemented through a fully connected layer at the Tensor level. S53. For each node, calculate the attention score for all adjacent nodes: ; in, Indicates the first The node and the first Attention score between nodes This represents the activation function. Represents the attention vector. This indicates a feature concatenation operation. Indicates the first The feature representation of each node. Indicates the first Feature representation of each node; S54. The corresponding elements in the syndrome semantic tension matrix... The weighted values ​​are added to the attention score to form the modulated attention value: ; in, Indicates the first The node and the first Modulation attention values ​​between nodes Indicates the tension adjustment coefficient; S55. Normalize the modulated attention value after syndrome semantic tension adjustment to obtain the final attention weight between nodes, and weight and aggregate the information of adjacent nodes according to the final attention weight to obtain the final feature vector of the node.

[0015] Optionally, S6 specifically includes: S61. Perform a type classification modeling on the final feature vector of the node obtained by updating the GATv2 model, and use a multilayer perceptron model to map the final feature vector of the type node to the output probability distribution in the classification space. S62. Perform feature concatenation on the final feature vectors of the symptom nodes and the final feature vectors of the disease nodes of the target patient to construct the patient feature expression vector, and output the syndrome prediction result corresponding to the patient based on the matching probability between the patient feature expression vector and the final feature vector of the syndrome node. S63. Based on the predicted syndrome type results, extract the corresponding syndrome type-prescription mapping relationship from the TCM knowledge data and select a set of candidate prescriptions. S64. Calculate the semantic association degree between the patient's current symptom node and the core drug node in the candidate prescriptions, and rank the candidate prescriptions. S65. The candidate prescriptions ranked highest are recommended as the final prescriptions and drug pathways. S66. The final output of the patient's corresponding syndrome prediction results and the prescription and drug pathway recommendations are used as TCM syndrome differentiation results for the generation of chronic disease treatment suggestions and physician auxiliary decision support.

[0016] The beneficial effects of this invention are: (1) Introducing python convolutional units to perform multi-level spiral perception processing on graph structures can identify the structural depth, relational direction and path order in the neighborhood of nodes, effectively enhancing the ability to represent complex heterogeneous structures in the initial dialectical graph. (2) By constructing a syndrome semantic tension matrix and introducing it into the attention propagation process, we can achieve explicit modeling of the synergistic and conflict relationships between syndrome nodes, thereby improving the ability to control the consistency and rationality of pathogenesis in the process of syndrome differentiation. (3) By integrating structural position encoding and nonlinear feature transformation mechanism, the model achieves a unified expression of node initial features, graph topology and multilateral semantics, thereby enhancing the model’s adaptability and discriminability to multiple types of nodes in the TCM knowledge graph. (4) Based on the GATv2 model, perform multimodal attention propagation and combine semantic tension guidance mechanism to dynamically adjust the weight of adjacent nodes, thereby improving the semantic consistency and discrimination accuracy of node feature aggregation. Attached Figure Description

[0017] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is an overall flowchart of an optimized method for TCM chronic disease diagnosis and treatment based on graph neural networks proposed in this invention. Figure 2 This is a flowchart of the Python convolutional unit execution of an optimization method for TCM chronic disease diagnosis and treatment based on graph neural networks proposed in this invention. Figure 3 This is a flowchart illustrating the construction of the syndrome semantic tension matrix in a traditional Chinese medicine chronic disease syndrome differentiation and treatment optimization method based on graph neural networks proposed in this invention. Detailed Implementation

[0018] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0019] refer to Figures 1-3 An optimized method for TCM chronic disease diagnosis and treatment based on graph neural networks includes the following steps: S1. Collect the patient's electronic medical record text data and TCM knowledge data, extract entities based on natural language processing technology, and construct an initial dialectical diagram. The initial dialectical diagram includes symptom, syndrome type, disease, prescription and drug nodes. S2. Encode the features of each node in the initial dialectical diagram to obtain the initial feature vector of the node; S3. Multi-level spiral perception processing is performed using python convolutional units. The python convolutional units construct spiral adjacency paths for each target node according to structural depth and relational direction, and introduce structural position encoding to perform sequential perception modeling of node neighborhood relationships, generating an adjacency feature matrix. S4. Construct a semantic tension matrix of syndromes to represent the semantic co-occurrence relationship or semantic conflict relationship between syndrome nodes, where positive tension values ​​represent co-occurrence syndromes and negative tension values ​​represent conflicting syndromes. S5. Input the adjacency feature matrix and the syndrome semantic tension matrix into the GATv2 model, perform multiple attention propagation, and obtain the final feature vector of the node. S6. Use the final feature vector of the node to output the syndrome prediction result corresponding to the patient, and combine it with TCM knowledge data to generate prescription and drug path recommendations.

[0020] By fusing electronic medical record text with TCM knowledge data to construct an initial syndrome differentiation diagram, and employing graph neural networks for structured information modeling, the overall approach can realize the graph structure representation of the relationships between symptoms, syndrome types, diseases, prescriptions, and drug medical entities. Python convolutional units are introduced to achieve multi-order spiral perception processing of structural paths and relationship directions in the graph, effectively preserving the sequentiality of clinical pathways and the hierarchical nature of TCM syndrome differentiation during node neighborhood modeling. Combining the syndrome semantic tension matrix to model the synergistic and conflict patterns in syndrome differentiation relationships helps avoid confusion about pathogenesis and errors in syndrome types. Finally, GATv2 is used to complete the multi-attention aggregation of structure-perceived information and semantic tension information, strengthening the consistency of syndrome differentiation logic in the information dissemination process and improving the interpretability of syndrome differentiation reasoning and the targeted nature of medication recommendations.

[0021] In this embodiment, S1 specifically includes: S11. Collect the patient's original electronic medical record text data, including chief complaint, present illness, past medical history, and tongue and pulse information; S12. Perform sentence segmentation and word segmentation on the original text data of the patient's electronic medical record to construct a sequence of clinical terms; S13. Apply natural language processing technology to perform named entity recognition on the clinical terminology sequence to extract symptom, disease, syndrome, prescription and drug entities; S14. Obtain TCM knowledge data and extract the correlation information between symptoms-syndrome types, syndrome types-diseases, syndrome types-prescriptions, and prescriptions-drugs; S15. Based on the extracted entity and related information, construct an initial dialectical diagram, which consists of five types of nodes: symptoms, syndrome types, diseases, prescriptions, and drugs.

[0022] The electronic medical record text content is broken down into typical TCM clinical structural information, including chief complaint, present illness history, and tongue and pulse diagnosis. Natural language processing (NLP) technology is used to achieve terminology recognition and entity extraction, effectively improving the structured quality of the text data and the accuracy of medical entity extraction. Simultaneously, the relationships between five types of nodes are integrated using a TCM knowledge base, ensuring the initial diagnostic graph possesses structural integrity and semantic connectivity, providing high-quality basic input for subsequent training and inference of the graph neural network. The entire graph construction process not only recreates the disease-syndrome-prescription logical chain in the TCM diagnostic process but also enhances the system's ability to process heterogeneous information from electronic medical records, strengthening the model's adaptability in multi-source data integration scenarios.

[0023] In this embodiment, S2 specifically includes encoding the symptom node using a word vector model based on semantic embedding, encoding the syndrome node using a prior knowledge tag embedding method, encoding the disease node using an ICD-10 mapping encoding method, encoding the prescription node and the drug node using a structured embedding method based on component description, and fusing category information with text, attributes and structural relationships for each node to generate an initial feature vector of a unified dimension.

[0024] By employing customized encoding strategies for different types of nodes, the semantic expressive power of the initial feature vectors of nodes is significantly enhanced. Symptom nodes are embedded in the word vector space to reflect semantic similarity, syndrome nodes introduce TCM expert knowledge tags to improve the differentiation of syndromes, disease nodes use ICD-10 standard encoding to strengthen medical consistency, and prescription and drug nodes use component structure embedding to enhance the expressive power of pharmacological relationships. Furthermore, the three types of information—text, attributes, and structure—are fused to enable the model to have a unified ability to express complex node information. This provides a sufficient representational basis for multi-hop information propagation and high-order relationship modeling in graph neural networks, and improves the accuracy and stability of the overall syndrome reasoning chain.

[0025] In this embodiment, S3 specifically includes: S31. Taking each target node in the initial dialectical diagram as the center, set the maximum depth K of adjacency sensing, perform a K-order structural depth search, and obtain the set of all adjacent nodes from order 1 to order K, denoted as the neighborhood set. And retain the structural depth and path information of each adjacent node relative to the target node; S32. For each adjacent node in the neighborhood set, extract the edge type and directionality between it and the target node to construct a directed path sequence. The edge type includes the relationship types of subject, applicable, composition, and belonging. Each type is mapped to a direction encoding vector. S33. The python convolutional unit performs multi-order spiral perception processing on the target node, constructs a K-order neighborhood structure, and executes a path spiral sorting algorithm according to the structure depth from low to high and the edge type sorting rule to construct the spiral adjacency path of the target node. S34. For each node in the spiral adjacency path Calculate the structural location encoding vector: ; in, Represents the structural position encoding vector. Indicates the structural depth. This represents the direction encoding vector for the edge type. This indicates the positional code of the spiral adjacency path. , and Indicates the weighting factor; S35. Initialize the feature vector of each node. With the corresponding structural position encoding vector Feature concatenation is performed, and the data is input into the nonlinear feature transformation module to calculate the structure-aware feature vector. ; in, Represents structure-aware feature vectors. This represents the activation function. Represents the weight matrix. Indicates the bias term. Indicates feature concatenation operation; S36. All structure-aware feature vectors Nodes are constructed by stacking them in the order described in the spiral adjacency path. The corresponding spiral sensing feature matrix: S37. Perform channel normalization and convolution activation processing on the spiral sensing feature matrix to obtain the spiral sensing vector of the target node; S38. Combine the spiral sensing vectors corresponding to all target nodes to generate an adjacency feature matrix.

[0026] This paper constructs spiral adjacency paths based on graph structure depth and edge relationship types, addressing the lack of modeling for the order of neighboring nodes in existing graph neural network models. By introducing structural position encoding, the model can distinguish the different influences of neighboring nodes on structural hierarchy and path direction, achieving perception of topological order information in the graph. The Python convolutional unit, combining multi-level neighborhood construction, nonlinear feature transformation, and perceptual vector stacking, ensures that the neighborhood information of each target node is fully encoded, enhancing the modeling ability for complex TCM structural relationships. This mechanism significantly improves the structural integrity and semantic discriminative ability of node representations in dialectical models.

[0027] In this embodiment, the path spiral sorting algorithm specifically includes sorting all adjacent nodes of structural depth from 1 to K in layers according to structural depth from low to high. Within each layer of adjacent nodes, the nodes are classified according to the edge type between the adjacent nodes and the target node. Nodes with the same edge type are grouped together, and a unique directional priority number is assigned to each edge type. Within each edge type group, a secondary sort is performed according to the index order of the topological position of the adjacent nodes in the initial dialectical graph.

[0028] The path spiral sorting algorithm is used to achieve multi-level grouping and priority sorting of adjacent nodes in the graph. When constructing the node neighborhood, the algorithm not only considers the depth layering of the graph structure, but also introduces the semantic priority of edge type and the topological position of the node in the graph, to construct a more semantically distinguishable neighborhood sequence. This effectively solves the problem of disordered node perception order in traditional graph neural networks when dealing with complex heterogeneous graph structures, and enables the model to more finely control the aggregation order and propagation path of adjacency information, providing a logically clear and interpretable structural foundation for feature extraction and information propagation.

[0029] In this embodiment, S4 specifically includes: S41. Extract all the set of all the dialectical nodes in the initial dialectical diagram and establish pairwise combinations between the dialectical nodes; S42. Based on TCM knowledge data and historical statistical data from electronic medical records, analyze the co-occurrence frequency of each syndrome type node pair in real clinical scenarios, and perform normalization processing to obtain the co-occurrence frequency matrix. ; S43. Based on TCM knowledge graphs and expert experience, set up a conflict matrix. It is used to measure the degree of semantic opposition between evidence-type node pairs, including the existence of semantic opposition relationships such as opposite pathogenesis, opposition between exterior and interior, and incompatibility of yin and yang. S44. Merge the co-occurrence frequency matrix and the conflict matrix: ; in, Indicates the first The certificate type node and the first The tension value between individual certificate nodes Indicates the first The certificate type node and the first Co-occurrence frequency among individual certificate types Indicates the first The certificate type node and the first Conflict values ​​between individual certificate nodes and Represents the weighting coefficients, satisfying ; when When it indicates a coordinated syndrome, When indicates conflict symptoms; This indicates a lack of symptom relationship; S45. Construct a symmetric matrix structure of the tension values ​​of all proof-type node pairs in tensor form, satisfying... Obtain the semantic tension matrix of the syndrome.

[0030] By jointly modeling the semantic tension relationship between syndromes using a co-occurrence frequency matrix and an expert-defined conflict matrix, the model gains the ability to distinguish between synergistic and conflicting syndromes. The introduction of the tension matrix provides a structured expression for the complex semantic relationships between TCM syndromes, avoiding the introduction of pathogenesis logic errors in model reasoning. Synergistic syndromes are reinforced with positive tension values, while conflicting syndromes are constrained and modulated with negative tension values, effectively improving the boundary control capability of diagnostic reasoning. This not only enhances the model's ability to perceive the internal logic of TCM theory but also improves the controllability and clinical interpretability of the diagnostic process.

[0031] In this embodiment, S5 specifically includes: S51. Input the adjacency feature matrix and the syndrome semantic tension matrix into the GATv2 model. The adjacency feature matrix contains the spiral sensing vectors of all nodes, and the syndrome semantic tension matrix provides modulation information on the relationship between syndrome node pairs. S52. The GATv2 model performs linear mapping processing on the spiral sensing vector of each node in the input adjacency feature matrix to obtain a node feature representation of a unified dimension. The linear mapping processing adopts a combination of matrix multiplication and vector addition, and is implemented through a fully connected layer at the Tensor level. S53. For each node, calculate the attention score for all adjacent nodes: ; in, Indicates the first The node and the first Attention score between nodes This represents the activation function. Represents the attention vector. This indicates a feature concatenation operation. Indicates the first The feature representation of each node. Indicates the first Feature representation of each node; S54. The corresponding elements in the syndrome semantic tension matrix... The weighted values ​​are added to the attention score to form the modulated attention value: ; in, Indicates the first The node and the first Modulation attention values ​​between nodes Indicates the tension adjustment coefficient; S55. Normalize the modulated attention value after syndrome semantic tension adjustment to obtain the final attention weight between nodes, and weight and aggregate the information of adjacent nodes according to the final attention weight to obtain the final feature vector of the node.

[0032] GATv2 introduces a more flexible attention mechanism into graph neural networks. Compared to the traditional GAT, its weight calculation process is no longer limited to the shared weight matrix, giving it a stronger structural expressive ability. Combined with spiral perceptual feature vectors as input, the model can deeply extract structural information. The introduction of the syndrome semantic tension matrix as a modulation factor enables the dynamic adjustment of the importance of different neighboring nodes during the attention propagation process. At the same time, the modulation mechanism effectively controls the problem of misleading propagation in information aggregation, enhances the model's sensitivity to the semantic relationships between syndromes, and improves the discriminative power of the final node representation and the robustness of dialectical reasoning.

[0033] In this embodiment, S6 specifically includes: S61. Perform a type classification modeling on the final feature vector of the node obtained by updating the GATv2 model, and use a multilayer perceptron model to map the final feature vector of the type node to the output probability distribution in the classification space. S62. Perform feature concatenation on the final feature vectors of the symptom nodes and the final feature vectors of the disease nodes of the target patient to construct the patient feature expression vector, and output the syndrome prediction result corresponding to the patient based on the matching probability between the patient feature expression vector and the final feature vector of the syndrome node. S63. Based on the predicted syndrome type results, extract the corresponding syndrome type-prescription mapping relationship from the TCM knowledge data and select a set of candidate prescriptions. S64. Calculate the semantic association degree between the patient's current symptom node and the core drug node in the candidate prescriptions, and rank the candidate prescriptions. S65. The candidate prescriptions ranked highest are recommended as the final prescriptions and drug pathways. S66. The final output of the patient's corresponding syndrome prediction results and the prescription and drug pathway recommendations are used as TCM syndrome differentiation results for the generation of chronic disease treatment suggestions and physician auxiliary decision support.

[0034] By combining multilayer perceptron to classify syndrome nodes and introducing a modeling method that matches patient node feature vectors with syndrome nodes, the diagnosis results become more targeted and personalized. By integrating the path mapping relationship from syndrome to prescription and the semantic association analysis between drug nodes and symptom nodes, a complete recommendation chain from syndrome differentiation to prescription is realized. The final prescription recommendation results are obtained by ranking based on semantic similarity, which improves the accuracy and practicality of the recommendation and ensures that the selected prescriptions are highly matched with the current patient's condition. This provides a complete and logically rigorous technical support for the intelligent treatment of chronic diseases and physician-assisted decision-making.

[0035] Example 1: To verify the feasibility of this invention in practice, a randomized controlled trial was conducted for clinical simulation. Sixty patients with chronic prostatitis were randomly selected and divided into an observation group and a control group, with 30 patients in each group. The observation group received systematic treatment intervention using the optimized syndrome differentiation and treatment method proposed in this invention, while the control group received conventional treatment plans formulated by traditional Chinese medicine practitioners based on their individual clinical experience.

[0036] During a patient's initial consultation, the system automatically collects their electronic medical record text information, including chief complaint, present illness history, and tongue, pulse, and coating details, and constructs an initial diagnostic diagram using a traditional Chinese medicine knowledge graph. The system utilizes structured embeddings and Python convolutional units to perform multi-level perception of the node information in the diagram, and completes the diagnostic result reasoning based on the syndrome semantic tension matrix and the GATv2 model, ultimately outputting specific syndrome types and suggested prescription combinations. Doctors can view the model-recommended diagnostic and medication pathways on the treatment platform and conduct secondary confirmation based on the actual situation.

[0037] In the observation group, all patients received two weeks of herbal treatment after using the system to assist decision-making. During this period, the system could dynamically adjust the suggested syndrome type and treatment plan based on changes in symptoms. In the control group, the syndrome differentiation and herbal selection process were completed independently by physicians. After the experimental period, the effectiveness was evaluated based on the accuracy rate of initial syndrome differentiation before and after the initial diagnosis, the consistency rate of herbal recommendations, the improvement of TCM syndrome scores, the average diagnosis and treatment time, patient satisfaction, and the adoption rate of drug pathway recommendations.

[0038] Table 1. Comparison of indicators of optimized TCM syndrome differentiation and treatment methods for chronic diseases in clinical trials.

[0039] Based on the experimental data in Table 1 above, there were significant differences between the observation group and the control group in several clinical indicators, which verified the effectiveness and advancement of the method of the present invention.

[0040] The experimental results showed that the accuracy rate of syndrome differentiation in the observation group was significantly higher than that in the control group. After review by the chief TCM doctor, the initial diagnosis accuracy rate in the observation group reached over 90%, compared to 76.7% in the control group. Regarding the consistency rate between the recommended prescription pathway and expert opinions, the observation group achieved 88.3%, higher than the control group's 72.5%. In terms of treatment efficacy, the average TCM syndrome score in the observation group decreased from 42.5 points before treatment to 14.2 points, an improvement of 66.6%; while in the control group, the score decreased from 41.8 points to 22.6 points, an improvement of 45.9%.

[0041] In this embodiment, the system processes each patient's electronic medical record in an average of approximately 3.1 seconds, enabling rapid decision support in the clinic and saving doctors a significant amount of time for syndrome differentiation and analysis. The patient satisfaction rate in the observation group was significantly higher than that in the control group. When faced with complex chronic disease cases involving multiple symptoms and overlapping pathogenesis, the system can effectively mine the semantic co-occurrence relationships between implicit syndromes through graph structure perception mechanisms, and propose reasonable treatment combination suggestions. This avoids the problems of syndrome misjudgment or prescription indication deviation that are prone to occur in traditional experience-based treatment. The adoption rate of drug pathway recommendations in the observation group was higher than that in the control group.

[0042] This embodiment focuses on the intelligent diagnosis and treatment of chronic diseases in Traditional Chinese Medicine (TCM). By introducing graph neural networks, GATv2 attention mechanisms, and structure-aware Python convolutional units, it achieves deep modeling of the logical relationship between the core elements of TCM diagnosis: "symptom-syndrome-prescription-medicine". The entire system is based on electronic medical record text and TCM knowledge graph, automatically extracting and constructing an initial dialectical graph containing five types of nodes and multiple semantic edge relationships. Then, through multi-order spiral path modeling, semantic tension matrix construction, and graph neural propagation mechanism, it deeply integrates and expresses the individualized feature information of patients.

[0043] During the reasoning process, the system not only focuses on the local neighborhood structure but also introduces topological order awareness through structural depth and edge type encoding, enhancing its ability to capture contextual information in the graph structure. Simultaneously, the syndrome semantic tension mechanism effectively identifies the synergistic and conflicting relationships between syndromes, avoiding the fuzzy matching or misdiagnosis problems that may occur in traditional Chinese medicine manual syndrome differentiation, thus ensuring that the syndrome differentiation recommendation results have a high degree of consistency and rationality.

[0044] This embodiment employs differentiated feature encoding methods for different types of nodes, enhancing the system's ability to integrate and express heterogeneous medical information. A structure-modulated attention mechanism is introduced during the graph neural propagation stage, enabling reasoning not only to rely on the characteristics of the nodes themselves but also to integrate the symptom tension relationships within clinical knowledge. This enhances the interpretability and professional matching of the system's inferences. Finally, the drug pathway recommendation based on the knowledge graph is no longer limited to fixed prescriptions corresponding to a single symptom type but can flexibly combine core drugs according to individual differences, thus improving the practical value of the treatment pathway.

[0045] The application of this invention in specific scenarios demonstrates a new model for intelligent diagnosis and treatment in traditional Chinese medicine that integrates data-driven methods and knowledge-constrained logic. It does not rely excessively on expert experience and can realize an automated diagnostic reasoning system that is transferable, replicable, and scalable. This embodiment verifies the advantages of graph neural structures in expressing traditional Chinese medicine information and the driving role of knowledge enhancement models in diagnosis and treatment recommendations, providing a technical path and feasible paradigm for the implementation of intelligent traditional Chinese medicine in the field of chronic disease treatment.

[0046] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. An optimized method for TCM chronic disease diagnosis and treatment based on graph neural networks, characterized in that, Includes the following steps: S1. Collect the patient's electronic medical record text data and TCM knowledge data, extract entities based on natural language processing technology, and construct an initial dialectical diagram. The initial dialectical diagram includes symptom, syndrome type, disease, prescription and drug nodes. S2. Encode the features of each node in the initial dialectical diagram to obtain the initial feature vector of the node; S3. Multi-level spiral perception processing is performed using python convolutional units. The python convolutional units construct spiral adjacency paths for each target node according to structural depth and relational direction, and introduce structural position encoding to perform sequential perception modeling of node neighborhood relationships, generating an adjacency feature matrix. S4. Construct a semantic tension matrix of syndromes to represent the semantic co-occurrence relationship or semantic conflict relationship between syndrome nodes, where positive tension values ​​represent co-occurrence syndromes and negative tension values ​​represent conflicting syndromes. S5. Input the adjacency feature matrix and the syndrome semantic tension matrix into the GATv2 model, perform multiple attention propagation, and obtain the final feature vector of the node. S6. Use the final feature vector of the node to output the syndrome prediction result corresponding to the patient, and combine it with TCM knowledge data to generate prescription and drug path recommendations.

2. The method for optimizing TCM chronic disease diagnosis and treatment based on graph neural networks according to claim 1, characterized in that, S1 specifically includes: S11. Collect the patient's original electronic medical record text data, including chief complaint, present illness, past medical history, and tongue and pulse information; S12. Perform sentence segmentation and word segmentation on the original text data of the patient's electronic medical record to construct a sequence of clinical terms; S13. Apply natural language processing technology to perform named entity recognition on the clinical terminology sequence to extract symptom, disease, syndrome, prescription and drug entities; S14. Obtain TCM knowledge data and extract the correlation information between symptoms-syndrome types, syndrome types-diseases, syndrome types-prescriptions, and prescriptions-drugs; S15. Based on the extracted entity and related information, construct an initial dialectical diagram, which consists of five types of nodes: symptoms, syndrome types, diseases, prescriptions, and drugs.

3. The method for optimizing TCM chronic disease diagnosis and treatment based on graph neural networks according to claim 1, characterized in that, S2 specifically includes encoding the symptom nodes using a word vector model based on semantic embedding, encoding the syndrome nodes using a prior knowledge tag embedding method, encoding the disease nodes using an ICD-10 mapping encoding method, encoding the prescription nodes and the drug nodes using a structured embedding method based on component description, and fusing category information with text, attributes and structural relationships for each node to generate an initial feature vector of a unified dimension.

4. The method for optimizing TCM chronic disease diagnosis and treatment based on graph neural networks according to claim 1, characterized in that, S3 specifically includes: S31. Taking each target node in the initial dialectical diagram as the center, set the maximum depth K of adjacency sensing, perform a K-order structural depth search, and obtain the set of all adjacent nodes from order 1 to order K, denoted as the neighborhood set. And retain the structural depth and path information of each adjacent node relative to the target node; S32. For each adjacent node in the neighborhood set, extract the edge type and directionality between it and the target node to construct a directed path sequence. The edge type includes the relationship types of subject, applicable, composition, and belonging. Each type is mapped to a direction encoding vector. S33. The python convolutional unit performs multi-order spiral perception processing on the target node, constructs a K-order neighborhood structure, and executes a path spiral sorting algorithm according to the structure depth from low to high and the edge type sorting rule to construct the spiral adjacency path of the target node. S34. For each node in the spiral adjacency path Calculate the structural location encoding vector: ; in, Represents the structural position encoding vector. Indicates the structural depth. This represents the direction encoding vector for the edge type. This indicates the positional code of the spiral adjacency path. , and Indicates the weighting factor; S35. Initialize the feature vector of each node. With the corresponding structural position encoding vector Feature concatenation is performed, and the data is input into the nonlinear feature transformation module to calculate the structure-aware feature vector. ; in, Represents structure-aware feature vectors. This represents the activation function. Represents the weight matrix. Indicates the bias term. Indicates feature concatenation operation; S36. All structure-aware feature vectors Nodes are constructed by stacking them in the order described in the spiral adjacency path. The corresponding spiral sensing feature matrix: S37. Perform channel normalization and convolution activation processing on the spiral sensing feature matrix to obtain the spiral sensing vector of the target node; S38. Combine the spiral sensing vectors corresponding to all target nodes to generate an adjacency feature matrix.

5. The method for optimizing TCM chronic disease diagnosis and treatment based on graph neural networks according to claim 4, characterized in that, The path spiral sorting algorithm specifically includes sorting all adjacent nodes of structural depth from 1 to K in layers according to structural depth from low to high. Within each layer of adjacent nodes, the nodes are classified according to the edge type between the adjacent nodes and the target node. Nodes with the same edge type are grouped together, and a unique directional priority number is assigned to each edge type. Within each edge type group, a secondary sort is performed according to the index order of the topological position of the adjacent nodes in the initial dialectical graph.

6. The method for optimizing TCM chronic disease diagnosis and treatment based on graph neural networks according to claim 1, characterized in that, S4 specifically includes: S41. Extract all the set of all the dialectical nodes in the initial dialectical diagram and establish pairwise combinations between the dialectical nodes; S42. Based on TCM knowledge data and historical statistical data from electronic medical records, analyze the co-occurrence frequency of each syndrome node pair in real clinical scenarios, and perform normalization processing to obtain the co-occurrence frequency matrix. ; S43. Based on TCM knowledge graphs and expert experience, set up a conflict matrix. It is used to measure the degree of semantic opposition between evidence-type node pairs, including the existence of semantic opposition relationships such as opposite pathogenesis, opposition between appearance and reality, and incompatibility of yin and yang. S44. Merge the co-occurrence frequency matrix and the conflict matrix: ; in, Indicates the first The certificate type node and the first The tension value between individual certificate nodes Indicates the first The certificate type node and the first Co-occurrence frequency among individual certificate-type nodes Indicates the first The certificate type node and the first Conflict values ​​between individual certificate nodes and Represents the weighting coefficients, satisfying ; when When it indicates a coordinated syndrome, When indicates conflict symptoms; This indicates a lack of symptom relationship; S45. Construct a symmetric matrix structure of the tension values ​​of all proof-type node pairs in tensor form, satisfying... Obtain the semantic tension matrix of the syndrome.

7. The method for optimizing TCM chronic disease diagnosis and treatment based on graph neural networks according to claim 1, characterized in that, S5 specifically includes: S51. Input the adjacency feature matrix and the syndrome semantic tension matrix into the GATv2 model. The adjacency feature matrix contains the spiral sensing vectors of all nodes, and the syndrome semantic tension matrix provides modulation information on the relationship between syndrome node pairs. S52. The GATv2 model performs linear mapping processing on the spiral sensing vector of each node in the input adjacency feature matrix to obtain a node feature representation of a unified dimension. The linear mapping processing adopts a combination of matrix multiplication and vector addition, and is implemented through a fully connected layer at the Tensor level. S53. For each node, calculate the attention score for all adjacent nodes: ; in, Indicates the first The node and the first Attention score between nodes This represents the activation function. Represents the attention vector. This indicates a feature concatenation operation. Indicates the first The feature representation of each node. Indicates the first Feature representation of each node; S54. The corresponding elements in the syndrome semantic tension matrix... The weighted values ​​are added to the attention score to form the modulated attention value: ; in, Indicates the first The node and the first Modulation attention values ​​between nodes Indicates the tension adjustment coefficient; S55. Normalize the modulated attention value after syndrome semantic tension adjustment to obtain the final attention weight between nodes, and weight and aggregate the information of adjacent nodes according to the final attention weight to obtain the final feature vector of the node.

8. The method for optimizing TCM chronic disease diagnosis and treatment based on graph neural networks according to claim 1, characterized in that, S6 specifically includes: S61. Perform a type classification modeling on the final feature vector of the node obtained by updating the GATv2 model, and use a multilayer perceptron model to map the final feature vector of the type node to the output probability distribution in the classification space. S62. Perform feature concatenation on the final feature vectors of the symptom nodes and the final feature vectors of the disease nodes of the target patient to construct the patient feature expression vector, and output the syndrome prediction result corresponding to the patient based on the matching probability between the patient feature expression vector and the final feature vector of the syndrome node. S63. Based on the predicted syndrome type results, extract the corresponding syndrome type-prescription mapping relationship from the TCM knowledge data and select a set of candidate prescriptions. S64. Calculate the semantic association degree between the patient's current symptom node and the core drug node in the candidate prescriptions, and rank the candidate prescriptions. S65. The candidate prescriptions ranked highest are recommended as the final prescriptions and drug pathways. S66. The final output of the patient's corresponding syndrome prediction results and the prescription and drug pathway recommendations are used as TCM syndrome differentiation results for the generation of chronic disease treatment suggestions and physician auxiliary decision support.

Citation Information

Cited By

  • Medical document-oriented man-machine collaborative intelligent writing method and system

    CN121390080A

  • Traditional Chinese medicine formula intelligent recommendation and safety monitoring system based on knowledge graph

    CN121565375A