ICU patient gastrointestinal complication risk prediction method and system based on time sequence data and neural network

By constructing a dynamic temporal knowledge graph and a graph decay-based label propagation training strategy, the problems of multi-source data fusion and sparse event prediction in ICU risk prediction were solved, enabling accurate, real-time prediction and interpretable risk monitoring of gastrointestinal complications in ICU patients.

CN122050839APending Publication Date: 2026-05-15THE SECOND AFFILIATED HOSPITAL OF GUANGZHOU MEDICAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610378474.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-26
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing ICU risk prediction methods struggle to effectively integrate multi-source heterogeneous data, fail to fully utilize medical knowledge, and lack the ability to predict sparse events, resulting in a lack of clinical credibility in model predictions.

Method used

A dynamic temporal knowledge graph is constructed. By fusing graph semantic embedding features, temporal dynamic features, and static risk features, and combining the graph decaying label propagation training strategy, the model parameters are optimized to achieve accurate prediction of gastrointestinal complications in ICU patients.

Benefits of technology

This improved the model's sensitivity to identifying the risk of gastrointestinal complications, provided continuous and real-time risk monitoring and early warning, and enhanced the clinical credibility and decision support value of the prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122050839A_ABST
    Figure CN122050839A_ABST
Patent Text Reader

Abstract

The invention provides an ICU patient gastrointestinal complication risk prediction method and system based on time sequence data and a neural network. The method comprises the following steps: collecting time sequence physiological monitoring, static clinical and medical event data with timestamps of a patient, and constructing a dynamic time sequence knowledge graph in real time to represent clinical state evolution; map semantic embedding features are extracted from the map and fused with time sequence dynamic features extracted from the physiological data and static risk features extracted from the static data, and the fusion process is guided by map entity association; historical data and the corresponding atlas are used for training the risk prediction model, and atlas attenuation type label propagation based on atlas association is carried out on training labels according to the atlas structure and the time sequence path during training so as to optimize parameters; and inputting real-time data of a patient to be predicted into the trained model, and outputting a risk prediction result of gastrointestinal complications in a future time window. According to the method, the dynamic knowledge graph and deep learning are fused, and the accuracy and interpretability of risk prediction are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the intersection of medical information technology and artificial intelligence, specifically to a method and system for predicting the risk of gastrointestinal complications in ICU patients based on time-series data and neural networks. Background Technology

[0002] Gastrointestinal complications (such as gastrointestinal bleeding, intestinal obstruction, and intestinal flora translocation) are common and serious clinical problems with poor prognosis in intensive care unit (ICU) patients. Their occurrence is complexly related to multiple factors, including multi-organ function status, hemodynamic changes, medication use, and primary diseases. Accurately predicting the risk of gastrointestinal complications in ICU patients is crucial for early warning, timely intervention, and improving patient outcomes.

[0003] Currently, ICU risk assessment mainly relies on traditional fixed-score models (such as APACHE II and SOFA). While these models are clinically interpretable, they primarily depend on static data at admission and struggle to dynamically reflect the continuous evolution of a patient's condition over time and the complex relationships between multiple factors. In recent years, with the widespread adoption of electronic medical record systems and bedside monitoring equipment, utilizing deep learning techniques to process the massive amounts of time-series physiological data (such as heart rate, blood pressure, and blood oxygen saturation) generated in the ICU has become a research hotspot. Existing methods typically employ models such as recurrent neural networks (RNNs) or temporal convolutional networks (TCNs) to directly model physiological signals in order to predict specific adverse events.

[0004] However, these methods still face significant challenges: First, complex dynamic relationships and high-order interactions exist among multi-source heterogeneous data such as physiological signals, static medical records, and discrete medical events (e.g., medication, procedures), making it difficult for traditional deep learning models to fully mine and integrate this cross-modal semantic information. Second, gastrointestinal complications are relatively low-probability events in the ICU, leading to a severe zero-inflation problem in the training data. This makes the model prone to predicting the majority class (no complications) while lacking the ability to identify high-risk samples. Finally, existing methods lack an effective combination of clinical knowledge and data-driven models, resulting in a black box decision-making process where the model's predictions are difficult for clinicians to fully trust, thus limiting their practicality.

[0005] Therefore, there is an urgent need for a new method for predicting the risk of ICU complications that can effectively integrate multi-source time-series and static data, make full use of medical knowledge, and alleviate the problem of data sparsity. Summary of the Invention

[0006] This invention aims to overcome the technical shortcomings of existing ICU risk prediction methods, such as difficulty in integrating multi-source heterogeneous data, inability to effectively utilize medical knowledge, and insufficient ability to predict sparse events, and to provide a highly accurate and interpretable risk prediction scheme for gastrointestinal complications in ICU patients.

[0007] In a first aspect, embodiments of this application provide a method for predicting the risk of gastrointestinal complications in ICU patients based on time-series data and neural networks, the method comprising:

[0008] S1. Collect time-series physiological monitoring data, static clinical data, and time-stamped medical event data of target ICU patients, and build and continuously update a dynamic time-series knowledge graph in real time to characterize the evolution of the patient's clinical status and its relationship with clinical conditions over time.

[0009] S2. Extract graph semantic embedding features from the dynamic temporal knowledge graph, extract temporal dynamic features from the temporal physiological monitoring data, and extract static risk features from the static clinical data;

[0010] S3. The extracted semantic embedding features, temporal dynamic features and static risk features of the graph are fused together. The fusion process is guided by the entity association relationship in the dynamic temporal knowledge graph to generate a unified patient state representation vector.

[0011] S4. Train the risk prediction model using historical patient data and the corresponding constructed dynamic temporal knowledge graph; during training, based on the topological structure and time evolution path of the dynamic temporal knowledge graph, perform graph decay-type label propagation on the training labels to optimize the model parameters.

[0012] S5. Input the real-time data of the patient to be predicted into the trained model. The model outputs the risk prediction value of the patient's gastrointestinal complications within the future time window based on the dynamic temporal knowledge graph at the current moment and the fused features.

[0013] Secondly, embodiments of this application provide a risk prediction system for gastrointestinal complications in ICU patients based on time-series data and neural networks, applied to the risk prediction method for gastrointestinal complications in ICU patients based on time-series data and neural networks as described in the first aspect. The system includes:

[0014] The knowledge graph construction module is used to acquire time-series physiological monitoring data, static clinical data, and time-stamped medical event data of target ICU patients, and to build and continuously update a dynamic time-series knowledge graph in real time to characterize the evolution of the patient's clinical status and its relationship with clinical conditions over time.

[0015] A multi-dimensional feature extraction module is used to extract graph semantic embedding features from the dynamic temporal knowledge graph, extract temporal dynamic features from the temporal physiological monitoring data, and extract static risk features from the static clinical data.

[0016] The graph-guided feature fusion module is used to fuse the extracted graph semantic embedding features, temporal dynamic features and static risk features. The fusion process is guided by the entity association relationships in the dynamic temporal knowledge graph to generate a unified patient state representation vector.

[0017] The model training optimization module is used to train the risk prediction model using historical patient data and the corresponding constructed dynamic temporal knowledge graph. During training, the module performs graph decay-based label propagation on the training labels according to the topology and time evolution path of the dynamic temporal knowledge graph to optimize the model parameters.

[0018] The real-time risk prediction and output module is used to input the real-time data of the patient to be predicted into the trained risk prediction model. The model outputs the risk prediction value of the patient's gastrointestinal complications within a future time window based on the dynamic temporal knowledge graph at the current moment and the fused features.

[0019] Thirdly, embodiments of this application provide an electronic device, including:

[0020] processor;

[0021] Memory used to store processor-executable instructions;

[0022] The processor is used to implement the method for predicting the risk of gastrointestinal complications in ICU patients based on time-series data and neural networks as described in the first aspect when executing the instructions.

[0023] Fourthly, embodiments of this application provide a computer-readable storage medium storing a program that instructs a device to perform the method for predicting the risk of gastrointestinal complications in ICU patients based on time-series data and neural networks as described in the first aspect.

[0024] The beneficial effects of this invention are as follows: By constructing a dynamic temporal knowledge graph, multi-source heterogeneous data such as temporal physiological signals, static medical records, and discrete medical events are unified under a semantically related structured framework. Utilizing a graph-guided feature fusion mechanism, deep and multi-dimensional modeling of clinical information relationships is achieved, significantly improving feature representation capabilities. A graph-based attenuation label propagation training strategy, based on graph associations, leverages the clinical pathways and relationships revealed by the knowledge graph to reasonably diffuse risk information from a few positive samples (complications) to relevant historical samples, effectively alleviating the data imbalance problem caused by low complication rates and enhancing the model's sensitivity to rare risks. Both the temporal knowledge graph and the feature extraction process are dynamically updated, reflecting the latest changes in the patient's condition, thus supporting continuous and real-time risk monitoring and early warning, better meeting the continuity requirements of ICU clinical monitoring. The model's prediction process is tightly coupled with the entities, associations, and attention mechanisms of the knowledge graph, not only outputting risk values ​​but also providing attribution analysis of risk evolution trends and key influencing factors, making the prediction results more clinically credible and valuable for decision support. This invention provides an effective solution for accurate, real-time, and interpretable risk prediction in complex clinical environments such as the ICU by organically combining dynamic temporal knowledge graphs with deep neural networks. Attached Figure Description

[0025] Figure 1 This is a schematic flowchart of a method for predicting the risk of gastrointestinal complications in ICU patients based on time-series data and neural networks, provided in an embodiment of this application.

[0026] Figure 2 The system architecture diagram for predicting the risk of gastrointestinal complications in ICU patients based on time-series data and neural networks is provided in this application.

[0027] Figure 3 A schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0028] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them.

[0029] It should be noted that in the embodiments of this application, "at least one" refers to one or more, and "more than one" refers to two or more. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the specification of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application.

[0030] Based on the embodiments described in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0031] Example 1

[0032] Figure 1 This is a schematic flowchart illustrating a method for predicting the risk of gastrointestinal complications in ICU patients based on time-series data and neural networks, as provided in one embodiment of this application. Figure 1 As shown, a method for predicting the risk of gastrointestinal complications in ICU patients based on time-series data and neural networks includes:

[0033] S1. Collect time-series physiological monitoring data, static clinical data, and timestamped medical event data from target ICU patients. Construct and continuously update a dynamic time-series knowledge graph in real time to characterize the evolution of the patient's clinical state and its relationship with clinical events over time. Construct a dynamic knowledge graph that evolves over time, structurally integrating multi-source, heterogeneous, and time-series-attributed raw clinical data (physiological signals, static information, discrete events). Transform the unstructured data stream into a standardized, computable knowledge model that simultaneously characterizes clinical entities (e.g., hypotension, use of vasoactive drugs) and their spatiotemporal relationships (e.g., drug A leading to a subsequent decrease in blood pressure). This is the foundation and core of all subsequent intelligent processing.

[0034] In this embodiment, the construction and updating of the dynamic temporal knowledge graph described in S1 includes the following steps:

[0035] Framework Establishment: Entity and relation types are defined using a pre-defined medical ontology (such as UMLS). First, the pre-defined medical ontology serves as the type framework for entities and relations (used to define the entity categories that can appear in the knowledge graph and their relationships), constructing the semantic foundation of the knowledge graph. This example uses a publicly available medical ontology (such as UMLS or a custom ICU ontology), which explicitly defines entity types such as hypotension, tachycardia, and vasoactive drug use, as well as relation types such as causing, accompanying, and occurring after, providing a unified standard for subsequent entity recognition and relation establishment.

[0036] Entity Generation: Physiological state entities, such as persistent hypotension, are generated based on time-series physiological data; event entities, such as medication use events, are created based on medical event data. Next, the system generates physiological state entities corresponding to specific time points based on the current values ​​and historical trends of the time-series physiological monitoring data. For example, if the system detects that systolic blood pressure is below 90 mmHg for 10 consecutive minutes, a 'hypotension' entity is created; if an electronic medical order records an intravenous infusion of norepinephrine, a 'vasoactive drug use' event entity is created.

[0037] Then, based on the timestamped medical event data, event entities are created that include event type, target, and time of occurrence. For example, when the electronic medical order system records an intravenous infusion of norepinephrine, the system creates a vasoactive drug use event entity and associates it with attributes such as the specific drug name, dosage, and start time.

[0038] Association Establishment: Causal or co-occurrence association edges are established between entities based on clinical guidelines or data analysis. Subsequently, based on association rules defined in the medical ontology library, clinical guidelines, or data-driven correlation analysis, association edges with temporal direction and weights are established between entities. For example, based on causal associations in clinical guidelines, a potentially related edge with a higher weight is established between the entity of vasoactive drug use and the subsequent physiological state entity of tachycardia, pointing from the former to the latter. Simultaneously, based on data mining findings that hypotension and high lactate often co-occur at similar time points, the system can automatically establish a co-occurrence relationship edge that frequently occurs together.

[0039] Incremental Updates: The system updates the graph incrementally and manages historical information according to time decay rules to maintain the graph's timeliness. Finally, the system updates the graph incrementally, dynamically expanding upon the previous graph based on new data, and managing historical information according to preset rules. For example, when the system receives a new batch of monitor data, it only adds changed entities and relationships without reconstructing the entire graph. Simultaneously, based on time decay rules, entities older than 72 hours are marked as inactive, reducing their weight in current inference. This ensures the graph always focuses on recent, key disease progression, ultimately forming a dynamic knowledge structure reflecting the patient's continuous disease course.

[0040] Furthermore, the association rules defined in the medical ontology specifically include causal associations based on clinical pathways and co-occurrence associations based on physiological mechanisms;

[0041] The clinical pathway-based causal association is used to establish causal relationships between medical events with a clear temporal sequence, or between a medical event and a subsequent abnormal physiological state. The specific steps for establishing a clinical pathway-based causal relationship include: the system's built-in clinical pathway knowledge base clarifies that high-dose proton pump inhibitor (PPI) use is an intervention to prevent stress ulcers, aiming to reduce the risk of subsequent upper gastrointestinal bleeding. When the system identifies a patient's record containing a medical event entity of intravenous esomeprazole injection, if an abnormal physiological state entity characterized by a significant increase in gastric drainage volume and bloody or progressively decreasing hemoglobin levels is detected within a subsequent time window (e.g., 24-72 hours), the system automatically establishes a causal relationship edge with a clear temporal sequence, pointing from the PPI use event entity to the suspected upper gastrointestinal bleeding state entity, labeled "for prevention... but still possible." This relationship encodes the causal logic between the intention of clinical intervention and the actual complex consequences.

[0042] The co-occurrence association based on physiological mechanisms is used to establish co-occurrence relationships between multiple abnormal physiological states that occur simultaneously or in close proximity and have known physiological connections. The specific steps for establishing co-occurrence relationships based on physiological mechanisms include: The system, based on physiological knowledge, presupposes that insufficient intestinal perfusion may simultaneously cause two abnormal states: decreased bowel sounds and increased intra-abdominal pressure. When the system, through data analysis or monitoring equipment input, identifies three abnormal physiological states within the same patient's contiguous time period (e.g., within 1 hour): mean arterial pressure consistently below 65 mmHg (indicating insufficient perfusion), bowel sounds <2 times / min (indicating decreased bowel sounds), and bladder pressure monitoring >12 mmHg (indicating increased intra-abdominal pressure), the system does not forcibly establish causal arrows. Instead, it establishes bidirectional "often co-occurring" co-occurrence relationships between these three entities, forming a semantic subgraph reflecting the interrelationship of multiple manifestations under the same pathophysiological basis (intestinal ischemia).

[0043] During the establishment of association edges, the system automatically assigns an initial weight to each edge based on the association type, and dynamically adjusts its weight according to the frequency and consistency of the edge's instantiation in subsequent data streams. The specific steps of the dynamic adjustment mechanism for association edge weights include: when the system first establishes a causal relationship edge according to the above rules (e.g., drug A usage leads to deterioration of renal function indicators), it assigns an initial weight based on the authority of the rule's source (e.g., clinical guidelines assign a high initial weight of 0.8, and statistical data patterns assign a medium initial weight of 0.5). In subsequent continuous operation, whenever new patient data instantiates the same association pattern again (i.e., renal function deterioration is observed again after drug A usage), the system slightly increases the edge's weight (e.g., increases it by 0.01). Conversely, if there are frequent counterexamples where renal function does not deteriorate or even improves after drug A usage, the system gradually decreases its weight. Simultaneously, the system calculates the consistency ratio of this association among positive and negative examples. If the consistency is lower than a preset threshold (e.g., 30%), an alarm is triggered, prompting clinical experts to re-examine the applicability of the association rule. Through this dynamic adjustment based on data feedback, the network of connections in the knowledge graph can continuously evolve, thereby more accurately reflecting the complex and ever-changing patterns of individuals and groups in the actual clinical environment.

[0044] Based on the construction of a dynamic temporal knowledge graph, the system further extracts features from three dimensions: graph semantics, temporal physiological dynamics, and static risk background.

[0045] S2. Extract semantic embedding features from the dynamic temporal knowledge graph, extract temporal dynamic features from the temporal physiological monitoring data, and extract static risk features from the static clinical data. Temporal dynamic features are feature representations extracted from temporal data that reflect dynamic change patterns. Deep information extraction is performed on the standardized knowledge model and raw data constructed in S1 from different dimensions, transforming them into machine-processable numerical features. Specifically, three feature extraction tasks are executed in parallel: extracting semantic features from the graph to uncover the implicit clinical conceptual relationships and evolutionary logic behind the data; extracting dynamic features from the temporal data to capture the changing patterns and trends of physiological indicators (such as sudden increases, gradual decreases, and periodicity); and extracting background features from the static data to quantify the patient's basic risk status (such as age and basic medical history). This prepares comprehensive and complementary information raw materials for fusion and prediction.

[0046] Specifically, in this embodiment, S2 includes:

[0047] S2.1. A temporal knowledge graph embedding method (a method of mapping time-stamped graph entities and relations to low-dimensional vectors) is used to model the node entities and time-stamped relation edges in the dynamic temporal knowledge graph, generating dynamic vector representations that simultaneously reflect entity semantics, relation semantics, and temporal context information, as graph semantic embedding features. The specific steps for extracting graph semantic embedding features include: the system uses an improved temporal knowledge graph embedding model (such as the temporal knowledge graph embedding model DE-DistMult, a temporal knowledge graph embedding model that can simultaneously model the embedding of entity, relation, and temporal information) to process the aforementioned constructed dynamic temporal knowledge graph. The input includes entity nodes such as hypotension (t1) and vasoactive drug application (t2) contained in the graph at a certain time, as well as relation edges connecting them that occurred after (t1, t2). The model not only learns the static semantic vector of each entity (e.g., hypotension) but also learns a temporal encoding function, enabling the same entity to generate different vector representations at different timestamps (e.g., hypotension at times t1 and t3) to reflect its specific temporal context. Finally, the model outputs a dynamic vector for each entity at a specific moment. These vectors together constitute the graph semantic embedding matrix at that moment, which encodes not only the abstract meaning of clinical concepts such as low blood pressure and medication, but also the temporal relationship between them and the specific time of their occurrence.

[0048] S2.2. The temporal dynamic features in the time-series physiological monitoring data are extracted using a temporal coding model. These features characterize the dynamic changes in physiological state and capture long-term dependencies and short-term fluctuation patterns. The specific steps for extracting the temporal dynamic features include: For the patient's continuous physiological monitoring data stream, such as blood pressure and heart rate, the system uses a multi-layer Transformer encoder (an encoder based on a self-attention mechanism, a sequence modeling module based on a self-attention mechanism, adept at capturing long-term dependencies) as the temporal coding model. The model first segments the raw data into fixed windows (e.g., the past 6 hours) and adds positional encoding. Through its self-attention mechanism, the model can identify long-term dependencies (e.g., the impact of a slow decline in blood pressure starting 8 hours ago on the current state) and short-term fluctuation patterns (e.g., a sudden increase in heart rate within the last 15 minutes). After multi-layer processing, the model extracts the context vector for each time point from the last coding layer. The sequence of these vectors constitutes the temporal dynamic features, which precisely characterize the dynamic evolution of physiological state under the combined influence of global trends and local perturbations.

[0049] S2.3. The static clinical data is mapped into a high-dimensional dense vector through a feature encoding layer, serving as static risk features characterizing the patient's inherent risk factors. Static risk features are feature vectors extracted from static clinical data that reflect the patient's inherent risk. The specific steps for extracting static risk features include: for static or quasi-static clinical data such as the patient's age, underlying disease (e.g., history of cirrhosis), and admission diagnosis, a dedicated feature encoding layer is designed for processing. This layer is typically composed of a fully connected neural network and may include an embedding layer (for categorical variables such as underlying disease: cirrhosis) and a standardization layer (for continuous variables such as age: 65 years). Through the nonlinear transformation of this encoding layer, discrete categorical information and continuous numerical information are uniformly mapped to a high-dimensional dense vector space (e.g., a 128-dimensional vector). This vector is the static risk feature, integrating all the relatively fixed information about the patient's underlying risk factors for complications, providing a stable background benchmark for subsequent risk prediction.

[0050] S3. The extracted semantic embedding features, temporal dynamic features, and static risk features of the knowledge graph are fused. This fusion process is guided by the entity relationships in the dynamic temporal knowledge graph, generating a unified patient state representation vector. This step is used for graph-guided context-aware fusion, intelligently integrating the diverse features extracted in S2, rather than simply splicing them together. Specifically, the relationships between entities in the dynamic knowledge graph are used as a navigation graph to guide the fusion process. For example, during fusion, the model focuses more on physiological and event features strongly related to the current high-risk entity (such as the gastrointestinal ischemia node in the knowledge graph), generating a contextualized, weighted fused patient state vector. This vector not only contains all the information but also reflects the clinical relevance and importance of the information, making the representation closer to the comprehensive judgment logic of clinicians.

[0051] Specifically, in this embodiment, S3 specifically includes:

[0052] S3.1 Construct a three-channel parallel encoder, including a temporal physiological encoding channel, a static and event encoding channel, and a graph semantic encoding channel. The first channel, the temporal physiological encoding channel, receives real-time physiological data streams and extracts dynamic temporal features through a temporal neural network. The second channel, the static and event encoding channel, is used to receive and fuse the patient's static clinical features with real-time medical event features within the current time window. The third channel, the graph semantic encoding channel, is used to receive dynamic temporal knowledge graph feature vectors (vector representations reflecting the current semantic state and structure of the graph) generated based on the current dynamic temporal knowledge graph.

[0053] Specifically, the construction and feature extraction steps of the parallel encoding channel include: The system constructs a three-channel encoder to process multi-source data in parallel. The first channel (temporal physiological encoding channel) receives physiological data streams (such as blood pressure and heart rate waveforms) from the past 6 hours, and processes them using a bidirectional LSTM network (a bidirectional long short-term memory network, a recurrent neural network structure that can simultaneously capture the forward and backward dependencies of temporal data) to extract physiological risk signal feature vectors representing the current physiological dynamics (e.g., a 64-dimensional vector, where some dimensions correspond to blood pressure instability and others correspond to an increasing heart rate trend). The second channel (static and event encoding channel) receives the patient's static risk feature vector (such as advanced age and history of gastric ulcer) and discrete event features from the past 6 hours (such as one-hot encoding of intravenous esomeprazole injection and central venous catheterization). These features are concatenated and transformed through a fully connected layer to output a joint static and event feature vector, which integrates the patient's inherent risk and recent intervention measures. The third channel (graph semantic encoding channel) receives the dynamic knowledge graph at the current moment (e.g., after the last 5 minutes of updates), and uses a graph attention network (an attention network for graph structured data, an attention mechanism that runs on graph structured data and can dynamically weight neighbor node information) to process the graph and generate a graph semantic context feature vector. This vector aggregates the semantic information of key paths in the graph, such as hypotension, inadequate intestinal perfusion, and stress ulcer risk.

[0054] S3.2 After feature extraction is completed in the three parallel channels, the features output from each channel are input into a real-time feature fusion module. The fusion module constructs a graph attention bias matrix based on the entity relationships revealed by the dynamic temporal knowledge graph at the current moment, guiding the fusion process to assign differentiated weights to different features. Through an attention mechanism, the temporal dynamic features, the fused static and event features, and the feature vector of the dynamic temporal knowledge graph are interactively calculated and weighted to generate a unified and timely real-time patient state feature vector. The graph attention bias matrix is ​​a priori matrix used to guide the attention weights and is typically constructed based on external knowledge.

[0055] Specifically, the steps of graph-guided feature fusion include: the real-time feature fusion module receives the feature vectors output from the three channels mentioned above. The feature fusion module is a neural network module used to interact with and weight the multi-source features. First, the module queries the current dynamic knowledge graph, especially entities highly correlated with the risk of gastrointestinal complications (such as high intra-abdominal pressure and low perfusion) and their associations. Based on these associations, the module calculates a graph attention bias matrix: for example, if the graph shows a strong association between high intra-abdominal pressure and low blood pressure, the module will preset a higher bias weight during fusion, guiding the model to pay more attention to the interaction between the feature parts representing low blood pressure from the first channel (temporal physiology) and the feature parts representing high intra-abdominal pressure from the third channel (graph semantics). Then, the module uses a multi-head attention mechanism (a multi-head self-attention calculation module, an extension of the attention mechanism that allows the model to simultaneously focus on information from different representation subspaces), using the static and event joint feature vector of the second channel as the initial query, the feature vectors of the first and third channels as keys and values, and introducing the calculated graph attention bias matrix to correct the attention score. After multiple rounds of interactive computation and weighted aggregation, a unified 128-dimensional real-time patient status representation vector is finally generated. This vector includes not only the original physiological, event, and atlas information, but also encodes the deep interaction relationships most relevant to the current risk as defined by the knowledge graph. Furthermore, its computation process closely follows data updates, ensuring the timeliness of the results.

[0056] Furthermore, the step S3.2, which involves constructing a graph attention bias matrix based on the current dynamic temporal knowledge graph, specifically includes the following steps:

[0057] From the current dynamic temporal knowledge graph, clinical entities and their relationships related to the current prediction task are extracted to form a sub-graph focusing on the risk of the target complication (the process of filtering entities and relationships related to a specific task from the full graph). Specifically, the sub-graph extraction steps include: the real-time feature fusion module first queries the current dynamic temporal knowledge graph. For example, the current prediction task is the risk of stress ulcer bleeding. The system automatically identifies and extracts all clinical entities directly related to the pathophysiology of this complication from the full graph, such as the risk of hypotension, high gastric acid secretion, coagulation dysfunction, and proton pump inhibitor use, as well as the relational edges connecting these entities (such as causing, inhibiting, and accompanying), thereby forming a focused complication risk sub-graph. This sub-graph serves as the semantic basis for subsequent weight calculations, filtering out graph noise irrelevant to the current risk.

[0058] Based on the association type, temporal proximity, and historical co-occurrence frequency between entities in the sub-graph, a real-time association strength score is calculated for each pair of entities. The real-time association strength score can be calculated as follows:

[0059] ,

[0060] in, Indicates at time Entities in a knowledge graph With entity The real-time correlation strength score (scalar, ranging from 0 to 1) between the two. This is the basis for constructing the attention bias. This is the Sigmoid function, used to normalize the score to the (0,1) interval. This is a weight vector of the association type. Representing entities and The relationship type (e.g., causing, accompanying). This weight can be derived from a medical ontology library (a collection of structured medical concepts and relationships, such as UMLS, SNOMED CT, etc.) or learned from data. The learnable balance coefficients are used to weight the importance of association type, temporal proximity, and historical co-occurrence frequency, respectively. This represents the time decay function. It is a physical entity With entity The time difference between instantiation and the time of instantiation. Commonly used functions are... ,in This is the decay rate parameter. The smaller the time difference, the greater its contribution. This represents the historical co-occurrence frequency, that is, the frequency of an entity in historical data. State and entity The number of times a state occurs together within a similar time window.

[0061] Specifically, the real-time association strength score calculation steps include: For each pair of associated entities in the sub-grapheme (e.g., hypotension and inadequate intestinal perfusion), the system calculates an association strength score between 0 and 1 by integrating three aspects of information. First, association type weighting: a base high score (e.g., 0.7) is assigned based on causal relationships according to clinical guidelines (e.g., causing), and a base medium score (e.g., 0.4) is assigned based on statistical co-occurrence relationships. Second, temporal proximity: the time difference between the occurrence of these two entity instances on the current time axis is calculated; the closer the time, the higher the score bonus (e.g., a bonus of 0.2 within 1 hour). Finally, historical co-occurrence frequency: the probability of these two entity states co-occurring within a similar time window is statistically analyzed in the historical data of the training set; the higher the probability, the higher the score bonus (e.g., a bonus of 0.1 for the top 10% high-frequency co-occurrence). After the three weighted sums are calculated, the result is normalized using the Sigmoid function to obtain the real-time association strength score for the entity pair.

[0062] A three-dimensional atlas attention bias matrix is ​​constructed, where the first and second dimensions correspond to the feature vectors output by different feature channels, and the third dimension is the time step dimension. The real-time association strength score is mapped to the initial attention bias value between the corresponding feature channels at the corresponding time step in the atlas attention bias matrix. The construction and injection of the three-dimensional atlas attention bias matrix are represented as follows:

[0063] ,

[0064] in, Indicates at time Attention output after bias correction by the knowledge graph. These represent the Query, Key, and Value matrices, respectively, and are obtained by linear transformation of feature vectors (time-series features, spectral features, static features, etc.) from different channels in the feature fusion module. This represents the dimension of the key vector, used to scale the dot product result and stabilize training. The attention bias matrix representing the three-dimensional graph is the core of this invention. Its elements... The construction depends on the output of the following formula: When the feature dimension Related entities , dimension Related entities ,in It is the score of correlation strength. A function that maps to specific bias values ​​(such as linear scaling). Its purpose is to explicitly add the semantic association strength calculated in the knowledge graph as prior knowledge directly to the calculation of attention weights, thereby guiding the model to focus on clinically relevant feature interactions.

[0065] Specifically, the construction and mapping steps of the 3D attribution attention bias matrix include: The system constructs a 3D matrix Bias[t,i,j], where t corresponds to a time step (e.g., dividing the past 6 hours of data into 12 time steps), and i and j correspond to different dimensions (indices) of the feature vectors output by the first and third feature channels, respectively. Then, the system performs mapping: For entity pairs with high correlation strength scores (e.g., >0.6) in the sub-attribution (e.g., hypotension and high intra-abdominal pressure), the system identifies which feature channels and which feature dimensions these entities mainly affect (e.g., the semantics of hypotension are mainly captured by certain dimensions of the first channel, and the semantics of high intra-abdominal pressure are mainly captured by certain dimensions of the third channel), and assigns the calculated correlation strength score (e.g., 0.75) as the initial bias value to the corresponding dimension combinations (i,j) in the Bias matrix, and to the most recent time steps t where they are commonly active. For entity pairs with weak correlation, a zero or slightly negative bias is assigned.

[0066] In the attention calculation of the fusion module, the atlas attention bias matrix is ​​added to the query-key dot product result to explicitly enhance or suppress the interaction weights of different feature sources at different time steps, enabling the feature fusion process to dynamically adapt to the patient's current clinical context and risk evolution path. Specifically, the application steps of the atlas attention bias matrix in attention calculation include: in the multi-head attention calculation of the fusion module, when calculating the dot product score of the query vector (Q, from the second channel) and the key vector (K, from the concatenation of the first and third channels), the three-dimensional atlas attention bias matrix Bias[t,i,j] is directly added to the dot product result according to the corresponding time step and feature dimension. For example, in the dimension where low blood pressure and high intra-abdominal pressure are strongly correlated, the Bias value is positive, significantly increasing the attention score of the interaction between these two feature dimensions, thereby guiding the model to pay more attention to the synergistic effect between the physiological signal of low blood pressure and the atlas semantic of high intra-abdominal pressure during fusion. Conversely, for feature combinations that are unrelated or negatively correlated, the Bias value is zero or negative, thus suppressing their interaction. In this way, the clinical prior logic encoded by the knowledge graph is directly and structurally injected into the attention allocation process of the deep neural network, so that feature fusion is no longer purely data-driven, but becomes a context-aware fusion dynamically guided by clinical knowledge, thereby generating risk representations that are more in line with the current clinical context and risk evolution path.

[0067] S4. Train the risk prediction model using historical patient data and the corresponding dynamically constructed temporal knowledge graph. During training, based on the topological structure and temporal evolution path of the dynamic temporal knowledge graph, perform graph-based attenuation label propagation of training labels to optimize model parameters. This step, based on knowledge-enhanced model training, solves the core problem of unbalanced training data caused by the scarcity of complication cases and allows the model to learn the clinical patterns contained in the graph. Specifically, on the basis of conventional training, a mechanism for risk propagation along the graph is introduced. When a complication sample occurs, its label (risk signal) is diffused along a pre-defined association path in the knowledge graph (such as hypotension to inadequate intestinal perfusion) in an attenuated manner to related historical samples. At the data level, the training signal of high-risk scenarios is artificially but reasonably increased, alleviating the data sparsity problem. At the knowledge level, the model is forced to internalize the clinical pathological logic encoded by the knowledge graph (how risk is transmitted and evolves) while learning the prediction task, thereby improving its generalization ability and understanding of complex situations.

[0068] Specifically, graph attenuation label propagation is a label expansion method based on graph structure to alleviate sample imbalance. In this embodiment, the graph attenuation label propagation based on graph association in step S4 specifically includes:

[0069] For each positive sample in the training set that experiences gastrointestinal complications, the entity representing that complication in the dynamic temporal knowledge graph at the corresponding time point is designated as the source node for transmission. Based on the graph's topology, all clinical entity nodes reachable from the source node via associated edges are identified, forming the target node set for risk transmission. The specific steps for identifying the risk transmission source node and target node set include: During the training phase, for a positive sample in the training set marked as experiencing upper gastrointestinal bleeding, its corresponding time point in the dynamic temporal knowledge graph contains an active upper gastrointestinal bleeding entity node. The system designates this node as the source node. Subsequently, based on the graph's topological connections, the system performs a breadth-first search starting from this node to identify all other clinical entity nodes reachable via relational edges (such as "caused by," "accompanied by"). For example, reachable nodes might include: a history of peptic ulcer disease, current prolonged prothrombin time, hypotension, risk of high gastric acid secretion, and no use of gastric mucosal protectants in the previous 24 hours. All these reachable nodes constitute the risk transmission target node set for this training. This step ensures that the spread is based on clinical semantic associations, rather than randomness.

[0070] For each propagation path from the source node to the target node, its attenuation weight is calculated. This attenuation weight is determined by the following factors: the path length (i.e., the number of associated edges traversed); the real-time association strength of each edge on the path; and the time interval traversed by the path. Specifically, the calculation steps for the propagation path attenuation weight include: for each reachable path from the source node (active upper gastrointestinal bleeding) to each target node (e.g., hypotension), the system calculates an attenuation weight. The calculation model for this weight can be: , For decay weights, path length The attenuation factor (e.g., 0.7). The average intensity of each edge along the path. The time interval is the period between the source node and the target node. The longer the path length (number of hops), the more significant the exponential decay of the weight. The average strength of each edge comes from the dynamic weights of the edges in the graph; the higher the strength, the greater the propagation weight. The time interval refers to the time difference between the source node (bleed moment) and the target node entity at the corresponding time points, calculated through... Item implementation time decay ( (This is the time decay factor). The longer the time interval, the weaker the propagation effect. For example, for a path with a length of 2 hops, an average edge strength of 0.8, and a time interval of 6 hours, its decay weight might be calculated as follows: .

[0071] Based on the calculated attenuation weight, the label value of the positive sample is partially propagated to the training samples of other historical time points corresponding to the target clinical entity node in proportion to the attenuation weight. Specifically, the training label value of the sample corresponding to the target node is increased by an additional value determined by the attenuation weight on the basis of the original value, and the total label value after correction does not exceed a preset upper limit threshold. Specifically, the specific steps of training label correction based on attenuation weight include: the system performs label propagation according to the calculated attenuation weight. For the above example, an attenuation weight of 0.25 means that a portion (0.25) of the bleeding label value (usually 1) of the source sample will be propagated. The system finds the training samples of other historical time points corresponding to the hypotension state of the target node (i.e., the training samples corresponding to a moment when the patient had a hypotension state before bleeding). The original label of the sample (which may be 0, indicating that bleeding did not occur at that time) will get an additional value: additional value = source label value (1) * attenuation weight (0.25) = 0.25. Therefore, the corrected label value of the historical sample becomes 0 + 0.25 = 0.25. All propagation follows this rule, and the system sets an upper limit threshold (e.g., 0.8) to ensure that the total label value after correction for any sample does not exceed this threshold, preventing excessive label distortion. In this way, the labels of a large number of historical samples that did not directly experience complications but were in a high-risk clinical state (defined by the knowledge graph) are reasonably softened and enhanced, effectively increasing the amount of information the model can learn about high-risk patterns and alleviating the problem of scarce positive samples.

[0072] The attenuation weights are calculated using a learnable propagation attenuation function, which maps path feature vectors to specific attenuation weight values. Path feature vectors represent the attributes and order of edges along a path in the knowledge graph. The learnable propagation attenuation function is an attenuation weight calculation function implemented by a neural network, which can be optimized during training. Specifically, the introduction of the learnable propagation attenuation function and the construction of path feature vectors include the following steps: To improve the adaptability and accuracy of label propagation, this embodiment uses a lightweight neural network as the learnable propagation attenuation function. The learnable propagation attenuation function can be expressed as:

[0073] ,

[0074] in, This indicates a specific propagation path. The learnable decay weights (scalar, range 0~1) are calculated. This represents a multilayer perceptron (a fully connected feedforward neural network, commonly used for nonlinear feature transformation and classification), whose parameters are... This is the main body of the learnable decay function of the present invention. This represents a gated recurrent unit network, used to aggregate the edge feature sequences on a path into a path feature vector. Representing a path superior The feature sequence of each edge. The features of each edge... It is a vector containing: edge type embedding, edge real-time strength. Direction indicator, side time interval The input to this function is a path feature vector. This vector is constructed as follows: For each propagation path to be evaluated (e.g., "active bleeding," "causing coagulation disorders due to...," "accompanied by a history of liver disease"), the system sequentially extracts four-dimensional features from each associated edge on the path: 1) Edge type (e.g., causing or accompanying, using one-hot encoding); 2) Edge real-time strength (dynamic weight in the graph, scalar); 3) Directionality (indicating whether the edge direction is consistent with the propagation direction, a Boolean value); 4) The time interval corresponding to the edge (the time difference between the head and tail entities of the edge, a scalar). Then, these edge feature sequences arranged in path order are aggregated through a bidirectional GRU network (a bidirectional gated recurrent unit, a recurrent neural network capable of capturing contextual dependencies; a bidirectional variant of the gated recurrent unit used for feature aggregation and contextual modeling of sequence data). The final hidden state of the GRU is the path feature vector representing the comprehensive spatiotemporal and semantic attributes of the path.

[0075] The path feature vector is constructed as follows: for each associated edge on the risk propagation path, its type, real-time intensity, directionality, and corresponding time interval are extracted; the features of all associated edges are aggregated in path order to generate a path feature vector representing the comprehensive attributes of the path. Joint training is used to simultaneously optimize the training strategies of multiple related tasks to improve the model's generalization ability.

[0076] The learnable propagation decay function is optimized through joint training, specifically including: in the initial stage, a decay weight is calculated using a preset formula based on path length, average edge strength, and total time span; in the main training loop of the risk prediction model, an auxiliary propagation path discrimination task is added; the goal of the propagation path discrimination task is to determine whether a given graph path is more likely to be a real risk propagation path, and to jointly optimize the parameters of the decay function based on the feedback of this task. The propagation path discrimination task is used to assist the training task and to determine whether a graph path is a real risk propagation path. Specifically, the initialization and joint training framework based on the preset formula includes the following steps: in the initial training stage, the parameters of the learnable decay function are randomly initialized. To ensure training stability, the initial decay weights are not calculated by this function, but are provided by a preset heuristic formula: initial weight = 0.6^(path length) * (average edge strength) * (1 / (1 + total time span / 12)). The output of this formula serves as a teacher signal for preliminary pre-training of the decay function (mean squared error loss), enabling it to quickly obtain a reasonable initial mapping capability. After entering the main training loop, the system employs multi-task joint training. The main task is risk prediction, and the auxiliary task is propagation path discrimination. The discrimination task is constructed as follows: a batch of real propagation paths (i.e., the path from the source node of a positive sample to a high-risk state node before the actual occurrence of complications) are sampled from the training data as positive examples, while a batch of random, unreasonable graph paths are sampled as negative examples. The goal of the discrimination task is to train a decay function (and an additional classification layer) that can distinguish between these two types of paths. The gradients of this task are backpropagated to optimize the parameters of the decay function.

[0077] During training, the parameters of the decay function and the parameters of the risk prediction model are iteratively optimized together. Specifically, the joint iterative optimization process includes the following steps: throughout the training process, the parameters of the learnable decay function and the parameters of the main risk prediction model participate in each iterative optimization. The workflow is as follows: 1) During forward propagation, for each positive sample, the decay weights to each target node are calculated using the current decay function, and the labels of relevant historical samples are corrected accordingly. 2) The loss of the main prediction task (e.g., binary cross-entropy loss) is calculated using the corrected label batch data. 3) Simultaneously, the loss of the propagation path discrimination task (e.g., cross-entropy loss) is calculated using path samples from the same batch of data. 4) During backpropagation, the gradient of the total loss (the weighted sum of the main task loss and the discrimination task loss, e.g., weighted in a 7:3 ratio) is used to update the parameters of both the main model and the decay function. Through this end-to-end joint optimization, the decay function no longer depends on a fixed formula but learns to adaptively output a decay weight that best improves the final risk prediction performance based on the complex characteristics of the path. This is equivalent to the model learning how to use knowledge graphs for label propagation more scientifically, making the propagation strategy highly consistent with the prediction target, thereby more effectively solving the data sparsity problem.

[0078] Specifically, the multi-task loss function is a weighted total loss function combining the losses from the main task and the auxiliary tasks. The total loss function for joint training can be expressed as:

[0079] ,

[0080] in, This represents the total loss during model training. Represents the loss of the main risk prediction task (e.g., binary cross-entropy), and calculates the true label. Compared with model predictions The differences between them. Its optimization depends on the main model parameters. and decay function parameters . This represents all parameters of the risk prediction model (all parts of S1-S5 except for the decay function). Represents the learnable propagation decay function The parameters. This represents the auxiliary propagation path discrimination task loss. It forces the decay function to learn to distinguish the true propagation path. (The path back from the positive sample) and the randomly constructed spurious path . This represents the balancing hyperparameters, used to adjust the contribution of the discrimination task to the total loss. During training, this is achieved through optimization... ,parameter and It is updated simultaneously. This means that the decay function learns to generate decay weights that maximize the final prediction performance, rather than simply fitting a static heuristic rule.

[0081] S5. Input the real-time data of the patient to be predicted into the trained model. Based on the dynamic temporal knowledge graph of the current moment and the fused features, the model outputs a predicted risk value for the patient's gastrointestinal complications within a future time window. This step, real-time and interpretable risk reasoning and output, applies the trained model to new patients, achieving end-to-end real-time risk calculation and decision support. Specifically, for the real-time data stream of new patients, repeat the process of S1-S3 (dynamically updating the graph, extracting and fusing features), and then input the latest state vector into the trained model to directly calculate the future risk. Ultimately, this achieves the main application value of the invention by providing an automated, dynamically updated, gastrointestinal complication risk warning based on deep analysis and clinical knowledge, providing a prospective basis for clinical intervention.

[0082] Specifically, in this embodiment, the model's prediction output in S5 includes: the model simultaneously outputting multiple risk prediction values ​​for the patient within different future time windows, including short-term, medium-term, and long-term time windows. Specifically, the steps for outputting multi-time-window risk prediction values ​​include: the model receiving real-time data streams from the patient to be predicted, processing them through the aforementioned S1 to S4 training pipeline, and finally, through a prediction head with a multi-branch output layer, simultaneously calculating and outputting risk prediction values ​​for the three future time windows. For example, the system sets: short-term risk as the probability of gastrointestinal complications occurring within the next 6 hours (e.g., output 0.15), medium-term risk as the probability within the next 24 hours (e.g., 0.35), and long-term risk as the probability within the next 72 hours (e.g., 0.50). These three values ​​together constitute a preliminary risk profile, providing clinical decision-making references for different levels of urgency.

[0083] Based on the multiple risk prediction values, an evolution trend curve of the patient's risk of gastrointestinal complications over a future time period is generated. Specifically, the steps for generating the risk evolution trend curve include: the system does not only output a single prediction value, but automatically triggers a complete prediction at a fixed frequency (e.g., every hour). After running continuously for a period of time (e.g., the past 12 hours and the next 24 hours), the system will obtain a series of risk prediction values ​​arranged by time, representing multiple time windows. Based on this sequence, the system uses an interpolation smoothing algorithm to plot the evolution trend curves of short-term, medium-term, and long-term risks over time. For example, the trend curve may show that the short-term risk has steadily increased from 0.05 to 0.15 in the past 6 hours, while the medium-term risk curve shows a steeper upward slope. These visualized curves can intuitively reveal whether the risk is in an upward, plateau, or downward phase, providing crucial information for dynamically assessing the evolution of the condition.

[0084] Based on the association paths of the dynamic temporal knowledge graph and the attention weights within the model, the system identifies and outputs several key clinical influencing factors that contribute the most to the current predicted risk. Specifically, the attribution analysis output of key clinical influencing factors includes the following steps: Simultaneously with outputting the risk value, the system initiates an interpretability analysis module. This module first backtracks the dynamic temporal knowledge graph upon which the current prediction is based, locating entity nodes (such as hypotension and coagulation disorders) that are strongly associated with gastrointestinal complications and have been active recently (e.g., in the past 24 hours). Then, the module extracts the attention weight matrix from the feature fusion stage (S3.2) and analyzes which feature dimensions (corresponding to specific physiological signal patterns, events, or graph semantics) received the highest attention score in this prediction. Combining graph association and attention weights, the system performs attribution: for example, it identifies that the progressive decrease in blood pressure in the past 4 hours (a physiological temporal feature with high attention weight), the graph semantics of inadequate intestinal perfusion strongly associated with hypotension (a graph feature with high attention weight), and the patient's history of cirrhosis (a static risk feature) together constitute the main contributing factors to this high-risk prediction. The system outputs these key influencing factors in the form of a structured list or brief statement, along with risk values ​​and trend curves, thus providing clinicians with a transparent explanation of why the risk is high, greatly enhancing the clinical credibility and operability of the prediction results.

[0085] Example 2

[0086] like Figure 2As shown, this application provides an architecture diagram of a risk prediction system for gastrointestinal complications in ICU patients based on time-series data and neural networks. It is applied to the risk prediction system for gastrointestinal complications in ICU patients based on time-series data and neural networks as described in Embodiment 1, including: a knowledge graph construction module 210, a multi-dimensional feature extraction module 220, a graph-guided feature fusion module 230, a model training and optimization module 240, and a real-time risk prediction and output module 250.

[0087] The knowledge graph construction module 210 is used to acquire time-series physiological monitoring data, static clinical data and time-stamped medical event data of the target ICU patient, and to build and continuously update a dynamic time-series knowledge graph in real time to characterize the evolution of the patient's clinical status and its relationship with the clinical situation over time.

[0088] The multi-dimensional feature extraction module 220 is used to extract graph semantic embedding features from the dynamic temporal knowledge graph, extract temporal dynamic features from the temporal physiological monitoring data, and extract static risk features from the static clinical data.

[0089] The graph-guided feature fusion module 230 is used to fuse the extracted graph semantic embedding features, temporal dynamic features and static risk features, and the fusion process is guided by the entity association relationships in the dynamic temporal knowledge graph to generate a unified patient state representation vector.

[0090] The model training optimization module 240 is used to train a risk prediction model using historical patient data and the corresponding constructed dynamic temporal knowledge graph. During training, the module performs graph decay-based label propagation on the training labels according to the topology and time evolution path of the dynamic temporal knowledge graph to optimize the model parameters.

[0091] The real-time risk prediction and output module 250 is used to input the real-time data of the patient to be predicted into the trained risk prediction model. The model outputs the risk prediction value of the patient's gastrointestinal complications within a future time window based on the dynamic temporal knowledge graph at the current moment and the fused features.

[0092] Figure 3 This is an electronic device provided in one embodiment of this application. For example... Figure 3 As shown, the electronic device includes at least the following components: processor 301 and memory 300, communication interface 303, and bus 302.

[0093] In this embodiment of the application, the memory 300 is used to store executable instructions of the processor 301, and the processor 301 is used to implement the method as described in the first aspect when executing the instructions.

[0094] In embodiments of this application, a computer-readable storage medium includes instructions that instruct a device to perform the method as described in the first aspect. For example, the instructions instruct the device to perform... Figure 1 The method is shown in the process steps.

[0095] In one embodiment of this application, the program operating in the electronic device may be a program that controls a central processing unit (CPU) or similar device to achieve the functions of the above-described embodiments of the present invention (a program that enables the computer to function). Information processed by these systems is then temporarily stored in random access memory (RAM) during processing, and subsequently stored in various ROMs such as read-only memory (FlashROM) and hard disk drives (HDDs), and read, corrected, and written by the CPU as needed.

[0096] It should be noted that a portion of the electronic device described above can also be implemented using a computer. In this case, the program for implementing the control function can be recorded on a computer-readable recording medium, and the program recorded on the recording medium can be read into the computer and executed.

Claims

1. A method for predicting the risk of gastrointestinal complications in ICU patients based on time-series data and neural networks, characterized in that, Includes the following steps: S1. Collect time-series physiological monitoring data, static clinical data, and time-stamped medical event data of target ICU patients, and build and continuously update a dynamic time-series knowledge graph in real time to characterize the evolution of the patient's clinical status and its relationship with clinical conditions over time. S2. Extract graph semantic embedding features from the dynamic temporal knowledge graph, extract temporal dynamic features from the temporal physiological monitoring data, and extract static risk features from the static clinical data; S3. The extracted semantic embedding features, temporal dynamic features and static risk features of the graph are fused together. The fusion process is guided by the entity association relationship in the dynamic temporal knowledge graph to generate a unified patient state representation vector. S4. Train the risk prediction model using historical patient data and the corresponding constructed dynamic temporal knowledge graph; during training, based on the topological structure and time evolution path of the dynamic temporal knowledge graph, perform graph decay-type label propagation on the training labels to optimize the model parameters. S5. Input the real-time data of the patient to be predicted into the trained model. The model outputs the risk prediction value of the patient's gastrointestinal complications within the future time window based on the dynamic temporal knowledge graph at the current moment and the fused features.

2. The method according to claim 1, characterized in that, The S1 section describes the real-time construction and continuous updating of a dynamic time-series knowledge graph, specifically including: A pre-defined medical ontology library is used as the type framework for entities and relationships; Based on the current value and historical trend of the time-series physiological monitoring data, a physiological state entity at the corresponding time point is generated; Based on the timestamped medical event data, create an event entity that includes event type, target, and occurrence time; Based on the association rules defined in the medical ontology, clinical guidelines, or data-driven correlation analysis, association edges with time directionality and weights are established between entities in adjacent time slices, as well as between entities corresponding to physiological states, medical events, and patient static clinical data. The system updates the knowledge graph incrementally, dynamically expanding the graph based on new data from the previous moment, and managing historical information in the graph according to preset rules, thereby forming a dynamic temporal knowledge graph structure that reflects the latest and continuous course of the patient's disease.

3. The method according to claim 2, characterized in that, The association rules defined in the medical ontology specifically include causal associations based on clinical pathways and co-occurrence associations based on physiological mechanisms. The causal association based on clinical pathways is used to establish causal relationships between medical events with a clear temporal sequence, or between a medical event and subsequent physiological abnormalities. The co-occurrence association based on physiological mechanisms is used to establish co-occurrence relationship edges between multiple abnormal physiological states that occur simultaneously or at near time points and have known physiological connections. During the process of establishing associated edges, the system automatically assigns an initial weight to each edge based on the association type, and dynamically adjusts its weight according to the frequency and consistency of the edge being instantiated in subsequent data streams.

4. The method according to claim 1, characterized in that, S2 specifically includes: S2.

1. The node entities and time-stamped relation edges in the dynamic temporal knowledge graph are modeled using the temporal knowledge graph embedding method to generate dynamic vector representations that can simultaneously reflect entity semantics, relation semantics and temporal context information, as graph semantic embedding features. S2.

2. Use a time-series coding model to extract the time-series dynamic features from the time-series physiological monitoring data. The time-series dynamic features characterize the dynamic changes in physiological state and capture their long-range dependencies and short-term fluctuation patterns. S2.3 The static clinical data is mapped into a high-dimensional dense vector through a feature encoding layer, which serves as a static risk feature representing the patient's inherent risk factors.

5. The method according to claim 1, characterized in that, S3 specifically includes: S3.1 Construct an encoder containing three parallel processing channels, where, The first channel is the time-series physiological coding channel, which is used to receive the real-time physiological monitoring data stream of the current time window and extract its time-series dynamic features through a time-series neural network; The second channel is the static and event coding channel, which is used to receive and fuse the patient's static clinical characteristics with real-time medical event characteristics within the current time window; The third channel is the graph semantic encoding channel, used to receive the dynamic temporal knowledge graph feature vector generated based on the dynamic temporal knowledge graph at the current time. S3.2 After feature extraction is completed in the three parallel channels, the features output by each channel are input into a real-time feature fusion module. The fusion module constructs a graph attention bias matrix based on the entity relationships revealed by the dynamic temporal knowledge graph at the current time, and guides the fusion process to assign differentiated weights to different features. Through the attention mechanism, the temporal dynamic features, the fused static and event features, and the feature vector of the dynamic temporal knowledge graph are interactively calculated and weighted to generate a unified and timely real-time patient status feature vector.

6. The method according to claim 5, characterized in that, The step S3.2, which involves constructing a graph attention bias matrix based on the current dynamic temporal knowledge graph, specifically includes the following steps: From the current dynamic temporal knowledge graph, extract clinical entities and their relationships related to the current prediction task to form a sub-graph focusing on the risk of target complications; Based on the association type, temporal proximity, and historical co-occurrence frequency between entities in the sub-graph, calculate the real-time association strength score between each pair of entities; Construct a three-dimensional atlas attention bias matrix, where the first and second dimensions correspond to the feature vectors output by different feature channels, and the third dimension is the time step dimension; map the real-time association strength score to the initial attention bias value between the corresponding feature channels in the atlas attention bias matrix at the corresponding time step; In the attention calculation of the fusion module, the graph attention bias matrix is ​​added to the query-key dot product result to explicitly enhance or suppress the interaction weights of different feature sources at different time steps, so that the feature fusion process can dynamically adapt to the patient's current clinical situation and risk evolution path.

7. The method according to claim 1, characterized in that, The graph-attenuation tag propagation based on graph association in S4 specifically includes: For each positive sample in the training set that has a gastrointestinal complication, the entity that represents the complication in the dynamic temporal knowledge graph at the corresponding time point is taken as the source node of the propagation. Based on the topology of the graph, all clinical entity nodes that can be reached from the source node through the associated edges are identified, forming the target node set for risk propagation. For each propagation path from the source node to the target node, calculate its attenuation weight; the attenuation weight is determined by the following factors: the length of the path, i.e. the number of associated edges traversed; the real-time association strength of each edge on the path; and the time interval traversed by the path. Based on the calculated attenuation weight, the label value of the positive sample is partially propagated to the training samples of other historical time points corresponding to the target clinical entity node in proportion to the attenuation weight; specifically, the training label value of the sample corresponding to the target node is increased by an additional value determined by the attenuation weight on the basis of the original value, and the total label value after correction does not exceed a preset upper limit threshold.

8. The method according to claim 7, characterized in that, The propagation attenuation weight is calculated using a learnable propagation attenuation function. The learnable propagation decay function is used to map the path feature vector to a specific decay weight value. The path feature vector is constructed as follows: for each associated edge on the risk propagation path, its type, real-time intensity, directionality, and corresponding time interval are extracted; the features of all associated edges are aggregated in the order of the path to generate a path feature vector that represents the comprehensive attributes of the path. The learnable propagation decay function is optimized through joint training, specifically including: in the initial stage, using a preset formula based on path length, average edge strength and total time span to calculate decay weights; in the main training loop of the risk prediction model, an auxiliary propagation path discrimination task is added; the goal of the propagation path discrimination task is to determine whether a given graph path is more likely to be a real risk propagation path, and to jointly optimize the parameters of the decay function based on the feedback of this task. During training, the parameters of the decay function and the parameters of the risk prediction model are iteratively optimized together.

9. The method according to claim 1, characterized in that, The prediction output of the model in S5 specifically includes: The model simultaneously outputs multiple risk prediction values ​​for the patient in different future time windows, including short-term, medium-term, and long-term time windows. Based on the multiple risk prediction values, an evolution trend curve of the patient's risk of gastrointestinal complications over a future time period is generated; Based on the association paths of the dynamic temporal knowledge graph and the attention weights within the model, several key clinical influencing factors that contribute the most to the current predicted risk are identified and output.

10. A risk prediction system for gastrointestinal complications in ICU patients based on time-series data and neural networks, applied to the method described in any one of claims 1 to 9, characterized in that, The system includes: The knowledge graph construction module is used to acquire time-series physiological monitoring data, static clinical data, and time-stamped medical event data of target ICU patients, and to build and continuously update a dynamic time-series knowledge graph in real time to characterize the evolution of the patient's clinical status and its relationship with clinical conditions over time. A multi-dimensional feature extraction module is used to extract graph semantic embedding features from the dynamic temporal knowledge graph, extract temporal dynamic features from the temporal physiological monitoring data, and extract static risk features from the static clinical data. The graph-guided feature fusion module is used to fuse the extracted graph semantic embedding features, temporal dynamic features and static risk features. The fusion process is guided by the entity association relationships in the dynamic temporal knowledge graph to generate a unified patient state representation vector. The model training optimization module is used to train the risk prediction model using historical patient data and the corresponding constructed dynamic temporal knowledge graph. During training, the module performs graph decay-based label propagation on the training labels according to the topology and time evolution path of the dynamic temporal knowledge graph to optimize the model parameters. The real-time risk prediction and output module is used to input the real-time data of the patient to be predicted into the trained risk prediction model. The model outputs the risk prediction value of the patient's gastrointestinal complications within a future time window based on the dynamic temporal knowledge graph at the current moment and the fused features.