A method for predicting depression risk in patients with chronic diseases

Through the combination of nonlinear transformation and adaptive switching factors combined with sliding window mechanism, local fragment characteristics are constructed, and a fully connected neural network is used to predict the risk of depression in chronic diseases, solving the problems of insufficient generalization capabilities of models and insufficient dynamic modeling in the existing technology, and achieving more accurate risk assessment.

CN120299720BActive Publication Date: 2025-09-02THE AFFILIATED HOSPITAL OF SHANDONG UNIV OF TCM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510779228.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-12
Publication Date
2025-09-02
Estimated Expiration
2045-06-12

AI Technical Summary

Technical Problem

The prior art has problems such as strong subjectivity, long cycles, delayed response, insufficient generalization ability of model and lack of dynamic modeling mechanisms in the prediction of depression risk in chronic diseases, making it difficult to achieve individualized and dynamic management, and it is not possible to effectively characterize the complex nonlinear interaction between multiple data.

Method used

The deviation sequence of factor data is converted into high-dimensional feature sequences, the tension value and overall tension mean are calculated, the adaptive switching factor is introduced to adjust the activation intensity, and the fusion feature sequence is obtained by combining phase transformation. Local fragments are divided through the sliding window mechanism, local complexity and trend curvature are calculated, local control factors are introduced to generate multi-scale path weights, and prediction is performed using a fully connected neural network.

Benefits of technology

It improves the accuracy and stability of the prediction of depression risk in patients with chronic diseases, and can more accurately capture the dynamic changes in factor data, and realize individualized and dynamic risk assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120299720B_ABST
    Figure CN120299720B_ABST
Patent Text Reader

Abstract

The present invention proposes a method for predicting depression risk in patients with chronic diseases, which relates to the field of predicting depression risk in patients with chronic diseases. The process for predicting depression risk in patients with chronic diseases proposed in the present invention includes constructing a dataset for predicting depression risk in patients with chronic diseases, constructing a deviation sequence based on the median value of each factor data, mapping it into a high-dimensional feature sequence, calculating its tension value and the overall tension mean, introducing an adaptive switching factor and a nonlinear phase transformation to obtain a fused feature sequence, using a sliding window to extract local segments of the fused feature sequence, calculating the local complexity and trend curvature of the local segments, introducing a local control factor, generating multi-scale path weights, weightedly fusing the local segments, generating the final feature representation of each factor data, inputting a fully connected neural network to calculate the predicted value of depression risk in patients with chronic diseases for each factor data, and taking the mean as the final predicted value. This method can synergistically utilize local changes and overall trends to enhance prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of depression risk prediction for patients with chronic diseases, and specifically relates to a method for predicting depression risk for patients with chronic diseases. Background Art

[0002] The depression risk in patients with chronic diseases refers to the possibility that individuals are more likely to experience depression or develop clinical depression due to the physical pain, decreased quality of life and increased psychological stress brought about by long-term diseases. This depression risk will aggravate the condition of the chronic disease itself, reduce treatment compliance, and increase complications and disability rates. Timely and accurate prediction of the depression risk in patients with chronic diseases can help medical teams intervene early and develop personalized physical and mental treatment plans, which can not only improve the patient's mental health status, but also significantly improve the effectiveness of chronic disease management and improve the patient's quality of life.

[0003] The prediction of depression risk in patients with chronic diseases mainly relies on regular psychological questionnaires, manual interviews and other means, which have problems such as strong subjectivity, long cycle, and delayed response, making it difficult to achieve individualized and dynamic management. Although the prediction models of some machine learning methods have improved the level of automation to a certain extent, the existing methods fail to effectively represent the complex nonlinear interactions between multiple data, resulting in insufficient model generalization ability. Secondly, there is a lack of dynamic modeling mechanism for the evolution of the status of chronic disease patients, making it difficult to capture the key changes from stable accumulation to sudden outbreak.

[0004] The factor data collected for predicting the depression risk of patients with chronic diseases usually cover multiple dimensions. These data not only have highly nonlinear characteristics in time series, but also show multi-scale and multi-stage evolution patterns. Therefore, the prediction model must have both sensitivity to short-term fluctuations and the ability to model long-term trend evolution, which is very important for accurately predicting the depression risk of patients with chronic diseases. Summary of the Invention

[0005] The present invention provides a method for predicting depression risk in patients with chronic diseases. The method utilizes nonlinear transformation to convert a deviation sequence of various factor data relative to a median value into a high-dimensional feature sequence, calculates the tension value and the overall tension mean of the high-dimensional feature sequence, introduces an adaptive switching factor to adjust the activation intensity of the tension value, and combines phase transformation to obtain an updated fused feature sequence. Subsequently, a sliding window mechanism is used to divide the fused feature sequence into continuous local segments, and local complexity and trend curvature are calculated to characterize dynamic change characteristics. A local control factor is introduced, and multi-scale path weights are generated according to the distance between the control factor and the segment center to achieve weighted fusion of the local segments. Finally, the weighted fused features are input into a fully connected neural network to independently predict the depression risk value corresponding to each factor data, and the average of the predicted values ​​is taken as the final output, thereby improving the accuracy and stability of depression risk prediction in patients with chronic diseases.

[0006] The technical method adopted by the present invention to achieve the above-mentioned purpose specifically includes the following steps:

[0007] S1. Collect data on factors that affect the risk of depression in patients with chronic diseases and construct a dataset for predicting the risk of depression in patients with chronic diseases.

[0008] S2. The factor data constitutes time series data, the median value of each factor time series data is obtained, and the deviation sequence between each factor time series data and the corresponding median value is calculated, and the deviation sequence is mapped into a high-dimensional feature sequence through nonlinear transformation;

[0009] S3. Calculate the tension value and overall tension mean of the high-dimensional feature sequence, introduce an adaptive switching factor, combine it with nonlinear phase transformation, construct an adaptive switching evolution module, fuse the high-dimensional feature sequence and local tension changes, and obtain a fused feature sequence;

[0010] S4. Use the sliding window mechanism to divide the fused feature sequence into multiple continuous local segments, build a local change characterization module, and calculate the local complexity and local trend curvature of each local segment respectively;

[0011] S5. Based on the local complexity and local trend curvature, a local control factor is introduced, a multi-scale path weight is generated according to the distance between the local control factor and the center of each local segment, and the local segments are weighted and fused to obtain the final feature representation of each factor data;

[0012] S6. Use a fully connected neural network to calculate the final feature representation of each factor data to obtain the depression risk prediction value for chronic disease patients. Add up all the prediction values ​​and take the average value as the final depression risk prediction value for chronic disease patients.

[0013] Preferably, in S1, data on factors affecting the risk of depression in patients with chronic diseases are collected, including blood sugar levels, blood pressure, heart rate, exercise frequency, anxiety assessment value, stress assessment value, disease type, and drug use records. Resampling and interpolation techniques are used to fill in missing data to ensure data continuity and construct a chronic disease patient depression risk prediction dataset.

[0014] Preferably, in said S2, input Time series data on factors affecting the risk of depression in patients with chronic diseases , the time series length is , calculate the The deviation sequence of various factor data and their median values ​​is used to measure the abnormal degree of chronic disease patients. The specific mathematical model is:

[0015] ;

[0016] Where, For the The deviation sequence of the factor data from the corresponding median value, For the The sensitivity hyperparameter of the factor data, For the The median value of the factor data;

[0017] Using nonlinear transformation to transform the deviation sequence Mapping to a high-dimensional feature sequence automatically suppresses extreme data input to ensure model stability. The specific mathematical model is:

[0018] ;

[0019] Where, For the The high-dimensional feature sequence of factor data, the dimension of the high-dimensional feature is , is the learnable parameter matrix, is a learnable bias term.

[0020] Preferably, by calculating the deviation between the factor data of depression risk in chronic disease patients and the median value and performing nonlinear mapping, a deviation potential energy distribution reflecting the degree of feature abnormality is formed, and further high-dimensional mapping is performed using nonlinear transformation to enhance feature expression, automatically suppress the impact of extreme data on model stability, and provide a more robust and fine-grained high-dimensional feature foundation for subsequent unified modeling.

[0021] Preferably, in S3, an adaptive switching evolution module is constructed to simulate the natural evolution process of depression risk in chronic disease patients from stable accumulation to sudden outbreak, and to update the high-dimensional feature sequence. The overall features of , to obtain a richer overall feature representation, include the following steps:

[0022] S31, using the second-order and fourth-order tension control hyperparameters, respectively The square and fourth power results of each element of the high-dimensional feature sequence of the factor data are combined and weighted to obtain the first The tension value sequence of the factor data is further analyzed. The tension values ​​of each time step of the various factor data are normalized and averaged over the entire sequence to obtain the first The overall tension mean of the factor data is:

[0023] ;

[0024] ;

[0025] Where, For the Tension value sequence of factor data, is the second-order tension control hyperparameter, is the fourth-order tension control hyperparameter, for The element-wise square of , for The fourth power of the element-wise For the The overall tension mean of the factor data, for Middle The tension value for the time step;

[0026] S32. Calculate the absolute difference between the tension value and the overall tension mean, and construct an adaptive switching factor based on the normalization function to adjust the activation degree of the tension value. The specific mathematical model is:

[0027] ;

[0028] Where, For the Adaptive switching factor for factor data, To take the absolute value operation, is the hyperparameter of the stable threshold;

[0029] S33, using adaptive switching factors as adjustment weights, combined with nonlinear phase changes, to fuse high-dimensional feature sequences and local tension changes to obtain the fused feature sequence after fusion. The specific mathematical model is:

[0030] ;

[0031] Where, After fusion The fusion feature sequence of various factor data.

[0032] Preferably, calculating the tension value and the overall tension mean can help the model capture small changes and large anomalies in the factor data of depression risk in chronic disease patients. During the change of factor data, not all tension value fluctuations are worthy of triggering model evolution. Therefore, the introduction of an adaptive switching factor can naturally allocate local evolution weights according to the deviation between the local tension and the overall tension mean. The switching factor inhibits local evolution when there is a small disturbance, and activates local drastic changes when the local anomaly is significant. The adaptive switching factor combined with nonlinear phase changes enables the model to achieve the coexistence of continuous smooth evolution and local jump phenomena, greatly enriching the model's fine-grained simulation capabilities of the changing process of depression risk in chronic disease patients.

[0033] Preferably, in S4, a sliding window mechanism is used to divide the time series data into multiple continuous local segments, and local complexity and local trend curvature are calculated based on each segment to characterize local change characteristics, including the following steps:

[0034] S41, using the sliding window to Fusion feature sequence of factor data Divide into local segments, the sliding window size is , the sliding step length is , , co-generate Partial fragment, remember The local fragment is ;

[0035] S42. Construct local complexity. Calculate the local mean in the feature direction for each local segment. Calculate the square of the difference between the fused feature value and the corresponding mean within the local segment. Normalize within the time step and feature dimension range to obtain local complexity to describe the local fluctuation intensity. The specific mathematical model is:

[0036] ;

[0037] ;

[0038] Where, For the Factor data The first part of the Feature mean, For the Factor data The local complexity of the local fragment, For the Factor data In the local fragment The time step Eigenvalues, is the dimension of high-dimensional features;

[0039] S43. Calculate the discrete second-order difference of the eigenvalues ​​of adjacent time steps within the local segment, obtain the local trend curvature after normalization, capture the degree of change inflection, and make up for the problem that local complexity only perceives intensity but cannot perceive trend changes. The specific mathematical model is:

[0040] ;

[0041] Where, For the Factor data The local trend curvature of a local segment.

[0042] Preferably, the fused feature sequence is locally divided through a sliding window mechanism, so that the model can extract local dynamic information while maintaining the global structure. On this basis, two types of characteristic indicators, local complexity and trend curvature, are jointly constructed to achieve the simultaneous characterization of the internal amplitude fluctuations and trend mutation behaviors of local segments of the factor data affecting the risk of depression in chronic disease patients, thereby providing a quantitative basis for subsequent feature weighting.

[0043] Preferably, in S5, based on the local complexity and the local trend curvature, a local control factor is introduced to weightedly fuse the local segment features, specifically comprising the following steps:

[0044] S51. Introducing local control factors, nonlinearly integrating two types of local characteristic indicators: local complexity and local trend curvature. The specific mathematical model is:

[0045] ;

[0046] Where, For the Factor data The local control factor of the local segment, 、 are the learnable complexity weight and curvature weight, is a learnable bias term;

[0047] S52. Use a fixed equidistant strategy to calculate the center of each local segment, and generate a multi-scale path weight based on the control factor and the distance between the local segment centers. The specific mathematical model is:

[0048] ;

[0049] ;

[0050] Where, For the Factor data local fragment centers, For the Factor data The multi-scale weights corresponding to the local segments, For the Factor data local fragment centers, For the Factor data Local control factors for local segments;

[0051] S53, using multi-scale path weights to weightedly fuse local segments, and obtain the final The overall characteristic sequence of the factor data, the specific mathematical model is:

[0052] ;

[0053] Where, The final weighted fusion of local segments is obtained The overall characteristic sequence of the factor data.

[0054] Preferably, a local control factor is constructed based on local complexity and local trend curvature to achieve adaptive modeling of the importance of different local fragments, and multi-scale path weights are generated according to the distance between the local control factor and the center of each local fragment, so that the model can adaptively assign different importances according to the characteristics of each local fragment, thereby achieving weighted fusion at the local fragment granularity, making the model more adaptable and stable when facing the nonlinear and non-stationary sequence characteristics of the factor data affecting the risk of depression in chronic patients, and enhancing the model's ability to distinguish key change areas.

[0055] Preferably, in S6, a fully connected neural network is used to calculate the depression risk prediction value of chronic disease patients for each factor data, and the average value of all prediction values ​​is calculated to obtain the final prediction result. The specific mathematical model is:

[0056] ;

[0057] Where, is the final prediction value of depression risk in patients with chronic diseases, For the A fully connected neural network based on the risk factor data of depression in patients with chronic diseases. The number of data types for risk factors for depression in patients with chronic illness.

[0058] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention uses nonlinear transformation to convert the deviation sequence of various factor data relative to the median value into a high-dimensional feature sequence, which effectively enhances the perception ability of potential risk signals, combines adaptive switching factors with nonlinear phase transformation, and realizes dynamic activation and reconstruction of high-dimensional feature vectors. Subsequently, the sliding window mechanism is used to extract the complexity and trend curvature of local fragments, characterize local change characteristics, and introduce local control factors. Multi-scale path weights are generated according to the distance between the control factor and the fragment center to realize soft selective fusion of key features. Finally, the depression risk value of chronic disease patients of each factor data is independently predicted and averaged through a fully connected neural network to obtain a more stable and accurate prediction result of depression risk of chronic disease patients. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1A step-by-step diagram of a method for predicting depression risk in patients with chronic diseases.

[0060] Figure 2 Diagram of the adaptive switching evolution module.

[0061] Figure 3 Draw a modular graph for local changes.

[0062] Figure 4 It is a weighted fusion structure diagram of local fragments.

[0063] Figure 5 This is a diagram showing the effect of predicting depression risk in patients with chronic diseases. DETAILED DESCRIPTION

[0064] The present invention proposes a method for predicting depression risk in patients with chronic diseases. The method constructs a deviation amount based on the median value for various factor data, generates a high-dimensional feature sequence through nonlinear mapping, calculates the tension value of the high-dimensional feature sequence and its overall mean, introduces an adaptive switching factor and combines it with a nonlinear phase transformation to realize dynamic activation and regulation of the high-dimensional feature vector, obtains a fused feature sequence, and then uses a sliding window mechanism to divide the fused feature sequence into local segments, calculates local complexity and trend curvature, introduces a local control factor, and generates multi-scale path weights in combination with the distance between the centers of the local segments to realize soft selection fusion of the local segments. After obtaining the final feature representation of each factor data, the depression risk value of the chronic disease patient of each factor data is predicted separately through a fully connected neural network, and the average value is calculated to obtain the final prediction result, thereby improving the stability and accuracy of the depression risk prediction of chronic disease patients. The technical scheme in the embodiment of the present invention is described in detail and completely below, specifically including the following steps: Figure 1 shown.

[0065] S1. Collect data on factors that affect the risk of depression in patients with chronic diseases and construct a dataset for predicting the risk of depression in patients with chronic diseases.

[0066] Furthermore, in S1, data on factors affecting the risk of depression in patients with chronic diseases were collected for 80 consecutive days, including blood sugar levels, blood pressure, heart rate, exercise frequency, anxiety assessment value, stress assessment value, disease type, and drug use records. Resampling and interpolation techniques were used to fill in missing data to ensure data continuity, and a dataset for predicting the risk of depression in patients with chronic diseases was constructed. The dataset was divided into a training set and a validation set in a ratio of 8:2, and the data for the first 7 days of each time step were used as model input.

[0067] S2. The factor data constitute time series data, obtain the median value of each factor time series data, and calculate the deviation sequence between each factor time series data and the corresponding median value, and map the deviation sequence into a high-dimensional feature sequence through nonlinear transformation.

[0068] Furthermore, in said S2, input Time series data consisting of risk factors for depression in patients with chronic diseases , , is the length of the time series, For the Data on risk factors for depression in patients with chronic diseases The monitoring value of the time step, , calculate the The deviation sequence of factor data and the corresponding median value is as follows:

[0069] ;

[0070] Where, For the The deviation sequence of the factor data from the corresponding median value, For the The sensitivity hyperparameter of the factor data is set to 25 in the initial implementation. For the The median value of the factor data;

[0071] Using nonlinear transformation to transform the deviation sequence Mapped into a high-dimensional feature sequence, the specific mathematical model is:

[0072] ;

[0073] Where, For the A high-dimensional feature sequence of factor data, is the dimension of the high-dimensional feature vector, is the learnable parameter matrix, is a learnable bias term.

[0074] S3. Calculate the tension value and overall tension mean of the high-dimensional feature sequence, introduce an adaptive switching factor, combine it with nonlinear phase transformation, construct an adaptive switching evolution module, fuse the high-dimensional feature sequence and local tension changes, and obtain a fused feature sequence.

[0075] Furthermore, in said S3, an adaptive switching evolution module is constructed, such as Figure 2 As shown, an adaptive switching evolution module is constructed to update the high-dimensional feature sequence The overall characteristics include the following steps:

[0076] S31, using the second-order and fourth-order tension control hyperparameters, respectively The square and fourth power results of each element of the high-dimensional feature sequence of the factor data are combined and weighted to obtain the first The tension value sequence of the factor data is further analyzed. The tension values ​​of each time step of the various factor data are normalized and averaged over the entire sequence to obtain the first The overall tension mean of the factor data is:

[0077] ;

[0078] ;

[0079] Where, For the Tension value sequence of factor data, is the second-order tension control hyperparameter, and its initial value is set to 0.5 during implementation. is the fourth-order tension control hyperparameter, and its initial value is set to 0.05 during implementation. for The element-wise square of , for The fourth power of the element-wise For the The overall tension mean of the factor data, for Middle The tension value for the time step;

[0080] S32. Calculate the absolute difference between the tension value and the overall tension mean, and construct an adaptive switching factor based on the normalization function to adjust the activation degree of the tension value. The specific mathematical model is:

[0081] ;

[0082] Where, For the Adaptive switching factor for factor data, To take the absolute value operation, As a hyperparameter of the stabilization threshold, the initial value was set to 0.1 during the implementation;

[0083] S33, using adaptive switching factors as adjustment weights, combined with nonlinear phase changes, to fuse high-dimensional feature sequences and local tension changes to obtain the fused feature sequence after fusion. The specific mathematical model is:

[0084] ;

[0085] Where, After fusion The fusion feature sequence of the factor data, ,in For the Factor data Feature representation of time steps.

[0086] S4. Use the sliding window mechanism to divide the fused feature sequence into multiple continuous local segments, construct a local change characterization module, and calculate the local complexity and local trend curvature of each local segment respectively.

[0087] Furthermore, in S4, a sliding window mechanism is used to divide the time series data into multiple continuous local segments, and local complexity and local trend curvature are calculated based on each segment to characterize local change characteristics, such as Figure 3 As shown, the following steps are included:

[0088] S41, using the sliding window to Fusion feature sequence of factor data Divide into local segments, the sliding window size is , the initial value is set to 3 during the implementation process, and the sliding step size is , the initial value is set to 1 during the implementation process, and a total of Partial fragment, remember The local fragment is ,in ;

[0089] S42. Construct local complexity. Calculate the local mean in the feature direction for each local segment. Calculate the square of the difference between the fused feature value and the corresponding mean within the local segment. Normalize within the time step and feature dimension range to obtain local complexity. The specific mathematical model is:

[0090] ;

[0091] ;

[0092] Where, For the Factor data The first part of the Feature mean, For the Factor data The local complexity of the local fragment, For the Factor data In the local fragment The time step Eigenvalue;

[0093] S43. Calculate the discrete second-order difference of the eigenvalues ​​of adjacent time steps in the local segment, and obtain the local trend curvature after normalization. The specific mathematical model is:

[0094] ;

[0095] Where, For the Factor data The local trend curvature of a local segment.

[0096] S5. Based on the local complexity and local trend curvature, a local control factor is introduced. A multi-scale path weight is generated according to the distance between the local control factor and the center of each local segment. The local segments are weighted and fused to obtain the final feature representation of each factor data.

[0097] Furthermore, in S5, based on the local complexity and local trend curvature, a local control factor is introduced, such as Figure 4 As shown in FIG, weighted fusion of local segment features includes the following steps:

[0098] S51. Introducing local control factors, nonlinearly integrating two types of local characteristic indicators: local complexity and local trend curvature. The specific mathematical model is:

[0099] ;

[0100] Where, For the Factor data The local control factor of the local segment, 、 are the learnable complexity weight and curvature weight, is a learnable bias term;

[0101] S52. Use a fixed equidistant strategy to calculate the center of each local segment, and generate a multi-scale path weight based on the control factor and the distance between the local segment centers. The specific mathematical model is:

[0102] ;

[0103] ;

[0104] Where, For the Factor data local fragment centers, For the Factor data The multi-scale weights corresponding to the local segments, For the Factor data local fragment centers, For the Factor data Local control factors for local segments;

[0105] S53, using multi-scale path weights to weightedly fuse local segments, and obtain the final The overall characteristic sequence of the factor data, the specific mathematical model is:

[0106] ;

[0107] Where, The final weighted fusion of local segments is obtained The overall characteristic sequence of the factor data.

[0108] S6. Use a fully connected neural network to calculate the final feature representation of each factor data to obtain the depression risk prediction value for chronic disease patients. Add up all the prediction values ​​and take the average value as the final depression risk prediction value for chronic disease patients.

[0109] Furthermore, in S6, a fully connected neural network is used to calculate the depression risk prediction value of chronic disease patients for each factor data, and the average value of all prediction values ​​is calculated to obtain the final prediction result. The specific mathematical model is:

[0110] ;

[0111] Where, is the final prediction value of depression risk in patients with chronic diseases, For the A fully connected neural network based on the risk factor data of depression in patients with chronic diseases. The number of data types for risk factors for depression in patients with chronic illness.

[0112] Furthermore, the model is implemented based on Python 3.8 programming language and PyTorch framework, running in CUDA 11.3 environment, and using NVIDIA 3090 24GB GPU during training. To improve the efficiency and stability of model training, the initial learning rate is , the batch size is ,use The optimizer iteratively updates the parameters, and the loss function is The loss function adopts a linear learning rate decay strategy.

[0113] Furthermore, the method predicts the effect as Figure 5As shown, the vertical axis is the depression risk value (%) of chronic disease patients, the horizontal axis is time (days), the gray dotted line in the figure represents the actual assessment value of depression risk of chronic disease patients, and the black solid line is the depression risk prediction value of chronic disease patients generated by this method. Figure 5 It can be seen that the two curves maintain a high degree of consistency in both overall trends and local fluctuations, and the degree of fit between the predicted results and the actual evaluation values ​​is high, indicating that the proposed method has high accuracy and stability in the task of predicting depression risk in patients with chronic diseases.

[0114] The above are only preferred embodiments of the present invention. It should be pointed out that those skilled in the art can make several modifications and improvements without departing from the inventive concept of the present invention, and these all fall within the scope of protection of the present invention.

Claims

1. A method for predicting depression risk in patients with chronic diseases, characterized in that: The following steps are involved: S1. Collect data on factors that affect the risk of depression in patients with chronic diseases and construct a dataset for predicting the risk of depression in patients with chronic diseases. S2. The factor data constitutes time series data, the median value of each factor time series data is obtained, and the deviation sequence between each factor time series data and the corresponding median value is calculated, and the deviation sequence is mapped into a high-dimensional feature sequence through nonlinear transformation; S3. Calculate the tension value and overall tension mean of the high-dimensional feature sequence, introduce an adaptive switching factor, combine it with nonlinear phase transformation, construct an adaptive switching evolution module, fuse the high-dimensional feature sequence and local tension changes, and obtain a fused feature sequence. The specific steps are as follows: Construct an adaptive switching evolution module to update the high-dimensional feature sequence The overall characteristics include the following steps: S31, using the second-order and fourth-order tension control hyperparameters, respectively The square and fourth power results of each element of the high-dimensional feature sequence of the factor data are combined and weighted to obtain the first Tension value sequence of factor data , further The tension values ​​of each time step of the various factor data are normalized and averaged over the entire sequence to obtain the first The overall tension mean of the factor data ; S32. Calculate the absolute difference between the tension value and the overall tension mean, and construct an adaptive switching factor based on the normalization function. The specific mathematical model is: ; Where, For the Adaptive switching factor for factor data, To take the absolute value operation, is the hyperparameter of the stable threshold; S33, using adaptive switching factors as adjustment weights, combined with nonlinear phase changes, to fuse high-dimensional feature sequences and local tension changes to obtain the fused feature sequence after fusion. The specific mathematical model is: ; Where, After fusion The fusion feature sequence of various factor data; S4. Use the sliding window mechanism to divide the fused feature sequence into multiple continuous local segments, build a local change characterization module, and calculate the local complexity and local trend curvature of each local segment respectively; S5. Based on the local complexity and local trend curvature, a local control factor is introduced. A multi-scale path weight is generated based on the distance between the local control factor and the center of each local segment. The local segments are weighted and fused to obtain the final feature representation of each factor data. The specific steps are as follows: Based on the local complexity and local trend curvature, a local control factor is introduced to weightedly fuse the local segment features. Specifically, the following steps are included: S51. Introducing local control factors, nonlinearly integrating two types of local characteristic indicators: local complexity and local trend curvature. The specific mathematical model is: ; Where, For the Factor data The local control factor of each local segment, 、 are the learnable complexity weight and curvature weight, is a learnable bias term, For the Factor data The local complexity of the local fragment, For the Factor data The local trend curvature of each local segment; S52. Use a fixed equidistant strategy to calculate the center of each local segment, and generate a multi-scale path weight based on the control factor and the distance between the local segment centers. The specific mathematical model is: ; ; Where, For the Factor data local fragment centers, For the Factor data The multi-scale weights corresponding to the local segments, For the Factor data local fragment centers, For the Factor data The local control factor of each local segment, is the length of the time series, is the sliding window size, is the sliding step length; S53, using multi-scale path weights All local segments of the factor data are weighted fused to obtain the final The overall characteristic sequence of factor data ; S6. Use a fully connected neural network to calculate the final feature representation of each factor data to obtain the depression risk prediction value for chronic disease patients. Add up all the prediction values ​​and take the average value as the final depression risk prediction value for chronic disease patients.

2. A method for predicting depression risk in patients with chronic diseases according to claim 1, characterized in that: In S1, data on factors that affect the risk of depression in patients with chronic diseases are collected, including blood sugar levels, blood pressure, heart rate, exercise frequency, anxiety assessment values, stress assessment values, disease types, and medication use records. Resampling and interpolation techniques are used to fill in missing data and construct a chronic disease patient depression risk prediction dataset.

3. A method for predicting depression risk in patients with chronic diseases according to claim 2, characterized in that: In S2, input Time series data on factors affecting the risk of depression in patients with chronic diseases , the time series length is ,get The median value of The deviation sequence of factor data from the median value is as follows: ; Where, For the The deviation sequence of the factor data from the corresponding median value, For the The sensitivity hyperparameter of the factor data, For the The median value of the factor data; Using nonlinear transformation to transform the deviation sequence Mapped into a high-dimensional feature sequence, the specific mathematical model is: ; Where, For the The high-dimensional feature sequence of factor data, the dimension of the high-dimensional feature is , is the learnable parameter matrix, is a learnable bias term.

4. A method for predicting depression risk in patients with chronic diseases according to claim 3, characterized in that: In S4, constructing a local change characterization module includes the following steps: S41, using the sliding window to Fusion feature sequence of factor data Divide into local segments, the sliding window size is , the sliding step length is , , co-generate Partial fragment, remember The local fragment is ; S42, calculate the local mean in the feature direction for each local segment, and calculate the obtained Factor data The first part of the The feature mean is , calculate the square of the difference between the fused feature value and the corresponding mean in the local segment, and normalize it within the time step and feature dimension range to obtain the local complexity. The specific mathematical model is: ; Where, For the Factor data The local complexity of the local fragment, For the Factor data In the local fragment The time step Eigenvalues, is the dimension of high-dimensional features; S43. Calculate the discrete second-order difference of the eigenvalues ​​of adjacent time steps in the local segment, and obtain the local trend curvature after normalization. The specific mathematical model is: ; Where, For the Factor data The local trend curvature of a local segment.

5. A method for predicting depression risk in patients with chronic diseases according to claim 4, characterized in that: In S6, a fully connected neural network is used to calculate the depression risk prediction value of chronic disease patients for each factor data, and the average value of all prediction values ​​is calculated to obtain the final depression risk prediction value of chronic disease patients. .

Citation Information

Patent Citations

  • Depression intensity identification method based on spatial-temporal feature integration and global-local feature fusion

    CN118506421A

  • Method for constructing depression risk prediction model based on multi-modal sample information

    CN119943384A