Depression state assessment method and device based on heart rate variability characteristics and parallel neural network

By using the method of heart rate variability characteristics and parallel neural networks in the assessment of depression status, the inaccuracy and adaptability of assessments in the prior art are solved, and more accurate and comprehensive mental health monitoring is achieved.

CN120114060APending Publication Date: 2025-06-10SOUTHEAST UNIV

Patent Information

Application Number
CN202510277495.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-10
Publication Date
2025-06-10

AI Technical Summary

Technical Problem

The existing depression status assessment methods rely on subjective questionnaires and simple biological signal analysis, making it difficult to achieve objective quantification and accurate evaluation. Traditional machine learning models have limitations in processing complex physiological signals, making it difficult to adapt to individual differences and cross-scenario applications.

Method used

The depression state evaluation method based on heart rate variability characteristics and parallel neural networks is adopted. The electrocardiogram signal is collected through wearable devices, and multi-level preprocessing and comprehensive HRV feature extraction is carried out. Combined with the graph neural network and the CNN-GRU parallel neural network model, deep learning and feature fusion are carried out, and precise classification and real-time monitoring of depression states are finally realized.

Benefits of technology

It significantly improves the accuracy and comprehensiveness of depression status assessment, can better adapt to individual differences and cross-scenario applications, provide intuitive real-time display and history query functions, and supports mental health monitoring and intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120114060A_ABST
    Figure CN120114060A_ABST
Patent Text Reader

Abstract

The invention provides a depression state assessment method and device based on heart rate variability characteristics and a parallel neural network. Real-time electrocardiosignals are collected in real time through wearable equipment and transmitted to a mobile terminal, the mobile terminal transmits the electrocardiosignals to a cloud server, and work of signal preprocessing, heart rate variability (HRV) feature extraction, feature selection and data enhancement and depth model construction and optimization is carried out on the cloud server. And evaluating the depression state of the subject. The cloud outputs an evaluation result to a display screen of the mobile terminal to be displayed, the depression state of the subject is finally displayed, and the four evaluated depression states are healthy, mild depression, moderate depression and severe depression; in addition, the terminal also supports depression state historical record query and key HRV feature tracing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method and device for evaluating depressive state based on heart rate variability features and parallel neural networks, belonging to the technical fields of mental health assessment and bio-signal processing, and particularly relates to realizing accurate classification and real-time monitoring of depressive state through real-time acquisition, processing and in-depth analysis of electrocardiogram signals, combining heart rate variability features with a parallel deep learning model. Background Art

[0002] As a common mental illness, depression has become an important public health problem worldwide. Depression not only affects the daily life and work of patients, but may also lead to serious social and economic consequences. Traditional depression assessment mainly relies on subjective assessment methods such as subjective questionnaires and self-reports, which are susceptible to individual cognitive biases and environmental influences, and it is difficult to achieve objective quantification, thus having obvious limitations.

[0003] In terms of bio-signal processing, the heart rate variability (HRV) of electrocardiogram signals (ECG) has been widely proven to be closely related to emotional states and mental health conditions (including depression). HRV reflects the regulatory ability of the autonomic nervous system. A large number of clinical studies have shown that low HRV is usually related to mental health problems such as depression, high stress levels and anxiety, providing a solid theoretical basis for using HRV to evaluate depressive state. However, existing HRV analysis methods mainly focus on simple time-domain and frequency-domain features, and fail to deeply explore the non-linear dynamic characteristics in HRV signals, resulting in insufficient comprehensiveness and accuracy in the evaluation of depressive state. In addition, traditional electrocardiogram signal processing methods often have certain limitations in dealing with signal noise interference and complex physiological changes, and it is difficult to comprehensively and accurately reflect the depressive state of an individual.

[0004] Existing depression state assessment methods usually rely on traditional machine learning algorithms such as Support Vector Machine (SVM) and Random Forest. These static models show certain limitations when dealing with physiological signals. First of all, traditional methods often only use limited features for classification, resulting in poor adaptability to individual differences. Moreover, when applied across different scenarios, the generalization ability of the model is weak and performance degradation is likely to occur. With the rise of deep learning technology, physiological signal analysis has gradually shifted towards more complex neural network models, but there are still some challenges. In particular, existing deep learning models often fail to fully capture the complex relationships between high-dimensional features in the signals, especially in the modeling of complex physiological features such as Heart Rate Variability (HRV). In addition, when processing the extracted features, many deep learning models have problems in effectively integrating and learning the interactions between different features. At the same time, current deep learning models usually lack effective interpretability mechanisms and are difficult to provide reliable feature contribution analysis for classification results, making the model decision-making process opaque and restricting their application in clinical and health management. In addition, most existing depression assessment systems only output simple classification labels and lack intuitive historical data tracing and interactive visualization functions, which makes it difficult for users to deeply understand the trends and potential impacts of depression state changes and cannot meet the needs of personalized health management and psychological intervention. Summary of the Invention

[0005] To solve the above problems, the present invention proposes a depression state assessment method and device based on heart rate variability features and parallel neural networks. This solution uses wearable devices to continuously collect dynamic electrocardiogram signals, and through mobile terminals and cloud servers, it successively realizes signal preprocessing, HRV feature extraction, feature selection and data augmentation, deep model construction and training optimization. Finally, it accurately judges the depression state of the subject and displays it in an intuitive way in real time, supporting the query of depression state historical records and the tracing of key HRV features. This device not only meets the growing demand for mental health monitoring in modern society but also provides a new technical support for mental health management and psychological intervention.

[0006] To achieve the above object, the present invention provides the following technical solutions:

[0007] A depression state assessment method based on heart rate variability features and parallel neural networks, comprising the following steps:

[0008] Step 10: Electrocardiogram signal acquisition: Use a wearable device to collect electrocardiogram signals and transmit the electrocardiogram signals to a mobile terminal, and the mobile terminal transmits the electrocardiogram signals to a cloud server;

[0009] Step 20: Preprocess the received electrocardiogram signals; the cloud server successively performs baseline drift removal, high-frequency noise filtering, wavelet denoising and optional high-pass filtering on the original electrocardiogram signals;

[0010] Step 30: Extract HRV features from the preprocessed electrocardiogram (ECG) signals: Extract time-domain, frequency-domain, and non-linear features from the sequence of time intervals (NN intervals) between adjacent normal heartbeats in the preprocessed ECG signals, and evaluate the heart rate complexity and fragmentation metrics;

[0011] Step 40: Perform feature selection and data augmentation on the extracted HRV features: Generate an optimized feature set through feature importance screening, dynamic alignment, data augmentation, and normalization;

[0012] Step 50: Construct a parallel neural network of a dynamic graph neural network and a convolutional neural network-gated recurrent unit (CNN-GRU) to classify the depressive state: Extract high-order graph features based on the graph neural network, and introduce a multi-head attention mechanism within the graph neural network module to strengthen key information. At the same time, construct a parallel CNN-GRU module to learn temporal patterns. Finally, the output results of the graph neural network and the CNN-GRU module are concatenated in the feature dimension, and the final classification result is generated through a fully connected layer;

[0013] Step 60: Optimize the model, and the cloud server transmits the depressive state result back to the mobile terminal for real-time display: Optimize the model using contrastive learning and domain adaptation. The cloud server outputs the four-classification result of the depressive state and transmits it back to the terminal device for display. The system stores the result in the cloud server for subsequent analysis and optimization.

[0014] Furthermore, the wearable device includes a silver / silver chloride (Ag / AgCl) ECG electrode, a preamplifier circuit, a differential amplifier circuit, an (analog / digital) A / D conversion circuit, a microcontroller, and a Bluetooth module; wherein, the ECG electrode is used to collect the human ECG signals, the preamplifier circuit is used to preliminarily amplify the weak ECG signals collected, the differential amplifier circuit further amplifies the signals while improving the common-mode rejection ability to reduce noise interference, the A / D conversion circuit is used to convert the analog ECG signals into digital signals, and the microcontroller wirelessly transmits the converted digital signals to the mobile terminal through the Bluetooth module, thereby realizing high-quality collection and secure data transmission of the ECG signals.

[0015] Further, in step 10, a medical-grade Ag / AgCl electrocardiogram electrode is used to collect the electrocardiogram signal of the subject. The subject needs to be in a sitting state, and the continuous collection time is 5 minutes. The signal sampling rate is strictly set to 500 Hz to ensure that sufficient dynamic physiological information is captured. To ensure the high quality of the collected data, the built-in impedance detection module of the device automatically detects the contact impedance between the electrode and the skin before collection, and requires its value to be lower than 2 kΩ to ensure that there is no obvious interference in the signal. The device realizes stable wireless connection with the mobile terminal through the Bluetooth 5.0 module. At the same time, the system automatically records the basic information of the subject, such as metadata such as age, gender, and health status, which is of great significance for subsequent data interpretation and handling of individual differences. During the collection process, to ensure the security of data transmission, all data are encrypted using the Advanced Encryption Standard 256-bit (AES-256) encryption algorithm, and a 32-bit Cyclic Redundancy Check (CRC-32 check code) is attached to each data packet to prevent data damage or tampering during transmission, thereby ensuring the integrity and confidentiality of the data.

[0016] Further, in step 20, multi-level preprocessing is mainly performed on the original electrocardiogram signal to eliminate noise, remove baseline drift, and correct other interferences. First, baseline drift removal is performed: The system uses the median filtering method (filter window set to 500 ms) to perform preliminary smoothing processing on the original signal, obtains the signal baseline by estimating the local median, and then uses a linear detrending function to eliminate the global drift, so that the baseline fluctuation of the processed signal is controlled within ±0.1 mV; This method can not only eliminate the slowly changing baseline drift but also retain the important features of the electrocardiogram signal.

[0017] Next, to filter out high-frequency noise, high-frequency noise filtering is performed: The system uses a 5th-order Butterworth low-pass filter for filtering, and its cut-off frequency is strictly set to 25 Hz. The filter transfer function is where ω is the angular frequency in radians per second, ω c represents the cut-off angular frequency, and a represents the filter order. This method can effectively suppress high-frequency electromagnetic interference and electromyographic noise. In addition, the system also uses wavelet denoising: The Daubechies 6 wavelet (db6 wavelet) basis function is used to perform 5-layer multi-scale decomposition on the signal, and the wavelet coefficients are denoised by the adaptive soft threshold method in each layer. The threshold calculation formula used is where threshold represents the threshold, and coeffs lowest refers to the coefficients in the lowest scale layer in the wavelet decomposition, median(|coeffs lowest|) It refers to taking the median of the absolute values of these coefficients. 0.6745 represents the normalization constant, 0.85 represents the empirical correction factor, and J is the total number of coefficients in the current decomposition layer. This step can fully suppress the transient noise caused by physiological and environmental factors and further improve the signal quality. Optionally, the system can also adopt residual baseline correction: a 0.5 Hz cut-off frequency, a 3rd-order Butterworth high-pass filter, and compensate for the signal group delay with a finite impulse response filter (linear phase FIR filter) to further eliminate the residual low-frequency drift phenomenon.

[0018] Further, in step 30, the preprocessed electrocardiogram signal is used to calculate the NN interval sequence, which is the key data for evaluating heart rate variability (HRV). The system extracts multi-dimensional HRV features reflecting the depressive state of the subject, mainly including the following three types of indicators:

[0019] ① Time-domain indicators:

[0020] This indicator is obtained by directly calculating the statistical parameters of the NN interval sequence, including basic statistics: mean NN interval (MeanNN), standard deviation (SDNN), median NN interval (MedianNN), standard deviation of the differences between adjacent NN intervals (SDSD), coefficient of variation of NN intervals (CVNN), median NN interval (MedianNN), absolute deviation of the median NN interval (MadNN), median coefficient of variation (MCVNN), 20th percentile of NN intervals (Prc20NN), 80th percentile of NN intervals (Prc80NN), minimum NN interval (MinNN), maximum NN interval (MaxNN), and root mean square difference (HRMSSD). Among them, the calculation formula of RMSSD is where NN i represents the time interval between two consecutive normal heartbeats, NN i -NN i-1 represents the difference between adjacent heartbeat intervals, and N represents the total number of measured heartbeat intervals; segment statistics: also calculate the proportion of differences between adjacent NN intervals exceeding 50 ms (pNN50), the proportion of differences greater than 20 ms (pNN20), segment standard deviation (SDANN), and other features; these data can reflect the instantaneous changes in the activities of the autonomic nervous system.

[0021] ② Frequency-domain indicators:

[0022] To analyze the spectral characteristics of the electrocardiogram (ECG) signal, the system uses the Fast Fourier Transform (FFT) and adopts a Hanning window to calculate the power spectral density. Thus, the integral values of ultra-low frequency (ULF, 0–0.04 Hz), very low frequency (VLF, 0.04–0.15 Hz), low frequency (LF, 0.15–0.4 Hz), and high frequency (HF, 0.4–0.8 Hz) are extracted. In addition, the system calculates features such as total power (HRV_TP), normalized low-frequency power: LFnu = LF / (TP - VLF)×100%, normalized high-frequency power HFnu = HF / (TP - VLF)×100%, the ratio of low frequency to high frequency (LF / HF), the ratio of very low frequency to ultra-low frequency (VLF / ULF), and the ratio of total power to mean NN interval (TP / MeanNN). These indices can comprehensively reflect the balance state of the autonomic nervous system and the changes in the depressive state.

[0023] ③ Nonlinear indices:

[0024] Considering the complexity of the ECG signal, the system also extracts nonlinear indices, Poincaré Plot parameters (including minor axis SD1, major axis SD2 and their ratio, ellipse area S, complexity index CSI, variant complexity index CVI), multi-scale entropy (MSE, scale factor 1 - 20), Shannon entropy (shanEn), approximate entropy (ApEn), fuzzy entropy (FuzzyEn), modified sample entropy (mSampEn, where the tolerance is set as r = 0.15×SD, and the choice of the tolerance r = 0.15×SD is based on the test of the sensitivity of sample entropy to noise. When r < 0.1×SD, it is vulnerable to noise interference, and when r > 0.2×SD, the resolution decreases); and short-term and long-term detrended fluctuation analysis indices (DFA α1 and α2). In addition, symbol dynamics and fragmentation indices (percentage of inflection points PIP, proportion of short segments PSS, proportion of alternating segments PAS and their coefficient of variation, reciprocal of the average length of acceleration / deceleration segments IALS); heart rate asymmetry features (short-term standard deviation of heart rate deceleration SD1d, short-term standard deviation of heart rate acceleration SD1a, long-term standard deviation of heart rate deceleration SD2d, total standard deviation of heart rate deceleration SDNNd) and other features are extracted; to comprehensively reveal the nonlinear dynamic change features existing in the ECG signal.

[0025] Furthermore, in step 40, the system further processes the HRV features extracted in step 30 to improve the data quality and the model training effect. First, the Shapley value feature screening (SHAP value screening) method is used to calculate the Shapley value (Shapley contribution value) of each feature, and the top K (Top-K) features with the highest contribution degree are retained (the value range of K is 30 - 50, preferably K = 40), and its calculation formula is where φ iIndicates the contribution degree of the i-th feature, M represents the number of experiments conducted, and f(·) represents the prediction function of the model. Represents the input data containing feature i in the m-th experiment. Indicates the input data that does not contain feature i (or replaces this feature with the baseline value) in the m-th experiment; then, to expand the sample size and further enhance the robustness of the model, the system adopts a data augmentation method based on the Wasserstein Generative Adversarial Network (Wasserstein GAN), constructs a generator composed of 5 fully connected layers and a discriminator using the gradient penalty strategy (penalty coefficient λ = 10), and through experimental adjustment, the regularization term is set to 10 to avoid overfitting and improve the generalization ability of the model. Its loss function is Where Represents the distribution of the samples generated by the generator. Indicates sampling from the generator distribution To obtain fake samples. Represents the output value of the discriminator for the fake samples. Represents the distribution of the real data samples, x represents the real samples sampled from the real data distribution And D(x) represents the output value of the discriminator for the real samples. Represents the sample distribution for gradient penalty, which is generated by interpolating between real and fake samples. Indicates the samples generated during the interpolation process for calculating the gradient. Represents the gradient of the discriminator's output with respect to the input at the sample The first part of the formula Represents the expected value of the discriminator's output for the generator samples, and the second part Represents the expected value of the discriminator's output for the real samples, and the third part Represents the gradient penalty term for controlling the discriminator's gradient.

[0026] Finally, to eliminate the adverse effects of the scale differences between features on model training, the system first standardizes the data using the standard score (Z-score), that is Where x represents a certain value in the original data, and μ y Is the average value of all the data, and σ y Is the standard deviation of the data, and y′ represents the value in units of the standard deviation after the original value is decentralized and normalized; subsequently, the min-max normalization method is used to map the data to the [0,1] interval, that is Where y′ min And y′ max Are respectively the minimum and maximum values of the standardized data, and y″ represents further mapping the data to the [0,1] interval to ensure that all the data is within a unified scale range.

[0027] Furthermore, in step 50, the system constructs a deep learning model using the feature data processed in step 40 to achieve accurate classification of the depressive state. First, the feature vector is mapped to a node feature vector through a fully connected layer The edge weight formula is ∈ e = 1e-8. The difference from the traditional cosine similarity is the introduction of the minimum value ∈ e , to avoid numerical instability caused by the denominator being zero. In the formula, h i represents the feature vector of node i, and its value is obtained by mapping through a fully connected layer; h j represents the feature vector of node j; h i ·h j represents the dot product between the feature vectors of node i and node j, used to measure their similarity; ∈ represents a minimum constant used to prevent the denominator from being zero; EdgeWeight ij parameter represents the edge weight between node i and node j calculated by cosine similarity. Next, the system introduces a multi-head attention mechanism with 4 attention heads in the graph neural network module, and enhances the correlation between nodes through weighted summation of multiple heads. Specifically, the feature vector h i of the node is mapped to Query, Key, and Value, and the attention weight is calculated using the improved cosine similarity. The formula is: In the formula, Q i and K j respectively represent the query vector of node i and the key vector of node j, used to calculate the similarity between nodes; ∈ a is a small constant used to avoid the denominator from being zero; Attention(Q i ,K j ) is the attention weight calculated using the improved cosine similarity. The output of each attention head is the weighted sum of the values: head i = Attention(Q i ,K j )·V j , where head i is the output of a single attention head, and V j is the value vector of node j, representing the information of node j. Then, by concatenating the outputs of all attention heads and mapping to the final feature space: MultiHead(Q,K,V) = Concat(head 1 ,head 2 ,…,head 4 )W O , where W Ois the weight matrix for learning. Q, K, and V are the query, key, and value vectors respectively. Concat(head 1 , head 2 , …, head 4 ) concatenates the outputs of all attention heads to form a richer representation; MultiHead(Q, K, V) is the output of the entire multi-head attention. After that, the system uses the Chebyshev polynomial approximation method for graph convolution operation, and its formula is In the formula is the normalized Laplacian matrix, T k is the k-th order Chebyshev polynomial. In the formula represents the updated node feature vector after calculation by the graph convolution layer, σ h represents the ReLU activation function, which is used to introduce non-linear transformation. θ k represents the learnable coefficient of the k-th order Chebyshev polynomial, represents the k-th order Chebyshev polynomial, where represents the normalized Laplacian matrix, which is used to capture the graph structure information, while represents the node feature vector of the l-th layer. The summation symbol in the formula represents the weighted accumulation of the calculation results from the 0-th to the K-th order polynomials, thus completing the graph convolution operation.

[0028] Meanwhile, to fully extract local temporal features, the system parallelly adopts multi-scale one-dimensional convolutional kernels with output channel numbers of 32 / 64 / 128, and uses 3-point, 5-point, and 7-point convolutional kernels. The 3-point convolutional kernel captures short-term local features, the 5-point convolutional kernel extracts medium-term changes, and the 7-point convolutional kernel helps to capture long-term dependencies. Combining multi-scale convolutional kernels improves the comprehensiveness and accuracy of feature extraction. And dilated convolution (with dilation factor set to 2, aiming to expand the convolutional receptive field to capture longer temporal dependencies. Experiments show that dilated convolution effectively improves the model's learning ability for temporal features) is used to extract features from the data; in addition, gated recurrent unit (GRU) is used to capture long temporal dependencies, and its update gate calculation formula is In the formula represents the output of the update gate, and its value is mapped to the interval [0, 1] through the Sigmoid activation function σ t to control information update; W z represents the weight matrix of the update gate, which is used to perform a linear transformation on the vector obtained by concatenating the hidden state at the previous moment and the current input . Among them has a dimension of 128, corresponding to the size of the hidden layer, while represents the input data at the current moment.

[0029] After the two modules have processed the features in parallel, the output results of the graph neural network module and the CNN-GRU module are concatenated in the feature dimension to merge the features of the graph neural network and the temporal network into a more enriched feature vector. Subsequently, the concatenated features are further processed through a fully connected layer to generate the final classification result of the depressive state.

[0030] Furthermore, in step 60, to improve the classification performance and generalization ability of the model, the system introduces contrastive learning, domain adaptation, hyperparameter optimization, and early stopping mechanism during the model training process. Specifically, the system constructs a projection head (with a hidden layer dimension of 256) consisting of two-layer multi-layer perceptron (MLP) based on the SimCLR framework, and sets the temperature parameter to τ = 0.1 to enhance the distinguishability between samples; at the same time, constructs a domain classifier containing three fully connected layers (with sizes of 64, 32, and 1 in sequence), and adopts a gradient reversal layer (multiplied by the reversal factor γ = -1) during backpropagation. The domain adaptation strategy reduces the interference brought by environmental changes. Hyperparameters such as the regularization term and the temperature parameter τ are determined through experiments to ensure the generalization ability and stability of the model, so as to reduce the interference brought by individual differences and changes in the acquisition environment; in addition, the system uses Bayesian optimization to automatically search for the learning rate (logarithmically uniformly distributed in [1e-5, 1e-3]), and the learning rate range is set from 1e-5 to 1e-3. A smaller learning rate (1e-5) is suitable for fine-tuning, and a larger learning rate (1e-3) accelerates training but may lead to instability. Using logarithmic uniform distribution search, the best learning rate is selected to ensure stable training and fast convergence. The batch size is selected as 32, 64, or 128 in the present invention. A smaller batch size (32) accelerates convergence but may increase noise; a medium batch size (64) balances the convergence speed and stability; a larger batch size (128) improves the training stability and reduces noise, which is suitable for large datasets. Finally, the best batch size is selected through cross-validation. The number of graph convolutional layers is selected as 2 to 4 layers. Two layers are suitable for simple graph structures to avoid overfitting; three layers balance the computational efficiency and graph feature extraction ability and are suitable for most applications; four layers are suitable for complex graph data and can capture higher-order features. The best number of layers is selected through experimental results. And monitor the F1 score on the validation set. If there is no improvement for 5 consecutive epochs, the early stopping mechanism is activated to prevent overfitting. The model finally outputs a four-classification result of the depressive state, corresponding to healthy, mild depression, moderate depression, and severe depression respectively. The softmax function is used to normalize the output results, and the area of the color block displayed on the mobile terminal for each state is calculated through the formula c = 1, 2, 3, 4, where A c represents the area of the color block corresponding to the c-th state, and z c represents the original score of the c-th state, exp(z c) represents the exponential transformation of the score, Represents the sum of the index scores of all four categories of states, which is used to calculate the softmax probability, S total Represents the total area of ​​the entire display area, thereby ensuring that the color block area is positively correlated with the softmax probability value. The mobile terminal displays the classification results in real time through an intuitive graphical user interface, and presents the historical records of the last 30 days in the form of a timeline, marking the frequency of occurrence of four types of states through color coding; at the same time, it supports users to touch and query the key HRV feature data at each moment. When the classification result of a specific time point is selected by touch, the key characteristic values ​​of heart rate variability at the corresponding moment are displayed in conjunction, including standard deviation SDNN, low frequency / high frequency ratio LF / HF, short axis / long axis standard deviation ratio SD1 / SD2.

[0031] Furthermore, the present invention also provides a depression status assessment device based on heart rate variability characteristics and parallel neural networks, including a wearable device, a mobile terminal, a real-time status area, a historical analysis area, a feature tracing area and a cloud server.

[0032] The wearable device includes medical-grade Ag / AgCl ECG electrodes, a preamplifier circuit, a differential amplifier circuit, an A / D conversion circuit, a microcontroller and a Bluetooth module, which are mainly used to realize the acquisition and preliminary data processing of ECG signals in step 10; the mobile terminal adopts an ARM Cortex-A72 processor and is equipped with a 5-inch AMOLED touch screen (resolution 1920×1080, refresh rate 60Hz), which is used to receive the collected ECG signals, perform some preprocessing tasks and display the evaluation results in real time; the real-time status area presents the current classification results in four-quadrant color blocks; the historical analysis area displays the classification records in a timeline; the feature tracing area displays the heart rate variability feature data at the selected moment in response to touch operations; the cloud server is deployed with a parallel neural network computing cluster, which is mainly responsible for realizing all data preprocessing, HRV feature extraction, feature selection, data enhancement, model construction, training optimization and depression status evaluation functions in steps 20 to 60.

[0033] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0034] 1. Multi-level signal preprocessing and comprehensive HRV feature extraction methods are used to significantly reduce ECG signal noise interference and ensure data accuracy;

[0035] 2. Combined with SHAP value screening and Wasserstein GAN data augmentation technology, the effectiveness of feature data and the training robustness of the model are greatly improved;

[0036] 3. The parallel architecture that utilizes graph neural networks and temporal deep learning models effectively captures the complex high-order structures and dynamic temporal information in electrocardiogram signals. By processing graph-structured features and temporal features in parallel, the accuracy of depression state assessment is significantly improved.

[0037] 4. During the model training process, contrastive learning and domain adaptation strategies are introduced to reduce the interference caused by individual differences and environmental changes, and enhance the generalization ability of the model.

[0038] 5. The intuitive real-time display and historical record query functions provide users with convenient means for mental health monitoring, facilitating early psychological intervention and health management. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 FIG. 0 is a block diagram of the overall structure of the depression state assessment device of the present invention, showing the data transmission and processing flow between the wearable device, the mobile terminal and the cloud server.

[0040] Figure 2 FIG. 1 is a schematic diagram of the structure of the wearable device, showing the functions of medical-grade electrocardiogram electrodes, preamplifier circuits, differential amplifier circuits, A / D conversion circuits and Bluetooth modules in the electrocardiogram acquisition process.

[0041] Figure 3 FIG. 2 is a schematic diagram of the electrocardiogram signal preprocessing process, showing the processing steps of median filtering, linear detrending, low-pass filtering and wavelet denoising.

[0042] Figure 4 FIG. 3 is a schematic diagram of the HRV feature extraction process, showing the process of calculating the NN interval sequence from the preprocessed signal and extracting time-domain, frequency-domain and non-linear indexes.

[0043] Figure 5 FIG. 4 is a schematic diagram of the feature selection and data augmentation process, showing the steps of screening using SHAP values, data augmentation based on Wasserstein GAN and normalization processing.

[0044] Figure 6 FIG. 5 is a schematic diagram of the parallel neural network structure of graph neural networks and CNN-GRU, showing the multi-head attention mechanism, node feature mapping, graph convolution introduced in the graph neural network module, and the overall parallel network structure of the multi-scale convolution of the CNN module and the GRU module.

[0045] Figure 7 FIG. 6 is a schematic diagram of the model training and result output process, showing the application of contrastive learning, domain adaptation, Bayesian hyperparameter optimization and early stopping mechanism, and the process of finally displaying the depression state assessment result in real time through the mobile terminal. DETAILED DESCRIPTION OF THE INVENTION

[0046] The technical solutions of the present invention will be described in detail below in conjunction with the accompanying drawings and specific embodiments. The embodiments are only used to illustrate the present invention and should not be regarded as a limitation on the protection scope of the present invention. Any person skilled in the art can make modifications and variations based on the disclosed content, and these modifications and variations should be included within the protection scope of the present invention.

[0047] Embodiment 1:

[0048] This embodiment refers to Figures 1 to 7 to describe in detail a depression state evaluation method and device based on heart rate variability characteristics and a parallel neural network. Embodiment 1 not only includes steps such as data acquisition, signal preprocessing, HRV feature extraction, feature selection and data augmentation, deep model construction and training optimization, and result output, but also details the specific operations and parameter settings of the hardware part.

[0049] Step 10: Electrocardiogram signal acquisition and hardware operation. As Figure 2 shown, the wearable device includes the following hardware modules:

[0050] ① The medical-grade Ag / AgCl electrocardiogram electrodes adopt a three-electrode layout, where the RA electrode is attached to the right side of the chest, the LA electrode is attached to the left side of the chest, and the RL electrode is attached to the root of the right leg to ensure comprehensive capture of electrocardiogram signals;

[0051] ② The preamplifier circuit is used to preliminarily amplify the collected weak signals (about 11 times) to provide sufficient signal amplitude for subsequent processing;

[0052] ③ The differential amplifier circuit has high common-mode rejection ability (common-mode rejection ratio > 100 dB), further amplifies the signal (about 20 times), and effectively reduces environmental noise interference;

[0053] ④ The A / D conversion circuit converts the analog signal into a digital signal;

[0054] ⑤ The microcontroller and the Bluetooth module (Bluetooth 5.0) are responsible for preliminary processing of the data and realizing wireless transmission;

[0055] ⑥ The built-in impedance detection module detects the contact impedance between the electrode and the skin before collection to ensure that it is less than 2 kΩ.

[0056] The electrocardiogram (ECG) signals of the subjects were continuously collected for 5 minutes in a sitting state at a sampling rate of 500 Hz. Through experimental verification, a sampling rate of 500 Hz can ensure that the R-wave detection error is < 2 ms (compared with the 5 ms error at a sampling rate of 250 Hz), meeting the accuracy requirements for HRV analysis. The ECG signals collected by the wearable device are processed by a microcontroller and then transmitted to the mobile terminal in real time via a Bluetooth module; after receiving the signals, the mobile terminal caches the data and performs AES-256 encryption and CRC-32 verification to ensure the integrity and security of the data when uploading it to the cloud server.

[0057] Step 20: Signal preprocessing. As Figure 3 shown, the cloud server preprocesses the original ECG signals. The specific steps include:

[0058] ① First, median filtering (filter window: 500 ms) is used to smooth the signals, and a linear detrending algorithm is used to eliminate the global drift, ensuring that the baseline fluctuation of the processed signals is controlled within ±0.1 mV.

[0059] ② Then, a fifth-order Butterworth low-pass filter is used to filter the signals, with the cut-off frequency set at 25 Hz. Its transfer function is where is the cut-off angular frequency and a is the filter order.

[0060] ③ To further reduce high-frequency noise, the db6 wavelet basis function is used to perform five-layer multi-scale decomposition on the signals, and adaptive soft threshold denoising is implemented on the wavelet coefficients at each layer. The threshold calculation formula is where J is the number of coefficients in the current decomposition layer.

[0061] ④ If necessary, a 0.5 Hz cut-off frequency, third-order Butterworth high-pass filter is automatically enabled, and a linear-phase FIR filter is used to compensate for the group delay to further eliminate low-frequency drift.

[0062] Step 30: HRV feature extraction. As Figure 4 shown, the preprocessed signals are used to calculate the NN interval sequence and extract the following HRV features:

[0063] ① Time-domain indices: Calculate the average NN interval, standard deviation of NN intervals, and root mean square of successive differences (RMSSD). The calculation formula for RMSSD is At the same time, time-domain features such as the proportion of adjacent NN interval differences greater than 50 ms (pNN50) and 20 ms (pNN20) are statistically analyzed.

[0064] ②Frequency domain metrics: Calculate the power spectral density using FFT (with a Hanning window and a resolution of 0.01 Hz), and extract the integrated values of ultra-low frequency (ULF, 0–0.04 Hz), very low frequency (VLF, 0.04–0.15 Hz), low frequency (LF, 0.15–0.4 Hz), and high frequency (HF, 0.4–0.8 Hz); calculate frequency domain features such as low frequency normalized power LFnu = LF / (TP - VLF)×100%, high frequency normalized power HFnu = HF / (TP - VLF)×100%, and LF / HF ratio;

[0065] ③Nonlinear metrics: Extract Poincaré Plot parameters (short axis SD1, long axis SD2, and their ratio), multi-scale entropy (MSE), modified sample entropy (mSampEn, with a tolerance of r = 0.15×SD), short-term and long-term detrended fluctuation analysis exponents (DFAα1 and α2), and symbolic dynamics and fragmentation metrics (such as percentage of inflection points PIP, proportion of short segments PSS, proportion of alternating segments PAS, and their coefficient of variation) and other nonlinear features.

[0066] Step 40: Feature selection and data augmentation. As Figure 5 shown, to improve the effectiveness of feature data and the model training effect, the system processes the HRV features extracted in step 30 as follows:

[0067] ①Adopt the SHAP value screening method, calculate the Shapley contribution value of each feature, and retain the top-K features with the highest contribution (K is set to 40), and its formula is

[0068] ②Adopt the data augmentation method based on Wasserstein GAN to construct a generator (consisting of 5 fully connected layers) and a discriminator (using the gradient penalty strategy, λ = 10), and its loss function is

[0069] ③Finally, first perform Z-score standardization on the data (formula: Then use min-max normalization to map the data to the [0, 1] interval (formula: ).

[0070] Step 50: Construct a dynamic graph neural network and a CNN-GRU parallel neural network. As Figure 6 shown, using the data processed in step 40, the system constructs a deep learning model that integrates a dynamic graph neural network and a CNN-GRU for the classification of depressive states. During the implementation process:

[0071] ①First, convert the input feature vector into node features through a fully connected layer And an improved cosine similarity is used to calculate the edge weights between nodes, and the formula is ∈ e = 1e-8; Then, a multi-head attention mechanism is introduced into the graph neural network module. By mapping node features into query, key, and value vectors, the outputs of each attention head are calculated and concatenated to obtain the final weighted feature representation. The Chebyshev polynomial approximation is used for graph convolution operations, and the formula is where is the normalized Laplacian matrix, is the k-th order Chebyshev polynomial, and θ k are trainable parameters;

[0072] ② At the same time, to fully extract local temporal features, the system uses multi-scale one-dimensional convolutional kernels (3-point, 5-point, and 7-point) combined with dilated convolution (dilation coefficient set to 2). The 3-point, 5-point, and 7-point convolutional kernels are used for feature extraction. Experiments show that combining multi-scale convolutional kernels can effectively improve the accuracy of depression state assessment. Therefore, these three convolutional kernels are finally used for parallel processing. And the gated recurrent unit (GRU) is used to capture long temporal dependencies, and its update gate formula is

[0073] ③ Model output and fusion: In the parallel structure, the graph neural network module and the CNN-GRU module process the HRV feature data respectively. The graph neural network module focuses on extracting graph structure features, while the CNN-GRU module focuses on learning temporal patterns. The output results of the two modules are concatenated in the feature dimension to obtain a richer feature vector. The concatenated feature is input to the fully connected layer for processing, and finally the depression state classification result is output.

[0074] Step 60, Model optimization and depression state assessment. As Figure 7 shown, to improve the classification performance and generalization ability of the model, the system introduces the following optimization strategies during the training phase:

[0075] ① Based on the SimCLR framework, a projection head consisting of 2-layer MLP is constructed (the hidden layer dimension is 256), and the temperature parameter is set to τ = 0.1;

[0076] ② A domain classifier consisting of 3 fully connected layers (sizes are 64, 32, 1 in sequence) is constructed, and a gradient reversal layer (multiplied by the coefficient reversal factor γ = -1) is used during backpropagation to reduce the influence of individual differences and environmental interference;

[0077] ③ Use Bayesian optimization to automatically search for the best combination of learning rate (logarithmically uniformly distributed in [1e-5, 1e-3]), batch size (such as 32, 64, or 128), and the number of graph convolutional layers (such as 2, 3, or 4). The experimental results show that choosing a learning rate of 1e-4 can ensure the convergence speed while avoiding unstable training fluctuations. Therefore, the learning rate is finally determined to be 1e-4; a batch size of 64 provides the best balance, ensuring both training efficiency and not overly affecting the model stability. Finally, the batch size is chosen as 64; 3 graph convolutional layers provide the best balance between accuracy and computational efficiency, so 3 layers are chosen.

[0078] ④ Start the early stopping mechanism when there is no improvement for 5 consecutive epochs on the validation set to prevent overfitting.

[0079] Finally, the model outputs the four-classification results of the depression state, corresponding to healthy, mild depression, moderate depression, and severe depression respectively. The system normalizes the output using the softmax function and calculates the area of the color block displayed on the mobile terminal for each state through the formula c = 1, 2, 3, 4, where S total is the total display area. The mobile terminal displays the classification results in real time through an intuitive graphical user interface and shows the historical records of the last 30 days in the form of a timeline. At the same time, it supports users to touch and query the key HRV feature data at each moment.

[0080] This example details the implementation of the depression state assessment method and device based on heart rate variability features and parallel neural networks of the present invention. This example not only covers steps such as data collection, signal preprocessing, HRV feature extraction, feature selection and data augmentation, deep model construction and optimization, but also combines Figure 2 the hardware modules in to detail the roles of the preamplifier circuit, differential amplifier circuit, and A / D conversion circuit in data collection, ensuring that the collected electrocardiogram signals have high quality and high accuracy. After actual testing, Example 1 performs excellently in real-time and accurately evaluating the depression state of the subject, with high robustness and stability.

[0081] Example 2:

[0082] Based on Example 1, this embodiment optimizes and improves some parameters and processing flows to verify the applicability and stability of the present invention under different environmental and noise conditions.

[0083] In step 10, the wearable device is still used to collect electrocardiogram signals, but an environmental interference adaptive compensation module is added. The device adopts an improved impedance detection algorithm, which not only detects the contact impedance between the electrode and the skin (still required to be lower than 2 kΩ), but also dynamically adjusts the sampling parameters according to the real-time electromagnetic interference. At the same time, in addition to recording basic information, physiological indicators such as body temperature and blood pressure are also synchronously collected. In the data transmission part, while continuing to use AES-256 encryption and CRC-32 checksum, a real-time data caching function is added to ensure that data is not lost during network fluctuations.

[0084] In step 20, in the preprocessing stage of this embodiment, an adaptive high-pass filter module is added on the basis of Embodiment 1. When obvious low-frequency drift is detected, a 3rd-order Butterworth high-pass filter with a cut-off frequency of 0.5 Hz is automatically enabled for secondary filtering, and an FIR filter is used to compensate for the delay, thereby further improving the signal stability.

[0085] In step 30, when calculating the NN interval sequence and extracting HRV features based on the preprocessed signal, FFT is used for power spectrum estimation in the calculation of frequency domain indicators to obtain stable low-frequency and high-frequency energy indicators. At the same time, in the non-linear indicators, in addition to the conventional indicators, this embodiment also introduces a short-term dynamic complexity indicator to further capture the subtle changes in the depressive state.

[0086] In step 40, the value of K in Top-K of this embodiment is fixed at 40, and an outlier detection and rejection process is added before data normalization to ensure the stability of the input data. The data augmentation strategy based on Wasserstein GAN is similar to that of Embodiment 1, but more strict parameter settings are used during normalization to ensure that all data is mapped to a unified numerical interval.

[0087] In step 50, in the dynamic graph neural network and the CNN-GRU parallel neural network constructed in this embodiment, the order of the Chebyshev polynomial used in the graph convolution module is increased to 4 to capture more high-order features; the convolution kernel size and dilation coefficient used in the CNN module are the same as those in Embodiment 1; the parameters of the GRU module and the multi-head attention mechanism (the number of heads is set to 4) are the same as those in Embodiment 1. The parameters of each module are optimized through a large number of experiments to ensure that the model has a high classification accuracy under different data conditions.

[0088] In step 60, in the model training of this embodiment, contrastive learning, domain adaptation, Bayesian hyperparameter search and early stopping mechanism are still used, but the dimension of the hidden layer of the projection head is adjusted to 300, and a regularization term is added to prevent overfitting. During the training process, the training is automatically terminated when the F1 score has not improved for 5 consecutive epochs on the validation set. Finally, the model outputs the four-classification results of the depressive state, and the same softmax normalization and area calculation formula as in Embodiment 1 are used c = 1, 2, 3, 4, is visually displayed on the mobile terminal, and at the same time supports historical record query and traceability of key HRV feature data.

[0089] Based on Example 1, this example proves that the solution of the present invention can stably and accurately achieve the assessment of the depressive state under different data acquisition environments and noise interference conditions by adding an environmental interference adaptive compensation module, optimizing the preprocessing process, improving the calculation methods of frequency domain and non-linear indicators, and adjusting model parameters, further verifying the applicability and robustness of the method and device of the present invention.

[0090] The present invention provides a method and device for depressive assessment based on heart rate variability features and parallel neural networks, with a reasonable system structure, simple operation, high assessment accuracy, good real-time performance and strong robustness, which can effectively overcome the limitations of traditional methods in signal processing, feature extraction and model generalization, and provides strong technical support for mental health management and psychological intervention.

Claims

1. A method for evaluating depression based on heart rate variability characteristics and parallel neural networks, characterized in that: The following steps are involved: Step 10: ECG signal collection: collect ECG signals with a wearable device and transmit the ECG signals to a mobile terminal, which transmits the ECG signals to a cloud server. Step 20, signal preprocessing: the cloud server performs baseline drift removal, high-frequency noise filtering, wavelet denoising and optional high-pass filtering on the original ECG signal in sequence; Step 30, heart rate variability feature extraction: extracting time domain, frequency domain and nonlinear features from the preprocessed time interval between two adjacent normal heartbeats, i.e., the sequence of NN intervals, and evaluating the heart rate complexity and fragmentation indexes; Step 40, feature selection and enhancement: generate an optimized feature set through feature importance screening, dynamic alignment, data augmentation and standardization; Step 50: Deep model construction: Extract high-order graph features based on the graph neural network, introduce a multi-head attention mechanism in the graph neural network module to strengthen key information, and build a parallel convolutional neural network-gated recurrent unit, i.e., CNN-GRU module, to learn temporal patterns; finally, the output results of the graph neural network and the CNN-GRU module are concatenated in the feature dimension, and the final classification result is generated through the fully connected layer; Step 60, model optimization and result output: using contrastive learning and domain adaptive optimization models, the cloud server outputs the four-category results of depression status and transmits them back to the terminal device for display, and stores the results in the cloud server for subsequent analysis and optimization.

2. The method according to claim 1, characterized in that: The wearable device includes medical-grade silver / silver chloride ECG electrodes, a preamplifier circuit, a differential amplifier circuit, an A / D conversion circuit, a microcontroller, a Bluetooth module, and a built-in impedance detection module; wherein the built-in impedance detection module ensures that the electrode-skin contact impedance is less than 2kΩ, the ECG electrodes are used to collect ECG signals of the human body, and a three-electrode layout of the right arm RA, the left arm LA, and the left leg LL is adopted, the preamplifier circuit is used to preliminarily amplify weak ECG signals, the differential amplifier circuit further amplifies the signal while improving the common-mode suppression capability to reduce noise interference, the A / D conversion circuit converts the amplified analog signal into a digital signal, and the microcontroller wirelessly transmits the converted digital signal to a mobile terminal through the Bluetooth module.

3. The method according to claim 1, characterized in that The step 10 specifically includes: ① The ECG electrode device has a built-in 500Hz sampling rate module, which is connected to the terminal device through the Bluetooth 5.0 protocol. Impedance detection is performed before each acquisition to ensure that the electrode-skin contact impedance is less than 2kΩ; ② During the collection process, the subject’s age, gender, and health status metadata are recorded, and associated timestamps are used to mark changes in physiological status; ③ The Advanced Encryption Standard 256-bit encryption algorithm is used to encrypt the ECG signal end-to-end, and a 32-bit cyclic redundancy check is added to the data packet.

4. The method according to claim 1, characterized in that: The step 20 specifically includes: ① Baseline drift removal: The local baseline is estimated by applying a median filter with a window length of 500ms, and the global trend is removed by a linear detrending function. After processing, the signal baseline fluctuation range is controlled within ±0.1mV; ② High-frequency noise filtering: Use a 5th-order Butterworth low-pass filter to achieve 25Hz cutoff frequency filtering, and its transfer function is: Where ω is the angular frequency in radians per second, ω c represents the cutoff angular frequency, and a represents the filter order; ③ Wavelet denoising: The Daubach 6 wavelet (db6) basis function is used to perform 5-layer multi-scale decomposition, and adaptive soft threshold denoising is performed on each layer of coefficients. The threshold formula is: Where threshold represents the threshold, coeffs lowest Refers to the coefficients of the lowest scale layer in the wavelet decomposition, median(|coeffs lowest |) refers to the median of the absolute values ​​of these coefficients, 0.6745 represents the normalization constant, 0.85 represents the empirical correction factor, and J is the total number of coefficients in the current decomposition layer; ④ Residual baseline correction: A 0.5 Hz cutoff frequency, 3rd order Butterworth high-pass filter is added, and its group delay compensation is achieved through a linear phase finite impulse response filter, i.e., a linear phase FIR filter.

5. The method according to claim 1, characterized in that The step 30 specifically includes the following three-dimensional indicator sets: ① Time domain features: including but not limited to the following features: Basic statistics: mean NN interval MeanNN, standard deviation SDNN, root mean square difference RMSSD, where the RMSSD calculation formula is: where NN i Represents the time interval between two consecutive normal heartbeats, NN i -NN i-1 Represents the difference between adjacent heartbeat intervals, N represents the total number of measured heartbeat intervals; segmented statistics: the proportion of adjacent NN intervals with a difference greater than 50ms pNN50, the proportion of differences greater than 20ms pNN20, and the segmented standard deviation SDANN; ② Frequency domain features: The power spectrum density is calculated by fast Fourier transform FFT, and the extraction includes but is not limited to: absolute power: ultra-low frequency ULF, 0-0.04Hz; very low frequency VLF, 0.04-0.15Hz; low frequency LF, 0.15-0.4Hz; high frequency HF, 0.4-0.8Hz; frequency band integral value; relative power: low frequency normalized power LFnu=LF / (TP-VLF)×100%, TP is the total power; high frequency normalized power HFnu=HF / (TP-VLF)×100%; power ratio: low frequency / high frequency ratio LF / HF, very low frequency / ultra-low frequency ratio VLF / ULF, total power and average NN interval ratio TP / MeanNN; ③ Nonlinear characteristics: including but not limited to the following characteristics: Poincare map parameters: minor axis standard deviation SD1, major axis standard deviation SD2, SD1 / SD2 ratio, ellipse area S, the formula is as follows: Var ⊥ and Var || Represent the variance in the vertical and parallel diagonal directions respectively; entropy indicators: multi-scale entropy MSE, scale factor 1-20; modified sample entropy mSampEn, tolerance r = 0.15×SD; fractal analysis: short-term detrended fluctuation analysis index DFAα1, 4≤n≤16; long-term detrended fluctuation analysis index DFAα2, 16≤n≤64; symbolic dynamics indicators: Markov state transition probability of word length 3, Shannon entropy; fragmentation indicators: including inflection point percentage PIP; short segment ratio PSS, segment length ≤5; alternating segment ratio PAS and its coefficient of variability.

6. The method according to claim 1, characterized in that The step 40 specifically includes: ① Shapley value feature screening: Based on the screening range verified by the preset experiment, the Shapley value of each feature is calculated and the top K features are retained, where K is an integer from 30 to 50, and the feature contribution is defined as: where φ i represents the contribution of the i-th feature, M represents the number of experiments, f(·) represents the prediction function of the model, represents the input data containing feature i in the mth experiment, Indicates that in the mth experiment, the input data of feature i is not included; ②Wasserstein generative adversarial network augmentation: The generator network contains 5 layers of full connection, the discriminator adopts a gradient penalty strategy, the penalty coefficient λ = 10, and the loss function is: In the formula represents the distribution of samples generated by the generator, Represents distribution from generator The false samples obtained by sampling, D Represents the output value of the discriminator for false samples, represents the distribution of real data samples, and x represents the distribution of real data The real sample sampled in , D(x) represents the output value of the discriminator for the real sample, represents the sample distribution used for gradient penalty, which is interpolated between real and fake samples. represents the samples generated during the interpolation process and used to calculate the gradient, Represents the discriminator in the sample The gradient of the output with respect to the input, the first part of the formula Represents the expected output of the discriminator for the generator sample, part 2 Represents the expected output of the discriminator for the real sample, and the third part λ Represents the gradient penalty term, which is used to control the discriminator gradient; ③ Standardization: Perform standard score (Z-score) standardization and minimum-maximum normalization in sequence: Where y represents a value in the original data, μ y is the average value of all data, σ y is the standard deviation of the data, y′ represents the value in standard deviation after the original value is decentralized and normalized, y′ min and y′ max are the minimum and maximum values ​​of the standardized data, respectively. y″ means further mapping the data to the [0,1] interval to ensure that all data are within a uniform scale.

7. The method according to claim 1, characterized in that The step 50 specifically includes: ①Dynamic graph network module: node feature vector The original features are mapped through the fully connected layer; the edge weight is calculated using the cosine similarity defined by the following formula: ∈ e =1e-8, where h i represents the feature vector of node i, whose value is obtained by mapping through the fully connected layer; h j represents the feature vector of node j; h i ·h j Represents the dot product between the feature vectors of node i and node j, which is used to measure the similarity between them; ∈ e Represents a minimum constant used to prevent the denominator from being zero; EdgeWeight ij The parameter represents the edge weight between node i and node j calculated by cosine similarity. A multi-head attention mechanism is introduced in this module. First, the node features are mapped into query, key and value vectors, and the relationship between nodes is weighted combined using multiple attention heads. Then, the attention weight is calculated. The output of the attention head is the weighted sum of the values. Then, the outputs of all heads are concatenated and mapped through the weight matrix. The graph convolution operation uses Chebyshev polynomial approximation: In the formula is the normalized Laplace matrix, T k is the k-order Chebyshev polynomial, where represents the updated node feature vector after the graph convolution layer calculation, σ h ReLU represents the activation function, which is used to introduce nonlinear transformation, θ k represents the learnable coefficients of the k-th order Chebyshev polynomial, represents the kth order Chebyshev polynomial, where represents the normalized Laplacian matrix, which is used to capture the graph structure information, and Represents the node feature vector of the lth layer, and the summation symbol in the formula Represents the weighted accumulation of the calculation results of polynomials from 0 to K orders, thereby completing the graph convolution operation; ② Convolutional neural network module: multi-scale one-dimensional convolution kernels are used in parallel, with the number of output channels being 32 / 64 / 128 respectively; dilated convolution is used to expand the receptive field; ③Gated Recurrent Unit (GRU) module: hidden layer dimension 128, update gate The calculation formula is: Where σ t Represents the activation function Sigmoid, Represents the output of the update gate, whose value is activated by the activation function σ t Mapped to the interval [0,1] to control information update; W z Represents the weight matrix of the update gate, which is used to update the hidden state of the previous moment and the current input The vector obtained after splicing is linearly transformed, where The dimension of is 128, corresponding to the size of the hidden layer, and Represents the input data at the current moment; ④Parallel structure fusion: The dynamic graph neural network module and the CNN-GRU module process the heart rate variability feature data in parallel, extracting graph structure features and time series features respectively; the output results of the two modules are spliced ​​in the feature dimension, and the final classification results are generated through the fully connected layer.

8. The method according to claim 1, characterized in that The model optimization in step 60 includes: ① Contrastive learning optimization: Based on simplified contrastive learning, the projection head network of the SimCLR framework contains 2 layers of multi-layer perceptrons, 256-dimensional hidden layers, and a temperature parameter τ = 0.1; ② Domain adaptation: The domain classifier D consists of 3 fully connected layers with sizes of 64-32-1. The gradient reversal layer is multiplied by the reversal factor γ = -1 during back propagation; ③ Hyperparameter optimization: The Bayesian optimization search space is defined as: learning rate: log uniform distribution [1e-5, 1e-3], batch size: {32, 64, 128}, number of graph convolution layers: {2, 3, 4}; ④Early stopping mechanism: Terminate training when the F1 score of the validation set does not improve for 5 consecutive epochs.

9. The method according to claim 1, characterized in that: The four classification results outputted in step 60 include: health, mild depression, moderate depression, and severe depression, and are presented on the display screen of the terminal device in the following manner: ① Visualization of classification results: Four-quadrant color blocks are used to dynamically display the current depression state. The area of ​​the color block corresponding to each state is positively correlated with the softmax probability value. The calculation formula is: Among them A c represents the color block area corresponding to the c-th state, z c represents the original score of the c-th state, exp(z c ) represents the exponential transformation of the score, Represents the sum of the index scores of all four categories of states, which is used to calculate the softmax probability, S total Represents the total area of ​​the entire display area, thereby ensuring that the color block area is positively correlated with the softmax probability value; ②Historical record display: The classification results distribution of the last 30 days is displayed in a rolling timeline format, and the frequency of occurrence of the four types of status is marked by color coding; ③Interactive report: When you touch and select the classification result of a specific time point, the key characteristic values ​​of heart rate variability at the corresponding moment will be displayed in conjunction, including standard deviation SDNN, low frequency / high frequency ratio LF / HF, and short axis / long axis standard deviation ratio SD1 / SD2.

10. A depression status assessment device, characterized in that: The method according to claim 9 comprises: Wearable ECG acquisition device, which includes medical-grade silver / silver chloride ECG electrodes, a preamplifier circuit, a differential amplifier circuit, an A / D conversion circuit, a microcontroller, and a Bluetooth module; Mobile terminal: Equipped with ARM Cortex-A72 processor and 5-inch AMOLED touch screen, resolution 1920×1080, refresh rate 60Hz, equipped with the following exclusive display modules: Real-time status area: presents the current classification results in four-quadrant color blocks; Historical analysis area: displays classified records in a timeline; Characteristic tracing area: displays the characteristic data of heart rate variability at the selected moment in response to touch operation; Cloud server: executes the method and generates visualization data.

Citation Information

Patent Citations

  • Depression evaluating system and method based on heart rate variability analytical method

    CN104127194A

  • Unified evaluation method for gear fatigue limit and P-S-N curve

    CN116976015A

  • Airport capacity prediction method based on causal graph neural network

    CN117371568A

  • Magnetic resonance image semantic segmentation method for cerebral arteriovenous malformation

    CN117765262A

  • Depression detection method and device based on pulse mixed supervision graph attention network

    CN118000751A

Cited By

  • ECG signal classification system, method, equipment, medium and product

    CN120995247A

  • Electrocardiosignal recovery method based on multi-modal inertial sensing and deep learning

    CN121051354A

  • Auxiliary identification method and device for monophasic depression and biphasic depression

    CN121176907A

  • Intelligent health management system for post-stroke depression

    CN121641431A

  • Multi-dimensional myocardial infarction health monitoring system based on multi-source heterogeneous physiological data

    CN121910378A