An ai-based atrial fibrillation patient health risk prediction method

By performing time-series alignment and feature extraction on the physiological parameters and intervention records of atrial fibrillation patients, and utilizing multi-scale temporal features and attention mechanisms to separate the intervention effect, the problem of low causal accuracy in risk assessment in existing technologies is solved, and individualized long-term risk prediction is achieved.

CN121506507BActive Publication Date: 2026-05-15FUJIAN PROVINCIAL HOSPITAL
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
FUJIAN PROVINCIAL HOSPITAL
Filing Date
2026-01-12
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing risk prediction technologies for atrial fibrillation patients fail to effectively distinguish between the inherent baseline risk before treatment and the actual risk after treatment intervention, resulting in low causal accuracy of risk assessment and inaccurate long-term risk prediction results.

Method used

By receiving physiological parameters and intervention records from atrial fibrillation patients, time series alignment is performed to extract baseline risk features and intervention response features. Multi-scale temporal feature extraction architecture and attention mechanism are used to separate intervention effects, construct a baseline risk prediction network and an intervention effect separation network, and generate individualized long-term risk prediction trajectories.

Benefits of technology

It significantly improves the accuracy of post-discharge risk prediction, accurately isolates the effects of treatment interventions, and provides a basis for individualized long-term risk management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121506507B_ABST
    Figure CN121506507B_ABST
Patent Text Reader

Abstract

The application discloses an atrial fibrillation patient health risk prediction method based on AI and belongs to the medical information technology field, and specifically comprises the following steps: receiving physiological parameter records and intervention treatment records of atrial fibrillation patients, performing time sequence alignment operation, and forming structured patient data; extracting risk-related features from the structured patient data, wherein the risk-related features are divided into basic risk features and intervention response features; inputting the basic risk features into a basic risk prediction network to output a basic risk score; inputting the intervention response features and the basic risk score into an intervention effect separation network to generate a post-intervention risk score; calculating a net effect value of treatment intervention according to the difference between the basic risk score and the post-intervention risk score; and combining the basic risk score, the post-intervention risk score and the net effect value to generate an individual long-term risk prediction trajectory of the patient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical information technology, specifically to an AI-based method for predicting health risks in patients with atrial fibrillation. Background Technology

[0002] Atrial fibrillation is the most common type of arrhythmia worldwide, and its incidence is increasing year by year with the aging population. This disease easily induces serious complications such as ischemic stroke and heart failure, which not only significantly increases the disability and mortality rates of patients, but also greatly increases the consumption of social medical resources. Therefore, accurate prediction of the long-term health risks of atrial fibrillation patients has become a core need for clinical development of individualized treatment plans and improvement of patient prognosis.

[0003] Currently, AI-based risk prediction technology has been gradually applied and made progress in the clinical management of atrial fibrillation. Existing technologies typically collect patients' physiological parameters and intervention records. The physiological parameters include indicators such as heart rate, blood pressure, and coagulation function, while the intervention records include information such as medication use and surgical procedures. The technical solutions extract data features through time-series models or machine learning algorithms to construct risk scoring and stratification systems, providing data-level support for the initial clinical assessment of patients' prognosis.

[0004] However, existing risk prediction technologies do not clearly distinguish between a patient's baseline risk and post-intervention risk. The former refers to the inherent risk before treatment, while the latter is the actual risk after treatment intervention. This leads to the model easily misjudging the risk reduction brought about by treatment as a result of the patient's baseline risk being low, affecting the causal accuracy of risk assessment. Furthermore, it cannot effectively isolate the effects of treatment intervention. When patients stop treatment after discharge, the model still uses the low-risk data from the intervention period for prediction, failing to reflect the upward trend of baseline risk. Ultimately, this results in inaccurate long-term risk predictions after discharge, making it difficult to meet the actual clinical needs for individualized dynamic risk assessment. Summary of the Invention

[0005] The purpose of this invention is to provide an AI-based method for predicting health risks in patients with atrial fibrillation, addressing the following technical problems:

[0006] Current risk prediction technologies for atrial fibrillation patients do not clearly distinguish between the inherent baseline risk before treatment and the actual risk after treatment intervention. This can easily lead to the misjudgment of the risk reduction brought about by treatment as the patient's baseline risk being low, thus affecting the causal accuracy of risk assessment. Furthermore, it cannot effectively separate the effects of treatment intervention, resulting in inaccurate long-term risk prediction results.

[0007] The objective of this invention can be achieved through the following technical solutions:

[0008] An AI-based method for predicting health risks in patients with atrial fibrillation includes the following steps:

[0009] S1. Receive physiological parameter records and intervention treatment records of atrial fibrillation patients, perform time series alignment operation on the physiological parameter records and intervention treatment records to form structured patient data;

[0010] S2. Extract risk-related features from structured patient data, wherein the risk-related features are divided into basic risk features and intervention response features;

[0011] S3. Input the basic risk characteristics into the basic risk prediction network and output the basic risk score;

[0012] S4. Input the intervention response characteristics and the baseline risk score into the intervention effect separation network to generate a post-intervention risk score.

[0013] S5. Calculate the net effect value of the treatment intervention based on the difference between the baseline risk score and the post-intervention risk score;

[0014] S6. Combine baseline risk scores, post-intervention risk scores, and net effect values ​​to generate individualized long-term risk prediction trajectories for patients.

[0015] As a further aspect of the present invention: the specific process of performing time-series alignment operation on physiological parameter records and intervention treatment records in S1 is as follows:

[0016] Read the timestamps from physiological parameter records and intervention treatment records; take the time point of the first atrial fibrillation diagnosis as the reference time origin and calculate the time offset of each timestamp relative to the reference time origin; for each intervention treatment record, take the intervention start time point as the center point, select a baseline time window of fixed length forward, and select an observation time window of fixed length backward.

[0017] Within the baseline and observation time windows, physiological parameter records are resampled at a uniform sampling frequency. For the resampled physiological parameter data, statistical features within the sliding time window are calculated at each sampling time point. Intervention treatment records are matched and associated with the processed physiological parameter records according to time points to generate a structured patient data table containing time point sequences, physiological parameter statistical features, and intervention status labels.

[0018] As a further aspect of the present invention: In step S2, the specific process of extracting risk-related features from structured patient data is as follows:

[0019] Physiological parameter data within the baseline time window before the intervention begins are selected; the arithmetic mean of each physiological parameter within the baseline time window is calculated; the standard deviation of each physiological parameter within the baseline time window is calculated; the mean of the absolute values ​​of the first differences of each physiological parameter within the baseline time window is calculated; the Pearson correlation coefficient matrix between different physiological parameters is calculated, and the upper triangular elements of the matrix are extracted; polynomial fitting is performed on the time series of each physiological parameter, and the cubic polynomial coefficients of the polynomial fitting are obtained; the calculation results corresponding to the above physiological parameters are concatenated in a fixed order to form the basic risk feature vector.

[0020] Locate the start and end times of each intervention treatment record; select fixed-length time windows before and after the intervention; calculate the percentage change of physiological parameters relative to the baseline mean within the time window; calculate the time required for the physiological parameter change curve to reach its peak after the intervention; for multiple consecutive intervention treatment records, calculate the time interval between adjacent interventions; calculate the dose change ratio between adjacent interventions; arrange the calculation results corresponding to the above intervention treatments in chronological order to form an intervention response feature vector.

[0021] As a further aspect of the present invention: In step S3, the specific process of inputting the basic risk characteristics into the basic risk prediction network and outputting the basic risk score is as follows:

[0022] The basic risk prediction network adopts a multi-scale temporal feature extraction architecture; it reconstructs the basic risk feature vector in the time dimension to form a feature map with a time series; it processes feature patterns at different time scales through parallel one-dimensional convolutional paths; each convolutional path uses convolutional kernels of different sizes to extract local features; the feature maps output by each path are fused by adaptive weights; the fused feature map is fed into a sequence of bidirectional gated recurrent units; the bidirectional gated recurrent units capture the temporal dependencies between time steps; it outputs the hidden state at the last time step; and it maps this hidden state to the basic risk score through a fully connected layer.

[0023] As a further aspect of the present invention: In step S4, the specific process of inputting the intervention response features and the baseline risk score into the intervention effect separation network to generate the post-intervention risk score is as follows:

[0024] The intervention effect separation network adopts a feature interaction architecture based on an attention mechanism. It maps the basic risk score to the same feature space as the intervention response feature through a linear transformation. It calculates the dynamic correlation weights between the basic risk feature and the intervention response feature through a multi-head attention layer. In the effect separation stage, the network decomposes the intervention effect into two components, direct effect and indirect effect, according to the correlation weights. Each effect component is transformed through a fully connected network with different activation functions. The two effect components are combined with the basic risk score through a gating mechanism to generate a post-intervention risk score.

[0025] As a further aspect of the present invention: the specific working process of the multi-head attention layer is as follows:

[0026] The basic risk feature vector is transformed linearly to generate a query vector matrix; the intervention response feature vector is transformed linearly to generate a key-value pair matrix; in the attention calculation stage, the query vector and the key vector are similar to each other; an attention weight distribution is generated by the softmax function; this attention weight distribution is used to perform a weighted summation of the value vectors; a weighted feature representation is obtained; the weighted feature representation is residually connected to the original query vector; layer normalization is performed; and feature enhancement and dimensionality transformation are performed by a feedforward neural network.

[0027] As a further aspect of the present invention: In step S5, the specific process for calculating the net effect value of the treatment intervention based on the difference between the baseline risk score and the post-intervention risk score is as follows:

[0028] A multi-stage effect decomposition network was established to decompose the total intervention effect into three components: immediate effect, intermediate effect, and long-term effect. A fully connected neural network was constructed for each effect component. The immediate effect network was input with the physiological parameter change characteristics within the short-term time window after intervention; the intermediate effect network was input with the parameter trend characteristics within the intermediate time window after intervention; and the long-term effect network was input with the parameter recovery pattern characteristics after intervention. The outputs of each network were weighted by a time decay function, and the weighted effect components were linearly combined. The net effect value was output through a normalization layer.

[0029] As a further aspect of the present invention, the specific working process of the multi-stage effect decomposition network is as follows:

[0030] A neural network structure with three parallel branches is constructed; each branch corresponds to an effect component; the immediate effect branch uses a convolutional neural network to extract the fluctuation characteristics of short-term physiological parameters after intervention; the intermediate effect branch uses a recurrent neural network to capture the trend changes of intermediate parameters after intervention; the long-term effect branch uses an autoregressive model to analyze the recovery trajectory of parameters after intervention; the outputs of each branch are weighted through an attention mechanism; the weights are dynamically adjusted according to the intervention duration and the patient's baseline risk score; the weighted effect components are fused through a fully connected layer.

[0031] As a further aspect of the present invention: the specific process of generating a patient-specific long-term risk prediction trajectory in step S6 is as follows:

[0032] A trajectory prediction network integrating multi-source information is constructed. This network uses the basic risk score as the initial state input to the time-series prediction module; the post-intervention risk score as the observed state input to the state update module; and the net effect value as a moderating factor input to the trajectory correction module. The time-series prediction module adopts an encoder-decoder structure. The encoder converts the historical risk sequence into a hidden state representation; the decoder performs multi-step prediction based on the hidden state; the state update module fuses the predicted values ​​with the observed values ​​using a Kalman filter algorithm; the trajectory correction module adaptively adjusts the predicted trajectory based on the net effect value; the adjustment magnitude is based on the magnitude and direction of the effect value; and the network outputs a long-term risk prediction trajectory.

[0033] The beneficial effects of this invention are:

[0034] This invention effectively solves the technical challenge of traditional models confusing treatment intervention effects with patients' baseline risk by constructing a dual architecture of a baseline risk prediction network and an intervention effect separation network. The method first aligns physiological parameters and intervention records over time to extract feature data with clear temporal relationships. Then, through multi-scale feature extraction and bidirectional gated recurrent units, it accurately quantifies the patient's baseline risk level before intervention. Based on this, an attention mechanism is used to dynamically analyze intervention response features, decomposing the treatment effect into direct and indirect effect components. A time decay function is used to achieve weighted fusion of intervention effects at different stages, thereby accurately separating the true impact of intervention measures on risk scores. Finally, a multi-source information fusion algorithm integrates baseline risk scores, post-intervention risk scores, and net effect values ​​into a long-term risk prediction trajectory, significantly improving the accuracy of post-discharge risk prediction. This method overcomes the limitation of traditional models relying solely on the correlation of observational data, establishing a technical path combining causal inference and temporal prediction, providing a reliable basis for individualized risk management of atrial fibrillation patients. Attached Figure Description

[0035] The invention will now be further described with reference to the accompanying drawings.

[0036] Figure 1 This is a flowchart illustrating the present invention. Detailed Implementation

[0037] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0038] Please see Figure 1 As shown, this invention is an AI-based method for predicting health risks in patients with atrial fibrillation, comprising the following steps:

[0039] S1. Receive physiological parameter records and intervention treatment records of atrial fibrillation patients, perform time series alignment operation on the physiological parameter records and intervention treatment records to form structured patient data;

[0040] S2. Extract risk-related features from structured patient data, wherein the risk-related features are divided into basic risk features and intervention response features;

[0041] S3. Input the basic risk characteristics into the basic risk prediction network and output the basic risk score;

[0042] S4. Input the intervention response characteristics and the baseline risk score into the intervention effect separation network to generate a post-intervention risk score.

[0043] S5. Calculate the net effect value of the treatment intervention based on the difference between the baseline risk score and the post-intervention risk score;

[0044] S6. Combine baseline risk scores, post-intervention risk scores, and net effect values ​​to generate individualized long-term risk prediction trajectories for patients.

[0045] In S1, the specific process of performing time-series alignment on physiological parameter records and intervention treatment records is as follows:

[0046] First, the timestamp reading step is performed. The physiological parameter records include multiple indicators related to the health status of atrial fibrillation patients, such as heart rate, blood pressure, coagulation function, and electrolyte levels. The collection timestamp for each record needs to be extracted individually. The intervention treatment records include records of treatment procedures such as the use of novel oral anticoagulants, radiofrequency ablation, and cardioversion. Similarly, the start and end timestamps for each treatment procedure are extracted to ensure complete coverage of the time information for both types of records.

[0047] After completing the timestamp reading, the reference time origin is determined as the time point of the patient's first atrial fibrillation diagnosis. For all the physiological parameter recording timestamps and intervention treatment recording timestamps that have been read, the difference between them and the time point of the first atrial fibrillation diagnosis is calculated to obtain the time offset of each timestamp relative to the reference time origin. This unifies all time information under the same time coordinate system and eliminates the problem of inconsistent time references between different records.

[0048] For each intervention treatment record, a time window selection process is initiated. Using the start time of the intervention treatment as the center point, and referring to the conventional time range for evaluating the effectiveness of atrial fibrillation treatment in clinical studies, a fixed-length baseline time window is selected to collect basic physiological parameter data of the patient before the intervention; a fixed-length observation time window is selected to collect dynamic changes in the patient's physiological parameters after the intervention. The length of both types of windows needs to be determined according to the type of intervention (e.g., drug treatment, surgical treatment) to ensure that the windows cover the cycle of changes in key physiological parameters before and after the intervention.

[0049] In the physiological parameter time-series processing stage, time-series resampling is performed on the physiological parameter records within the selected baseline and observation time windows. First, a uniform sampling frequency is set, which needs to consider the variation characteristics of the physiological parameters (e.g., heart rate can be set to once per hour, coagulation function to once every 6 hours). Linear interpolation or nearest neighbor interpolation is used to complete or downsample the original physiological parameter records, ensuring that the time intervals of all physiological parameter records within the window remain consistent, meeting the requirement of data temporal uniformity for subsequent feature extraction.

[0050] After resampling, statistical characteristics are calculated for the resampled physiological parameter data. A sliding time window is set based on each sampling time point, with the sliding step size consistent with the uniform sampling frequency. Within each sliding time window, statistical indicators of the physiological parameters are calculated, including but not limited to mean, variance, maximum, minimum, and median. These multi-dimensional statistical indicators capture the changing characteristics of physiological parameters within a local time range, avoiding interference from the randomness of a single data point in subsequent analysis.

[0051] Finally, the record matching and association step is performed. Information such as treatment type, dosage, and duration from the intervention treatment records is matched one-to-one with the physiological parameter records after resampling and statistical feature calculation, according to the time points corresponding to the time offsets. For each time point, the corresponding time offset, statistical features of various physiological parameters, and intervention status labels (e.g., "Under Intervention" or "Not Under Intervention") are integrated to generate a structured patient data table. This ensures that each record in the table contains complete time information, physiological parameter information, and intervention status information, providing a standardized data foundation for subsequent feature extraction.

[0052] In S2, the specific process of extracting risk-related features from structured patient data is as follows:

[0053] The first step is to calculate the arithmetic mean of the physiological parameters. For each physiological parameter within the baseline time window, the mean data of the statistical characteristics corresponding to all sampling time points within the window are accumulated, and then divided by the number of sampling time points to obtain the overall arithmetic mean of the physiological parameter within the baseline time window, which reflects the basic level of the parameter.

[0054] The second step is to calculate the standard deviation. For the mean of statistical characteristics of all sampling time points of each physiological parameter within the baseline time window, first calculate the deviation of each data from the arithmetic mean, then square the deviation, then calculate the average of the squared deviations, and finally take the square root of the average to obtain the standard deviation, which is used to measure the degree of fluctuation of physiological parameters during the baseline period.

[0055] The third step is to calculate the mean of the absolute values ​​of the first-order differences. For the sampled data of each physiological parameter arranged in chronological order within the baseline time window, the difference between the data of two adjacent sampling time points (i.e., the first-order difference) is calculated. The absolute values ​​of all the first-order difference results are taken, and then the arithmetic mean of these absolute values ​​is calculated. This indicator can reflect the average level of the rate of change of physiological parameters during the baseline period.

[0056] The fourth step is to construct the Pearson correlation coefficient matrix and extract the upper triangular element values. All physiological parameters within the baseline time window are paired, and the Pearson correlation coefficient between each pair of physiological parameters is calculated to form a correlation coefficient matrix with physiological parameters as rows and columns. Since this matrix is ​​a symmetric matrix, the upper triangular elements and lower triangular elements have the same value. To avoid data redundancy, only the upper triangular element values ​​above the main diagonal of the matrix are extracted and arranged into a vector in a fixed row and column order.

[0057] The fifth step is to obtain the coefficients of the cubic polynomial. For the time series data of each physiological parameter in the baseline time window, the least squares method is used to fit the cubic polynomial to obtain the constant term, the coefficients of the first term, the coefficients of the second term, and the coefficients of the third term. The polynomial coefficients reflect the trend characteristics of the physiological parameters during the baseline period.

[0058] After completing the above five calculations, the arithmetic mean, standard deviation, and mean of the absolute value of the first difference corresponding to each physiological parameter are combined with the upper triangular element values ​​of the Pearson correlation coefficient matrix corresponding to all physiological parameters and the cubic polynomial coefficients of each physiological parameter. They are then concatenated in a fixed order of "individual indicators of physiological parameters - cross-parameter correlation indicators - trend characteristic indicators" to form a basic risk feature vector with fixed dimensions. This vector fully covers the inherent risk information of the patient when no intervention is received.

[0059] In the intervention response feature extraction stage, the start and end times of each intervention treatment record are first located. This time information is directly extracted from the corresponding intervention treatment record entries in the structured patient data table generated by S1, ensuring that the time nodes accurately correspond to the specific treatment operations.

[0060] Based on the intervention start time, fixed-length time windows are selected before and after the intervention. The pre-intervention window is used to compare short-term physiological states before the intervention, and the post-intervention window is used to capture immediate physiological changes after the intervention. The window length is set differently according to the type of intervention (such as short-term drug intervention or long-term surgical intervention).

[0061] The percentage change of a physiological parameter relative to the baseline mean within a time window is calculated. The arithmetic mean of the physiological parameter within the baseline time window is used as the benchmark value. The mean of the statistical characteristic of the physiological parameter at each sampling time point within the time window is subtracted from the benchmark value. The difference is then divided by the benchmark value and multiplied by 100 to obtain the percentage change at each sampling time point, which intuitively reflects the magnitude of the intervention's impact on the physiological parameter.

[0062] To calculate the time required for the physiological parameter change curve to reach its peak after the intervention begins, first plot the percentage change of physiological parameters within the time window after the intervention begins as a change curve in chronological order, identify the peak point with the largest value in the curve, calculate the difference between the time corresponding to the peak point and the intervention start time, and obtain the peak time, which is used to evaluate the onset speed of the intervention effect.

[0063] For patients with a history of multiple consecutive interventions, the time interval between adjacent interventions is calculated, which is the start time of the later intervention minus the end time of the previous intervention. The dose change ratio between adjacent interventions is also calculated. If it is a drug intervention, the ratio of the drug dose of the later intervention to the drug dose of the previous intervention is used. If it is a non-drug intervention such as surgery, the ratio of the quantitative value of the treatment intensity of the later intervention to the quantitative value of the treatment intensity of the previous intervention is used. The interval and dose ratio reflect the adjustment pattern of the intervention plan.

[0064] The percentage change in physiological parameters, peak time, and the time interval between adjacent interventions and the ratio of dose changes between adjacent interventions within the time window corresponding to each intervention are arranged in chronological order of intervention implementation to form an intervention response feature vector with temporal characteristics. This vector can fully present the dynamic response of the patient to the treatment intervention.

[0065] In S3, the specific process of inputting basic risk characteristics into the basic risk prediction network and outputting the basic risk score is as follows:

[0066] The basic risk prediction network adopts a multi-scale temporal feature extraction architecture, which consists of a feature reconstruction module, a parallel one-dimensional convolution module, an adaptive weight fusion module, a bidirectional gated recurrent unit module, and a fully connected layer module. Each module works together to realize the transformation from feature input to score output.

[0067] The feature reconstruction module first performs a time-dimensional reconstruction operation on the basic risk feature vector. Since the basic risk feature vector contains feature information from different time points within the baseline time window, it needs to be split into multiple sub-vectors of different time steps in chronological order. Each sub-vector corresponds to a basic risk feature at a sampling time point, thus forming a feature map with the dimension of "time step × feature dimension". Here, the time step is equal to the number of samplings within the baseline time window, and the feature dimension is equal to the number of basic risk features contained in each time step. This transforms the one-dimensional feature vector into a feature map with a temporal structure, meeting the requirements for subsequent temporal feature extraction.

[0068] The parallel one-dimensional convolution module initiates multiple convolutional paths to process the feature maps, with each path corresponding to different time-scale feature patterns for extraction. Based on the temporal characteristics of physiological parameter changes in atrial fibrillation patients, one-dimensional convolutional kernels of different sizes are set. For example, short-scale paths use smaller kernels (e.g., 1×3) to extract hourly-level local feature fluctuations, medium-scale paths use medium-sized kernels (e.g., 1×5) to extract daily-level feature changes, and long-scale paths use larger kernels (e.g., 1×7) to extract weekly-level feature trends. Within each convolutional path, convolution calculation, ReLU activation function processing, and max pooling are performed sequentially. Convolution calculation is used to extract local features at the corresponding time scale, the activation function introduces non-linear feature mapping, and max pooling downsamples the convolution result to reduce the number of parameters while retaining key features. Finally, each path outputs a feature map corresponding to its time scale.

[0069] The adaptive weight fusion module assigns and fuses weights to the feature maps output from each convolutional path. This module constructs an attention mechanism subnetwork, calculating the weight value of each path's feature map based on its contribution to basic risk prediction. Contribution evaluation is based on correlation analysis between the feature map and the atrial fibrillation risk label. Subsequently, the feature maps of each path are weighted and summed with their corresponding weight values ​​to obtain a comprehensive feature map that integrates feature information from all time scales. This ensures that important features are given sufficient attention while avoiding the limitations of single-scale features.

[0070] The Bi-Gated Recurrent Unit (Bi-GRU) module receives the fused feature map and performs temporal dependency capture. This module contains two sub-units: a forward GRU and a backward GRU. The forward GRU processes the features sequentially from the first time step to the last time step, capturing the future temporal dependencies of the features; the backward GRU processes the features in reverse order from the last time step to the first time step, capturing the historical temporal dependencies of the features. At each time step, the output hidden states of the forward GRU and the backward GRU are concatenated to form the comprehensive hidden state for that time step. This state contains feature information from the current time step and related time steps before and after it.

[0071] After the Bi-GRU module processes the features of all time steps, it outputs the comprehensive hidden state of the last time step. This state integrates the global temporal information of the entire basic risk feature map and can comprehensively reflect the temporal characteristics of the patient's basic risk.

[0072] Finally, the fully connected layer module is activated to perform the basic risk score mapping. The comprehensive hidden state of the last time step is input into the fully connected layer. The first fully connected layer maps the high-dimensional features of the hidden state to a preset intermediate dimension, and performs a non-linear transformation through the Sigmoid activation function to enhance the expressive power of the features. The second fully connected layer further maps the intermediate dimension features to a one-dimensional output, which is the basic risk score. The score range is set according to the clinical atrial fibrillation risk grading standard and can be directly used to quantitatively assess the patient's inherent health risk level before intervention.

[0073] In S4, the specific process of inputting the intervention response features and the baseline risk score into the intervention effect separation network to generate the post-intervention risk score is as follows:

[0074] The core architecture of the intervention effect separation network is a feature interaction design based on the attention mechanism. Its core objective is to achieve effective separation of intervention effects and calculation of post-intervention risk scores by accurately capturing the correlation between basic risk features and intervention response features. The specific process is divided into the following six key steps.

[0075] First, a feature space mapping operation is performed on the basic risk score. Since the basic risk score is a single-dimensional or low-dimensional quantitative indicator, while the intervention response features are high-dimensional time-series vectors, they reside in different feature spaces and cannot be directly computed together. To address this issue, the network uses a linear transformation module to expand the dimensionality and align the basic risk score spatially. This module consists of a single-layer fully connected network, taking the basic risk score output by S3 as input, and ensuring that the output dimension matches the dimension of the intervention response features. During network training, the weight and bias parameters of the linear transformation are dynamically adjusted through backpropagation to ensure that the mapped basic risk feature vector and the intervention response feature vector are compatible in terms of feature distribution and numerical range, laying the foundation for subsequent feature interaction.

[0076] Subsequently, a multi-head attention layer is initiated to calculate feature association weights. The input to this layer is the mapped basic risk feature vector and the original intervention response feature vector. Through multiple sets of parallel attention calculation units (i.e., "attention heads"), the dynamic association relationships between the two types of features are captured from different feature dimensions and association perspectives. Each attention head independently calculates a set of association weights, and the outputs of all attention heads are concatenated to form a global association weight matrix. This matrix accurately reflects the association strength between each dimension of the basic risk features and each time-series node and parameter change feature in the intervention response features, providing a basis for subsequent effect separation.

[0077] After entering the effect separation phase, the network performs a binary decomposition of the intervention effect based on the aforementioned association weight matrix. The direct effect component corresponds to the direct impact of the intervention on the risk of atrial fibrillation patients, such as the change in stroke risk resulting from the direct regulation of coagulation function by novel oral anticoagulants. The indirect effect component corresponds to the part of the intervention that indirectly affects risk by influencing other physiological parameters, such as drugs indirectly reducing the risk of heart failure by regulating heart rate. The network uses threshold judgment of feature association strength and feature classification to categorize the part of the intervention effect directly associated with baseline risk characteristics as the direct effect, and the part mediated by intermediate physiological parameters as the indirect effect, thus achieving a clear separation between the two types of effects.

[0078] For the two separated effect components, the network is configured with fully connected networks with different activation functions for feature transformation. For the direct effect component, the fully connected network uses the ReLU activation function, whose nonlinear characteristics can effectively capture the nonlinear association between intervention and risk, such as the nonlinear relationship between drug dosage and risk reduction. For the indirect effect component, the fully connected network uses the tanh activation function, which has a symmetrical output range and stronger gradient propagation ability, and can adapt to the complex association mapping mediated by multiple physiological parameters in indirect effects. Each fully connected network contains two hidden layers. The dimension of the first hidden layer is twice that of the effect component, and the dimension of the second hidden layer is consistent with the dimension of the baseline risk score. This dimensional adjustment ensures that the effect component and the baseline risk score can be directly combined in subsequent steps.

[0079] Next, a gating mechanism is used to dynamically fuse the three types of core information. The gating mechanism consists of a gating unit and a weight allocation module. The gating unit first encodes the baseline risk score, direct effect component, and indirect effect component, generating corresponding gating coefficients. These coefficients are mapped to the 0-1 range using a sigmoid function, with the numerical value representing the contribution weight of the corresponding information in the final score. The weight allocation module multiplies the baseline risk score, direct effect component, and indirect effect component by their respective coefficients based on the gating coefficients. The products are then summed element-wise to obtain the fused risk feature vector. This process can dynamically adjust the contribution ratio of the three types of information. For example, for patients with high baseline risk and significant direct intervention effects, the gating unit will increase the coefficient of the direct effect component to ensure that the score accurately reflects the core role of the intervention.

[0080] Finally, a post-intervention risk score is generated. The fused risk feature vector is input to the output layer, which is a single-layer fully connected network without an activation function. Its function is to map the high-dimensional fused features into a single-dimensional quantitative score. The value range of this score is consistent with the baseline risk score, facilitating direct clinical comparison of risk changes before and after intervention. For example, a quantitative range of 0-10 is used, where 0 represents extremely low risk and 10 represents extremely high risk. The final output value is the post-intervention risk score.

[0081] The specific working process of the multi-head attention layer is as follows:

[0082] The multi-head attention layer, as the core interactive module of the intervention effect separation network, achieves refined capture of feature associations through multiple sets of parallel attention heads. The specific process is divided into eight steps.

[0083] The first step is vector matrix generation. For the basic risk feature vector, the network is configured with N independent linear transformation layers (N is the number of attention heads, typically 8 or 16). Each linear transformation layer contains an independent weight matrix and bias vector. After processing by each linear transformation layer, the basic risk feature vector generates a vector of dimension D (D is the preset feature dimension). All N vectors are concatenated column-wise to form a query vector matrix of dimension N×D. For the intervention response feature vector, N independent linear transformation layers are also configured. One transformation layer generates N key vectors of dimension D, which are concatenated into an N×D key vector matrix; the other transformation layer generates N value vectors of dimension D, which are concatenated into an N×D value vector matrix. The dimensions of the three matrices are kept completely consistent to ensure that subsequent calculations can be performed in parallel.

[0084] The second step is to perform similarity calculation. For each attention head, the query vector and key vector are compared using a dot product similarity method to assess the association strength: the query vector and key vector are multiplied element-wise and then summed to obtain the similarity value for a single feature dimension; the similarity values ​​for all feature dimensions are then aggregated to form the similarity vector for that attention head. The choice of dot product similarity is based on the high-dimensionality of the two types of features, which can efficiently calculate the linear association between vectors while avoiding the impact of complex calculations on network training efficiency.

[0085] The third step is to generate the attention weight distribution. The similarity vector of each attention head is input into the softmax function. Through exponential operations and normalization, the similarity values ​​are mapped to the 0-1 range, and the sum of the weights of all dimensions is 1, forming the attention weight distribution for that attention head. This distribution highlights the key vectors (intervention response features) with high correlation to the query vector (basic risk features) and weakens dimensions with low correlation, achieving precise filtering of feature associations.

[0086] The fourth step is to complete the weighted feature representation calculation. The attention weight distribution of each attention head is element-wise multiplied with its corresponding value vector to obtain a weighted result of the value vector under that weight distribution. The sum of all weighted results is then used to generate a single-head weighted feature representation for that attention head. This process is repeated to obtain weighted feature representations for N attention heads. These N representations are then concatenated column-wise to form a multi-head weighted feature representation matrix of dimension N×D, integrating multi-dimensional feature association information.

[0087] The fifth step involves residual connection. To avoid the vanishing gradient problem during deep network training while preserving the core information of the original basic risk features, a residual connection is performed between the multi-head weighted feature representation matrix and the original query vector matrix: the two matrices are added element-wise to obtain the residually connected feature matrix. This operation ensures that the network learns complex correlation features without losing the inherent information of the basic risk features, thus improving the integrity of the feature representation.

[0088] The sixth step is to perform layer normalization. Layer normalization is applied to the feature matrix after residual connections. The mean and variance of this matrix are calculated along the feature dimensions. Through mean subtraction and variance scaling, the feature values ​​are adjusted to a standard distribution with a mean of 0 and a variance of 1. Layer normalization effectively reduces the impact of feature value fluctuations on subsequent calculations, stabilizes the network training process, accelerates model convergence, and avoids training bias caused by differences in feature distribution.

[0089] The seventh step involves activating the feedforward neural network for feature enhancement. The feedforward neural network consists of two fully connected layers. The first fully connected layer increases the dimension of the normalized feature matrix from N×D to N×2D, enhancing feature expressiveness through dimensional expansion. A ReLU activation function is used to introduce a non-linear transformation, capturing complex non-linear relationships between features. The second fully connected layer restores the dimension from N×2D to N×D, ensuring the output dimension matches the input dimension of the subsequent effect separation module. This process further optimizes the associated features output by multi-head attention, enhancing the feature discrimination capability.

[0090] The eighth step outputs the multi-head attention layer results. The output of the feedforward neural network is the final result of the multi-head attention layer. This result is a feature vector with the same dimension as the intervention response features. It contains the dynamic correlation information between the basic risk features and the intervention response features, and retains the core attributes of the two types of features. It can be directly input into the subsequent effect separation stage, providing a high-quality feature foundation for the accurate separation of intervention effects.

[0091] In S5, the specific process for calculating the net effect value of the treatment intervention based on the difference between the baseline risk score and the post-intervention risk score is as follows:

[0092] First, a multi-stage effect decomposition network was constructed. The core design principle of this network is that the impact of intervention on the risk of atrial fibrillation patients is temporally heterogeneous. After intervention, risk changes exhibit different characteristics in the short, medium, and long term. Therefore, the total effect of the intervention needs to be decomposed into three components according to the time scale: immediate effect, medium-term effect, and long-term effect. The immediate effect corresponds to the rapid change in risk in the short term (e.g., several hours to one day) after intervention, reflecting the rapid onset of the intervention. The medium-term effect corresponds to the stable change in risk during the duration of the intervention (e.g., one day to two weeks), reflecting the continuous regulatory effect of the intervention. The long-term effect corresponds to the recovery change in risk after the intervention ends (e.g., two weeks to several months), reflecting the residual effects of the intervention and the body's recovery trend. This decomposition method avoids the one-sided judgment of the intervention effect by a single-effect assessment, laying the foundation for subsequent accurate calculations.

[0093] For the three split effect components, independent fully connected neural networks are constructed for each, with the structure of each network adapted to the feature attributes of the corresponding effect. The immediate effect network is designed for the physiological parameter changes within a short time window after intervention (such as the amplitude of heart rate fluctuations and the rate of change of prothrombin time within 6 hours to 1 day after intervention). It adopts a structure of "2 hidden layers + ReLU activation function". The ReLU activation function can efficiently capture the nonlinear correlation of short-term physiological parameter changes. The dimension of the first hidden layer is set to twice the dimension of the input features to expand the feature expression space. The dimension of the second hidden layer is reduced to half the dimension of the input features to achieve feature dimensionality reduction and key information extraction, and finally outputs the original value of the immediate effect component.

[0094] The mid-term effect network inputs parameter trend features within the mid-term time window after intervention (such as the trend of mean blood pressure changes and electrolyte level stability within 3 days to 2 weeks after intervention). It adopts a structure of "3 hidden layers + tanh activation function". The output range of tanh activation function is symmetrical and has strong gradient propagation ability, which can adapt to the complex correlation of multiple parameters co-changing in the mid-term trend. The dimensions of the first two hidden layers are gradually expanded (input dimension → 2×input dimension → 4×input dimension), and the dimensions of the third layer are reduced to 2×input dimension. The feature discrimination ability is enhanced through the "expansion-compression" dimension change, and the original values ​​of the mid-term effect components are output.

[0095] The long-term effect network inputs the parameter recovery pattern features after intervention (such as the rate of recovery of the international normalized ratio and the recovery trend of heart rate variability within 1 week to 1 month after drug withdrawal). It adopts the structure of "2 hidden layers + LeakyReLU activation function". LeakyReLU can retain the feature information of small recovery trend and avoid losing key recovery details due to the "death zone" of the activation function. The dimensions of the two hidden layers are set to 1.5 times the dimension of the input features to balance feature expression ability and computational efficiency, and output the original values ​​of the long-term effect components.

[0096] After preliminary calculations of the three effect components, each component is weighted using a time decay function. The design of the time decay function must match the temporal influence of each effect: the immediate effect weakens rapidly over time, so an exponential decay function (weights decrease exponentially over time) is used to ensure high weights in the short term and low weights in the later stages; the intermediate effect remains relatively stable throughout the intervention period, so a linear decay function (weights decrease slowly and linearly over time) is used to match the stabilizing effect of continuous regulation; the long-term effect weakens gradually with the recovery process, so a power function decay function (weights decrease slowly and exponentially over time) is used to match the gradual nature of the body's recovery. The input to the decay function is the interval between the current time point and the start / end time point of the intervention, and the output is the weight value in the 0-1 range. The original value of each effect component is multiplied by its corresponding weight value to obtain the weighted effect component.

[0097] Subsequently, a linear combination operation was performed on the three weighted effect components, summing the weighted values ​​of the three components element by element to obtain the original composite value of the net effect of the intervention. The core of this operation is to integrate the intervention effects at different time scales and avoid the one-sidedness of a single effect component. For example, patients with high baseline risk may simultaneously experience significant immediate effects (rapid reduction in short-term risk) and stable intermediate-term effects (continuous risk control). Linear combination can superimpose these two types of effects to reflect the overall effect of the intervention.

[0098] Finally, the net effect value is output through a normalization layer. The normalization layer employs a layer normalization mechanism. First, the mean and variance of the raw composite net effect values ​​for all patients are calculated. Then, through mean subtraction and variance scaling, the raw composite values ​​are mapped to a fixed interval of -1 to 1. Positive values ​​represent the risk-reducing effect of the intervention (the larger the value, the more significant the risk reduction), while negative values ​​represent the potential risk-increasing effect of the intervention (the smaller the value, the more significant the risk increase). Normalization eliminates the influence of differences in baseline risk and intervention type among patients on the net effect value, ensuring cross-sectional comparability of net effect values ​​across different patients and providing a standardized indicator for clinical evaluation of intervention effectiveness.

[0099] The specific working process of the multi-stage effect decomposition network is as follows:

[0100] The first step is to construct a parallel branch neural network structure, which contains three independent branches corresponding to the extraction of immediate, intermediate, and long-term effects, respectively. The network type of each branch is selected to deeply match the feature attributes of the corresponding effect. The core of the immediate effect is the fluctuation characteristics of short-term physiological parameters (such as the rapid rise and fall of heart rate within a few hours after intervention). Convolutional neural networks (CNNs) are good at extracting fluctuation patterns within local time windows, so the immediate effect branch adopts a one-dimensional CNN architecture. The core of the intermediate effect is the temporal trend characteristics (such as the continuous improvement trend of coagulation function within a few days after intervention). Recurrent neural networks (RNNs), especially gated recurrent units (GRUs), are good at capturing the long-term and short-term dependencies of time-series data, so the intermediate effect branch adopts a bidirectional GRU architecture. The core of the long-term effect is the autocorrelation characteristics of the recovery trajectory (such as the gradual rise in blood pressure within a few weeks after drug withdrawal). Autoregressive models are good at predicting subsequent trends and analyzing trajectory patterns based on historical data, so the long-term effect branch adopts an autoregressive GRU architecture. The input ports of the three branches are respectively connected to the feature data of different time windows, and the output ports are all fixed-dimensional (such as 64-dimensional) effect feature vectors to ensure compatibility of subsequent weight calculation and fusion.

[0101] The second step involves extracting the effect features for each branch. The one-dimensional CNN architecture of the immediate effect branch consists of two convolutional layers and one max-pooling layer: the first convolutional layer uses a 1×3 kernel (adapted to local features of short-term fluctuations at the hourly level), with a stride of 1 and 32 output channels; the second convolutional layer uses a 1×5 kernel (adapted to fluctuations over slightly longer time spans), with 64 output channels; the max-pooling layer uses a 1×2 kernel to downsample the convolutional output to reduce the number of parameters and retain key fluctuation features. After the above processing, the input short-term physiological parameter change sequence is converted into a 64-dimensional immediate effect feature vector through a flattening layer.

[0102] The bidirectional GRU architecture of the mid-term effect branch consists of one bidirectional GRU layer and one fully connected layer: the number of hidden units in the bidirectional GRU layer is set to 64. The forward GRU processes the mid-term parameter trend sequence from the intervention start time backward to capture future trend dependence; the backward GRU processes the sequence from the mid-term intervention time forward to capture historical trend dependence; the outputs of the two GRU layers are concatenated to form a 128-dimensional feature vector, which is then compressed by the fully connected layer (output dimension 64) to obtain a 64-dimensional mid-term effect feature vector.

[0103] The autoregressive GRU architecture of the long-term effects branch consists of one autoregressive GRU layer and one temporal attention layer: the number of hidden units in the autoregressive GRU layer is set to 64, and the output of each time step depends not only on the current input, but also on the output of the previous 3 time steps (to adapt to the short-term autocorrelation characteristics of the recovery trajectory); the temporal attention layer assigns weights to the sequence features of the autoregressive output, highlighting the features of key recovery nodes (such as the point of sudden change in recovery speed), and finally converts them into a 64-dimensional long-term effects feature vector through a fully connected layer.

[0104] The third step involves calculating the dynamic weights of each branch using an attention mechanism. The input to the attention mechanism includes two key types of information: intervention duration (e.g., number of days of medication use, follow-up period after surgical intervention) and the patient's baseline risk score. First, these two types of information are converted into 16-dimensional feature vectors, which are then multiplied by the 64-dimensional effect feature vectors output from the three branches to obtain three correlation scores (reflecting the strength of the correlation between intervention duration, baseline risk, and each effect). Subsequently, these three correlation scores are input into a softmax function to generate three weight values ​​in the 0-1 range (the sum of the weights is 1). For example, a longer intervention duration results in a higher weight for intermediate-term effects; a higher baseline risk score results in a higher weight for immediate effects, achieving dynamic weight adaptation.

[0105] The fourth step is to fuse the weighted effect components. The effect feature vectors output from the three branches are multiplied by their corresponding attention weights to obtain the weighted immediate effect feature vector, mid-term effect feature vector, and long-term effect feature vector. Then, the three weighted vectors are added element by element to obtain a 64-dimensional fused effect feature vector. This vector is then input into a single fully connected layer (output dimension 32), and a nonlinear transformation is performed using the ReLU activation function to further integrate the multi-effect features, outputting a final 32-dimensional effect decomposition feature vector.

[0106] The fifth step outputs the effect decomposition results. The final effect decomposition feature vector is directly transferred to the subsequent time decay function weighting stage, providing an accurate effect split basis for calculating the net effect value. This result not only retains the independent characteristics of intervention effects at different time scales, but also achieves the organic integration of multiple effects through dynamic weighting and fusion operations, effectively avoiding the limitations of traditional single effect assessment and ensuring that the net effect value can truly reflect the role of the intervention throughout the entire time period.

[0107] In S6, the specific process of generating a patient-specific long-term risk prediction trajectory is as follows:

[0108] First, a trajectory prediction network based on multi-source information fusion is constructed, defining the three core inputs and corresponding modules: the baseline risk score is input as the initial state into the time-series prediction module, reflecting the patient's inherent risk level before intervention and providing an initial benchmark for long-term prediction; the post-intervention risk score is input as the observation state into the state update module, representing the actual risk observation value after intervention and used to correct prediction bias; and the net effect value is input as a moderating factor into the trajectory correction module, quantifying the risk control effect of the intervention and used to adapt to the long-term trajectory impact trend.

[0109] The time-series prediction module uses an encoder-decoder structure to process historical risk sequences. These sequences include the patient's baseline risk score over a pre-defined time period, post-intervention risk scores, and corresponding timestamps. The encoder employs a bidirectional gated cyclic unit architecture, traversing the historical sequence bidirectionally to capture the dependencies between risk changes at different time steps. By compressing the sequence information into a fixed-dimensional hidden state representation (e.g., a 128-dimensional vector), it abstracts and extracts historical risk features. The decoder uses an autoregressive decoding method, taking the hidden state output by the encoder as initial input. Each prediction step combines the previous prediction result with the hidden state features to generate a preliminary risk prediction sequence for the future pre-defined time period (e.g., risk score sequences for the next 6 months and 12 months), thus completing the initial prediction of long-term risk.

[0110] The state update module fuses predicted and observed values ​​using a Kalman filter algorithm. First, the preliminary risk prediction sequence output by the time series prediction module is used as the predicted value by the Kalman filter, and the post-intervention risk score is used as the observed value. The deviation between the predicted and observed values ​​is calculated. Then, based on preset process noise covariance (reflecting the uncertainty of the prediction model) and observation noise covariance (reflecting the measurement error of the post-intervention score), the Kalman gain is updated. The preliminary predicted values ​​are then weighted and adjusted based on the Kalman gain to make the adjusted predicted values ​​closer to the actual level of the observed values, reducing the bias of the pure prediction model, and obtaining a corrected risk prediction sequence, thus improving the accuracy of short- to medium-term predictions.

[0111] The trajectory correction module adaptively adjusts the corrected predicted trajectory based on the net effect value. First, the net effect value is mapped to an adjustment coefficient in the 0-1 range. The mapping rule is based on the magnitude and direction of the net effect value: the larger the net effect value (the more significant the risk reduction), the larger the adjustment coefficient; when the net effect value is negative (risk increases), the adjustment coefficient is negative. Then, the adjustment coefficient is applied to each time step of the corrected predicted trajectory, adjusting the risk score by magnitude. If the net effect value is significantly positive, the risk score at each time step is adjusted downwards by a larger margin, resulting in a gradual downward trend in the trajectory; if the net effect value is small or negative, the downward adjustment is reduced or replaced by a slight upward adjustment, ensuring that the trajectory reflects the actual control effect of the intervention.

[0112] Finally, the integrated and adjusted trajectory data is used to output a long-term risk prediction trajectory with time as the horizontal axis and risk score as the vertical axis. The trajectory includes the specific risk score and corresponding confidence interval for each time point, fully presenting the patient's risk change trend in the long term, and providing individualized data support for clinical development of long-term follow-up and intervention plans.

[0113] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.

Claims

1. An AI-based method for predicting health risks in patients with atrial fibrillation, characterized in that, Includes the following steps: S1. Receive physiological parameter records and intervention treatment records of atrial fibrillation patients, perform time series alignment operation on the physiological parameter records and intervention treatment records to form structured patient data; S2. Extract risk-related features from structured patient data, wherein the risk-related features are divided into basic risk features and intervention response features; S3. Input the basic risk characteristics into the basic risk prediction network and output the basic risk score; S4. Input the intervention response characteristics and the baseline risk score into the intervention effect separation network to generate a post-intervention risk score. S5. Calculate the net effect value of the treatment intervention based on the difference between the baseline risk score and the post-intervention risk score; S6. Combine baseline risk score, post-intervention risk score and net effect value to generate a patient’s individualized long-term risk prediction trajectory. In S2, the specific process of extracting risk-related features from structured patient data is as follows: Select physiological parameter data within the baseline time window prior to the start of the intervention; Calculate the arithmetic mean of each physiological parameter within the baseline time window; calculate the standard deviation of each physiological parameter within the baseline time window; Calculate the mean of the absolute values ​​of the first differences of each physiological parameter within the baseline time window; Calculate the Pearson correlation coefficient matrix between different physiological parameters and extract the upper triangular element values ​​of the matrix; For each physiological parameter time series, a polynomial fit is performed to obtain the cubic polynomial coefficients of the polynomial fit; the calculation results corresponding to the above physiological parameters are concatenated in a fixed order to form a basic risk feature vector. Locate the start and end times of each intervention treatment record; select fixed-length time windows before and after the intervention; calculate the percentage change of physiological parameters relative to the baseline mean within the time window; calculate the time required for the physiological parameter change curve to reach its peak after the intervention begins. For records of multiple consecutive interventions, calculate the time interval between adjacent interventions; calculate the dose change ratio between adjacent interventions; arrange the calculation results corresponding to the above interventions in chronological order to form an intervention response feature vector.

2. The AI-based health risk prediction method for atrial fibrillation patients according to claim 1, characterized in that, In S1, the specific process of performing time-series alignment on physiological parameter records and intervention treatment records is as follows: Read the timestamps from physiological parameter records and intervention treatment records; The time point of the first diagnosis of atrial fibrillation is used as the baseline time origin, and the time offset of each timestamp relative to the baseline time origin is calculated. For each intervention treatment record, the intervention start time point is used as the center point, and a fixed-length baseline time window is selected forward and a fixed-length observation time window is selected backward. Within the baseline time window and the observation time window, physiological parameter records are resampled at a uniform sampling frequency. For the resampled physiological parameter data, the statistical characteristics within the sliding time window are calculated at each sampling time point; Intervention treatment records and processed physiological parameter records are matched and associated according to time points to generate a structured patient data table containing time point sequences, statistical features of physiological parameters, and intervention status labels.

3. The AI-based health risk prediction method for atrial fibrillation patients according to claim 1, characterized in that, In step S3, the specific process of inputting basic risk characteristics into the basic risk prediction network and outputting the basic risk score is as follows: The basic risk prediction network adopts a multi-scale temporal feature extraction architecture; The basic risk feature vector is reconstructed in the time dimension to form a feature map with time series; feature patterns at different time scales are processed through parallel one-dimensional convolutional paths; each convolutional path uses convolutional kernels of different sizes to extract local features; The feature maps output from each path are fused using adaptive weights; the fused feature maps are then fed into a sequence of bidirectional gated recurrent units; the bidirectional gated recurrent units capture the temporal dependencies between different time steps; the hidden state at the last time step is output; and this hidden state is mapped to the basic risk score through a fully connected layer.

4. The AI-based health risk prediction method for atrial fibrillation patients according to claim 1, characterized in that, In step S4, the specific process of inputting the intervention response characteristics and the baseline risk score into the intervention effect separation network to generate the post-intervention risk score is as follows: The intervention effect separation network adopts a feature interaction architecture based on an attention mechanism; it maps the basic risk score to the same feature space as the intervention response feature through a linear transformation; it calculates the dynamic correlation weight between the basic risk feature and the intervention response feature through a multi-head attention layer; in the effect separation stage, the network decomposes the intervention effect into two components, direct effect and indirect effect, according to the correlation weight; each effect component is transformed through a fully connected network with different activation functions; The two effect components are combined with the baseline risk score through a gating mechanism to generate a post-intervention risk score.

5. The AI-based method for predicting health risks in atrial fibrillation patients according to claim 4, characterized in that, The specific working process of the multi-head attention layer is as follows: The basic risk feature vector is transformed linearly to generate a query vector matrix; the intervention response feature vector is transformed linearly to generate a key-value pair matrix; in the attention calculation stage, the query vector and the key vector are similar to each other; an attention weight distribution is generated by the softmax function; this attention weight distribution is used to perform a weighted summation of the value vectors; a weighted feature representation is obtained; the weighted feature representation is residually connected to the original query vector; layer normalization is performed; and feature enhancement and dimensionality transformation are performed by a feedforward neural network.

6. The AI-based method for predicting health risks in atrial fibrillation patients according to claim 1, characterized in that, In S5, the specific process for calculating the net effect value of the treatment intervention based on the difference between the baseline risk score and the post-intervention risk score is as follows: A multi-stage effect decomposition network was established to decompose the total intervention effect into three components: immediate effect, medium-term effect, and long-term effect according to the time scale. A fully connected neural network was constructed for each effect component. The immediate effect network was input with the physiological parameter change characteristics within the short-term time window after intervention, and the medium-term effect network was input with the parameter trend characteristics within the medium-term time window after intervention. Characteristics of parameter recovery patterns after long-term effect network input intervention; The outputs of each network are weighted using a time decay function, and the weighted effect components are linearly combined; the net effect value is output through a normalization layer.

7. The AI-based method for predicting health risks in atrial fibrillation patients according to claim 6, characterized in that, The specific working process of the multi-stage effect decomposition network is as follows: A neural network structure with three parallel branches is constructed; each branch corresponds to an effect component; the immediate effect branch uses a convolutional neural network to extract the fluctuation characteristics of short-term physiological parameters after intervention. The intermediate-term effect branch uses a recurrent neural network to capture the trend changes of intermediate parameters after intervention; the long-term effect branch uses an autoregressive model to analyze the recovery trajectory of parameters after intervention; the outputs of each branch are weighted through an attention mechanism; the weights are dynamically adjusted according to the duration of intervention and the patient's baseline risk score; the weighted effect components are fused through a fully connected layer.

8. The AI-based method for predicting health risks in atrial fibrillation patients according to claim 1, characterized in that, In step S6, the specific process of generating a patient's individualized long-term risk prediction trajectory is as follows: A trajectory prediction network based on multi-source information fusion is constructed; this network uses the basic risk score as the initial state input to the time series prediction module. The post-intervention risk score is used as the observed state input to the state update module; the net effect value is used as the moderating factor input to the trajectory correction module; the time series prediction module adopts an encoder-decoder structure; the encoder converts the historical risk sequence into a hidden state representation; The decoder performs multi-step predictions based on the hidden states; The state update module fuses the predicted and observed values ​​using the Kalman filter algorithm; the trajectory correction module adaptively adjusts the predicted trajectory based on the net effect value; the adjustment magnitude is based on the size and direction of the effect value; and the long-term risk prediction trajectory is output.