A diagnosis and treatment result prediction method fusing time series and traditional Chinese medicine multi-stage diagnosis and treatment

By constructing graph structures and graph neural network models to extract feature sequences of symptoms, syndromes, treatments, and prescriptions, and combining them with recurrent neural networks to predict multi-stage diagnosis and treatment outcomes, the problem of inaccurate prediction throughout the entire TCM diagnosis and treatment process is solved, achieving precise and intelligent auxiliary decision-making in the TCM diagnosis and treatment process.

CN121439114BActive Publication Date: 2026-06-05PEKING UNIV +1
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PEKING UNIV
Filing Date
2025-12-29
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing technologies cannot accurately simulate the multi-stage reasoning logic of TCM syndrome differentiation and treatment, resulting in inaccurate prediction of the entire TCM diagnosis and treatment process.

Method used

This study employs a method that integrates time series analysis with multi-stage TCM diagnosis and treatment. By constructing graph structures and graph neural network models, feature sequences of symptoms, syndromes, treatments, and prescriptions are extracted. Recurrent neural networks are then used to predict multi-stage diagnosis and treatment outcomes. Graph attention mechanisms and stage-aware representation decoupling modules are utilized to decouple and aggregate features, achieving end-to-end prediction of diagnosis and treatment outcomes.

Benefits of technology

It enables accurate multi-stage prediction of the TCM diagnosis and treatment process, enhances the intelligent auxiliary decision-making ability of syndrome differentiation and treatment, and improves the accuracy and interpretability of diagnosis and treatment results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121439114B_ABST
    Figure CN121439114B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of fusion time series and traditional Chinese medicine multi-stage diagnosis and treatment diagnosis and treatment result prediction method, belong to traditional Chinese medicine diagnosis and treatment prediction technical field, solve the problem of lack of accurate whole process prediction in prior art.Method includes: obtaining the symptoms and historical visit time series data of the patient to be predicted current visit;Historical visit time series data includes the symptom, syndrome, therapy and prescription data of each time step;The graph structure corresponding to each time step of historical visit time series data is constructed;Based on the graph structure and the symptoms of current visit, symptom feature sequence, syndrome feature sequence, therapy feature sequence and prescription feature sequence are extracted using trained graph neural network model;Based on symptom feature sequence, syndrome feature sequence, therapy feature sequence and prescription feature sequence, multi-stage diagnosis and treatment result prediction is carried out using trained recurrent neural network model, and syndrome, therapy and prescription prediction results of the patient to be predicted current visit are obtained.Accurate whole process prediction is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of TCM diagnosis and treatment prediction technology, and in particular to a method for predicting diagnosis and treatment outcomes that integrates time series analysis with multi-stage TCM diagnosis and treatment. Background Technology

[0002] Traditional Chinese Medicine (TCM) has been researched and practiced in China for thousands of years. It is a unique medical paradigm distinct from modern medicine and is widely used globally. However, the diagnostic and treatment process of TCM relies heavily on the subjective experience of doctors, resulting in limitations such as low standardization, long treatment times, and high training costs, making it difficult to meet the growing clinical needs. Against this backdrop, the development of artificial intelligence (AI) technology offers a new path for the modernization of TCM. By utilizing patients' medical records and current symptoms, AI-driven TCM prescription recommendation models can simulate the reasoning process of TCM physicians, thereby providing intelligent auxiliary decision support for clinical diagnosis and treatment.

[0003] The diagnostic and treatment process in Traditional Chinese Medicine (TCM) is typically divided into four stages. The first stage is symptom collection, where doctors use methods such as observation, auscultation and olfaction, inquiry, and palpation to collect information about the patient's symptoms, such as tongue coating, pulse, complexion, and voice. The second stage is syndrome differentiation, where doctors analyze the collected symptoms to determine the cause, location, and pathogenesis of the disease, clarify the pathological mechanism, and establish the syndrome. The third stage is treatment, where doctors select appropriate treatment methods based on the identified syndrome, such as clearing heat and calming the mind. The fourth stage is prescription recommendation, where doctors comprehensively consider the patient's condition, constitution, and past medical history to formulate a personalized prescription consisting of various Chinese herbal medicines.

[0004] Early machine learning-based TCM prescription recommendation methods primarily relied on statistical and probabilistic models and topic modeling to uncover the associations between symptoms and medications. However, these methods struggled to characterize the complex high-order relationships between clinical concepts such as symptoms and herbs. To overcome this limitation, subsequent research introduced graph-based representation methods. By constructing relational networks between clinical concepts and combining them with external knowledge such as knowledge graphs, the accuracy of symptom-to-medication matching was improved. However, these methods still simplified the diagnosis and treatment process to a single "symptom-to-medication" mapping, failing to reflect the multi-stage reasoning logic in TCM syndrome differentiation and treatment, from symptoms to syndromes to prescriptions. This resulted in an inability to effectively simulate the complete reasoning chain of syndrome differentiation and treatment, and thus, an inability to make accurate full-process predictions. Summary of the Invention

[0005] Based on the above analysis, the embodiments of the present invention aim to provide a method for predicting treatment outcomes that integrates time series analysis with multi-stage TCM diagnosis and treatment, in order to solve the problem of the lack of accurate full-process prediction in existing methods.

[0006] On one hand, embodiments of the present invention provide a method for predicting treatment outcomes by integrating time series data with multi-stage TCM diagnosis and treatment, comprising the following steps:

[0007] Obtain the symptoms and historical consultation time series data of the patient to be predicted; the historical consultation time series data includes the symptoms, syndromes, treatments and prescription data for each time step;

[0008] Construct a graph structure corresponding to each time step of historical medical visit time series data; based on the graph structure and the symptoms of the current medical visit, use a trained graph neural network model to extract symptom feature sequences, syndrome feature sequences, treatment feature sequences, and prescription feature sequences;

[0009] Based on symptom feature sequences, syndrome feature sequences, treatment feature sequences, and prescription feature sequences, a trained recurrent neural network model is used to predict multi-stage diagnosis and treatment outcomes, thereby obtaining the predicted syndrome, treatment, and prescription of the patient to be diagnosed.

[0010] Based on the above method, a graph structure corresponding to each time step of the historical medical visit time series data is constructed in the following way:

[0011] Each symptom, syndrome, treatment, and prescription in the medical data at that time step is used as a node in the graph structure; edges are established between each symptom node and each syndrome node, between each syndrome node and each treatment node, and between each treatment node and each prescription node.

[0012] Based on a further improvement of the above method, the graph neural network model includes:

[0013] The node embedding module is used to perform embedding mapping on each node in the graph structure corresponding to each time step to obtain the initial embedding of each node.

[0014] The node feature extraction module is used to perform feature interaction on the initial embedding of each node in the graph structure based on the improved graph attention mechanism to obtain the feature representation of each node;

[0015] The feature aggregation module is used to aggregate information from the feature representations of each type of node to obtain the feature representation of each node type; the node types include symptom nodes, syndrome nodes, treatment nodes, and prescription nodes.

[0016] The stage perception representation decoupling module is used to decouple the symptom feature representation of the current visit to obtain syndrome enhancement representation, therapy enhancement representation, and prescription enhancement representation;

[0017] The sequence construction module is used to construct symptom feature sequences, syndrome feature sequences, therapy feature sequences, and prescription feature sequences based on the feature representations of each node type at each time step of historical medical visit time series data, the feature representation of the current medical visit, the syndrome enhancement representation, the therapy enhancement representation, and the prescription enhancement representation.

[0018] Based on the above method, a further improvement is made to obtain the feature representation of each node by performing feature interaction on the initial embedding of each node in the graph structure:

[0019] ;

[0020] ;

[0021] ;

[0022] Among them, among them, This represents the feature representation of the i-th node in the graph structure. This represents the initial embedding of the i-th node in the graph structure. This represents the initial embedding of the j-th node in the graph structure. This represents the set of adjacent nodes of the i-th node in the graph structure. Represents a learnable linear transformation matrix. This represents the attention score between the i-th node and the j-th node. This represents the attention score between the i-th node and the k-th node. Represented as attention weights after Softmax normalization. This represents a vector of learnable attention parameters. Represents the ReLU activation function. This represents the LeakyReLU activation function, " indicates a join operation.

[0023] Based on further improvements to the above methods, the following approach is used to decouple the symptom characteristics of the current medical visit to obtain syndrome enhancement representation, therapy enhancement representation, and prescription enhancement representation:

[0024] ;

[0025] ;

[0026] in," "Indicates a splicing operation, , and Both represent fully connected layers. , and This represents the parameters of the corresponding fully connected layer. This indicates an enhancement of the symptoms. This indicates that the therapy enhances the manifestation. This indicates that the prescription enhances the characterization. Indicates shared features, Indicates the specific characteristics of the syndrome. Indicates the specific characteristics of the therapy. Indicates the specific characteristics of the prescription. Indicates a shared encoder. Indicates a syndrome-specific encoder. Indicates a therapy-specific encoder, Indicates a prescription-specific encoder. , , and Indicates the parameters of the encoder, This indicates the characteristics of the symptoms presented during the current medical visit.

[0027] Based on further improvements to the above method, the trained graph neural network model and the trained recurrent neural network are obtained through joint training.

[0028] Based on a further improvement of the above method, the recurrent neural network model includes:

[0029] The enhanced temporal representation computation module is used to perform dynamic feature modeling based on symptom feature sequences, syndrome feature sequences, therapy feature sequences, and prescription feature sequences to obtain enhanced temporal representations of symptoms, syndromes, therapy, and prescriptions.

[0030] The prediction module is used to perform multi-stage predictions based on symptom enhancement time-series representation, syndrome enhancement time-series representation, therapy enhancement time-series representation, and prescription enhancement time-series representation, and obtain syndrome, therapy, and prescription prediction results.

[0031] Based on the further improvement of the above method, the joint training loss is calculated using the following formula:

[0032] ;

[0033] in, Indicates the predicted loss of prescriptions. Indicates the predicted loss of the therapy. Indicates the predicted loss based on the symptoms. Indicates time difference alignment loss. This represents the decoupling loss. , , and This represents the weight hyperparameter.

[0034] Based on the further improvement of the above method, the decoupling loss is calculated using the following formula:

[0035] ;

[0036] in, This function represents the orthogonality measure between two vectors. Indicates shared features, Indicates the specific characteristics of the syndrome. Indicates the specific characteristics of the therapy. It indicates the specific characteristics of the prescription.

[0037] Based on the above method, a further improvement is made to calculate the time difference alignment loss using the following method:

[0038] ;

[0039] in, This represents the feature difference between the i-th time step and the (i-1)-th time step in the symptom feature sequence. This represents the feature difference between the i-th time step and the (i-1)-th time step in the syndrome feature sequence. This represents the feature difference between the i-th time step and the (i-1)-th time step in the therapeutic feature sequence. Let represent the feature difference between the i-th time step and the (i-1)-th time step in the prescription feature sequence, and t represent the number of time steps in the symptom feature sequence. This represents the cosine similarity function.

[0040] Compared with existing technologies, this invention acquires the current symptoms and historical time-series data of the patient to be predicted, and constructs a graph structure corresponding to each time step of the historical time-series data. Based on the graph structure and the current symptoms, a trained graph neural network model is used to extract symptom feature sequences, syndrome feature sequences, treatment feature sequences, and prescription feature sequences. Then, based on the symptom feature sequences, syndrome feature sequences, treatment feature sequences, and prescription feature sequences, a trained recurrent neural network model is used to predict multi-stage diagnosis and treatment results, thereby obtaining the predicted syndrome, treatment, and prescription of the patient to be predicted. This jointly models the time series and multi-stage sequences, accurately generating prediction results in a stage-by-stage manner, thus enabling more precise syndrome differentiation and treatment auxiliary decision-making for dynamically evolving complex conditions.

[0041] In this invention, the above-described technical solutions can be combined with each other to achieve more preferred combinations. Other features and advantages of this invention will be set forth in the following description, and some advantages may become apparent from the description or be learned by practicing the invention. The objects and other advantages of this invention can be realized and obtained from what is particularly pointed out in the description and drawings. Attached Figure Description

[0042] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts.

[0043] Figure 1 This is a flowchart of a method for predicting treatment outcomes that integrates time series data with multi-stage TCM diagnosis and treatment, as described in an embodiment of the present invention.

[0044] Figure 2 This is a performance comparison chart of different models in the embodiments of the present invention;

[0045] Figure 3 These are box plots showing the performance of different models in the embodiments of the present invention. Detailed Implementation

[0046] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.

[0047] A specific embodiment of the present invention discloses a method for predicting treatment outcomes by integrating time series analysis with multi-stage TCM diagnosis and treatment, such as... Figure 1 As shown, it includes the following steps:

[0048] S1. Obtain the current symptoms and historical time-series data of the patient to be predicted; the data for each time step includes symptoms, syndromes, treatments, and prescriptions.

[0049] S2. Construct a graph structure corresponding to each time step of the historical medical visit time series data; based on the graph structure and the symptoms of the current medical visit, use a trained graph neural network model to extract symptom feature sequences, syndrome feature sequences, treatment feature sequences, and prescription feature sequences;

[0050] S3. Based on the symptom feature sequence, syndrome feature sequence, treatment feature sequence, and prescription feature sequence, a trained recurrent neural network is used to predict the multi-stage diagnosis and treatment results, and the predicted syndrome, treatment, and prescription of the patient to be diagnosed are obtained.

[0051] During implementation, assuming the current visit is the t-th visit, obtain the symptom data of the current visit as well as the symptoms, syndromes, treatments, and prescriptions of the 1st to t-1st visits.

[0052] In historical medical visit time series data, each visit constitutes one time step. A prescription is the medication prescribed by the doctor.

[0053] In practice, in order to model the relationship network between clinical concepts and improve the accuracy of prediction, a graph structure corresponding to each time step of historical medical visit time series data is constructed, and then feature sequence extraction is performed based on a graph neural network model.

[0054] Specifically, the graph structure corresponding to each time step of the historical medical visit time series data is constructed using the following method:

[0055] Each symptom, syndrome, treatment, and prescription in the medical data at that time step is used as a node in the graph structure; edges are established between each symptom node and each syndrome node, between each syndrome node and each treatment node, and between each treatment node and each prescription node.

[0056] Each clinical event during a visit (each symptom, syndrome, treatment plan, and prescription) is defined as a node in the graph. That is, node types include symptom nodes, syndrome nodes, treatment nodes, and prescription nodes.

[0057] In constructing the graph, we establish connections between events in adjacent diagnostic stages based on the logical sequence of TCM diagnosis and treatment, forming edge sets. These correspond to the associations of "symptom → syndrome", "syndrome → treatment method", and "treatment method → ​​prescription", respectively. All edges are bidirectional, with an initial weight of 1, thus forming a fully connected four-part graph structure within each visit. Indicates symptom nodes, Indicates the symptom node, Indicates therapeutic nodes, This represents a prescription node.

[0058] Then, based on the graph structure and the symptoms observed during the current medical visit, a trained graph neural network model is used to extract symptom feature sequences, syndrome feature sequences, treatment feature sequences, and prescription feature sequences. Specifically, the graph neural network model includes:

[0059] The node embedding module is used to perform embedding mapping on each node in the graph structure corresponding to each time step to obtain the initial embedding of each node.

[0060] The node feature extraction module is used to perform feature interaction on the initial embedding of each node in the graph structure based on the improved graph attention mechanism to obtain the feature representation of each node;

[0061] The feature aggregation module is used to aggregate information from the feature representations of each type of node to obtain the feature representation of each node type; the node types include symptom nodes, syndrome nodes, treatment nodes, and prescription nodes.

[0062] The stage perception representation decoupling module is used to decouple the symptom feature representation of the current visit to obtain syndrome enhancement representation, therapy enhancement representation, and prescription enhancement representation;

[0063] The sequence construction module is used to construct symptom feature sequences, syndrome feature sequences, therapy feature sequences, and prescription feature sequences based on the feature representations of each node type at each time step of historical medical visit time series data, the feature representation of the current medical visit, the syndrome enhancement representation, the therapy enhancement representation, and the prescription enhancement representation.

[0064] In practice, unique heat coding can be used to encode each TCM symptom to obtain a coding vector for each symptom; coding can be used to encode each TCM syndrome to obtain a coding vector for each syndrome; coding can be used to encode each TCM treatment method to obtain a coding vector for each treatment method; and coding can be used to encode each TCM drug to obtain a coding vector for each drug.

[0065] The encoded vectors of all symptoms currently presented constitute the feature representation of the current symptoms.

[0066] During implementation, the node embedding module establishes an embedding matrix for each node type:

[0067] ;

[0068] ;

[0069] ;

[0070] ;

[0071] Each row in the embedding matrix corresponds to a single clinical event instance. Indicates the total number of symptoms, Indicates the total number of symptoms. This indicates the total number of treatments. d represents the total number of prescriptions, and d represents the dimension of the initial embedding. It represents the set of real numbers.

[0072] The embedding matrix maps the encoded vector of each node in the graph structure at each time step to the initial embedding. Its definition is as follows:

[0073] ;

[0074] ;

[0075] in, , , , These respectively represent the symptoms observed during a single medical visit, the diagnosed syndrome, the treatment method used, and the corresponding prescription. , , and The parameter represents the corresponding embedding matrix.

[0076] The initial embedding of each symptom node in the graph structure is obtained through the embedding matrix. Initial embedding of each symptom node Initial embedding of each therapy node and the initial embedding of each prescription node .

[0077] The node feature extraction module uses an improved graph attention mechanism to perform feature interaction on the initial embedding of each node in the graph structure to obtain the feature representation of each node.

[0078] In practice, after constructing the graph corresponding to each time step, this invention performs feature interaction and information propagation between nodes based on predefined edge relationships. It adopts an improved graph attention mechanism (GATv2) to model the dependencies between nodes and dynamically calculates the weights of edges through an adaptive attention mechanism, thereby improving the accuracy of feature fusion and semantic expression capabilities.

[0079] The characteristic representation of any node in the graph structure is obtained using the following formula:

[0080] ;

[0081] ;

[0082] ;

[0083] in, This represents the feature representation of the i-th node in the graph structure. This represents the initial embedding of the i-th node in the graph structure. This represents the initial embedding of the j-th node in the graph structure. This represents the set of adjacent nodes of the i-th node in the graph structure. Represents a learnable linear transformation matrix. This represents the attention score between the i-th node and the j-th node. This represents the attention score between the i-th node and the k-th node. Represented as attention weights after Softmax normalization. This represents a vector of learnable attention parameters. Represents the ReLU activation function. This represents the LeakyReLU activation function. The symbol " " indicates a join operation.

[0084] After obtaining the feature representation of each node in the graph structure, the feature aggregation module aggregates information from nodes of the same type in the graph structure to form an overall representation of that type. GraphNorm is then used to normalize the aggregation results to eliminate scale differences between different event types. This yields the feature representation of the medical visit data at each time step, including symptom feature representation, syndrome feature representation, treatment feature representation, and prescription feature representation.

[0085] For example, for the (t-1)th time step, the symptom feature representation is calculated as follows:

[0086] ;

[0087] in, This represents the symptom characteristics at time step t-1. Let represent the set of symptom nodes in the graph structure corresponding to the (t-1)th time step. This represents the feature representation of the i-th symptom node in the graph structure corresponding to the (t-1)-th time step. This indicates GraphNorm normalization.

[0088] The symptom characteristics at time step (t-1) are obtained in the same way. Therapeutic characteristics and prescription feature representation .

[0089] To simultaneously acquire common information across all clinical stages and the unique differences between each stage, this invention proposes stage-aware representation decoupling. Stage-aware representation decoupling allows for the explicit description of how a physician's focus on different symptom characteristics changes throughout the same consultation, thereby enabling precise modeling of stages such as syndrome differentiation, treatment plan formulation, and prescription generation.

[0090] Specifically, the stage-aware representation decoupling module uses the following methods to decouple the symptom features of the current visit to obtain syndrome enhancement representation, therapy enhancement representation, and prescription enhancement representation:

[0091] ;

[0092] ;

[0093] in," "Indicates a splicing operation, , and Both represent fully connected layers. , and This represents the parameters of the corresponding fully connected layer. This indicates an enhancement of the symptoms. This indicates that the therapy enhances the manifestation. This indicates that the prescription enhances the characterization. Indicates shared features, Indicates the specific characteristics of the syndrome. Indicates the specific characteristics of the therapy. Indicates the specific characteristics of the prescription. Indicates a shared encoder. Indicates a syndrome-specific encoder. Indicates a therapy-specific encoder, Indicates a prescription-specific encoder. , , and Indicates the parameters of the encoder, This indicates the characteristic features of the symptoms currently presented.

[0094] Among them, the shared encoder is used to extract global information common to each stage, while the stage-specific encoders extract specific features related to a specific diagnosis and treatment stage.

[0095] Specifically, the structural definitions of shared encoders and specific encoders are as follows:

[0096] ;

[0097] Indicates a shared encoder. Parameters representing the shared encoder, Indicates a syndrome-specific encoder. The parameters representing the syndrome-specific encoder, Indicates a therapy-specific encoder, Parameters representing the therapy-specific encoder, Indicates a prescription-specific encoder. Parameters representing prescription-specific encoders Indicates the dimension of the initial embedding.

[0098] During implementation, the symptom characteristics of the current medical visit are input into a shared encoder and three specific encoders for feature decoupling, resulting in shared features. And three specific features, namely, syndrome specific features Therapeutic specificity characteristics and prescription specificity features Shared features reflect the overall information of a patient's medical process, while specific features depict the unique diagnostic and treatment information at each stage.

[0099] In implementation, the shared encoder and the specific encoder can adopt existing encoder structures, such as multilayer linear perceptrons, Transformers, recurrent neural networks, etc. This invention does not impose any restrictions on the encoder structure. The experimental results presented in this paper use the multilayer linear perceptron, which has the smallest number of parameters and the simplest structure, as an example.

[0100] By decoupling shared features from stage-specific features through stage-aware representation, key information corresponding to different stages can be extracted, providing a foundation for subsequent accurate prediction.

[0101] Furthermore, based on shared and specific features, syndrome enhancement representations, therapy enhancement representations, and prescription enhancement representations are obtained. During implementation, the shared features are concatenated with each specific feature and then transmitted through a fully connected layer network. , and Obtain the corresponding enhanced representation , and .

[0102] After obtaining the enhanced representations at each stage, based on the feature representations of each node type at each time step of the historical medical visit time series data, the feature representation of the current medical visit, the syndrome enhancement representation, the therapy enhancement representation, and the prescription enhancement representation, symptom feature sequence, syndrome feature sequence, therapy feature sequence, and prescription feature sequence are constructed.

[0103] Specifically, the symptom feature representations at each time step of the historical medical visit data and the symptom feature representations of the current medical visit constitute a symptom feature sequence;

[0104] The syndrome feature representation and syndrome enhancement characterization at each time step of the historical medical visit time series data constitute the syndrome feature sequence;

[0105] The treatment feature representation and treatment enhancement characterization at each time step of the historical medical visit time series data constitute the syndrome feature sequence;

[0106] The prescription feature representation and syndrome prescription characterization of each time step in the historical medical visit time series data constitute the syndrome feature sequence.

[0107] During implementation, the symptom feature representations at time steps 1 to t-1 are concatenated with the symptom features at time step t to form a symptom feature sequence. The symptom feature representations at time steps 1 to t-1 are concatenated with the symptom enhancement representations at time step t to form a symptom feature sequence. The symptom feature representations at time steps 1 to t-1 are concatenated with the symptom enhancement representations at time step t to form a symptom feature sequence. The therapeutic feature sequence is formed by concatenating the therapeutic feature representations at time steps 1 to t-1 with the therapeutic enhancement representation at time step t. The prescription feature representations from time steps 1 to t-1 are concatenated with the prescription enhancement representation from time step t to form the prescription feature sequence. .

[0108] Then, a trained recurrent neural network is used to predict the results of multi-stage diagnosis and treatment.

[0109] Specifically, recurrent neural network models include:

[0110] The enhanced temporal representation computation module is used to perform dynamic feature modeling based on symptom feature sequences, syndrome feature sequences, therapy feature sequences, and prescription feature sequences to obtain enhanced temporal representations of symptoms, syndromes, therapy, and prescriptions.

[0111] The prediction module is used to perform multi-stage predictions based on symptom enhancement time-series representation, syndrome enhancement time-series representation, therapy enhancement time-series representation, and prescription enhancement time-series representation, and obtain syndrome, therapy, and prescription prediction results.

[0112] In implementation, the enhanced temporal representation computational model uses gated recurrent units (GRUs) to dynamically capture features from each feature sequence, obtaining enhanced temporal representations of symptoms, syndromes, treatments, and prescriptions, as follows:

[0113] ;

[0114] ;

[0115] ;

[0116] ;

[0117] in, , , and Indicates a GRU cell. , , and This represents the parameters of the corresponding GRU unit. This indicates the temporal progression of symptoms. Indicating the temporal representation of symptom enhancement, This indicates that the therapy enhances the temporal representation. This indicates the timing of prescription enhancement.

[0118] In this embodiment of the invention, to achieve dynamic prediction of the TCM diagnosis and treatment process, a hierarchical progressive training framework is proposed, which sequentially completes the prediction tasks of three stages: "syndrome identification—treatment method determination—prescription recommendation." This framework uses symptom characteristics as the input starting point and gradually transmits information in the time and stage dimensions, thereby achieving hierarchical accumulation and reasoning of clinical knowledge.

[0119] The prediction module predicts the syndrome of the current patient based on the symptom enhancement time-series representation and the syndrome enhancement time-series representation. During implementation, the symptom enhancement time-series representation and the syndrome enhancement time-series representation are concatenated and input into the syndrome identification decoder to obtain the multi-label syndrome prediction result.

[0120] The prediction module predicts the treatment for the current patient visit based on the enhanced temporal representations of symptoms, syndromes, and treatments. During implementation, the enhanced temporal representations of symptoms, syndromes, and treatments are concatenated and input into the treatment determination decoder, which then outputs the predicted treatment method.

[0121] The prediction module predicts the prescription for the current visit based on the enhanced temporal representations of symptoms, syndromes, treatments, and prescriptions. These enhanced temporal representations are concatenated and input into the prescription recommendation decoder, which outputs the prescription prediction result. This yields the predicted syndromes, treatments, and prescriptions.

[0122] The prediction module includes a syndrome identification decoder, a treatment determination decoder, and a prescription recommendation decoder.

[0123] In implementation, the structures of the syndrome identification decoder, treatment method determination decoder, and prescription recommendation decoder can adopt existing decoder structures, such as multilayer linear perceptrons, Transformers, recurrent neural networks, etc. This invention does not impose restrictions on the decoder structure. The experimental results presented in this paper use the multilayer linear perceptron, which has the smallest number of parameters and the simplest structure, as an example.

[0124] In practice, the trained graph neural network model and the trained recurrent neural network are jointly trained.

[0125] During implementation, time-series data of multiple patients' visits are collected to construct a sample set. Based on the constructed sample set, the graph neural network model and the recurrent neural network are jointly trained to obtain the trained graph neural network model and the recurrent neural network.

[0126] In practice, TCM medical records typically contain information from multiple patient visits at different time periods, forming a multi-stage longitudinal data sequence. Let the complete medical record for each patient be represented as... ,in This represents the number of clinical visits by the patient at time step t, and , This represents the total number of medical visits. Each visit followed the TCM principle of "differentiation of syndromes and treatment based on syndrome differentiation," which can be formally defined as... ,in , , and These represent the set of symptoms recorded during the consultation, the established syndrome type, the treatment methods used, and the final prescription (which usually consists of multiple Chinese herbal medicines). The patient's consultation timeline data includes the symptoms, syndrome, treatment methods, and prescription at each time step.

[0127] During implementation, time-series data of multiple patients' visits are acquired to construct a sample set. For example, for a certain patient, the symptoms, syndromes, treatments, and prescriptions at time steps 1 to t-1, as well as the symptoms at time step t, are used as sample input data. The syndromes, treatments, and prescriptions at time step t are used as labels to construct a sample, thereby constructing a sample set.

[0128] Given a patient's longitudinal medical history And the set of symptoms observed at the current consultation (the consultation at time step t). The goal of the model is to predict three key outcomes simultaneously, based on full utilization of temporal and stage information: (1) the syndrome type corresponding to the current medical visit. (2) Corresponding treatment methods (3) The final recommended personalized Chinese medicine prescription .

[0129] Therefore, the training loss of the model includes the prediction loss of syndromes, treatments, and prescriptions.

[0130] In practice, prescription, therapy, and syndrome prediction are all multi-label predictions. Therefore, the cross-entropy loss can be used for prescription prediction loss, therapy prediction loss, and syndrome prediction loss.

[0131] Through this hierarchical and progressive prediction mechanism, the model can achieve dynamic reasoning and accurate prediction from symptoms to prescriptions while fully preserving the hierarchical structure of TCM diagnosis and treatment logic, thereby significantly improving the interpretability and clinical practical value of TCM intelligent diagnosis and treatment system.

[0132] To avoid information aliasing between shared features and stage-specific features, this invention further designs an orthogonal constraint mechanism by constructing a decoupling loss function. Constraining the correlation between shared and specific features to achieve independence of the feature space.

[0133] Specifically, the decoupling loss is calculated using the following formula:

[0134] ;

[0135] in, This represents the orthogonality measure between two vectors, which ensures the independence between different eigenvectors by minimizing the absolute value of their inner product. Indicates shared features, This indicates the specificity of the syndrome. This indicates the specificity of the therapy. This indicates the specificity of the prescription.

[0136] By introducing orthogonal constraints to decouple the feature space, the most diagnostically valuable symptom information at different stages is highlighted, providing a foundation for accurate multi-stage prediction.

[0137] To ensure consistency in the temporal trends across different stages of a patient's medical history, this invention introduces a cross-stage time difference alignment loss to uniformly model the dynamic evolution of symptoms, treatment plans, and prescriptions over time. The time difference alignment loss calculates the representational differences between two consecutive visits within each stage to characterize the temporal trends of the patient's condition.

[0138] Specifically, the time difference alignment loss is calculated using the following method:

[0139] ;

[0140] in, This represents the feature difference between the i-th time step and the (i-1)-th time step in the symptom feature sequence. This represents the feature difference between the i-th time step and the (i-1)-th time step in the syndrome feature sequence. This represents the feature difference between the i-th time step and the (i-1)-th time step in the therapeutic feature sequence. Let represent the feature difference between the i-th time step and the (i-1)-th time step in the prescription feature sequence, and t represent the number of time steps in the symptom feature sequence. This represents the cosine similarity function, used to measure the directional consistency of time difference vectors at different stages.

[0141] During implementation, the feature difference between the i-th time step and the (i-1)-th time step is calculated in the following way:

[0142] ;

[0143] in, This represents the symptom feature representation at the i-th time step in the symptom feature sequence. This represents the symptom feature representation at the (i-1)th time step in the symptom feature sequence; Let represent the syndrome feature representation at the i-th time step in the syndrome feature sequence. This represents the syndrome feature representation at the (i-1)th time step in the syndrome feature sequence; Let i represent the therapeutic feature representation at the i-th time step in the therapeutic feature sequence. This represents the therapeutic feature representation at the (i-1)th time step in the therapeutic feature sequence; Let represent the prescription feature representation at the i-th time step in the prescription feature sequence. This represents the prescription feature representation at the (i-1)th time step in the prescription feature sequence.

[0144] , , and The mapping function can be implemented using a multilayer linear perceptron network to project the time difference vector onto a shared low-dimensional representation space, thereby enabling comparability of change patterns at different stages. , , and This indicates the corresponding parameter.

[0145] By introducing a time difference alignment loss, the consistency of temporal changes during multiple medical visits is captured and maintained, thereby modeling the complex relationship between time series and multi-stage sequences. By minimizing this loss function, the consistent trend of the temporal evolution trajectory of each stage can be effectively ensured in the shared representation space, thus achieving a dynamic alignment expression of the disease condition on the longitudinal time axis.

[0146] Therefore, the graph neural network model and the recurrent neural network model are jointly trained based on the following loss function to update the parameters of the two models:

[0147] ;

[0148] in, Indicates the predicted loss of prescriptions. Indicates the predicted loss of the therapy. Indicates the predicted loss based on the symptoms. Indicates time difference alignment loss. This represents the decoupling loss. , , and This represents the weight hyperparameter.

[0149] During the training phase, by minimizing the aforementioned comprehensive loss function... This enables joint learning and optimization of model parameters, resulting in a trained graph neural network model and a recurrent neural network. During the inference phase, the model follows the same inference process as during the training phase, achieving end-to-end prediction of treatment outcomes.

[0150] To illustrate the effectiveness of this invention, two real-world datasets were used for model training and validation (the combined graph neural network model and recurrent neural network model of this invention are named the TMRMed model). Dataset 1 originated from inpatient medical records of the Department of Respiratory Medicine at the First Affiliated Hospital of Henan University of Traditional Chinese Medicine, recording symptoms, syndromes, treatment methods, and prescription information during multiple patient visits. Dataset 2 consisted of real clinical data provided by the Traditional Chinese Medicine Oncology Treatment Center of Chongqing University Cancer Hospital, part of the "National Development and Reform Commission's Engineering Project for the Integration and Application of Biotechnology and Information Technology—Research, Development, and Application of Intelligent Auxiliary Diagnosis and Treatment Platform for TCM Syndrome Differentiation." After standardization and preprocessing, the two datasets were structured according to the four-step TCM diagnosis and treatment process, divided into training, validation, and test sets with a ratio of 0.7:0.1:0.2 to support effective model training and generalization performance validation.

[0151] To verify the effectiveness and superiority of the method of this invention, we selected six representative baseline models for comparative experiments, as follows:

[0152] PTM: A topic model based on Traditional Chinese Medicine knowledge, used for prescription generation;

[0153] SMGCN: A graph convolution model based on multi-heterogeneous graphs for symptom feature extraction;

[0154] TCMPR: Prescription recommendation based on the mapping relationship between traditional Chinese medicine and symptoms;

[0155] KDHR: A multi-graph convolution method for fusing attribute information of traditional Chinese medicine;

[0156] PresRecST: A phased modeling method combining residual networks and knowledge graphs;

[0157] SDPR: A generative model based on a four-part graph and employing multi-task and contrastive learning.

[0158]

[0159] Table 1: Performance Comparison of Different Methods on the Multi-Stage Dialectical Treatment Dataset

[0160] Table 1 presents the comprehensive performance of various TCM prescription recommendation models across different datasets. Early TCM prescription recommendation methods primarily relied on low-order statistics (such as topic models) to mine co-occurrence patterns between symptoms and medications, making it difficult to capture high-order dependencies and exhibiting limited generalization ability. Although subsequent methods introduced graph structures and external knowledge to enhance expressive power, they still simplified the diagnosis and treatment process into a single "symptom-to-prescription" mapping, neglecting the hierarchical logic of syndrome differentiation and treatment. Recent multi-stage modeling methods have improved performance to some extent by guiding subsequent decisions based on the results of the previous stage. Meanwhile, the method of this invention effectively captures the temporal evolution of the disease and distinguishes between common and specific symptom features by introducing temporal difference alignment and stage feature decoupling mechanisms, thus more closely resembling the real clinical reasoning process and achieving higher prediction accuracy and generalization ability. It significantly outperforms existing technologies on all indicators, demonstrating excellent overall performance and stability.

[0161]

[0162] Table 2: Performance Comparison of the Invention in Syndrome and Treatment Methods

[0163] To verify the predictive effectiveness of the method of this invention in various stages of diagnosis and treatment, a multi-stage performance evaluation experiment was conducted, and the results are shown in Table 2. On two datasets, compared with the multilayer perceptron model and the staged diagnosis and treatment modeling method, this invention shows significant advantages in all indicators of key aspects such as syndrome identification and treatment determination. Its superior performance mainly stems from two key designs: first, a stage-aware representation decoupling mechanism, which can distinguish common and specific symptom characteristics at different stages, accurately reflecting the doctor's focus during the diagnosis and treatment process; second, a cross-stage time difference alignment mechanism, which can capture the dynamic changes in the disease condition over time, improving the ability to characterize the patient's longitudinal diagnosis and treatment patterns. By jointly modeling stage features and time dependencies, this invention achieves higher accuracy and consistency throughout the entire process of diagnosis, treatment, and prescription generation.

[0164] This experiment further verifies the stability and adaptability of the method of the present invention in scenarios with sparse medical records, and the results are as follows: Figure 2 and Figure 3 As shown. Figure 2 This demonstrates the response of different models to the rate of decline in F1@15 (the F1 score is calculated within the range of the top 15 predictions ranked by confidence in the model's prediction results) as the number of visits is limited. Our TMRMed model significantly exhibits the least performance degradation, highlighting its ability to maintain high performance even under conditions of sparse visit information. Furthermore, Figure 3The stability of each model was depicted, with our model showing a significantly smaller box plot, indicating minimal fluctuations and superior robustness to visit-related perturbations. While the performance of all models declined with decreasing available visits, our method exhibited the smallest decrease, maintaining high prediction accuracy and stability, demonstrating strong robustness even with limited information. Mechanistically, this advantage stems primarily from two design features: first, the temporal difference alignment mechanism models the dynamic relationships between consecutive visits, enabling the model to reasonably infer changes in the patient's condition with limited data; second, the stage-aware representation decoupling mechanism automatically focuses on key symptom features, maintaining diagnostic accuracy even in low-data environments. In summary, this invention demonstrates excellent robustness and practical value in data-scarce clinical scenarios.

[0165] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.

[0166] 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 changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for predicting treatment outcomes that integrates time series analysis with multi-stage TCM diagnosis and treatment, characterized in that, Includes the following steps: Obtain the symptoms and historical consultation time series data of the patient to be predicted; the historical consultation time series data includes the symptoms, syndromes, treatments and prescription data for each time step; Construct a graph structure corresponding to each time step of historical medical visit time series data; based on the graph structure and the symptoms of the current medical visit, use a trained graph neural network model to extract symptom feature sequences, syndrome feature sequences, treatment feature sequences, and prescription feature sequences; Based on the symptom feature sequence, syndrome feature sequence, treatment feature sequence and prescription feature sequence, a trained recurrent neural network model is used to predict the multi-stage diagnosis and treatment results, and the predicted syndrome, treatment and prescription of the patient to be predicted are obtained. The recurrent neural network model includes: The enhanced temporal representation computation module is used to perform dynamic feature modeling based on symptom feature sequences, syndrome feature sequences, therapy feature sequences, and prescription feature sequences to obtain enhanced temporal representations of symptoms, syndromes, therapy, and prescriptions. The prediction module is used to perform multi-stage predictions based on symptom enhancement time-series representation, syndrome enhancement time-series representation, therapy enhancement time-series representation, and prescription enhancement time-series representation to obtain syndrome, therapy, and prescription prediction results. The prediction module predicts the syndrome of the current visit based on the symptom enhancement time sequence representation and the syndrome enhancement time sequence representation; predicts the treatment of the current visit based on the symptom enhancement time sequence representation, the syndrome enhancement time sequence representation and the treatment enhancement time sequence representation; and predicts the prescription of the current visit based on the symptom enhancement time sequence representation, the syndrome enhancement time sequence representation, the treatment enhancement time sequence representation and the prescription enhancement time sequence representation. Training loss includes temporal difference alignment loss; the temporal difference alignment loss is calculated as follows: ; in, This represents the feature difference between the i-th time step and the (i-1)-th time step in the symptom feature sequence. This represents the feature difference between the i-th time step and the (i-1)-th time step in the syndrome feature sequence. This represents the feature difference between the i-th time step and the (i-1)-th time step in the therapeutic feature sequence. Let represent the feature difference between the i-th time step and the (i-1)-th time step in the prescription feature sequence, and t represent the number of time steps in the symptom feature sequence. This represents the cosine similarity function.

2. The method for predicting treatment outcomes by fusing time series data with multi-stage TCM diagnosis and treatment as described in claim 1, characterized in that, The following method is used to construct the graph structure corresponding to each time step of the historical medical visit time series data: Each symptom, syndrome, treatment, and prescription in the medical data at that time step is used as a node in the graph structure; edges are established between each symptom node and each syndrome node, between each syndrome node and each treatment node, and between each treatment node and each prescription node.

3. The method for predicting treatment outcomes by integrating time series data with multi-stage TCM diagnosis and treatment as described in claim 1, characterized in that, The graph neural network model includes: The node embedding module is used to perform embedding mapping on each node in the graph structure corresponding to each time step to obtain the initial embedding of each node. The node feature extraction module is used to perform feature interaction on the initial embedding of each node in the graph structure based on the improved graph attention mechanism to obtain the feature representation of each node; The feature aggregation module is used to aggregate information from the feature representations of each type of node to obtain the feature representation of each node type; the node types include symptom nodes, syndrome nodes, treatment nodes, and prescription nodes. The stage perception representation decoupling module is used to decouple the symptom feature representation of the current visit to obtain syndrome enhancement representation, therapy enhancement representation, and prescription enhancement representation; The sequence construction module is used to construct symptom feature sequences, syndrome feature sequences, therapy feature sequences, and prescription feature sequences based on the feature representations of each node type at each time step of historical medical visit time series data, the feature representation of the current medical visit, the syndrome enhancement representation, the therapy enhancement representation, and the prescription enhancement representation.

4. The method for predicting treatment outcomes by fusing time series data with multi-stage TCM diagnosis and treatment as described in claim 3, characterized in that, The feature representation of each node is obtained by performing feature interaction on the initial embedding of each node in the graph structure in the following manner: ; ; ; in, This represents the feature representation of the i-th node in the graph structure. This represents the initial embedding of the i-th node in the graph structure. This represents the initial embedding of the j-th node in the graph structure. This represents the set of adjacent nodes of the i-th node in the graph structure. Represents a learnable linear transformation matrix. This represents the attention score between the i-th node and the j-th node. This represents the attention score between the i-th node and the k-th node. Represented as attention weights after Softmax normalization. This represents a vector of learnable attention parameters. Represents the ReLU activation function. This represents the LeakyReLU activation function. " indicates a join operation.

5. The method for predicting treatment outcomes by fusing time series data with multi-stage TCM diagnosis and treatment as described in claim 3, characterized in that, The following methods are used to decouple the symptom characteristics of the current medical visit to obtain syndrome enhancement, therapy enhancement, and prescription enhancement representations: ; ; in," "Indicates a splicing operation, , and Both represent fully connected layers. , and This represents the parameters of the corresponding fully connected layer. This indicates an enhancement of the symptoms. This indicates that the therapy enhances the manifestation. This indicates that the prescription enhances the characterization. Indicates shared features, Indicates the specific characteristics of the syndrome. Indicates the specific characteristics of the therapy. Indicates the specific characteristics of the prescription. Indicates a shared encoder. Indicates a syndrome-specific encoder. Indicates a therapy-specific encoder, Indicates a prescription-specific encoder. , , and Indicates the parameters of the encoder, This indicates the characteristics of the symptoms presented during the current medical visit.

6. The method for predicting treatment outcomes by fusing time series data with multi-stage TCM diagnosis and treatment as described in claim 1, characterized in that, The trained graph neural network model and the trained recurrent neural network are obtained through joint training.

7. The method for predicting treatment outcomes by fusing time series data with multi-stage TCM diagnosis and treatment as described in claim 6, characterized in that, The joint training loss is calculated using the following formula: ; in, Indicates the predicted loss of prescriptions. Indicates the predicted loss of the therapy. Indicates the predicted loss based on the symptoms. Indicates time difference alignment loss. This represents the decoupling loss. , , and This represents the weight hyperparameter.

8. The method for predicting treatment outcomes by fusing time series data with multi-stage TCM diagnosis and treatment according to claim 7, characterized in that, The decoupling loss is calculated using the following formula: ; in, This function represents the orthogonality measure between two vectors. Indicates shared features, Indicates the specific characteristics of the syndrome. Indicates the specific characteristics of the therapy. It indicates the specific characteristics of the prescription.

Citation Information

Patent Citations

  • Risk prediction method and device, equipment and storage medium

    CN114255872A