Intelligent health management system for post-stroke depression
By applying data preprocessing, feature fusion, and bidirectional long short-term memory networks, the problems of feature distortion and dynamic dependence of physiological and psychological data in the post-stroke depression health management system were solved, enabling accurate risk assessment and personalized intervention, and improving the efficiency and accuracy of health management for post-stroke depression patients.
Patent Information
- Application Number
- CN202511809371.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-03
- Publication Date
- 2026-03-10
AI Technical Summary
The existing post-stroke depression health management system fails to effectively eliminate motion artifacts and device drift interference in the preprocessing of physiological signals, lacks standardized processing of psychological scale data, resulting in feature distortion, fails to achieve multi-dimensional integration of physiological and psychological data, makes it difficult to support in-depth correlation analysis, the assessment model cannot adapt to the dynamic changes in the patient's state, the intervention plan lacks a tiered design, and cannot achieve closed-loop management, resulting in a disconnect between the assessment results and the actual state.
The data preprocessing unit performs signal denoising and baseline calibration, psychological scale data is filled and standardized, multi-dimensional feature vectors are constructed through feature fusion engine, and the dynamic dependence between physiology and psychology is captured using a bidirectional long short-term memory network based on attention mechanism to generate a risk visualization map. The intervention program generation unit formulates a tiered intervention program to achieve closed-loop management.
It improves the accuracy of risk assessment, adapts to changes in patient condition, generates personalized intervention plans, meets the needs of dynamic monitoring and accurate assessment of post-stroke depression patients, and improves the efficiency and accuracy of health management.
Smart Images

Figure CN121641431A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of post-stroke depression health management technology, and more specifically, to an intelligent health management system for post-stroke depression. Background Technology
[0002] Post-stroke depression health management is an important technology, specifically applied to the status monitoring, risk prediction and personalized intervention of post-stroke depression patients. The core is to accurately integrate physiological and psychological data and capture dynamic correlation patterns to achieve accurate assessment and closed-loop management of depression risk, adapting to the core needs of post-stroke patients for dynamic evolution of depression and personalized intervention.
[0003] Current post-stroke depression health management suffers from several shortcomings. Firstly, physiological signal preprocessing fails to effectively eliminate motion artifacts and device drift interference. Secondly, psychological scale data lacks standardized processing, leading to feature distortion. Thirdly, it fails to construct multi-dimensional fusion features of physiological rhythms and psychological fluctuations, and it lacks temporal alignment with real-time psychological scores, hindering deep correlation analysis. Fourthly, assessment models cannot capture the dynamic dependence between physiological and psychological states through bidirectional temporal modeling, lack a focusing mechanism for key abnormal nodes, and are susceptible to noise interference, resulting in low accuracy in risk level assessment. Fifthly, fixed model parameters cannot adapt to dynamic changes in patient status through incremental learning, leading to biases in long-term assessments. Sixthly, risk results lack intuitive visualization, fail to explore the correlation patterns between risk and behavioral abnormalities, and lack tiered intervention design. Finally, it fails to establish a closed-loop management system between patients and medical institutions, ultimately resulting in a disconnect between assessment results and the actual patient condition, insufficient intervention targeting, and an inability to meet the needs of precise and personalized health management for post-stroke depression patients. To address these technical issues, we have developed an intelligent health management system for post-stroke depression. Summary of the Invention
[0004] The purpose of this invention is to provide an intelligent health management system for post-stroke depression to solve the problems mentioned in the background art.
[0005] To achieve the above objectives, a post-stroke depression intelligent health management system is provided, comprising:
[0006] The data preprocessing unit receives and preprocesses the patient's physiological signals and psychological scale data, generates time-domain features and frequency-domain features, and constructs a multi-dimensional feature vector based on the time-domain features and frequency-domain features.
[0007] The state assessment unit receives the patient's multi-dimensional feature vector and real-time psychological score. The real-time psychological score is obtained from psychological scale data. A bidirectional long short-term memory network based on attention mechanism is used to identify the patient's state based on the multi-dimensional feature vector and real-time psychological score to obtain the first feature. The bidirectional long short-term memory network based on attention mechanism captures the dynamic dependence between physiological signals and real-time psychological scores through temporal modeling, and uses attention mechanism to weight and focus the first feature, dividing the patient's state into multiple levels of probability distribution. The assessment of the bidirectional long short-term memory network based on attention mechanism is updated based on the multiple levels of probability distribution, and the multi-source feature predicts the risk level.
[0008] The risk prediction unit integrates multi-source features to predict risk levels and generates a risk visualization map.
[0009] The intervention plan generation unit generates a tiered intervention plan based on a risk level visualization map.
[0010] The patient interaction terminal unit is used to receive tiered intervention plans and achieve closed-loop management through the medical collaboration platform unit.
[0011] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0012] This invention employs a data preprocessing unit to denoise and calibrate physiological signals to eliminate interference, and to fill in and standardize psychological scale data to address feature distortion. A feature fusion engine normalizes and stitches together physiological time-domain and frequency-domain features, adds timestamps to align with psychological scores, and constructs joint physiological and psychological features. A bidirectional long short-term memory network captures the dynamic dependence of physiological and psychological factors, and an attention mechanism focuses on key abnormal nodes to improve risk assessment accuracy. An incremental learning engine compares new and old probability distributions, fine-tunes network parameters when thresholds are exceeded to adapt to changes in patient status. A risk mapping module fuses probability distributions and behavioral logs to generate heatmaps annotated with key events. An intervention plan generation unit develops tiered plans based on these heatmaps, and combined with closed-loop management, achieves precise intervention, meeting the needs of dynamic monitoring, precise assessment, and personalized intervention for post-stroke depression patients, and improving the efficiency and accuracy of health management. Attached Figure Description
[0013] Figure 1 This is an overall block diagram of the present invention.
[0014] The meanings of the labels in the diagram are as follows:
[0015] 1. Data preprocessing unit; 2. Status assessment unit; 3. Risk prediction unit; 4. Intervention plan generation unit; 5. Patient interaction terminal unit; 6. Medical collaboration platform unit. Detailed Implementation
[0016] 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.
[0017] This invention provides an intelligent health management system for post-stroke depression. Please refer to [link / reference]. Figure 1 As shown, it includes:
[0018] The data preprocessing unit 1 receives the patient's physiological signals and psychological scale data and performs preprocessing to generate time-domain features and frequency-domain features, and constructs a multi-dimensional feature vector based on the time-domain features and frequency-domain features.
[0019] State assessment unit 2 receives the patient's multi-dimensional feature vector and real-time psychological score. The real-time psychological score is obtained from psychological scale data. A bidirectional long short-term memory network based on attention mechanism is used to identify the patient's state based on the multi-dimensional feature vector and real-time psychological score, and obtain the first feature. The bidirectional long short-term memory network based on attention mechanism captures the dynamic dependence between physiological signals and real-time psychological scores through temporal modeling, and uses attention mechanism to weight and focus the first feature, divide the patient's state into multiple levels of probability distribution, and update the assessment of the bidirectional long short-term memory network based on attention mechanism based on multiple levels of probability distribution, and output multi-source feature prediction of risk level.
[0020] Risk prediction unit 3 integrates multi-source features to predict risk levels and generate risk visualization maps;
[0021] Intervention program generation unit 4 generates a tiered intervention program based on a risk level visualization map;
[0022] The patient interaction terminal unit 5 is used to receive tiered intervention plans and achieve closed-loop management through the medical collaboration platform unit 6.
[0023] The data preprocessing unit 1 performs signal denoising and baseline calibration on the physiological signals to eliminate motion artifacts and device drift interference. At the same time, it fills in missing values and standardizes the psychological scale data. The time domain features include the root mean square of the continuous difference in heart rate variability and the standard deviation of the interval between adjacent heartbeats. The frequency domain features include the spectral energy ratio of the respiratory signal and the power ratio of the low-frequency band to the high-frequency band.
[0024] The construction of multi-dimensional feature vectors is achieved through a feature fusion engine. This engine normalizes and concatenates the root mean square of continuous differences in time-domain features with the standard deviation of adjacent heartbeat intervals, and the ratio of spectral energy in frequency-domain features with the power ratio of low-frequency bands and high-frequency bands, to generate a joint feature vector containing physiological rhythm stability and psychological fluctuation trends. A timestamp is added to achieve alignment with real-time psychological scores.
[0025] The bidirectional long short-term memory network used in the state assessment unit 2 includes a forward propagation layer and a backward propagation layer. The forward propagation layer extracts the cumulative dependency features of physiological signals and psychological scores from the first time point to the current time point in a forward direction, while the backward propagation layer extracts the lagged association features from the future time point to the current time point in a backward direction. Through bidirectional temporal modeling, the evolution path of the depressive state implied in the dynamic dependency relationship is captured.
[0026] The first feature is obtained through the feature importance filtering module. The feature importance filtering module calculates the overlapping area on the time axis between the physiological signal center rate mutation interval and the period of sharp increase in psychological score. The segment with the signal amplitude variation coefficient exceeding the preset fluctuation threshold in the overlapping area is extracted as a high-weight feature node, which is used for input focusing of the attention mechanism.
[0027] The capture of dynamic dependencies is achieved through the gating mechanism of long short-term memory units. The input gate adjusts the input intensity of physiological signal features according to real-time psychological scores, the forget gate filters invalid features according to historical state assessment results, and the output gate fuses physiological and psychological association patterns across time steps to generate a hidden state vector representing the evolution of depression risk.
[0028] The attention mechanism performs a non-linear mapping of the first feature using a trainable weight matrix, calculates the similarity score between the feature at each time step in the hidden state vector and the first feature, and dynamically assigns attention weights based on the score.
[0029] The probability distribution of multiple levels is generated by a fully connected classification layer. The fully connected classification layer receives the first feature whose similarity score is lower than the preset similarity threshold and calculates the probability value of each depression level. The discrete levels of the probability distribution are divided according to clinical diagnostic criteria, and each level corresponds to a preset joint fluctuation range of physiological and psychological indicators.
[0030] The evaluation update of the bidirectional long short-term memory network is achieved through an incremental learning engine. This engine compares the newly generated probability distribution with the historical evaluation results. If the probability change of the same level in two consecutive evaluations exceeds the adaptive threshold, the network parameters are fine-tuned online, and the multi-source feature prediction risk level for the next period is recalculated based on the fine-tuned network.
[0031] The output of the risk level prediction by multi-source features is completed through the risk mapping module. This module integrates the probability distribution results of the status assessment unit with the patient's historical behavior log data, identifies the correlation pattern between the frequency of occurrence of consecutive high-risk levels in the probability distribution and behavioral abnormalities, and generates a risk heat map that marks the spatiotemporal nodes of key deterioration events.
[0032] It is necessary to further explain that, as the data entry point for the post-stroke depression intelligent health management system, the core function of the data preprocessing unit is to transform the raw physiological signals and psychological scale data into standardized, highly reliable feature data. This provides accurate input for the risk level identification of the subsequent state assessment unit. Raw data is easily affected by motion, equipment errors, and improper data entry. Without refined preprocessing, feature distortion and assessment result deviations will occur. Therefore, a hierarchical processing logic is needed to complete signal purification, data standardization, and feature extraction. The specific implementation method is as follows:
[0033] First, signal denoising and baseline calibration are performed on the physiological signals. The core objective is to eliminate two main types of interference: motion artifacts and device drift. Motion artifacts refer to noise caused by poor sensor contact or abnormal signal transmission due to patient movement during signal acquisition, manifesting as sudden spikes or irregular fluctuations in the signal. Device drift, on the other hand, is caused by the slow shift of the signal baseline due to hardware factors such as circuit heating and voltage fluctuations after prolonged sensor operation, causing the overall signal to deviate from the normal range. Denoising is performed using a wavelet transform algorithm, which can accurately separate the effective and noise components in the signal. The physiological signal is first decomposed into wavelet coefficients of different scales, where high-frequency coefficients correspond to noise such as motion artifacts, and low-frequency coefficients correspond to the true physiological signal. High-frequency coefficients are suppressed by a preset threshold (based on the normal fluctuation range of clinical physiological signals), while low-frequency effective coefficients are retained and reconstructed to obtain the smoothed signal after denoising. Baseline calibration is performed using a sliding window method.
[0034] Using a 10-second window as a unit, the average signal value within each window is calculated as a temporary baseline for that window. A continuous baseline curve is then generated using linear interpolation. The denoised signal is subtracted from the baseline curve at the corresponding time point to eliminate the influence of slow drift, ultimately obtaining a clean physiological signal with a stable baseline and no significant noise. Simultaneously, missing value imputation and standardization transformation are performed on the psychological scale data. Psychological scale data refers to the depression assessment scale results filled out by patients through an interactive terminal, including scores for multiple dimensions such as mood state, sleep quality, and loss of interest. Missing value imputation uses a multiple imputation method, first based on the valid data already filled out by the patient. Based on the distribution patterns of scale data from patients of the same age and with the same stroke course, five complete imputed data sets were generated. Each set of data was analyzed separately, and then the results of the five sets were merged by weighted averaging to ensure the rationality of the imputed values and avoid bias caused by single imputation. The standardization transformation adopted the Z-score standardization method to eliminate the dimensional differences of scores in different dimensions. First, the historical mean and standard deviation of each dimension of the scale were calculated (based on the massive amount of patient data accumulated by the system). Then, the original scores of each patient were converted into standard scores so that all dimension data follow a normal distribution with a mean of 0 and a standard deviation of 1, which facilitates subsequent fusion calculation with physiological signal characteristics.
[0035] After preprocessing the signal and scale data, time-domain and frequency-domain features were extracted. These two types of features characterize the patient's physiological state from the time and frequency dimensions, respectively. The time-domain features focus on the fluctuation patterns of physiological signals over time, with core features including the root mean square of the continuous difference in heart rate variability and the standard deviation of adjacent heartbeat intervals. Heart rate variability refers to the minute changes in the intervals between successive heartbeats, reflecting the state of autonomic nervous system function and closely related to depressive mood. The root mean square of the continuous difference is calculated by summing the squares of the differences between all adjacent heartbeat intervals, taking the average, and then taking the square root. This indicator primarily reflects the stability of short-term heart rate fluctuations. In specific calculations, the time intervals between every two heartbeats are first extracted from the pure heart rate signal and arranged in chronological order to form an interval sequence. Then, the difference between adjacent intervals is calculated sequentially. The sum of the squares of all differences is divided by the total number of differences to obtain the average. Finally, the square root of the average is taken to obtain the root mean square of the continuous differences. The standard deviation of adjacent heartbeat intervals is calculated by taking the standard deviation of all heartbeat intervals, reflecting the overall range of long-term heart rate fluctuations. The standard deviation is directly calculated from the extracted heartbeat interval sequence to obtain the time-domain characteristic value. The frequency-domain characteristic is revealed through spectral analysis to show the frequency distribution characteristics of the physiological signal. The heart includes the spectral energy ratio and the power ratio of the low-frequency band to the high-frequency band of the respiratory signal. First, a Fast Fourier Transform is performed on the pure respiratory signal to convert the time-domain signal into a frequency-domain spectrum. The amplitude corresponding to different frequencies in the spectrum represents the energy intensity of that frequency component. The spectral energy ratio refers to the ratio of the energy in the effective respiratory frequency range (clinically recognized normal respiratory frequency is 0.15-0.4 Hz) to the energy of the entire frequency range. This indicator can reflect the regularity of breathing. In the calculation, the amplitude of the 0.15-0.4 Hz interval is first extracted from the spectrum, that is, the total amplitude of that interval is calculated. The energy is then divided by the amplitude integral over the entire frequency range to obtain the spectral energy ratio. The low-frequency band to high-frequency band power ratio (LF / HF) requires first dividing the frequency bands: the low-frequency band is 0.04-0.15 Hz (mainly related to sympathetic nerve activity), and the high-frequency band is 0.15-0.4 Hz (mainly related to parasympathetic nerve activity). The spectral energy (i.e., power) in the two frequency bands is calculated separately, and then the low-frequency band power is divided by the high-frequency band power to obtain the ratio. This indicator can reflect the balance between the sympathetic and parasympathetic nervous systems (an abnormally high ratio is commonly seen in autonomic nervous system disorders in a depressive state).
[0036] Through the above series of processes, the data preprocessing unit transforms the originally messy raw data into standardized data containing four core features, laying the foundation for the subsequent feature fusion engine to build multi-dimensional feature vectors. This ensures that the fused features can comprehensively and accurately depict the stability of the patient's physiological rhythm and the trend of psychological fluctuations, providing reliable data support for the risk level identification of the status assessment unit.
[0037] After the data preprocessing unit completes physiological signal denoising, baseline calibration, and missing value imputation and standardization of psychological scale data, and extracts time-domain features (root mean square of continuous differences, standard deviation of adjacent heartbeat intervals) and frequency-domain features (spectral energy ratio, low-frequency band to high-frequency band power ratio), these scattered single-dimensional physiological features need to be integrated into a multi-dimensional feature vector through a feature fusion engine. This step is the core link in realizing the correlation analysis between physiological state and psychological trend, because isolated physiological features cannot directly match real-time psychological scores. However, the joint feature vector after normalization and timestamp alignment can simultaneously carry the correlation information between physiological rhythm stability and psychological fluctuations, laying the foundation for the bidirectional long short-term memory network of the subsequent state assessment unit to capture dynamic dependencies. The specific implementation method is as follows:
[0038] First, we clarify the core components of the feature fusion engine. It is a modular component integrating four sub-modules: data reading, normalization calculation, vector concatenation, and timestamp binding. These sub-modules work collaboratively through a data flow pipeline. The data reading module retrieves time-domain and frequency-domain feature data in batches from the output buffer of the data preprocessing unit, based on the patient's unique ID and acquisition time. The normalization calculation module eliminates the dimensional differences between different features. The vector concatenation module integrates the normalized features into a unified structure. The timestamp binding module aligns the engine with the real-time psychological scoring. The entire engine supports processing over 100 patient feature data points per second, meeting the system's real-time requirements. The core step is performing normalization concatenation on the time-domain and frequency-domain features. The purpose of normalization is to eliminate weight imbalances caused by differences in units and value ranges among different features. Here, the min-max normalization method is used. This method maps all feature values to a unified range of 0-1 while preserving the original relative fluctuation trend of the features. In specific implementation, the normalization calculation... The module first retrieves the distribution data of similar characteristics of patients with the same stroke course and age group from the engine's historical feature database over the past year. It determines the historical maximum and minimum values for each characteristic, updating this data quarterly to ensure compatibility with the latest clinical data. For the root mean square of continuous differences in the time domain, the historical maximum is preset to 100 milliseconds, corresponding to the extreme case of poor autonomic nervous system regulation, and the historical minimum is preset to 10 milliseconds, corresponding to the case of good regulation. The historical maximum of the standard deviation of adjacent heartbeat intervals is preset to 200 milliseconds, and the minimum to 50 milliseconds. For the spectral energy ratio in the frequency domain, the historical maximum is preset to 0.9 (corresponding to extremely stable breathing), and the minimum to 0.3 (corresponding to respiratory disturbances). The historical maximum of the low-frequency band / high-frequency band power ratio (LF / HF) is preset to 5.0 (corresponding to extreme sympathetic nervous system excitation), and the minimum to 0.5 (corresponding to a balance between the sympathetic and parasympathetic nervous systems). Then, normalization calculations are performed one by one according to the feature type.
[0039] Taking a patient's original root mean square value of continuous difference as 55 milliseconds as an example, the normalized value is (55-10) / (100-10) = 0.5 by calculating (original value - historical minimum value) / (historical maximum value - historical minimum value). If the original value of the patient's standard deviation of adjacent heartbeat interval is 125 milliseconds, the normalized value is (125-50) / (200-50) = 0.5. When the original value of the spectral energy ratio is 0.6, the normalized value is (0.6-0.3) / (0.9-0.3) = 0.5. When the original value of LF / HF is 2.75, the normalized value is (2.75-0.5) / (5.0-0.5) = 0.5. During the normalization process, if the original value of a patient's feature exceeds the range of historical maximum / minimum values, its normalized value is forcibly set to 1.0 / 0.0 to avoid the interference of extreme values on the subsequent model.
[0040] After normalizing all features, the vector concatenation module integrates the four normalized features into a joint feature vector in a fixed dimensional order. The preset order is: normalized root mean square of continuous differences → normalized standard deviation of adjacent heartbeat intervals → normalized spectral energy ratio → normalized LF / HF. This order is based on the correlation strength between the features and the depressive state. Root mean square of continuous differences and standard deviation of adjacent heartbeat intervals reflect the autonomic nervous system more directly and are therefore prioritized. Furthermore, the dimensional order can be adjusted via configuration files during system deployment to adapt to different clinical scenarios. For example, if all four normalized values for the aforementioned patient are 0.5, the concatenated feature vector would be [0.5, 0.5, 0.5, ...]. [0.5], each dimension of the vector corresponds to a clear physiological meaning. The first two dimensions reflect the physiological rhythm stability related to heart rate variability, and the latter two dimensions reflect the frequency characteristics of respiratory and autonomic nervous system coordination. The four dimensions together constitute a vector structure that can characterize the patient's comprehensive physiological state. To achieve alignment with real-time psychological scores, the timestamp binding module of the feature fusion engine adds a precise timestamp to each joint feature vector. The timestamp adopts the format YYYY-MM-DDHH:MM:SS.ms, and its value is consistent with the termination time of physiological signal acquisition, ensuring that the feature vector can match the psychological score data within the same time period. The specific alignment logic is as follows:
[0041] The timestamp binding module retrieves the patient's real-time psychological scores within 10 seconds before and after the feature vector timestamp from the psychological scale data buffer. If multiple scores exist within this time period, the average is taken as the aligned score, and the score is stored in association with the feature vector via timestamp. If no psychological score exists within 10 seconds, it is marked as pending alignment. The association is automatically completed after the patient fills in the information, avoiding mismatches between physiological characteristics and psychological states due to time misalignment. Through the above normalization concatenation and timestamp binding, the feature fusion engine finally generates a multi-dimensional feature vector that not only eliminates the dimensional differences between different physiological characteristics, ensuring that subsequent models can treat each feature fairly, but also achieves time alignment. This establishes a connection between physiological data and psychological assessment data, enabling vectors to simultaneously carry joint information on the stability of physiological rhythms and the trend of psychological fluctuations. For example, a patient's feature vector is [0.2, 0.3, 0.4, 1.0]. Combined with aligned real-time psychological scores, it can intuitively reflect the patient's physiological state, which includes stable heart rate fluctuations (low root mean square of continuous differences and normalized value of standard deviation of adjacent heartbeat intervals), slightly disordered breathing (low spectral energy ratio), and sympathetic nerve excitation (high normalized value of LF / HF). This corresponds to the psychological assessment results of moderate depression, providing structured and highly correlated input data for subsequent dynamic dependency capture and risk level identification of the state assessment unit.
[0042] After the feature fusion engine generates a multi-dimensional feature vector containing physiological rhythm stability and psychological fluctuation trends, and aligns it with the timestamp of the real-time psychological score, the state assessment unit needs to perform deep modeling of these time-series data through a bidirectional long short-term memory network. The core advantage of this network is that it can extract features from both the positive and negative directions of the time axis simultaneously, making up for the limitation of traditional unidirectional LSTM which can only capture dependencies in the positive direction. This allows for a more comprehensive exploration of the dynamic correlation between physiological signals and psychological scores, and is particularly suitable for the characteristics of post-stroke depression, where physiological changes precede psychological responses. The specific implementation method is as follows:
[0043] First, we clarify the overall structure of the bidirectional Long Short-Term Memory (LSTM) network, which includes a forward propagation layer and a backward propagation layer operating in parallel. These two layers share input data but process data in opposite directions. Ultimately, feature fusion yields the complete hidden state at each time step. The forward propagation layer processes data from the first time step to the current time step, focusing on extracting cumulative dependency features—that is, the cumulative impact of physiological and psychological characteristics from historical time steps on the current state over time. The backward propagation layer processes data from future time steps to the current time step, focusing on extracting lagged correlation features—that is, the lagged impact of physiological and psychological characteristics from future time steps on the current state. These two layers work together to fully characterize the evolution path of the depressive state. The process of the forward propagation layer extracting cumulative dependency features from the first time step to the current time step is as follows:
[0044] The feedforward layer first receives the time-series data output by the feature fusion engine, sorts it by timestamp in ascending order, forming an input sequence of length N (usually N=24) covering 24 time points within a 2-hour period. The input data for each time step consists of a multi-dimensional feature vector (4-dimensional: normalized root mean square of continuous differences, standard deviation of adjacent heartbeat intervals, spectral energy ratio, LF / HF) and a real-time psychological score (1-dimensional: standardized PHQ-9 sub-items or total score). These are combined into a 5-dimensional input vector to ensure that each time step contains joint physiological and psychological information. The feedforward LSTM unit performs gated computation, with one LSTM unit corresponding to each time step. The unit achieves control over cumulative dependencies through the collaborative work of input gates, forget gates, and output gates. For feature extraction, the input gate dynamically adjusts the input intensity of physiological signal features based on the real-time psychological score at the current time step. If the psychological score indicates an worsening of depressive tendencies, the input weights of heart rate variability features (root mean square of continuous differences, standard deviation of adjacent heartbeat intervals) are increased, making the model pay more attention to fluctuations in autonomic nervous function. The forget gate filters out invalid features based on historical state assessment results. If the fluctuations in physiological features at time step t-1 are within the normal range, the impact of that feature on the current state is forgotten, retaining only abnormal fluctuation features. The output gate fuses the current input vector with the hidden state at time step t-1 to generate the forward hidden state for the current time step. The dimension is set to 64, the optimal dimension validated through clinical data. This hidden state contains the data from... The cumulative dependency features from t1 to the current t, such as the current forward hidden state of t, integrate the physiological and psychological correlation information of all time steps from t1 to the current t. The forward layer passes the forward hidden states generated at each time step to the next time step in chronological order until the current time step t is processed, ultimately forming a forward hidden state sequence of length N and dimension 64. Each element in the sequence carries the cumulative dependency information of the corresponding time step. The backpropagation layer extracts the lagged correlation features from the future time point to the current time point in reverse. The structure is the same as the forward layer, but the processing logic is reversed. It is also implemented in three steps. The first step is to reverse the input sequence. The backpropagation layer first reverses the input sequence of the forward layer from largest to smallest timestamp. At this time, the future time... The current point in time becomes the starting point for processing, and the current time point becomes the object of subsequent processing, ensuring that the lagged effects can be captured from the future. The second step is the gating calculation of the backward LSTM unit. The parameters of the backward LSTM unit are independent of the forward layer to avoid interference between forward and backward features, but the gating mechanism logic is adapted to the backward sequence. The input gate will adjust the current input intensity according to the physiological characteristics of the future time step. If the current spectral energy ratio of the future time step t is less than or equal to 0.3 (extreme respiratory disorder), the input weight of the respiratory feature at the current time step t-2 will be increased, because respiratory disorder usually reflects the depressive state with a lag. The forgetting gate filters out invalid features of the future time step. If the current psychological score of the future time step t is normal (standardized score less than or equal to 0), the forgetting gate will be used to filter out the invalid features of the future time step.5) Then, the influence of this feature on the current time step t-1 is forgotten, and only the correlation information of future abnormal scores is retained. The output gate fuses the current input vector of the reverse sequence with the hidden state of the future time step to generate the backward hidden state of the current time step (also 64-dimensional). This hidden state contains the lagged correlation features from t future to t current. The third step is the lagged feature propagation. The backward layer propagates the backward hidden state generated at each time step in reverse time order (from t current to t1), finally forming a backward hidden state sequence of length N and dimension 64. Each element in the sequence carries the lagged correlation information of the corresponding time step. Through bidirectional temporal modeling, the evolution path of the depressive state hidden in the dynamic dependency relationship is captured. The core of this approach is the fusion and analysis of the forward and backward hidden states. First, the hidden states are concatenated. For each time step t (t1 to the current t), the forward hidden state (64 dimensions) and the backward hidden state (64 dimensions) are concatenated dimensionally to form a 128-dimensional fused hidden state. This state simultaneously contains the cumulative dependency from t1 to t and the lagged correlation from t to the current t, effectively providing full-sequence temporal information for each time step, avoiding the information loss of unidirectional modeling. Second, dynamic dependency identification is performed. By analyzing the temporal change trend of the fused hidden state, the mutual influence between physiological signals and psychological scores is explored. For example, if the forward cumulative feature in the fused hidden state at time step t3 shows continuous differences... The root-normalized value decreased from 0.3 at t1 to 0.1 at t3 (reduced heart rate variability, autonomic inhibition). The backward lag characteristic showed that the psychological score at time step t4 increased from 0.8 to 1.3 (depression worsened). This reveals a dynamic dependency relationship: decreased heart rate variability → increased psychological score 20 minutes later. This relationship is a typical signal of worsening depressive state. Finally, the evolutionary path of depressive state is generated. Based on the dynamic dependency relationship across all time steps, key turning points are sequentially linked (e.g., a sudden increase in LF / HF at t2, a sudden decrease in the root mean square difference of continuous differences at t3, and a sudden increase in psychological score at t4), forming an evolutionary path from normal at t1 → physiological abnormalities at t2 → physiological deterioration at t3 → psychological abnormalities at t4. Each inflection point is labeled with corresponding physiological and psychological characteristic values, providing a clear basis for subsequent risk level assessment. Throughout the bidirectional temporal modeling process, network parameters are optimized through pre-training and fine-tuning. The pre-training phase uses time-series data from 100,000 patients with post-stroke depression accumulated by the system, employing a cross-entropy loss function to train the network, enabling the model to initially grasp the dynamic correlation between physiological and psychological factors. The fine-tuning phase adjusts parameters based on historical data of current patients through incremental learning, ensuring the model adapts to individual differences. Through this bidirectional modeling approach, the state assessment unit can accurately capture the complete evolutionary path of depressive states from physiological abnormalities to psychological deterioration, providing in-depth temporal evidence for subsequent risk level classification and intervention plan generation.
[0045] After completing bidirectional temporal modeling and initially capturing the dynamic dependencies between physiological and psychological states in the bidirectional long short-term memory network, to avoid the subsequent attention mechanism being misdirected among massive temporal features, a feature importance screening module is needed to extract high-value primary features from complex temporal data. These nodes are turning points in the evolution of depressive states, usually manifested as the simultaneous occurrence of abnormal physiological signals and changes in psychological scores. Therefore, the core logic of the module is to first locate the temporal overlap region of physiological and psychological abnormalities, and then screen out feature fragments with drastic fluctuations from them to ensure that the attention mechanism can accurately focus on key information. The specific implementation method is as follows:
[0046] First, the core processing object of the feature importance screening module is clearly defined: the combined physiological and psychological time-series data after data preprocessing and bidirectional temporal modeling. This includes time-stamped heart rate signal sequences, respiratory signal sequences, and real-time psychological score sequences (with a uniform time step interval of 5 minutes, covering 24 time points within 2 hours). The module completes the first feature extraction through the collaboration of the abnormal interval localization submodule and the high-fluctuation segment screening submodule. The two submodules share the time axis coordinate system to ensure time alignment between intervals and segments. The first step is for the abnormal interval localization submodule to calculate the overlapping area on the time axis between the heart rate mutation interval in the physiological signal and the period of sharp increase in psychological score. The heart rate mutation interval refers to a continuous period in which the heart rate signal fluctuates beyond the clinically normal fluctuation range within a short period of time (usually within 10 seconds). The clinically normal fluctuation range is set based on the heart rate baseline of post-stroke patients, with a resting heart rate of 60-80 beats / minute and a single fluctuation not exceeding 15 beats / minute. A sliding window method is used for specific localization.
[0047] Using a window length of 2 seconds and a step size of 1 second, the standard deviation of the heart rate signal in each window is calculated. If the standard deviation of a window exceeds 15 beats / minute (a preset mutation threshold), the window is marked as a mutation candidate window. Consecutive mutation candidate windows are merged to form continuous heart rate mutation intervals. The starting point of the interval is the start timestamp of the first mutation candidate window, and the ending point is the end timestamp of the last mutation candidate window. For example, if windows 10:02:00-10:02:02 and 10:02:01-10:02:03 are both mutation candidates, the merged interval is 10:02:00-10:02:03. A sharp increase in psychological score refers to a continuous period in which the increase in real-time psychological score exceeds a preset amplitude threshold within two adjacent time steps (5 minutes apart). The preset amplitude threshold is set based on the standardized psychological score. During localization, the psychological scores of adjacent time steps are calculated first. If the difference between the heart rate mutation intervals and the psychological score increase intervals is greater than or equal to 0.8, the current time step is marked as a candidate time step for a sharp increase. The time periods corresponding to consecutive candidate time steps for sharp increases are merged to form a period of sharp increase in psychological score. For example, if the score difference between time steps t3 and t4 is greater than or equal to 0.8, the corresponding time period is 10:10:00-10:20:00, which is a period of sharp increase. After locating the heart rate mutation interval and the period of sharp increase in psychological score, the overlapping area of the two needs to be calculated on the same time axis. First, the timestamps of the two intervals are converted into millisecond values, and then the interval intersection algorithm is used to determine whether there is an overlap. If the start time of the heart rate mutation interval is less than or equal to the end time of the period of sharp increase in psychological score, and the end time of the heart rate mutation interval is greater than or equal to the start time of the period of sharp increase in psychological score, then it is determined that there is an overlap. The start time of the overlapping area is the maximum value of the start time of the two intervals, and the end time is the minimum value of the end time of the two intervals. For example, if the heart rate mutation interval is 10:05:00-10:05:10 (corresponding to millisecond values AB), and the period of sharp increase in psychological score is 10:05:05-10:05:12 (corresponding to millisecond values CD), then the overlapping region is 10:05:05-10:05:10 (corresponding to max(A,C)-min(B,D)). This region is a critical period in which physiological abnormalities and psychological changes occur simultaneously, and it reflects the turning point of depressive state better than a single abnormal interval. The second step uses the high-fluctuation segment screening submodule to extract segments within the overlapping region whose signal amplitude variation coefficient exceeds a preset fluctuation threshold, and these segments are used as high-weight feature nodes.The coefficient of variation (COP) is a dimensionless indicator that measures the intensity of signal fluctuations. It is calculated by dividing the standard deviation of a signal segment by its mean (to avoid misjudgments of fluctuations caused by differences in signal means). It comprehensively reflects the dispersion of the signal within a segment; a larger COP indicates more severe signal fluctuations, which is more likely to be a key characteristic of changes in depressive states. The preset fluctuation threshold is set based on the distribution of COPs of normal clinical physiological and psychological signals. Through statistical analysis of data from 1000 stroke patients without depressive tendencies, the normal COP range was determined to be 0.1-0.2. Therefore, the preset fluctuation threshold was set to 0.3 (50% higher than the upper limit of the normal range, ensuring that only significantly abnormal segments are selected). The specific screening process consists of three steps:
[0048] The first step is to segment the overlapping region, dividing the overlapping region into several continuous signal segments in units of 1 second. For example, the overlapping region from 10:05:05 to 10:05:10 is divided into 5 segments of 1 second each. Each segment contains the heart rate signal sampling points within that 1 second (50 samplings per second, for a total of 50 data points), the respiratory signal spectrum energy ratio (the average value within 1 second), and the real-time psychological score (a stable value within 1 second; since the psychological score is filled in at a long interval, linear interpolation is used here to supplement the 1-second data). This ensures that each segment contains the combined physiological and psychological characteristics. The second step is coefficient of variation calculation. For each segment, the coefficient of variation of the heart rate signal, the coefficient of variation of the respiratory spectrum energy ratio, and the coefficient of variation of the psychological score are calculated separately. Taking the heart rate segment as an example, the mean and standard deviation of 50 sampling points are calculated first, and then the standard deviation is divided by the mean to obtain the heart rate coefficient of variation. The calculation logic for the coefficient of variation of respiratory and psychological scores is the same. Finally, the average of the three coefficients of variation is taken as the comprehensive coefficient of variation of the segment to avoid misjudgment caused by fluctuation of a single feature. The third step is threshold screening. The comprehensive coefficient of variation of each segment is compared with the preset fluctuation threshold (0.3). If the comprehensive coefficient of variation is ≥0.3, the segment is determined to be a high fluctuation segment. For all high fluctuation segments, their timestamp range, corresponding heart rate / respiratory / psychological score feature values, and the specific value of the comprehensive coefficient of variation are recorded. This information is encapsulated into high-weight feature nodes, and each node is accompanied by a unique identifier to ensure that the subsequent attention mechanism can accurately locate and focus on these nodes. Through the logic of locating overlapping abnormal intervals and screening high-fluctuation segments, the feature importance screening module can accurately extract the first feature strongly correlated with the evolution of depressive state from massive time-series data. For example, the comprehensive coefficient of variation of an overlapping region segment of a patient is 0.45 (exceeding the threshold of 0.3). The heart rate fluctuation of this segment suddenly increases from 65 beats / minute to 85 beats / minute, and the psychological score increases from a standardized 0.7 to 1.3. Such nodes can directly reflect the physiological and psychological linkage changes of the worsening depressive tendency, providing a clear target for the subsequent weighted focus of attention mechanism, avoiding the model from wasting computational resources in normal time-series features, and improving the accuracy of state assessment.
[0049] The specific implementation of the Long Short-Term Memory (LSTM) unit gating mechanism for capturing dynamic dependencies: After the feature importance screening module extracts high-weight feature nodes, the bidirectional Long Short-Term Memory network needs to further bind these discrete nodes to the dynamic dependencies in continuous temporal data through the LSTM unit gating mechanism. This is because the first feature only marks the period of physiological and psychological synchronization abnormalities, while the evolution of post-stroke depression is a continuous process of long-term interaction between physiological signals and psychological scores. A gating mechanism is needed to precisely control the storage, forgetting, and output of temporal information in order to fully capture this dynamic association across time steps. This provides structured temporal information for the subsequent attention mechanism to focus on key dependencies. The specific implementation is as follows:
[0050] First, we clarify the core structure and input / output logic of the LSTM unit gating mechanism. Each LSTM unit corresponds to a time step in the time series data (5-minute interval). Its core consists of cell state and hidden state. Cell state is like a long-term memory bank for time series information, capable of storing physiological and psychological dependencies across multiple time steps. Hidden state is a short-term memory carrier. By combining the information of the current time step with the long-term information of the cell state, a vector representing the dynamic dependencies of the current time step is generated. The gating mechanism coordinates the updating of cell state and hidden state through three independent control modules: input gate, forget gate, and output gate. The inputs of the three gating modules are the current time step input vector and the hidden state of the previous time step. The current time step input vector is the 5-dimensional data (4-dimensional physiological features and 1-dimensional real-time psychological score) output by the feature fusion engine. The previous time step hidden state is the 64-dimensional vector output by the previous LSTM unit (containing physiological and psychological correlation information of time step t-1). Through the interaction of these two types of inputs, the gating mechanism can achieve accurate capture of dynamic dependencies. The capture of dynamic dependencies revolves around the continuous updating of cell states. The overall process consists of three steps: First, the forget gate determines which historical dependency information to forget from the cell state; second, the input gate determines which current dependency information to add to the cell state; and third, the output gate generates a hidden state vector containing cross-time step relationships based on the updated cell state and the current input. Through these three steps, the cell state can smoothly transfer physiological and psychological dependencies from earlier time steps to subsequent time steps, like a conveyor belt, while continuously integrating new dependency information, ultimately forming a dynamic dependency chain that spans the entire time series. This avoids the loss of early key dependencies due to short-term memory bottlenecks in traditional time-series models. The input gate adjusts the input intensity of physiological signal features based on real-time psychological scores, with the core goal of allowing the model to dynamically focus on physiological features that are more representative of the current state under different depressive states. The real-time psychological score is a standardized PHQ-9 scale score (0-2, 0 for no depression and 2 for severe depression). It directly reflects the degree of depressive tendency at the current time step. The input gate calculates feature input weights based on this score to achieve differentiated input control of the four-dimensional physiological features (normalized root mean square of continuous difference, standard deviation of adjacent heartbeat interval, spectral energy ratio, LF / HF). In specific implementation, the input gate first concatenates the real-time psychological score of the current time step with the four-dimensional physiological features to form a 6-dimensional adjustment vector; then, it maps the adjustment vector through the sigmoid activation function, outputting four weight values between 0 and 1 (corresponding to the four-dimensional physiological features respectively). The characteristic of the sigmoid function is that the larger the input value (the more severe the depressive tendency), the closer the output weight is to 1, and vice versa.For example, when the standardized value of the real-time psychological score is 1.5 (corresponding to moderate depression), the input gate calculates the weights of the root mean square of continuous differences (a core indicator of heart rate variability) as 0.8, the standard deviation of adjacent heartbeat intervals as 0.7, the spectral energy ratio as 0.5, and the LF / HF as 0.6. This means that the input intensity of the root mean square of continuous differences and the standard deviation of adjacent heartbeat intervals is significantly enhanced (high weight), and the model will pay more attention to the association between these two physiological features and the depressive state. If the real-time psychological score is only 0.3 (corresponding to mild depression), the weights of all physiological features drop to 0.3-0.4. At this time, the model's dependence on physiological signals decreases, and it focuses more on the changes in the psychological score itself. Subsequently, the input gate multiplies these weight values element-wise with the physiological feature vector of the current time step to obtain a weighted physiological feature vector, which is then concatenated with the current psychological score to form the final effective input vector of the current time step, completing the dynamic adjustment of the physiological signal input intensity. The forgetting gate filters invalid features based on the historical state evaluation results. The core is to remove historical information in the cell state that is meaningless to the current dependency relationship, avoiding redundant information interference. The historical state assessment results specifically refer to the hidden state and cellular state of the previous time step. The hidden state of the previous time step contains the physiological and psychological association patterns of time step t-1, while the cellular state stores long-term dependency information prior to t-1. The criterion for the forgetting gate to judge invalid features is whether the historical feature falls within the normal clinical fluctuation range. If it falls within this range, it indicates that the historical feature is a normal physiological or psychological fluctuation and has no reference value for the evolution of the current depressive state, so it needs to be filtered. If it exceeds the range, it is a valid abnormal feature and needs to be retained. In specific implementation, the forgetting gate first extracts the dimensions corresponding to the physiological features in the hidden state of the previous time step (in the 64-dimensional hidden state, 16 dimensions correspond to historical physiological features, 16 dimensions correspond to historical psychological scores, and 32 dimensions correspond to association patterns), and calculates the mean of these dimensions. If the mean falls within the normal range, the forgetting gate outputs a weight close to 0 through the sigmoid activation function. This weight is multiplied element-wise with the historical dependency information stored in the cellular state, causing this part of the information to be forgotten (a weight of 0.1 means that only 10% of the historical information is retained). If the mean exceeds the normal range, a weight close to 1 is output, retaining most of the historical dependency information. For example, if the physiological characteristics of the previous time step are all within normal fluctuations (root mean square of continuous differences 0.5, standard deviation of adjacent heartbeat intervals 0.55), the forgetting gate weight is 0.1, and only a small amount of normal physiological dependency information stored in the cell state before t-1 is retained to avoid consuming cell state resources; if the mean LF / HF of the previous step is 0.9 (abnormal), the weight is 0.9, and this abnormal dependency information is largely retained for dynamic correlation analysis in the current time step. The output gate integrates physiological and psychological correlation patterns across time steps to generate a hidden state vector representing the evolution of depression risk. The core is to deeply integrate the long-term dependencies stored in the cell state with the short-term information of the current time step to form a structured vector that reflects the continuous evolution of the depressive state.In practice, the output gate first processes the updated cell state (long-term memory adjusted by the forgetting gate and the input gate) using the tanh activation function. The tanh function maps cell state values to between -1 and 1, highlighting anomalous dependency information. Then, the output gate combines the current time-step input vector with the previous time-step hidden state and calculates the output weights (64 dimensions, consistent with the hidden state dimensions) using the sigmoid activation function. These weights are used to filter the integrated information; association patterns with a significant impact on the evolution of depression risk have output weights close to 1, while patterns with a small impact have weights close to 0. Finally, the output gate multiplies the tanh-processed cell state element-wise with the output weights to obtain the hidden state vector for the current time-step. Each dimension of this vector corresponds to a cross-time-step physiological and psychological association pattern. The vector as a whole comprehensively represents the evolution path of depression risk from the first time-step to the current time-step, providing precise temporal feature input for the subsequent attention mechanism to focus on key association patterns. Through the coordinated operation of the input gate, forget gate, and output gate, the gating mechanism of the LSTM unit can accurately capture the dynamic dependence between physiological signals and psychological scores in the time dimension. This avoids redundant interference from normal temporal information and ensures the complete transmission of abnormal correlation patterns. The generated hidden state vector becomes the core carrier for characterizing the evolution of depression risk, providing a temporal basis that is both continuous and targeted for the subsequent risk level classification of the state assessment unit.
[0051] The specific implementation of the attention mechanism for weighted focusing on the first feature involves generating a hidden state vector representing the evolution of depression risk in the Long Short-Term Memory (LSTM) unit through a gating mechanism. After the feature importance screening module extracts high-weight feature nodes, the state assessment unit relies on the attention mechanism to accurately focus on information strongly correlated with the first feature from the full-time-series features of the hidden state vector. This is because the hidden state vector contains physiological and psychological correlation patterns at all time steps, including both key abnormal information and a large number of normal fluctuation noise features. The attention mechanism's weighted focusing is needed to strengthen the influence of key nodes on state classification while weakening noise interference, ensuring that subsequent depression risk level classification can accurately anchor the abnormal evolution path. The specific implementation method is as follows:
[0052] First, the attention mechanism performs a non-linear mapping on the first feature through a trainable weight matrix. The core is establishing a dimensional relationship and non-linear adaptation between key nodes and the hidden state vector. The trainable weight matrix is a parameter matrix used in the attention mechanism to transform the dimension of the first feature and capture complex relationships. Its dimension must match the dimensions of the first feature and the hidden state. Assuming the high-weight feature node is 128-dimensional (containing core information such as timestamps, physiological feature values, psychological scores, and comprehensive coefficient of variation), and the hidden state vector output by the LSTM unit is 64-dimensional, then the weight matrix is set to a 128×64 two-dimensional matrix. Each element in the matrix is a parameter that can be updated through model training. In the initial stage, the Xavier initialization method is used (to ensure that the variance of input and output is consistent in the early stage of training and avoid gradient vanishing) to assign values to the elements. During the training stage, the backpropagation algorithm is used to adjust the values based on the error of state classification. The parameter values are dynamically adjusted so that the matrix can gradually learn the nonlinear relationship between key nodes and hidden states. The nonlinear mapping process is divided into two steps. The first step is linear dimension transformation. The attention mechanism inputs the 128-dimensional original vector of each high-weight feature node into the trainable weight matrix. Through matrix multiplication, the 128-dimensional vector is transformed into a 64-dimensional linear mapping vector. This step unifies the dimensions of the key node and hidden state vectors, laying the foundation for subsequent similarity calculation. The second step is nonlinear enhancement. The linear mapping vector is input into the ReLU activation function (RectifiedLinearUnit, which sets negative values to 0 and retains positive values), and outputs a 64-dimensional nonlinear relationship vector. The core purpose of introducing the ReLU activation function is to adapt to the complex correlation patterns of physiological and psychological characteristics. For example, the linear mapping value corresponding to the heart rate mutation dimension of a key node is positive, while the linear mapping value corresponding to the normal fluctuation dimension is negative. After ReLU activation, the negative normal dimension value is set to 0 (noise removal), while the positive abnormal dimension value is retained and strengthened. This allows the nonlinear correlation vector to retain the abnormal core information of the key node and to be used for subsequent calculations on the same dimension as the hidden state vector. For example, after obtaining the linear mapping vector from the original vector of a key node through matrix multiplication, ReLU activation removes the negative dimension corresponding to normal respiratory fluctuations, while retaining the positive dimensions corresponding to sudden increases in heart rate and psychological scores, forming a more accurate correlation vector. After completing the nonlinear mapping, the similarity score between the features of each time step in the hidden state vector and the first feature is calculated. The similarity score is a quantitative indicator that measures the degree of correlation between the hidden state of a single time step and the key node. The higher the score, the closer the physiological and psychological correlation pattern of that time step is to the abnormal pattern of the key node, and the greater the reference value for the classification of depressive states.The calculation employs a dot product similarity algorithm (suitable for rapid comparison of vectors of the same dimension and effectively reflecting the consistency of vector direction). Specifically, each time step vector in the hidden state vector sequence is first extracted (assuming 24 time steps, each 64-dimensional). Then, each time step vector is element-wise multiplied with the nonlinear association vector of the key node. Finally, all multiplication results are summed to obtain the similarity score for that time step. For example, the hidden state vector at time step t8 (containing the association pattern of sudden increase in heart rate and moderate increase in psychological score) is element-wise multiplied with the nonlinear association vector of the key node (containing the core pattern of sudden change in heart rate and sharp increase in psychological score), and the sum yields a score of 6.3. The hidden state vector at time step t15 (containing the pattern of normal heart rate and slight fluctuation in psychological score) is multiplied with the association vector and the sum yields a score of 1.2. This indicates that the similarity between time step t8 and the key node is much higher than that of time step t15, and its association pattern is closer to the key abnormal information of the evolution of the depressive state. If multiple high-weight feature nodes exist, the similarity score between each time step and each key node needs to be calculated separately. The average of the three scores is then taken as the final similarity score for that time step, ensuring coverage of the impact of all key anomaly patterns. Finally, attention weights are dynamically allocated based on the similarity scores to achieve weighted focusing and noise suppression of key nodes. The attention weight is a weight value assigned to the hidden state at each time step, ranging from 0 to 1, with the sum of all time step weights being 1. Similarity scores greater than or equal to 3 are considered high, and similarity scores less than 3 are considered low. The weight directly determines the contribution of the feature at that time step to the subsequent state classification. In specific implementation:
[0053] The first step is weight normalization, which involves inputting the similarity scores of all time steps into the softmax activation function. This function can convert the scores into a probability distribution. The higher the score of a time step, the closer the output weight is to 1, and the lower the score, the closer it is to 0. For example, among the 24 time steps, time step t8 scored 6.3 (the highest), and after softmax processing, its weight was 0.28 (accounting for 28%). Time step t15 scored 1.2 (lower), and its weight was 0.03 (accounting for 3%). The weights of the remaining normal time steps were all below 0.05, achieving differentiated weight allocation. The second step is weighted focusing, which multiplies the hidden state vector of each time step element-wise with the corresponding attention weight to obtain a weighted hidden state vector. In high-weight time steps, the dimensionality of abnormal association patterns is significantly amplified, greatly enhancing its impact on state classification. In low-weight time steps, the dimensionality of normally fluctuating noise is weakened, having almost no impact on the classification result. The third step is feature integration, which sums all weighted hidden state vectors by time step to obtain an attention-weighted feature vector. In this vector, the time steps corresponding to key nodes contribute more than 80% of the information, while the noise information of normal time steps accounts for less than 20%, effectively achieving the focusing of key information and noise suppression. Through the aforementioned logic of nonlinear mapping, similarity calculation, and weight allocation, the attention mechanism can accurately enhance the guiding role of the first feature in state classification. For example, when determining the risk level in the subsequent fully connected classification layer, the attention-weighted feature vector will prioritize the abnormal association patterns at key time steps such as t8 and t10, rather than the noise at normal time steps such as t15. This significantly improves the accuracy of depression risk level assessment and avoids problems such as misjudging mild depression as moderate or missing moderate depression as mild due to noise interference. It provides reliable feature input for subsequent risk prediction and intervention plan generation.
[0054] The specific implementation of the fully connected classification layer for generating the probability distribution of depression levels: After the attention mechanism completes the weighted focusing of the first feature and outputs an attention-weighted feature vector that retains only the core abnormal information, the state assessment unit needs to map this abstract temporal feature vector into a concrete probability distribution of each depression level through the fully connected classification layer. This step is a key bridge connecting feature analysis and clinical risk assessment, because although the weighted feature vector carries information related to physiological and psychological abnormalities, it needs to be transformed into a probability value that can be directly used for risk determination through parameter learning of the classification layer and mapping to clinical standards, ensuring that the subsequent risk prediction results conform to the logic of clinical diagnosis. The specific implementation is as follows:
[0055] First, we clarify the core structure and functional positioning of the fully connected classification layer. It is a neural network layer consisting of an input layer, a hidden layer (optional, which can be omitted in the basic scenario to simplify calculation), and an output layer. Its core feature is full connectivity, meaning that each neuron in the previous layer is connected to all neurons in the next layer, ensuring that all dimensions of the attention-weighted feature vector are utilized comprehensively, avoiding the omission of key abnormal features. Considering the clinical needs of post-stroke depression risk assessment, the number of neurons in the input layer needs to match the dimension of the attention-weighted feature vector (the hidden state output by the LSTM unit mentioned earlier is 64-dimensional, and remains 64-dimensional after attention weighting, hence the input layer has 64 neurons). The number of neurons in the output layer corresponds to the number of discretized depression levels, which are usually divided into 4 levels according to clinical diagnostic criteria (no depression, mild depression, moderate depression, and severe depression). Therefore, the output layer has 4 neurons, each corresponding to a predicted depression level. If higher assessment accuracy is required, one hidden layer can be added (with 32 neurons, using the ReLU activation function to enhance nonlinear fitting ability). In the basic scenario, the hidden layer is omitted, and efficient calculation is achieved directly through the two-layer structure of the input and output layers. The process of generating multiple probability distribution levels in the fully connected classification layer is based on linear transformation and activation function mapping, implemented in two steps. The first step is linear transformation. The classification layer uses a trainable weight matrix and bias term to convert the 64-dimensional attention-weighted feature vector into a 4-dimensional linear prediction vector. The trainable weight matrix is a 64×4 two-dimensional parameter matrix (the number of rows matches the number of neurons in the input layer, and the number of columns matches the number of neurons in the output layer). Initially, the He initialization method (adapting to the characteristics of the ReLU activation function and avoiding gradient vanishing in the early training stage) is used to assign values to the matrix elements. During the training phase, the backpropagation algorithm dynamically adjusts the parameters based on the cross-entropy loss between the probability distribution prediction results and the actual clinical diagnosis results. For example, when the model misclassifies moderate depression as mild depression, the loss value increases, and backpropagation will specifically adjust the parameters of the column corresponding to moderate depression in the weight matrix to make subsequent predictions more accurate. The bias term is a 4-dimensional vector (corresponding to 4 depression levels), initially set to 0.1 (to avoid excessively extreme initial prediction values), and is also updated during training. The specific calculation of the linear transformation is as follows:
[0056] The attention-weighted feature vector is multiplied by the weight matrix, and then element-wise added to the bias term to obtain a 4-dimensional linear prediction vector. Each element of this vector corresponds to an original predicted value for the depression level (the value has no range limit and can be positive or negative). The second step is activation function mapping. The linear prediction vector is input into the softmax activation function, which outputs four probability values between 0 and 1, and the sum of the four probability values is 1, forming a probability distribution for multiple levels. The core function of the softmax function is to achieve probability normalization, ensuring that the probability value of each level reflects both the prediction confidence of that level and conforms to probabilistic statistical logic. For example, if the linear prediction vector is [1.2, 2.5, 0.8, 0.3], after softmax mapping, the output probability distribution is [0.15, 0.6, 0.18, 0.07]. The probability of 0.6 corresponding to mild depression is the highest, indicating that the model has the highest confidence in judging the patient as having mild depression. The key reason for introducing the softmax activation function is to adapt to multi-classification scenarios. The four levels of post-stroke depression are mutually exclusive categories (patients belong to only one level). Softmax can ensure the mutual exclusivity and integrity of the probability distribution through normalization, avoiding contradictory results where multiple levels have high probabilities. In the specific process of receiving the attention-weighted feature vector and calculating the probability values of each depression level in the classification layer, it is necessary to ensure the validity of the input data and the continuity of the calculation. First, the attention mechanism synchronously transmits the 64-dimensional weighted feature vector to the input layer of the fully connected classification layer via a data bus. During transmission, feature validity marking is attached (if the proportion of outliers in the feature vector exceeds 30%, it is marked as invalid, the calculation is paused, and the data preprocessing unit is fed back for reprocessing). After receiving the feature vector, the input layer neurons pass the feature value of each dimension to all neurons in the output layer. Each output layer neuron independently calculates the sum of the input feature value multiplied by the corresponding weight matrix elements and the bias term. The linear prediction value corresponding to each neuron is obtained. For example, if the first neuron in the output layer corresponds to no depression, the sum of the products of all input features and the elements in the first column of the weight matrix is calculated, and the first-dimensional bias term is added to obtain the linear prediction value for the no-depression level. After the four output layer neurons complete the linear prediction value calculation, the results are simultaneously input into the softmax function. The function performs normalization processing on the four values and finally outputs the probability values of each depression level, for example, no depression 0.12, mild depression 0.58, moderate depression 0.25, and severe depression 0.05. This probability distribution is stored in real time in the probability result buffer of the state evaluation unit for subsequent network evaluation updates and risk level output. The discretization level of the probability distribution must be strictly divided according to the clinical diagnostic criteria, and each level corresponds to a preset joint fluctuation range of physiological and psychological indicators to ensure that the probability distribution is highly consistent with the actual clinical diagnosis.The clinical diagnostic criteria here are based on the internationally recognized PHQ-9 depression assessment scale. Taking into account the specific physiological characteristics of post-stroke patients, the depressive state is discretized into four levels: Level 1, no depression, corresponding to a raw PHQ-9 score of 0-4 and a standardized psychological score of 0-0.2; Level 2, mild depression, corresponding to a PHQ-9 score of 5-9 and a standardized psychological score of 0.2-0.4; Level 3, moderate depression, corresponding to a PHQ-9 score of 10-14 and a standardized psychological score of 0.4-0.8; and Level 4, severe depression, corresponding to a PHQ-9 score of 15 or higher and a standardized psychological score of 0.8-2.0. The combined fluctuation range of physiological and psychological indicators corresponding to each discrete level needs to be determined by statistically analyzing the clinical physiological and psychological data of more than 1000 patients with post-stroke depression. This ensures that the range accurately represents the physiological characteristics of each level. The combined range for no depression level is as follows: psychological score 0-0.2, normalized root mean square difference of continuous differences in physiological indicators 0.4-0.6 (stable heart rate variability), normalized standard deviation of adjacent heartbeat intervals 0.4-0.6 (normal long-term heart rate fluctuations), normalized spectral energy ratio 0.6-0.8 (stable breathing), and normalized LF / HF 0.5-0.7 (sympathetic-parasympathetic balance). The combined range for mild depression level is as follows: psychological score 0.2-0.4, normalized root mean square difference of continuous differences in physiological indicators 0.3-0.4 (slightly reduced heart rate variability), and standard deviation of adjacent heartbeat intervals 0.3-0.4 (slightly abnormal long-term heart rate fluctuations). The combined interval for moderate depression is as follows: psychological score 0.4-0.8, root mean square difference of continuous differences in physiological indicators 0.2-0.3 (significantly reduced heart rate variability), standard deviation of adjacent heartbeat intervals 0.2-0.3 (significantly abnormal long-term heart rate fluctuations), spectral energy ratio 0.4-0.5 (respiratory disturbances), LF / HF 0.9-1.2 (sympathetic nerve excitation); the combined interval for severe depression is as follows: psychological score 0.8-2.0, root mean square difference of continuous differences in physiological indicators 0-0.2 (extremely low heart rate variability), standard deviation of adjacent heartbeat intervals 0-0.2 (extremely abnormal long-term heart rate fluctuations), spectral energy ratio 0.3-0.4 (extremely disordered breathing), LF / HF 1.2-2.0 (extremely excited sympathetic nerves).These joint intervals are stored in the parameter configuration file of the fully connected classification layer as reference thresholds for level determination. During the training phase, they are used to guide the optimization of the weight matrix parameters, and during the inference phase, they are used to verify the rationality of the probability distribution results. Through the above logic of structural design, linear transformation, activation mapping, and clinical standard binding, the fully connected classification layer can accurately transform the attention-weighted core features into probability distributions for each depression level, and ensure the clinical applicability of the results through the constraint of clinical joint intervals. For example, when the probability distribution shows that the probability of moderate depression is the highest, its corresponding physiological and psychological characteristics must fall within the joint interval of moderate depression, avoiding the contradiction of the probability level being out of sync with the indicator interval. This provides risk level data with both quantitative basis and clinical significance for the subsequent risk prediction unit to generate visualization maps and the intervention plan generation unit to formulate tiered plans.
[0057] The specific implementation of the incremental learning engine for updating the bidirectional long short-term memory network assessment: After generating the probability distribution of each depression level in the fully connected classification layer, the bidirectional long short-term memory network is not fixed. The physiological and psychological state of post-stroke depression patients will dynamically change with the recovery process, intervention effects, or fluctuations in the condition. If the network parameters are fixed for a long time, they may not be able to adapt to these dynamic changes, leading to a disconnect between the subsequent assessment results and the patient's actual state. Therefore, it is necessary to use an incremental learning engine to achieve real-time updates of the network assessment to ensure that the model always fits the patient's current state. The specific implementation is as follows:
[0058] First, we clarify the core positioning and structure of the incremental learning engine. It is a model optimization module specifically designed for dynamic time-series data. Unlike the traditional one-time full training mode, it can fine-tune key parameters based solely on newly generated evaluation data (probability distribution, physiological and psychological time-series data) without retraining the entire bidirectional long short-term memory network. This reduces computational costs and allows for rapid adaptation to state changes. The engine comprises four sub-modules: a historical evaluation result storage module, a difference comparison module, an online parameter fine-tuning module, and a re-evaluation calculation module. These four modules interact synchronously via a data bus to ensure the continuity of the update process. The historical module stores past evaluation data, the comparison module analyzes the differences between new and old data, the fine-tuning module optimizes network parameters, and the re-evaluation module generates updated risk levels, forming a closed-loop update logic of storage-comparison-fine-tuning-recalculation. The evaluation and update process of the bidirectional long short-term memory network (LSTM) is implemented through an incremental learning engine. This process is centered on periodic triggering and differential driving. The evaluation cycle is set at 2 hours based on clinical monitoring needs (i.e., physiological and psychological time-series data are collected every 2 hours, generating a probability distribution). The incremental learning engine automatically starts after each new probability distribution is generated. It first retrieves historical evaluation results and compares them with the new results to determine if fine-tuning of the network is needed. If no fine-tuning is needed, the new probability distribution is directly used as the current evaluation result. If fine-tuning is needed, the network parameters are optimized, the risk level for the current cycle is recalculated using the new parameters, and the new results are stored in the history module to provide a basis for the next update. The entire process requires no manual intervention, and the fine-tuning time is controlled within 1 minute, without affecting the system's real-time evaluation efficiency. The specific process of the incremental learning engine comparing the newly generated probability distribution with historical evaluation results requires first clarifying the definitions of the newly generated probability distribution and historical evaluation results:
[0059] The newly generated probability distribution is the 4-dimensional depression level probability value output by the fully connected classification layer within the current assessment period, accompanied by the timestamp of the current period and the input physiological and psychological time-series data fragments; the historical assessment results are the 5 most recent assessment data retained in the historical assessment results storage module (if more than 5 are included, the earliest data is deleted by timestamp to avoid data redundancy). Each data entry includes the probability distribution of the corresponding period, timestamp, snapshot of network parameters at that time (key parameters of LSTM unit gating weight matrix and fully connected layer weight matrix), and a summary of the patient's physiological and psychological characteristics at that time. During the comparison, the difference comparison module first filters out the most recent historical assessment results by timestamp (i.e., the assessment data from the previous 2-hour period) to ensure that the comparison objects are results from two consecutive periods, avoiding bias caused by cross-period comparisons. Then, it performs probability difference calculations for the same level. For each of the four depression levels, it calculates the absolute value of the difference between the probability value of that level in the new probability distribution and the corresponding level probability value in the historical results (i.e., the probability change for the same level, such as a historical probability of 0.4 for mild depression and a new probability of 0.6, a change of 0.2). Simultaneously, the module extracts summaries of physiological and psychological characteristics corresponding to the old and new results to help verify whether the probability change is caused by a change in the actual state (rather than data collection error). For example, if the probability change is accompanied by a continuous increase in the root mean square of the difference from 0.3 to 0.5 (recovery of heart rate variability), the change is considered reasonable; otherwise, it needs to be marked as a suspicious difference, requiring further verification of data validity. During the comparison process, an adaptive threshold is used to determine whether the difference is significant. The adaptive threshold is a dynamically generated critical value based on the patient's historical probability fluctuation characteristics, used to distinguish between probability fluctuations caused by changes in the actual state and small fluctuations caused by accidental data errors, avoiding unnecessary network fine-tuning triggered by accidental fluctuations. The calculation logic for the adaptive threshold is as follows:
[0060] The historical assessment results storage module retrieves the probability change values of the same level from the three most recent assessments, calculates the average of these changes, and then multiplies it by 1.5 (an amplification factor to allow for some fluctuation) as the adaptive threshold for the current cycle. If the patient's historical data is less than three times, the system's preset initial threshold (0.15, a reasonable upper limit of fluctuation based on a large amount of post-stroke patient data) is used. For example, if the probability change values of a patient's three most recent mild depression levels are 0.1, 0.08, and 0.12, with an average of 0.1, the adaptive threshold would be 0.1 × 1.5 = 0.15. This means that a significant difference is only considered when the probability change of mild depression between the old and new cycles exceeds 0.15. When the probability change of the same depression level exceeds the adaptive threshold in two consecutive assessments, the incremental learning engine triggers online fine-tuning of the bidirectional long short-term memory network. Two consecutive assessments refer to two consecutive comparisons between the current period and the previous period, and between the previous period and the period before that, where the probability change of the same depression level exceeds the threshold, avoiding fine-tuning triggered by a single accidental difference. Online fine-tuning refers to making minor optimizations to key network parameters without interrupting the system's assessment service, rather than retraining the entire network. The core is to balance parameter update efficiency and assessment stability. The specific implementation process of online fine-tuning focuses on the network's core parameters:
[0061] First, the online parameter fine-tuning module retrieves snapshots of the input data corresponding to the two most recent evaluations (i.e., physiological and psychological time-series data from these two periods, including preprocessed physiological signals, real-time psychological scores, and multi-dimensional feature vectors) from the historical evaluation result storage module as training data for fine-tuning (the data volume is small, covering only time-series data within 4 hours, ensuring rapid completion of fine-tuning); second, the range of parameters to be fine-tuned is determined, targeting only the gating weight matrix of the bidirectional LSTM unit (weights of the input gate, forget gate, and output gate, a total of 3 sets of 64×64 matrices) and the weight matrix of the fully connected classification layer (64×4 matrix), without adjusting the network structure to avoid disrupting the original modeling logic; subsequently, a small learning rate (0.001, much lower than...) is used. To prevent drastic parameter fluctuations from causing sudden changes in assessment results, the initial training parameter value was set to 0.01. Based on the cross-entropy loss function (using the actual physiological and psychological states of the two assessments as labels, with labels provided by clinicians or the system based on feature summaries), the parameters were iteratively optimized in three rounds. In each iteration, fine-tuned training data was input into the network, the loss value between the predicted probability distribution and the labels was calculated, and the parameters were adjusted using the backpropagation algorithm to gradually reduce the loss value, enabling the network to better fit the patient's recent state changes. Finally, after fine-tuning, the online parameter fine-tuning module stored the new parameters as a snapshot of the current parameters, overwriting historical snapshots, and synchronized it to the bidirectional long short-term memory network and the fully connected classification layer, replacing the original parameters and completing the online update. After online fine-tuning, the multi-source feature predicted risk level for the next period needs to be recalculated based on the fine-tuned network. The next period is the next two hours after the current assessment period (maintaining consistency with the original assessment period to ensure temporal continuity). The purpose of recalculation is to verify the effectiveness of the fine-tuned network and generate the latest risk level that fits the patient's current state. The specific process is as follows:
[0062] The reassessment calculation module first triggers the patient interaction terminal unit and physiological signal acquisition device to collect physiological signals (heart rate, respiration) and psychological scale data (patients fill out the PHQ-9 scale through the terminal) for the next cycle. Subsequently, the data preprocessing unit performs denoising, baseline calibration, missing value imputation, and standardization transformation on the newly collected data according to the original process, generating time-domain features, frequency-domain features, and multi-dimensional feature vectors, and aligning them with the timestamps of the real-time psychological scores. Next, the fine-tuned bidirectional long short-term memory network performs bidirectional temporal modeling on the new multi-dimensional feature vectors, extracting cumulative dependency features and lagged correlation features. The feature importance screening module simultaneously extracts high-weight feature nodes, and the attention mechanism weights and focuses on the nodes. Finally, the fine-tuned fully connected classification layer receives the attention-weighted feature vectors, calculates and outputs a new probability distribution of depression level. This distribution is the multi-source feature prediction risk level for the next cycle, which is simultaneously stored in the historical assessment results module and pushed to the risk prediction unit to generate the latest risk visualization map, providing a basis for subsequent intervention program adjustments. Through the comparison-fine-tuning-recalculation logic of the incremental learning engine, the bidirectional long short-term memory network can continuously adapt to the dynamic state changes of post-stroke depression patients, avoiding assessment bias caused by model solidification. For example, if a patient's psychological score decreases after intervention, the network parameters can be fine-tuned to quickly capture this positive change, resulting in a decrease in the probability of mild depression and an increase in the probability of no depression in the subsequent probability distribution. This ensures that the assessment results are always highly consistent with the patient's actual state, providing reliable model support for the system's long-term health management.
[0063] The specific implementation method for multi-source feature-predicted risk level output and risk heatmap generation is as follows: After the bidirectional long short-term memory network is fine-tuned and optimized by an incremental learning engine to generate multi-source feature-predicted risk levels (i.e., probability distribution of depression level) adapted to the patient's current state, the abstract probability data needs to be transformed into intuitive and clinically interpretable visualization results through the risk mapping module. Although the probability distribution output by the state assessment unit can quantify risk, clinicians and patients find it difficult to directly perceive the risk evolution trend and key abnormal nodes through numbers. The risk heatmap can integrate multi-source data (probability distribution, behavioral log) into spatiotemporally correlated graphical information, clearly marking key events that worsen the depressive state, providing an intuitive basis for the generation of subsequent intervention plans. The specific implementation method is as follows:
[0064] First, we need to clarify the core positioning and structure of the risk mapping module. It is the core component connecting status assessment and risk visualization. Unlike a simple data display module, its core value lies in the integrated processing of data fusion, pattern mining, and visualization annotation, enabling it to uncover hidden risk correlation patterns from multi-source data. The module comprises three collaborative sub-modules: the data fusion sub-module integrates probability distribution and behavioral log data; the association pattern recognition sub-module mines the accompanying relationship between consecutive high-risk levels and behavioral abnormalities; and the heatmap generation sub-module transforms the correlation results into a graphical interface annotating key events. The module's input data includes two types: first, multi-source feature-predicted risk levels pushed by the status assessment unit (i.e., a 4-dimensional depression level probability distribution, with assessment period timestamps and corresponding physiological and psychological feature summaries); and second, patient historical behavioral log data. The output is a risk heatmap adapted to clinical scenarios (supporting both hourly and daily time granularities; hourly granularity is used for real-time monitoring, and daily granularity for weekly review), along with an association pattern report to ensure that the visualization results are supported by data. The output of multi-source feature-predicted risk levels is completed through the risk mapping module. The overall process follows a closed-loop logic of data reception, fusion and association, map generation, and output synchronization. The first step is data reception and verification. The risk mapping module receives the latest multi-source feature-predicted risk levels sent by the status assessment unit in real time through the system data bus. At the same time, it retrieves historical behavioral data from the patient behavior log database according to the patient's unique ID and the range of 7 days before and after the current assessment period. After receiving the data, the module's data verification unit verifies the integrity of both types of data. If there is any missing data, a data retransmission request is triggered to ensure that the input data is valid. The second step is data preprocessing and time alignment. Since the probability distribution is generated at 2 hours / cycle (assessment cycle), while the behavior log is recorded in real time, alignment needs to be achieved by classifying time intervals. The current and historical 7-day time axis is divided into 84 time intervals at 2-hour intervals (7 days × 12 cycles / day). Each interval corresponds to the probability distribution of an assessment cycle. At the same time, the behavior logs are assigned to the corresponding intervals according to the occurrence timestamps. The number of behavioral abnormalities in each interval is counted to form preliminary correlation data of time interval - probability distribution - number of behavioral abnormalities. The third step is data fusion and pattern recognition. The data fusion submodule integrates the probability distribution of each interval with the abnormal behavior data into a multi-source feature fusion package. The association pattern recognition submodule analyzes the fusion package to uncover the correlation between continuous high-risk levels and abnormal behavior. The fourth step is heat map generation and output. The heat map generation submodule constructs a map containing annotations of key deterioration events based on the fused data and association patterns. It is then simultaneously pushed to the risk prediction unit, patient interaction terminal, and medical collaboration platform to complete the visualization output of the risk level predicted by multi-source features.The specific process of integrating the probability distribution results of the state assessment unit with the patient's historical behavior log data in the risk mapping module requires first clarifying the definition and composition of the patient's historical behavior log data. This data comprises behavioral data recorded by the patient through the system's interactive terminal or automatically collected by the system, covering four core categories of information: 1) psychological scale completion behavior; 2) intervention plan execution behavior; 3) daily life behavior data; and 4) system interaction behavior. Each log entry includes a timestamp accurate to the minute, a behavior type label, and patient operation notes (optional, such as "Patient notes: dizziness today, did not practice"). Data is stored in a distributed behavior log database, supporting rapid retrieval by time range and behavior type. The integration process is implemented in three steps:
[0065] The first step is behavior log filtering and classification. The data fusion submodule first cleans the retrieved historical behavior logs, removing invalid logs and retaining valid logs. Then, it classifies the valid logs according to the type of behavioral abnormality, such as scale-related abnormalities, sleep abnormalities, and intervention execution abnormalities, to facilitate subsequent correlation analysis. The second step is probability distribution feature extraction. For the 4-dimensional probability distribution of each time interval, it extracts the high-risk probability value (the sum of the probabilities of moderate and severe depression, with a preset high-risk threshold of 0.3, i.e., when the high-risk probability is ≥0.3, the interval is judged as a high-risk period) and the risk level change trend (the difference in high-risk probability between the current interval and the previous interval, with positive values indicating increased risk and negative values indicating decreased risk). These two features are used as the core representatives of the probability distribution to simplify the fusion dimensions. The third step is to link and integrate multi-source data, linking the high-risk probability value and risk level change trend of each time interval with the behavioral abnormality type and the number of abnormalities. For example, if the high-risk probability of the interval 10:00-12:00 is 0.37 (≥0.3, high-risk cycle) and the risk change trend is 0.12 (risk increases), and the corresponding behavioral abnormalities are 1 missed questionnaire and 1 sleep deprivation, then the data is integrated into the interval 10:00-12:00, with a high-risk probability of 0.37, an increased risk of 0.12, and abnormal behaviors [missed questionnaire, sleep deprivation]. At the same time, a physiological feature summary is added to each fused data item to achieve a three-dimensional fusion of probability, behavior, and physiology, avoiding the one-sidedness of a single data dimension. The specific process of identifying the correlation patterns between the frequency of consecutive high-risk levels and behavioral abnormalities in the probability distribution, and generating a risk heatmap annotated with key deterioration events, requires first defining core concepts: consecutive high-risk levels refer to a high-risk probability ≥0.3 (high-risk threshold) for two or more consecutive assessment periods (i.e., 4 hours or more); frequency of occurrence refers to the percentage of consecutive high-risk period segments within the most recent 84 intervals; the correlation pattern of behavioral abnormalities refers to the accompanying pattern between specific combinations of behavioral abnormalities and the occurrence of consecutive high-risk levels; key deterioration events refer to the core events that trigger consecutive high-risk levels, serving as the trigger for the deterioration of the depressive state; spatiotemporal nodes refer to the specific time of occurrence of key events and their corresponding state characteristics, marked with specific symbols in the heatmap; the risk heatmap is a visual graph with time as the horizontal axis and risk level as the vertical axis, using color depth to represent risk probability, and overlaying key event annotations. In specific implementation, correlation pattern recognition precedes heatmap generation.
[0066] The first step is to screen for continuous high-risk cycles. The association pattern recognition submodule traverses the high-risk probability values in chronological order from the fused data of 84 time intervals, marks all high-risk cycles (≥0.3), and then merges the continuous high-risk cycles into continuous high-risk segments. It then calculates the start / end time, the number of duration cycles, and the average high-risk probability within each segment, while recording the abnormal behavior data of the first 1-2 cycles of each segment (because abnormal behavior usually precedes the deterioration of risk). The second step is the association analysis between the abnormal behavioral sequences and high-risk segments. Using the Apriori sequence mining algorithm, consecutive high-risk segments are considered as outcome sequences, and the abnormal behaviors in the preceding 1-2 cycles are considered as preceding sequences. The probability of their association (i.e., the probability of the outcome sequence appearing after the preceding sequence) is calculated. For example, if the preceding sequences are interval 3 (missed questionnaires) and interval 4 (missed questionnaires and sleep deprivation), the probability of subsequent consecutive high-risk segments (intervals 5-7) is 85%. Therefore, the pattern of preceding abnormal sequences → consecutive high-risk sequences is marked as a strong association pattern. If the association probability is <30%, it is marked as a weak association pattern. Simultaneously, spurious associations are eliminated using clinical knowledge. The third step is the localization of critical deterioration events. Core preceding abnormalities are extracted from the strong association patterns, and their time intervals and state characteristics are determined as the spatiotemporal nodes of critical deterioration events. That is, the abnormal behavior at this node is the main trigger for subsequent risk deterioration. The generation process of the risk heatmap consists of five steps:
[0067] The first step is to construct the coordinate axis and color system. The horizontal axis is the time axis, marked with the dates of the most recent 7 days and time scales of 2 hours per grid, for a total of 84 grids. The vertical axis is the risk level axis, marked from bottom to top as no depression (high risk probability 0-0.3), mild depression (0.3-0.5), moderate depression (0.5-0.8), and severe depression (0.8-1.0). Each level corresponds to a specific color (no depression: light yellow, mild: pale yellow, moderate: orange, severe: red), and the color depth increases with the increase of the high risk probability. The second step is to fill in the risk colors. Based on the high risk probability of each time interval, the corresponding grid on the horizontal axis and the corresponding cell on the vertical axis are filled with color: for example, the high risk probability of 0.37 for the interval May 20th 10:00-12:00 corresponds to the mild depression level and is filled with light yellow; the high risk probability of 0.52 for the interval 12:00-14:00 corresponds to the moderate depression level and is filled with light orange, ensuring that the risk status of each interval is intuitively visible. The third step is to label key deterioration events. Specific symbols are added next to the time cells corresponding to the identified key deterioration event spatiotemporal nodes: Behavioral abnormalities are labeled with red triangles, and a floating notification box next to the symbol displays event details; sudden physiological and psychological changes are labeled with blue circles, and the notification box shows that on May 20th, from 14:00 to 16:00, heart rate variability increased from 0.3 to 0.1, psychological score increased from 0.35 to 0.7, and the high-risk probability rose to 0.52. The fourth step is to add association pattern legends. Association pattern legends are added to the right side of the graph, with textual explanations of strong association patterns to help doctors quickly understand the risk triggers. The fifth step is to optimize the interactive functions, allowing users to click on any time cell to view the complete data for that interval (probability distribution, behavioral logs, physiological characteristics), and click on the marked symbols to view the complete chain of events. It also supports switching the time granularity by day / week (the weekly granular map averages the high-risk probability of each day and uses color bars to represent the risk trend throughout the day), adapting to different clinical needs. The final generated map is saved in PNG format, and a detailed data report in PDF format (including the specific values of each interval and statistical correlation patterns) is also output and pushed to various terminals to ensure that clinicians and patients can clearly understand the risk evolution trend and key intervention points.
[0068] In this invention, the data preprocessing unit denoises and calibrates the patient's physiological signals, standardizes the psychological scale data, constructs a multi-dimensional vector containing joint physiological and psychological features and aligns the timestamps, the state assessment unit uses an attention mechanism bidirectional long short-term memory network to capture the dynamic dependence of physiological and psychological factors, focuses on the first feature, outputs the probability distribution of depression level, and adapts to changes in patient state through incremental learning, the risk prediction unit generates a risk visualization map annotated with key events, the intervention plan generation unit formulates a tiered plan based on this, and realizes a closed loop of health management through the patient interaction terminal and the medical collaboration platform, improving the accuracy and personalization of post-stroke depression management.
[0069] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.
Claims
1. A post-stroke depression intelligent health management system, characterized in that, The application relates to a physiological and psychological state risk prediction system and method. The data preprocessing unit (1) receives physiological signals and psychological scale data of a patient and performs preprocessing to generate time domain features and frequency domain features, and constructs a multidimensional feature vector according to the time domain features and the frequency domain features; The state evaluation unit (2) receives the multidimensional feature vector of the patient and real-time psychological scores obtained from the psychological scale data, and performs state recognition on the multidimensional feature vector and the real-time psychological scores by using a bidirectional long short-term memory network based on an attention mechanism, to obtain first features, wherein the bidirectional long short-term memory network based on the attention mechanism captures the dynamic dependence relationship between the physiological signals and the real-time psychological scores through time series modeling, and uses the attention mechanism to weight and focus on the first features, divides the state of the patient into a probability distribution of multiple levels, and updates the evaluation of the bidirectional long short-term memory network based on the attention mechanism based on the probability distribution of multiple levels, and outputs a multi-source feature prediction risk level; The risk prediction unit (3) fuses the multi-source feature prediction risk level and generates a risk visualization atlas; The intervention scheme generation unit (4) generates a step-by-step intervention scheme according to the risk level visualization atlas; The patient interaction terminal unit (5) is used for receiving the step-by-step intervention scheme and realizing closed-loop management through the medical collaboration platform unit (6).
2. The post-stroke depression intelligent health management system according to claim 1, characterized in that: The data preprocessing unit (1) performs signal denoising and baseline calibration processing on the physiological signals to eliminate motion artifacts and device drift interference, simultaneously performs missing value filling and standardization conversion on the psychological scale data, the time domain features include the continuous difference root mean square and the adjacent heartbeat interval standard deviation of heart rate variability, and the frequency domain features include the frequency spectrum energy ratio and the low frequency band to high frequency band power ratio of the respiratory signal.
3. The post-stroke depression intelligent health management system according to claim 2, characterized in that: The construction of the multidimensional feature vector is realized through a feature fusion engine, which normalizes and splices the continuous difference root mean square and the adjacent heartbeat interval standard deviation in the time domain features, the frequency spectrum energy ratio and the low frequency band to high frequency band power ratio in the frequency domain features, generates a joint feature vector containing physiological rhythm stability and psychological fluctuation trend, and adds a time stamp mark to realize alignment with the real-time psychological scores.
4. The post-stroke depression intelligent health management system according to claim 3, characterized in that: The bidirectional long short-term memory network used by the state evaluation unit (2) contains a forward propagation layer and a backward propagation layer, the forward propagation layer extracts cumulative dependence features of the physiological signals and the psychological scores from a first time point to a current time point in a forward direction, the backward propagation layer extracts lag correlation features from a future time point to the current time point in a reverse direction, and the dynamic dependence relationship is captured through bidirectional time series modeling to obtain the depression state evolution path hidden in the dynamic dependence relationship.
5. The post-stroke depression intelligent health management system according to claim 4, characterized in that: The first feature is obtained through a feature importance screening module, which calculates the overlapping area of the heart rate mutation interval of the physiological signals and the steep increase period of the psychological scores on a time axis, extracts a segment with a signal amplitude variation coefficient exceeding a preset fluctuation threshold in the overlapping area as a high-weight feature node, and inputs the high-weight feature node into the attention mechanism for focused input.
6. The post-stroke depression intelligent health management system according to claim 5, characterized in that: The capturing of the dynamic dependency is realized by the gating mechanism of long short-term memory units, the input gate adjusts the input strength of physiological signal features according to real-time psychological scores, the forget gate filters invalid features according to historical state evaluation results, and the output gate fuses the physiological and psychological correlation patterns across time steps to generate a hidden state vector representing the evolution of depression risk.
7. The post-stroke depression intelligent health management system according to claim 6, characterized in that: The attention mechanism nonlinearly maps the first features through a trainable weight matrix, calculates the similarity scores of each time step feature in the hidden state vector with the first features, and dynamically allocates attention weights according to the similarity scores.
8. The post-stroke depression intelligent health management system according to claim 7, characterized in that: The multiple levels of probability distribution are generated by a fully connected classification layer, which receives the first features with similarity scores lower than a preset similarity threshold and calculates the probability values of each depression level, wherein the discrete levels of the probability distribution are divided according to clinical diagnosis standards, and each level corresponds to a preset joint fluctuation interval of physiological and psychological indicators.
9. The post-stroke depression intelligent health management system according to claim 8, characterized in that: The evaluation and update of the bidirectional long short-term memory network are realized by an incremental learning engine, which compares the newly generated probability distribution with the historical evaluation results, and if the probability of the same level changes by more than an adaptive threshold in two consecutive evaluations, the online fine-tuning of network parameters is triggered, and the risk level of the multi-source feature in the next period is recalculated based on the fine-tuned network.
10. The post-stroke depression intelligent health management system according to claim 9, characterized in that: The output of the multi-source feature prediction risk level is completed by a risk mapping module, which fuses the probability distribution results of the state evaluation unit and the historical behavior log data of the patient, identifies the association pattern between the occurrence frequency of continuous high-risk levels in the probability distribution and behavior abnormalities, and generates a risk heat map of the labeled key deterioration event space-time nodes.
Citation Information
Patent Citations
Medical risk assessment system and method based on multi-source data analysis
CN119650056A
Depression state assessment method and device based on heart rate variability characteristics and parallel neural network
CN120114060A
Self-injury behavior early warning and intervention method and system based on multi-modal physiological data and AI
CN120565057A
Depression symptom assessment method and system based on multi-modal physiological data
CN120636806A