Deep Learning-Based Classification and Prediction System and Method for Heart Failure with Preserved Ejection Fraction
Through the deep learning-based ejection fraction-reserved heart failure classification prediction system, the high misdiagnosis rate and lack of grassroots resources in HFpEF diagnosis are solved, and efficient and accurate heart failure classification and interpretable diagnosis are achieved.
Patent Information
- Application Number
- CN202510736051.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2045-06-04
AI Technical Summary
The prior art has problems such as high misdiagnosis rate, unbalanced diagnostic performance, lack of grassroots resources and low accuracy of AI-ECG in the noisy environment in the diagnosis of heart failure with ejaculation fraction (HFpEF), which leads to difficulties in early screening.
The ejection fraction-reserved heart failure classification prediction system based on deep learning is adopted, including signal preprocessing module, feature extraction module and decision output module. The adaptive R-wave detection algorithm, CNN-LSTM network and multimodal dynamic decision algorithm are used to dynamically balance spatial features and timing characteristics to generate interpretable reports.
It improves the accuracy of R-wave detection, improves the accuracy and efficiency of heart failure classification, reduces uncertainty, and generates interpretable diagnostic reports, suitable for community screening and hospital diagnosis assistance.
Smart Images

Figure CN120241092B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the cross - technical field of intelligent medicine and artificial intelligence, and particularly relates to a classification prediction system and method for heart failure with preserved ejection fraction based on deep learning. Background Art
[0002] Heart failure with preserved ejection fraction (HFpEF) accounts for 50% of all heart failure cases. The diagnostic dilemma stems from the non - specificity of symptoms, the complexity of examinations, and the heterogeneity of the disease. The atypical clinical manifestations of patients lead to a misdiagnosis rate as high as 30% - 50%. A definite diagnosis depends on laboratory index natriuretic peptide levels, echocardiogram (left ventricular ejection fraction ≥ 50%), and diastolic function indexes (such as E / e′>9). For some patients, even invasive right heart catheterization is required. The high technical requirements and the lack of primary medical resources limit the early screening of HFpEF. Although the existing H2FPEF and HFA - PEFF scoring systems integrate multiple parameters (age, BMI, atrial fibrillation, etc.), their sensitivity decreases due to the underestimated natriuretic peptide levels in obese populations, and it is difficult to collect grass - roots data, so their applications are limited. This regional imbalance in diagnostic efficacy directly leads to about 35% of patients progressing to the irreversible myocardial remodeling stage when diagnosed. The prognosis of HFpEF is poor, and the mortality rate of HFpEF is similar to that of heart failure with reduced ejection fraction (HFrEF) (about 50%), becoming a major public health burden.
[0003] In this context, the breakthrough of AI - electrocardiogram (AI - ECG) technology provides a new path for the early diagnosis and management of HFpEF. However, there are the following problems with AI - ECG in heart failure diagnosis: the R - wave miss - detection rate > 15% in a noisy environment, the extraction of single - lead features resulting in AUC < 0.8, and the lack of an interpretable decision - making mechanism. Overall, this leads to low accuracy and efficiency of automated analysis.
[0004] Therefore, the present invention proposes a classification prediction system and method for heart failure with preserved ejection fraction based on deep learning. Summary of the Invention
[0005] The present invention provides a classification prediction system and method for heart failure with preserved ejection fraction based on deep learning to solve the above - mentioned technical problems.
[0006] The present invention proposes a classification prediction system for heart failure with preserved ejection fraction based on deep learning, including:
[0007] A signal pre - processing module, configured to automatically cut an electrocardiogram signal to obtain a heartbeat cycle based on an adaptive R - wave detection algorithm, wherein the adaptive R - wave detection algorithm includes: multi - level filtering processing, dynamic threshold construction, and peak location constraint;
[0008] A feature extraction module, which is used to parallel - process the spatial features of electrocardiogram signals and capture the temporal features of the heartbeat cycle based on a CNN - LSTM network, dynamically balance the contributions of the spatial features and the temporal features, and output a deep feature vector;
[0009] A decision - making output module, which is used to evaluate the deep feature vector based on a multi - modal dynamic decision - making algorithm, predict the heart failure type of the risk level of heart failure with preserved ejection fraction, and generate an interpretable report.
[0010] Preferably, the feature extraction module includes:
[0011] A parallel dual - channel convolution unit, which is used to apply an intra - lead convolution kernel of 1×15 and an inter - lead convolution kernel of 12×1 to parallel - extract the single - lead waveform features of electrocardiogram signals and capture the inter - lead correlation, and obtain spatial features;
[0012] A bidirectional LSTM unit, which is used to capture the forward and backward temporal changes of electrocardiogram signals in each heartbeat cycle based on bidirectional LSTM, and enhance the weights of key time nodes by combining an attention mechanism to obtain temporal features;
[0013] A gated fusion unit, which is used to dynamically balance the contributions of spatial and temporal features by gated fusion and output a 256 - dimensional deep feature vector.
[0014] Preferably, the signal pre - processing module includes:
[0015] A filter construction sub - module, which is used to construct a multi - level filter and perform multi - level filtering on electrocardiogram signals. The multi - level filter consists of a first - level high - pass filter, a second - level low - pass filter, and a third - level median filter;
[0016] A threshold determination sub - module, which is used to calculate the signal mean and standard deviation within a set time window in real - time based on the electrocardiogram signals after multi - level filtering, and update the threshold according to the dynamic threshold formula;
[0017]
[0018]
[0019] Among them, represents the dynamic threshold; 、 are empirical coefficients, and ; is the corresponding signal mean; is the corresponding standard deviation; is an adjustment function; represents the number of peaks in the signal within the corresponding set time window; represents the number of valleys in the signal within the corresponding set time window; Represents the time amount between adjacent peak points and valley points in the signal within the corresponding set time window; Respectively represent the maximum value, minimum value, and average value based on all within the corresponding set time window; Represents the set time window;
[0020] An R-wave positioning sub-module, which is used to search for signal peaks in the electrocardiogram signal after multi-stage filtering processing based on the determination of the dynamic threshold. When the signal peak exceeds the dynamic threshold, the peak is positioned, and at the same time, constraint conditions are introduced to determine the position of the R-wave. Among them, the constraint conditions include the minimum time interval, maximum time interval, and relative change range of the peak amplitude between adjacent peaks;
[0021] A cycle determination sub-module, which is used to regard the R-wave position and the time period between adjacent R-waves as a heartbeat cycle.
[0022] Preferably, the filter construction sub-module includes:
[0023] A first construction unit, which is used to set a first frequency range and a high-pass cut-off frequency for the initial filter, input signals of different frequencies generated by a signal generator into the initial filter to obtain a first response curve, and construct a first cut-off sequence;
[0024] A second construction unit, which is used to set a second frequency range and a low-pass cut-off frequency for the initial filter, input signals of different frequencies generated by a signal generator into the initial filter to obtain a second response curve, and construct a second cut-off sequence;
[0025] A third construction unit, which is used to set a third frequency range for the initial filter, input signals of different frequencies generated by a signal generator into the initial filter to obtain a third response curve, and construct a third difference sequence;
[0026] A sequence determination unit, which is used to intercept a first sequence from the end of the first cut-off sequence and a second sequence from the beginning of the second cut-off sequence according to the multi-stage construction order in a specified window to obtain a first transition sequence, and intercept a third sequence from the end of the second cut-off sequence and a fourth sequence from the beginning of the third difference sequence to obtain a second transition sequence;
[0027] A first coefficient determination unit, which is used to respectively determine the maximum value sequence and minimum value sequence in the first transition sequence and the second transition sequence, and determine the sequence fluctuation coefficient and sequence fluctuation similarity coefficient of each maximum value sequence and each minimum value sequence, so as to obtain the first coefficient to be optimized for the corresponding transition sequence;
[0028] A second coefficient determination unit, configured to respectively obtain the number of maximum value anomalies and the number of minimum value anomalies existing in the first cut-off sequence, the second cut-off sequence, and the third difference sequence, and obtain the second coefficient to be optimized for the corresponding sequence;
[0029] A circuit setting unit, configured to determine the transition buffer circuit for each transition sequence according to the first coefficient to be optimized and the second coefficient to be optimized, and in combination with the corresponding impedance characteristics, and set it between the corresponding filtering components to implement the construction of a multi-stage filter.
[0030] Preferably, the circuit setting unit includes:
[0031] A first design sub-unit, configured to perform impedance measurement on the transmission media of the first-stage high-pass filtering and the second-stage low-pass filtering in the initial filter, and combine the first change in the input impedance and output impedance of the first-stage high-pass filtering, the second change in the input impedance and output impedance of the second-stage low-pass filtering, and the third change in the output impedance of the first-stage high-pass filtering and the input impedance of the second-stage low-pass filter to obtain a first impedance vector, and in combination with the first coefficient to be optimized, establish a first design model of the transition buffer circuit;
[0032] A second design sub-unit, configured to perform impedance measurement on the transmission media of the second-stage low-pass filtering and the third-stage median filtering in the initial filter, and combine the fourth change in the input impedance and output impedance of the third-stage median filtering, the second change in the input impedance and output impedance of the second-stage low-pass filtering, and the fifth change in the output impedance of the second-stage low-pass filtering and the input impedance of the third-stage median filter to obtain a second impedance vector, and in combination with the second coefficient to be optimized, establish a second design model of the transition buffer circuit;
[0033] An optimization adjustment sub-unit, configured to perform simulation tests on the design model to determine the participation accuracy of each component, and adjust and optimize the corresponding design model until the set standard is met, and obtain the specific structure and component parameters of each component in the design model that meets the set standard, and fabricate the transition buffer circuit.
[0034] Preferably, the bidirectional LSTM unit includes:
[0035] A sequence determination sub-unit, configured to learn each heartbeat cycle signal based on the bidirectional LSTM network, and obtain a hidden state sequence containing forward and reverse timing features;
[0036] An event configuration sub-unit, configured to configure arbitration events for each hidden state in the hidden state sequence, and receive arbitration signals;
[0037] A range determination sub-unit, configured to determine the priority range of each hidden state according to the arbitration signal, and configure it to the corresponding hidden state;
[0038] A conversion subunit, configured to construct a priority matrix according to the number of the hidden state sequences and the priority range of each hidden state, and convert the hidden state sequences to obtain temporal features.
[0039] Preferably, the decision output module includes:
[0040] A grading unit, configured to input the depth feature vector into a multi-modal dynamic decision algorithm to predict the risk grade and heart failure type of heart failure with preserved ejection fraction, wherein the risk grade includes: low risk, medium risk, and high risk;
[0041] A mining unit, configured to mine the feature depth and feature breadth of each depth feature in the depth feature vector to obtain feature importance;
[0042] Meanwhile, based on the process log of the multi-modal dynamic decision algorithm, analyze the treatment responsiveness of each depth feature;
[0043] A generating unit, configured to generate an interpretable report according to the importance and treatment responsiveness, and in combination with the feature type, risk grade, and heart failure type of the corresponding depth feature.
[0044] The present invention provides a classification prediction method for heart failure with preserved ejection fraction based on deep learning, including:
[0045] Step 1: Automatically cut the electrocardiogram signal based on an adaptive R-wave detection algorithm to obtain a heartbeat cycle, wherein the adaptive R-wave detection algorithm includes: multi-level filtering processing, dynamic threshold construction, and peak positioning constraint;
[0046] Step 2: Based on a CNN-LSTM network, process the spatial features of the electrocardiogram signal in parallel and capture the temporal features of the heartbeat cycle, dynamically balance the contributions of the spatial features and the temporal features, and output a depth feature vector;
[0047] Step 3: Based on a multi-modal dynamic decision algorithm, evaluate the depth feature vector, predict the risk grade and heart failure type of heart failure with preserved ejection fraction, and generate an interpretable report.
[0048] Compared with the prior art, the beneficial effects of the present application are as follows:
[0049] By means of a multi-level filtering and dynamic threshold mechanism, solve the problem of missed detection of R waves caused by noise interference and motion artifacts. The design based on a CNN-LSTM network ensures the refinement of feature extraction. By means of a multi-modal dynamic decision algorithm, ensure the prediction accuracy and improve the analysis efficiency.
[0050] Other features and advantages of the present invention will be described in the following specification, and partly will be obvious from the specification, or will be understood by implementing the present invention. The objectives and other advantages of the present invention can be achieved and obtained by the structures specifically pointed out in the written specification and the drawings.
[0051] The technical solutions of the present invention will be further described in detail below through the drawings and embodiments. Description of the Drawings
[0052] The drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention, and do not constitute a limitation to the present invention. In the drawings:
[0053] Figure 1 It is a structural diagram of a classification prediction system for heart failure with preserved ejection fraction based on deep learning in an embodiment of the present invention;
[0054] Figure 2 It is a flowchart of a classification prediction method for heart failure with preserved ejection fraction based on deep learning in an embodiment of the present invention. Detailed Embodiments
[0055] The following describes the preferred embodiments of the present invention with reference to the drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0056] The present invention proposes a classification prediction system for heart failure with preserved ejection fraction based on deep learning, as Figure 1 shown, including:
[0057] A signal preprocessing module, which is used to automatically cut the electrocardiogram signal based on an adaptive R-wave detection algorithm to obtain a heartbeat cycle. Among them, the adaptive R-wave detection algorithm includes: multi-level filtering processing, dynamic threshold construction, and peak position constraint;
[0058] A feature extraction module, which is used to parallel process the spatial features of the electrocardiogram signal and capture the temporal features of the heartbeat cycle based on a CNN-LSTM network, dynamically balance the contributions of the spatial features and the temporal features, and output a deep feature vector;
[0059] A decision output module, which is used to evaluate the deep feature vector based on a multi-modal dynamic decision algorithm, predict the risk level and heart failure type of heart failure with preserved ejection fraction, and generate an interpretable report.
[0060] In this embodiment, multi-stage filtering processing is performed on the ECG signal to remove noise, solving the interference of baseline drift (≤0.5Hz) and electromyogram noise (≥100Hz). The original signal is first subjected to a first-stage 0.5Hz high-pass filter, then a second-stage 45Hz low-pass filter, and then a third-stage median filter. The formula:
[0061] First-stage high-pass filter (removing baseline drift):
[0062] Objective: Remove low-frequency noise (such as baseline drift) of ≤0.5Hz.
[0063] Formula:
[0064] Coefficients:
[0065] , ;
[0066] Design optimization: Based on the Butterworth filter, ensure that the passband ripple ≤0.5dB and the stopband attenuation ≥40dB.
[0067] Second-stage low-pass filter (suppressing electromyogram noise):
[0068] Objective: Remove high-frequency noise (such as electromyogram noise) of ≥100Hz.
[0069] Formula:
[0070] Coefficients:
[0071] ,
[0072] ;
[0073] Design optimization: Also based on the Butterworth filter.
[0074] Third-stage median filter (smoothing the signal):
[0075] Objective: Further smooth the signal and remove sharp noise.
[0076] Formula:
[0077] In this embodiment, the dynamic threshold is constructed as:
[0078] Dual-threshold mechanism:
[0079] Short-term threshold: Based on the local features of the exponential moving average (EMA).
[0080] Long-term threshold: Maintain the extreme values of a sliding window of 128 sampling points.
[0081] The threshold fusion formula is as follows:
[0082]
[0083] Parameters:
[0084] In this embodiment, the peak positioning constraint is:
[0085] R-wave detection conditions:
[0086] ; where: is the average slope of the 10 ms before the R-wave, is the average slope of the 10 ms after the R-wave [[ID=?]]
[0087] Through multi-level filtering (high-pass, low-pass, median filtering) and dynamic threshold mechanism (EMA and sliding window extreme value fusion), the problem of missed detection of R-waves caused by noise interference and motion artifacts is solved.
[0088] The R-wave detection rate is increased to 98.7% (verified by the MIT-BIH database), which is significantly better than the existing technology (missed detection rate > 15%).
[0089] In this embodiment, the CNN-LSTM spatio-temporal feature joint extraction network, implementation steps:
[0090] Spatial feature extraction path (CNN branch):
[0091] Intra-lead convolution: Extract the single-lead waveform features, and the convolution kernel is 1×15.
[0092]
[0093] Inter-lead convolution: Capture the inter-lead correlation, and the convolution kernel is 12×1.
[0094]
[0095] Feature fusion: After fusing F1 and F2, compress to 128 dimensions through 3×3 convolution.
[0096]
[0097] where represents the convolution kernel, and LN is Layer Normalization
[0098] Temporal feature extraction path (LSTM branch):
[0099] Bidirectional LSTM: Capture the heart rate variability features forward and extract the repolarization process features backward. Please note that there seems to be a formatting or content issue with the "?
[0087] " in the original text. It's not clear what this is supposed to be. The translation is done as accurately as possible based on the provided text.
[0100]
[0101] Attention mechanism: Dynamically weighted time features.
[0102]
[0103] Temporal feature output:
[0104] Feature fusion:
[0105] Gated fusion mechanism:
[0106]
[0107]
[0108] In this embodiment, the multi-modal dynamic decision algorithm is:
[0109] Calculate the class probability distribution for each heartbeat, then calculate the bimodal confidence, and dynamically generate the final decision.
[0110] Heartbeat-level prediction:
[0111]
[0112] Confidence calculation:
[0113] Decision function:
[0114] Dynamic threshold:
[0115] Based on the constructed cascade filtering system, μVμV-level weak signal detection is achieved. Based on cross-lead convolution operation, the spatial feature resolution is improved to 3.2 times that of traditional methods. Based on the dynamic decision mechanism, the uncertain case rate is reduced to less than 3.2%. Among them, all weight matrices W and bias vectors b The parameters need to be obtained through end-to-end training.
[0116] Performance metrics: Classification accuracy:
[0117]
[0118] Among them, TP is true positive, FP is false positive, FN is false negative, and TN is true negative.
[0119] Area Under the Curve (AUC) of the Receiver Operating Characteristic (ROC) curve
[0120] Decision-making time: <2 seconds per case (Intel i7-11800H processor)
[0121] One specific application scenario of the above technical solution, for example: community screening scenario
[0122] (1) Collect data using a portable 12-lead ECG device
[0123] (2) Run the R-wave detection algorithm (sampling rate adaptively adjusted)
[0124] (3) Output risk grading:
[0125] Low risk (P < 0.3): Annual review is recommended
[0126] Medium risk (0.3 ≤ P < 0.7): Refer for ultrasound examination
[0127] High risk (P ≥ 0.7): Initiate the heart failure management process
[0128] Another specific application scenario of the above technical solution: For example, hospital diagnostic assistance
[0129] (1) Interface with the HIS system to obtain historical ECG
[0130] (2) Generate an interpretable report (including feature importance analysis)
[0131] (3) Provide treatment responsiveness prediction (ΔP < 5% indicates ineffective plan)
[0132] In this embodiment, the multi-modal dynamic decision-making algorithm integrates multiple information modalities (such as electrocardiogram signal features, other physiological indicators of the patient, etc., if any), and uses machine learning or deep learning models, such as support vector machines, random forests, deep neural networks, etc. The model is first trained on a large amount of labeled data to learn the mapping relationship between the deep feature vectors and the risk levels and heart failure types of heart failure with preserved ejection fraction. During training, the model parameters are adjusted to make the prediction results as close as possible to the actual labels. Generating an interpretable report is based on the model prediction results, combined with medical knowledge and rules. For example, if the model judges a certain risk level and heart failure type, it is explained from the perspective of electrocardiogram signal features, such as which spatial or temporal features indicate abnormal cardiac electrical activity, and the medical principles associated with this heart failure type and risk level. A single electrocardiogram signal feature may not be sufficient to accurately judge the heart failure risk and type, and the multi-modal dynamic decision-making algorithm that integrates information from multiple aspects can improve the prediction accuracy. Generating an interpretable report is to enable professionals such as doctors to understand the basis of the model prediction, enhance the credibility and practicality of the results, and promote clinical applications.
[0133] The beneficial effects of the above technical solution are as follows: By means of multi-level filtering and dynamic threshold mechanism, the problem of missed detection of R waves caused by noise interference and motion artifacts is solved. The design based on the CNN-LSTM network ensures detailed feature extraction. The multi-modal dynamic decision algorithm ensures prediction accuracy and improves the analysis efficiency.
[0134] The present invention provides a classification and prediction system for heart failure with preserved ejection fraction based on deep learning. The feature extraction module includes:
[0135] A parallel dual-channel convolutional unit, which is used to extract the single-lead waveform features of the electrocardiogram signal and capture the inter-lead correlation in parallel by using a 1×15 kernel for in-lead convolution and a 12×1 kernel for cross-lead convolution, so as to obtain spatial features;
[0136] A bidirectional LSTM unit, which is used to capture the forward and backward temporal changes of the electrocardiogram signal in each heartbeat cycle based on bidirectional LSTM, and combines an attention mechanism to enhance the weights of key time nodes, so as to obtain temporal features;
[0137] A gated fusion unit, which is used to dynamically balance the contributions of spatial and temporal features by gated fusion and output a 256-dimensional deep feature vector.
[0138] In this embodiment, the in-lead convolution uses a convolution kernel with a size of 1×15. In implementation, the electrocardiogram signal is regarded as a sequence data. For the waveform of the single-lead electrocardiogram signal, the convolution kernel slides along the time dimension (length direction) of the signal. Each time it slides, the convolution kernel performs multiplication and accumulation operations with 15 consecutive data points at the corresponding position to obtain a new feature value. By continuously sliding the convolution kernel, the entire single-lead signal is processed. The cross-lead convolution uses a 12×1 convolution kernel. The electrocardiogram signal usually has 12 leads. At this time, the data of 12 leads at the same moment are regarded as a vector, and the convolution kernel slides in the lead dimension (each time for the data of 12 leads at one moment), and performs operations such as weighted summation on the data of 12 leads to capture the correlation between leads.
[0139] In this embodiment, for the input electrocardiogram signal, convolution operations are simultaneously performed using the in-lead convolution kernel and the cross-lead convolution kernel respectively. Each convolution operation has a corresponding weight matrix (convolution kernel parameters). During the training process, these weights are continuously adjusted through the backpropagation algorithm, so that the convolution operation can better extract the corresponding features. Two groups of feature maps are obtained, one group reflects the single-lead waveform features, and the other group reflects the inter-lead correlation. Combining these two groups of feature maps constitutes the spatial features of the electrocardiogram signal, providing an information basis for subsequent analysis of the spatial distribution of cardiac electrical activities.
[0140] In this embodiment, the bidirectional LSTM consists of a forward LSTM and a backward LSTM. The forward LSTM processes the electrocardiogram (ECG) signal sequence in chronological order of the heartbeat cycle, from the starting moment to the ending moment. At each time step, it receives the input at the current moment and the hidden state at the previous moment, and updates the hidden state through internal structures such as the forget gate, input gate, and output gate. The backward LSTM, on the contrary, processes the signal sequence from the ending moment to the starting moment, and performs similar calculations at each time step. Attention mechanism: After the bidirectional LSTM outputs the hidden state sequence, the attention mechanism is introduced. First, the hidden state sequence is linearly transformed through a learnable weight matrix to obtain the attention scores. Then, the softmax function is used to normalize the attention scores to obtain the attention weights at each time node, which represent the importance of information at different time nodes. Finally, the hidden state sequence is weighted and summed according to the attention weights. The ECG signals of each heartbeat cycle are input into the bidirectional LSTM, and the forward and backward hidden state sequences are calculated respectively. Then, the attention mechanism is applied to these two hidden state sequences to calculate the attention scores, weights, and perform weighted summation. During training, the weight parameters of the bidirectional LSTM and the learnable parameters in the attention mechanism are adjusted through optimization algorithms (such as stochastic gradient descent, etc.). A temporal feature vector containing the important information of key time nodes within the heartbeat cycle is obtained. This vector reflects the variation law and key features of the ECG signal in the time dimension, and helps to analyze the dynamic process of cardiac electrical activity over time.
[0141] In this embodiment, the previously obtained spatial features and temporal features are input into the gated fusion unit to calculate their respective gating values, and the two features are weighted and added (or other fusion methods, such as element-wise multiplication and then summation) according to the gating values. During the training process, the parameters of the gating unit are continuously adjusted through the backpropagation of the loss function to optimize the fusion ratio of the spatial and temporal features. A 256-dimensional deep feature vector is output. This vector synthesizes the ECG signal features in both the spatial and temporal dimensions, providing a more comprehensive and effective feature representation for subsequent tasks such as ECG signal classification and disease diagnosis.
[0142] The beneficial effects of the above technical solutions are as follows: The acquisition of temporal features and spatial features reflects the variation law and key features of the ECG signal in the time dimension, which helps to analyze the dynamic process of cardiac electrical activity over time. The 256-dimensional deep feature vector synthesizes the ECG signal features in both the spatial and temporal dimensions, providing a more comprehensive and effective feature representation for subsequent tasks such as ECG signal classification and disease diagnosis.
[0143] The present invention proposes a classification and prediction system for heart failure with preserved ejection fraction based on deep learning. The signal preprocessing module includes:
[0144] A filter construction sub-module, which is used to construct a multi-stage filter to perform multi-stage filtering on the electrocardiogram signal. The multi-stage filter consists of a first-stage high-pass filter, a second-stage low-pass filter, and a third-stage median filter;
[0145] A threshold determination sub-module, which is used to calculate the signal mean value and standard deviation within a set time window in real time based on the electrocardiogram signal after multi-stage filtering, and update the threshold according to the dynamic threshold formula;
[0146]
[0147]
[0148] Where, represents the dynamic threshold; 、 are empirical coefficients, and ; is the corresponding signal mean value; is the corresponding standard deviation; is the adjustment function; represents the number of peaks in the signal within the corresponding set time window; represents the number of valleys in the signal within the corresponding set time window; represents the time amount between adjacent peak points and valley points in the signal within the corresponding set time window; respectively represent the maximum value, minimum value, and mean value based on all within the corresponding set time window; represents the set time window;
[0149] An R-wave positioning sub-module, which is used to search for signal peaks in the electrocardiogram signal after multi-stage filtering based on the determined dynamic threshold. When the signal peak exceeds the dynamic threshold, the peak is positioned, and at the same time, constraint conditions are introduced to determine the R-wave position. Among them, the constraint conditions include the minimum time interval, maximum time interval, and relative change range of peak amplitude between adjacent peaks;
[0150] A cycle determination sub-module, which is used to take the R-wave position and the time period between adjacent R-waves as a heartbeat cycle.
[0151] In this embodiment, during the acquisition of the electrocardiogram (ECG) signal, it is subject to various types of noise interference, and a single filter is difficult to effectively remove all the noise. In hardware implementation, high-pass filtering can be achieved by an RC high-pass circuit. The cut-off frequency is determined by selecting appropriate resistor and capacitor values to filter out low-frequency noise in the ECG signal, such as baseline drift. Low-pass filtering can be achieved using a similar RC low-pass circuit or a more complex active low-pass filter, and the cut-off frequency is set to remove high-frequency noise, such as electromyogram interference. Median filtering can be achieved by sorting the signal data and taking the middle value, which is used to remove impulse noise. In software implementation, digital filtering algorithms, such as the IIR (Infinite Impulse Response) or FIR (Finite Impulse Response) filter design methods, can be used to implement high-pass and low-pass filtering. Median filtering can be achieved by programming to sort and extract values from the signal sequence.
[0152] In this embodiment, the amplitude characteristics of the ECG signal vary among different individuals and different physiological states, and a fixed threshold is difficult to adapt to various situations. By calculating the signal mean and standard deviation in real time and combining with an adjustment function, the threshold can be dynamically adjusted according to the local characteristics of the signal, making the threshold more suitable for the actual situation of the current ECG signal and improving the accuracy of R-wave detection. The adjustment function Δ1 comprehensively considers the number and timing characteristics of peaks and valleys in the signal to further optimize the dynamic adjustment of the threshold.
[0153] In this embodiment, determining the R-wave solely based on the signal peak exceeding the threshold may be affected by pseudo-peaks generated by noise or other interference. Based on the determination of the dynamic threshold, peak searching is performed on the ECG signal after multi-stage filtering. Starting from the beginning of the signal, each data point is compared with its adjacent points in turn to determine whether it is a peak. When the signal peak exceeds the dynamic threshold, it is initially considered a possible R-wave peak. At the same time, constraint conditions are introduced, including the minimum time interval, maximum time interval between adjacent peaks, and the relative change range of peak amplitudes. For example, the time interval between adjacent peaks needs to be within the time range corresponding to the normal heart beat cycle, and the change in peak amplitude cannot exceed a certain proportion. Through these conditions, the true R-wave positions are screened out.
[0154] In this embodiment, The mean, standard deviation of the signal, and the adjustment function are comprehensively considered. The mean μ reflects the average level of the signal, the standard deviation σ reflects the degree of fluctuation of the signal, and the adjustment function Δ1 combines information such as the number of peaks and valleys and time characteristics in the signal. Through this combination, the dynamic threshold can be flexibly adjusted according to the local statistical characteristics and morphological characteristics of the electrocardiogram signal, and can better adapt to the amplitude changes of different electrocardiogram signals than the fixed threshold, effectively improving the accuracy and robustness of R-wave detection. Due to the complexity and individual differences of electrocardiogram signals, there are significant differences in the amplitude and waveform characteristics of electrocardiogram signals among different people, and even the same person will have changes under different physiological states. The fixed threshold cannot cope with this change, easily leading to missed or false detections in R-wave detection. The dynamic threshold formula can adaptively adapt to various electrocardiogram signal conditions by calculating in real time and comprehensively adjusting the threshold with multiple factors, accurately identifying R waves, which is the key link to achieve reliable electrocardiogram signal analysis.
[0155] The adjustment function Δ1 comprehensively considers information such as the number of peaks Nf, the number of valleys Ng, and the time quantity between adjacent peak-valley points in the signal. For example, if the number of peaks or valleys in the signal is large within a period of time (max(Nf,Ng) is large), and the time interval between adjacent peak-valley points changes significantly, Δ1 will adjust the threshold according to these situations, making the threshold more conform to the actual morphology of the signal, further improving the accuracy and stability of R-wave detection.
[0156] The beneficial effects of the above technical solution are: The relatively pure electrocardiogram signal after multi-stage filtering processing provides a good data basis for subsequent threshold calculation and R-wave detection. The dynamic threshold that changes in real time according to the characteristics of the electrocardiogram signal provides a reasonable judgment standard for subsequent R-wave positioning. Determining the position of the R wave in the electrocardiogram signal provides a key basis for subsequent heartbeat cycle division. Dividing the electrocardiogram signal according to the heartbeat cycle is convenient for further analyzing the characteristics of the electrocardiogram signal in each cycle.
[0157] The present invention proposes a classification and prediction system for heart failure with preserved ejection fraction based on deep learning. The filter construction sub-module includes:
[0158] The first construction unit is used to set the first frequency range and the high-pass cut-off frequency for the initial filter, input signals of different frequencies generated by the signal generator into the initial filter to obtain the first response curve, and construct the first cut-off sequence;
[0159] The second construction unit is used to set the second frequency range and the low-pass cut-off frequency for the initial filter, input signals of different frequencies generated by the signal generator into the initial filter to obtain the second response curve, and construct the second cut-off sequence;
[0160] A third construction unit, configured to set a third frequency range for an initial filter, input signals with different frequencies generated by a signal generator into the initial filter to obtain a third response curve, and construct a third difference sequence;
[0161] A sequence determination unit, configured to intercept a first sequence from the end of a first cut-off sequence and a second sequence from the beginning of a second cut-off sequence according to a multi-level construction order and a specified window to obtain a first transition sequence, and intercept a third sequence from the end of the second cut-off sequence and a fourth sequence from the beginning of the third difference sequence to obtain a second transition sequence;
[0162] A first coefficient determination unit, configured to respectively determine maximum value sequences and minimum value sequences in the first transition sequence and the second transition sequence, and determine a sequence fluctuation coefficient and a sequence fluctuation similarity coefficient of each maximum value sequence and each minimum value sequence, so as to obtain a first coefficient to be optimized for the corresponding transition sequence;
[0163] A second coefficient determination unit, configured to respectively obtain the number of maximum value anomalies and the number of minimum value anomalies existing in the first cut-off sequence, the second cut-off sequence, and the third difference sequence, so as to obtain a second coefficient to be optimized for the corresponding sequence;
[0164] A circuit setting unit, configured to determine a transition buffer circuit for each transition sequence according to the first coefficient to be optimized and the second coefficient to be optimized and in combination with the corresponding impedance characteristics, and set it between the corresponding filtering components to implement the construction of a multi-stage filter.
[0165] In this embodiment, for the initial filter, a first frequency range and a high-pass cut-off frequency are set. A signal generator is used to generate a series of signals with different frequencies, and these signals are sequentially input into the initial filter. Measuring instruments (such as an oscilloscope, a spectrum analyzer, etc.) are used to record the output signals of the filter, and then a first response curve is obtained. According to the first response curve, the cut-off characteristics of the filter at different frequencies are determined, and a first cut-off sequence is constructed. This sequence records different frequency points and the corresponding cut-off characteristic parameters (such as attenuation values, etc.). Setting the first frequency range and the high-pass cut-off frequency is to define the characteristics of the initial filter in high-frequency signal processing. By inputting signals with different frequencies and obtaining the response curve, the processing ability of the filter for signals in the high-frequency band can be comprehensively understood. The constructed first cut-off sequence provides a data basis for subsequent analysis of the high-frequency characteristics of the filter, which helps to determine the accurate performance of the filter when filtering high-frequency signals. Adjust the parameters of the initial filter to set the first frequency range and the high-pass cut-off frequency, operate the signal generator to generate signals and input them into the filter, measure and record the output signals to obtain the response curve, and extract data from the curve to construct the first cut-off sequence. It should be noted that the acquisition method of the second cut-off sequence is similar to that of the first cut-off sequence, and will not be elaborated here.
[0166] In this embodiment, the initial filter is a filter model or hardware circuit that has not been finely tuned and has basic filtering functions, and includes three filtering methods: high-pass filtering, low-pass filtering, and median filtering.
[0167] For example, the high-pass cut-off frequency is the lowest frequency limit that allows signals to pass through in a high-pass filter, and the low-pass cut-off frequency is the highest frequency limit that allows signals to pass through in a low-pass filter.
[0168] In this embodiment, the response curve is a curve representing the relationship between the frequency of the filter input signal and the amplitude (or phase) of the output signal. For example, by inputting sine wave signals of different frequencies into the filter and measuring the amplitude of the output signal, and plotting a curve with frequency as the abscissa and output amplitude as the ordinate, we can intuitively see how the filter processes signals of different frequencies.
[0169] In this embodiment, the cut-off sequence is a data sequence that records the cut-off characteristics (such as attenuation values, etc.) of the filter at different frequencies. For example, within a certain frequency range, the attenuation value of the filter is measured at regular frequency intervals, and the sequence formed by these frequency points and the corresponding attenuation values is the cut-off sequence. The difference sequence is a data sequence that records the differences in the characteristics of the filter in one frequency range compared to other frequency ranges. For example, by comparing the characteristics of the filter in the low-frequency band and the high-frequency band, and finding the differences in the intermediate transition band compared to them, a difference sequence is formed. The transition sequence is composed of parts intercepted from different cut-off sequences or difference sequences, and reflects the characteristics of the filter in the transition region between different frequency bands. For example, by intercepting parts from the end of the high-frequency cut-off sequence and the beginning of the low-frequency cut-off sequence and combining them, it reflects the characteristics of the transition region from high frequency to low frequency.
[0170] In this embodiment, the maximum value sequence: In a data sequence, it is the sequence composed of local maximum values. For example, in the sequence [1, 3, 2, 5, 4], the maximum value sequence is [3, 5]. The minimum value sequence is [1, 2, 4].
[0171] In this embodiment, the sequence fluctuation coefficient: A coefficient that measures the degree of fluctuation of the maximum value sequence or the minimum value sequence. For example, it can be obtained by calculating the average value of the differences between adjacent maximum values, etc., and reflects the change amplitude of the median value in the sequence. The sequence fluctuation similarity coefficient: A coefficient that measures the similarity degree of the fluctuation patterns of the maximum value sequence and the minimum value sequence. It can be determined by calculating the correlation of the two sequences, etc. The closer the value is to 1, the more similar the fluctuation patterns are.
[0172] In this embodiment, the transition buffer circuit is a circuit designed to make the performance of the filter more stable and the signal processing smoother during the transition between different frequency bands. It is usually composed of components such as resistors, capacitors, and inductors, and its structure and parameters are determined according to the coefficients to be optimized and the impedance characteristics.
[0173] In this embodiment, assume that the maximum value sequence is [5, 7, 6] and the minimum value sequence is [3, 4, 3]. Calculate the sequence fluctuation coefficient, such as calculating the average value of the differences between adjacent maximum values: ((7 - 5) + (6 - 7)) / 2 = 0.5. Calculate the sequence fluctuation similarity coefficient, for example, the similarity coefficient is obtained as 0.6 by calculating the Pearson correlation coefficient of the two sequences. Combine these to obtain the first coefficient to be optimized.
[0174] Assume that the normal range of the maximum value is set to [-10 dB, 10 dB], and the number of maximum values exceeding this range is counted as 3. The normal range of the minimum value is [-15 dB, -5 dB], and the number of minimum values below this range is counted as 2, obtaining the second coefficient to be optimized for the first cut-off sequence. Similarly, perform statistics on the second cut-off sequence and the third difference sequence to obtain the corresponding second coefficients to be optimized. Suppose it is found through calculation that the signal stability needs to be enhanced in a certain transition region. According to these coefficients and the impedance situation, design a π-type transition buffer circuit composed of resistors and capacitors, and adjust the resistor and capacitor parameters. Then, set this transition buffer circuit between the corresponding filtering components to complete the construction of the multi-stage filter. It should be noted that each stage of filtering corresponds to a filtering component, that is, there are 3 filtering components involved in the filter, respectively for high-pass, low-pass, and median.
[0175] In this embodiment, set a third frequency range for the initial filter. This frequency range is generally a transition frequency band between the high-pass and low-pass cut-off frequencies. Use a signal generator to generate different frequency signals and input them into the initial filter, measure and record the output signals to obtain the third response curve. Analyze the third response curve, find the differences from the characteristics of the first two cut-off sequences, construct the third difference sequence, and record the difference information between the filter characteristics in this frequency band and other frequency bands.
[0176] In this embodiment, according to the multi-stage construction order (i.e., the order of the first, second, and third construction units), and according to the specified window size (a preset length for intercepting sequences), intercept the first sequence from the end of the first cut-off sequence, intercept the second sequence from the beginning of the second cut-off sequence, and combine these two intercepted sequences to obtain the first transition sequence. Similarly, intercept the third sequence from the end of the second cut-off sequence, intercept the fourth sequence from the beginning of the third difference sequence, and combine them to obtain the second transition sequence. In actual operation, this can be achieved by programming to perform indexing and intercepting operations on the sequence data. Intercepting and combining sequences is to obtain the characteristic data of the transition part between different cut-off sequences. The first transition sequence reflects the information of the transition region from the high-frequency cut-off characteristic to the low-frequency cut-off characteristic, and the second transition sequence further reflects the transition situation between the low-frequency cut-off characteristic and the difference in characteristics of the special frequency band. The data of these transition sequences are crucial for analyzing the performance changes of the filter during the transition in different frequency bands.
[0177] In this embodiment, for the first transition sequence and the second transition sequence, the maximum value sequence (i.e., the sequence composed of local maximum values in the sequence) and the minimum value sequence (the sequence composed of local minimum values) are respectively found. Analyzing the maximum value, minimum value sequences and their fluctuation characteristics of the transition sequence is to quantify the signal change characteristics of the transition region. The sequence fluctuation coefficient reflects information such as the fluctuation amplitude and frequency of the signal in the transition region, and the sequence fluctuation similarity coefficient reflects the correlation characteristics between the maximum value and minimum value sequences. It can provide a quantitative basis for designing a transition buffer circuit according to the transition characteristics subsequently.
[0178] In this embodiment, the first cut-off sequence, the second cut-off sequence, and the third difference sequence are respectively analyzed, and the number of maximum value anomalies (such as the number of maximum values exceeding the normal range) and the number of minimum value anomalies (the number of minimum values below the normal range) existing therein are counted. Counting the number of maximum value and minimum value anomalies is to evaluate the degree of abnormality of the signal characteristics in each sequence.
[0179] In this embodiment, according to the first coefficient to be optimized and the second coefficient to be optimized, combined with the corresponding impedance characteristics (obtained by measuring or analyzing the input and output impedances of the filter in different frequency bands), using circuit theory and design methods (such as adjusting the parameters of components such as resistors, capacitors, and inductors according to the coefficients, or selecting a suitable circuit topology), the transition buffer circuit of each transition sequence is determined. Then the designed transition buffer circuit is set between the corresponding filtering components to complete the construction of the multi-stage filter.
[0180] The first coefficient to be optimized = the sequence fluctuation coefficient of the maximum value sequence × the sequence fluctuation coefficient of the minimum value sequence × (1 - the sequence fluctuation similarity coefficient).
[0181] The second coefficient to be optimized = (the sum of the number of maximum value anomalies existing in the first cut-off sequence, the second cut-off sequence, and the third difference sequence + the sum of the number of minimum value anomalies existing in the first cut-off sequence, the second cut-off sequence, and the third difference sequence) / the total number of values involved in the first cut-off sequence, the second cut-off sequence, and the third difference sequence. The second coefficient to be optimized reflects the severity of this abnormal situation and is very important for subsequently designing a transition buffer circuit in combination with impedance characteristics to optimize the overall performance of the filter.
[0182] The beneficial effects of the above technical solution are as follows: The first cut-off sequence that records the high-frequency cut-off characteristics of the initial filter provides high-frequency band data support for subsequent filter characteristic analysis and overall construction. The second cut-off sequence that records the low-frequency cut-off characteristics of the initial filter supplements the characteristic data of the low-frequency band of the filter. Based on the third difference-one sequence, the characteristic differences of the filter in a specific frequency band are recorded, improving the overall understanding of the filter frequency characteristics. The two transition sequences respectively record the characteristic information of the filter in the transition regions of different frequency bands, providing transition characteristic data for subsequent coefficient determination and circuit design. The first coefficient to be optimized corresponding to the two transition sequences quantifies the signal characteristics in the transition region and provides key parameters for circuit design. The second coefficient to be optimized corresponding to the three sequences quantifies the abnormal characteristics of each sequence and provides parameters regarding the abnormal performance of the filter for circuit design, facilitating the construction of a multi-stage filter.
[0183] The present invention proposes a classification and prediction system for heart failure with preserved ejection fraction based on deep learning. The circuit setting unit includes:
[0184] The first design sub-unit is used to measure the impedance of the transmission medium of the first-stage high-pass filtering and the second-stage low-pass filtering in the initial filter, and combine the first change in the input impedance and output impedance of the first-stage high-pass filtering, the second change in the input impedance and output impedance of the second-stage low-pass filtering, and the third change in the output impedance of the first-stage high-pass filtering and the input impedance of the second-stage low-pass filter to obtain the first impedance vector, and combine the first coefficient to be optimized to establish the first design model of the transition buffer circuit;
[0185] The second design sub-unit is used to measure the impedance of the transmission medium of the second-stage low-pass filtering and the third-stage median filtering in the initial filter, and combine the fourth change in the input impedance and output impedance of the third-stage median filtering, the second change in the input impedance and output impedance of the second-stage low-pass filtering, and the fifth change in the output impedance of the second-stage low-pass filtering and the input impedance of the third-stage median filter to obtain the second impedance vector, and combine the second coefficient to be optimized to establish the second design model of the transition buffer circuit;
[0186] The optimization and adjustment sub-unit is used to perform simulation tests on the design model to determine the participation accuracy of each component, and adjust and optimize the corresponding design model until the set standard is met, obtain the specific structure and component parameters of each component in the design model that meets the set standard, and fabricate the transition buffer circuit.
[0187] In this embodiment, for the first - order high - pass filter, the variations of its input impedance Zin1(f) and output impedance Zout1(f) with frequency f are respectively recorded; for the second - order low - pass filter, the variations of its input impedance Zin2(f) and output impedance Zout2(f) with frequency are recorded. Calculate the first variation of the input impedance and output impedance of the first - order high - pass filter. For example, the first variation is obtained by calculating ΔZ1 = Zin1(f)Zout1(f)-Zin1(f) (at different frequencies); similarly, calculate the second variation ΔZ2 of the input impedance and output impedance of the second - order low - pass filter. Calculate the third variation ΔZ3 = Zin2(f)-Zout1(f) of the output impedance of the first - order high - pass filter and the input impedance of the second - order low - pass filter. The first impedance vector: Z1 = [ΔZ1, ΔZ2, ΔZ3].
[0188] In this embodiment, the first coefficient to be optimized reflects the information related to the signal characteristics in the transition region. Using circuit theory knowledge, a suitable circuit topology (such as T - type, π - type, etc.) is selected to establish the first design model of the transition buffer circuit. In the model, the first impedance vector and the first coefficient to be optimized are used as parameters to determine the preliminary connection method and parameter range of the components (such as resistor R, capacitor C, inductor L, etc.) that may be involved in the circuit. For example, when choosing the π - type circuit topology to establish the first design model, the parameter ranges of capacitor C1, C2 and resistor R are initially set. For example, C1 is between 0.1 - 1 μF, C2 is between 0.1 - 1 μF, and R is between 100 - 1000 Ω.
[0189] In this embodiment, the principle of the second variation is similar to that of the fourth variation, and the principle of the fifth variation is similar to that of the third variation, which will not be elaborated here. The principle of the second impedance is similar to that of the first impedance. For example, the parameter ranges of inductor L, capacitor C and resistor R are initially set in the second design model. For example, L is between 1 - 10 mH, C is between 0.01 - 0.1 μF, and R is between 200 - 20,00 Ω.
[0190] In this embodiment, circuit simulation software (such as Multisim, PSpice, etc.) is used to import the first design model and the second design model into the software respectively. According to the simulation test results, if it is found that the parameters of some components cause the circuit performance not to meet the set standards (such as excessive signal attenuation, phase shift exceeding the allowable range, etc.), the component parameters are adjusted. For example, increasing or decreasing the resistance value, changing the size of the capacitor or inductor, etc. If the circuit topology is unreasonable, it may be necessary to replace the topology. Repeat the simulation test and adjustment until the set standards are met. When the design model meets the set standards, record the specific structure of each component in the model at this time (such as whether the resistor is a common resistor or a variable resistor, etc.) and the component parameters (such as resistance value, capacitance value, inductance value, etc.). According to these parameters, an actual transition buffer circuit is prepared. Taking the first design model as an example, it is imported into the Multisim software, and the input signal is set as a sine wave signal with a frequency range of 50 - 500 Hz and an amplitude of 1 V (simulating the frequency components of the electrocardiogram signal). After running the simulation, it is found that the voltage change across the capacitor C1 does not meet the expectation, resulting in excessive signal attenuation. Adjust the value of C1 from 0.5 μF to 0.3 μF and conduct the simulation test again. After multiple adjustments and tests, it is finally determined that C1 = 0.2 μF, C2 = 0.4 μF, R = 500 Ω, and the circuit topology does not need to be changed, meeting the set signal attenuation and phase shift standards. Similarly, operate on the second design model to determine its component parameters as L = 3 mH, C = 0.05 μF, R = 800 Ω. According to these parameters, a transition buffer circuit is prepared.
[0191] The beneficial effects of the above technical solution are as follows: The first design model can initially consider the impedance mismatch problem between the first - stage high - pass filter and the second - stage low - pass filter and the signal characteristics in the transition region. The second design model theoretically improves the signal transmission quality between these two stages of filtering, reducing interference and distortion caused by impedance mismatch and signal anomalies. The transition buffer circuit can better match the impedance characteristics of the front - and rear - stage filters in practical applications.
[0192] The present invention proposes a classification and prediction system for heart failure with preserved ejection fraction based on deep learning. The bidirectional LSTM unit includes:
[0193] A sequence determination subunit, configured to learn each heartbeat cycle signal based on a bidirectional LSTM network to obtain a hidden state sequence containing forward and reverse timing characteristics;
[0194] An event configuration subunit, configured to configure arbitration events for each hidden state in the hidden state sequence and receive arbitration signals;
[0195] A range determination subunit, configured to determine the priority range of each hidden state according to the arbitration signal and configure it to the corresponding hidden state;
[0196] A conversion subunit, configured to construct a priority matrix according to the number of the hidden state sequences and the priority range of each hidden state, and convert the hidden state sequences to obtain temporal features.
[0197] In this embodiment, each heartbeat cycle signal is preprocessed, such as normalized, to standardize its numerical range for facilitating network learning. Then, the processed heartbeat cycle signals are arranged in sequence form according to time as the input of the bidirectional LSTM network. Assume that after preprocessing the collected electrocardiogram signals, each heartbeat cycle signal consists of 100 time-point data, and these data are arranged in sequence with a length of 100 according to time. A bidirectional LSTM network with 2 hidden layers and 64 hidden units in each layer is constructed. The mean squared error loss function is used, and the Adam optimizer is selected for training with 100 training iterations. After training, when a new heartbeat cycle signal sequence is input, the network outputs a hidden state sequence containing forward and backward temporal features. For example, each hidden state is a 64-dimensional vector, and the entire sequence length is 100.
[0198] In this embodiment, the arbitration event can be a predefined logical judgment condition. For example, when a certain feature value in the hidden state exceeds or is lower than a specific threshold, an event is triggered. It can also be an event related to the cardiac physiological characteristics, such as a specific arbitration event is triggered by the hidden state corresponding to the occurrence of the R wave. Then, a mechanism for receiving the arbitration signal is set. When the arbitration event occurs, a corresponding hidden state generates an arbitration signal. Assume that each hidden state in the hidden state sequence is a 64-dimensional vector, and it is defined that the arbitration event is triggered when the 10th feature value in the vector is greater than 0.5. For each hidden state in the hidden state sequence, the feature value is monitored in real time. When the 10th feature value of a certain hidden state is greater than 0.5, an arbitration signal is generated, and the signal content includes the trigger time and the feature value information.
[0199] In this embodiment, if a certain hidden state triggers an arbitration event related to the R wave, the information contained in this hidden state may be more critical for the diagnosis of heart diseases, and its priority range is set to a higher level; while for the hidden states that do not trigger important arbitration events, the priority range is set to a lower level. A grading mechanism can be used, such as dividing the priority range into three levels: high, medium, and low. The priority range information of each hidden state can be marked by means of data tags or attribute settings. Suppose among the received arbitration signals, 30 hidden states trigger important events related to the R wave, and the priority range of these 30 hidden states is set to "high"; 50 hidden states trigger some minor feature change events, and their priority range is set to "medium"; the remaining 20 hidden states do not trigger obvious important events, and their priority range is set to "low". By programming, a "priority_level" attribute is added to each hidden state, and the values are respectively assigned as "high", "medium", and "low".
[0200] In this embodiment, according to the number of hidden state sequences and the priority range of each hidden state, a priority matrix is created. The rows of the matrix can correspond to different hidden states, and the columns can represent dimensions related to priority (such as priority levels, weights, etc.). For example, the first column of the matrix can record the numbers of hidden states, the second column records their priority levels (using the numbers 1, 2, and 3 to represent high, medium, and low respectively), and the third column can assign different weight values according to the priority levels (the high-priority weight is 0.6, the medium-priority weight is 0.3, and the low-priority weight is 0.1). For the hidden state at each time point, a weighted sum is calculated according to its priority weight to obtain a new feature vector, and this new vector is the final temporal feature. Suppose there are 100 hidden states, and a 100×3 priority matrix is constructed. The numbers of hidden states from 1 to 100 are filled in the first column in sequence, the corresponding numbers are filled in the second column according to the previously determined priority range (such as 30 "1"s, 50 "2"s, and 20 "3"s), and the corresponding weight values are filled in the third column. Then the hidden state sequence is transformed. Suppose each hidden state is a 64-dimensional vector. For each time point, the hidden state vector is multiplied by the corresponding weight and then added up to obtain a 64-dimensional temporal feature vector.
[0201] The beneficial effects of the above technical solution are as follows: Compared with the unidirectional LSTM network, the bidirectional LSTM can capture the time-dependent relationships in the heartbeat cycle signals more comprehensively, providing a rich and accurate feature representation for the subsequent analysis of the temporal changes in cardiac electrical activities. By configuring arbitration events for the hidden states and receiving arbitration signals, the key information in the hidden state sequence can be marked and monitored. By constructing a priority matrix and transforming the hidden state sequence, the obtained temporal features can highlight the important hidden state information and suppress the relatively unimportant information.
[0202] The present invention proposes a classification prediction system for heart failure with preserved ejection fraction based on deep learning. The decision output module includes:
[0203] A grading unit for inputting the deep feature vector into a multi-modal dynamic decision-making algorithm to predict the risk grade and heart failure type of heart failure with preserved ejection fraction, where the risk grade includes: low risk, medium risk, and high risk;
[0204] A mining unit for mining the feature depth and feature breadth of each deep feature in the deep feature vector to obtain feature importance;
[0205] At the same time, based on the process log of the multi-modal dynamic decision-making algorithm, analyze the treatment responsiveness of each deep feature;
[0206] A generating unit for generating an interpretable report according to this importance and treatment responsiveness, and combining the feature type, risk grade, and heart failure type of the corresponding deep feature.
[0207] In this embodiment, a multi-modal dynamic decision-making algorithm model based on a deep neural network is used. Deep feature vectors of 1000 patients are collected. These feature vectors contain spatial features, temporal features, etc. extracted from electrocardiogram signals. At the same time, the risk grade and heart failure type of heart failure with preserved ejection fraction of each patient are labeled. 800 cases of data are used as the training set, and 200 cases are used as the test set. During the training process, the number of layers of the neural network is set to 5 layers, and the number of neurons in the hidden layers is 256, 128, 64, 32, and 16 respectively. The Adam optimizer and cross-entropy loss function are used for training, and the number of training iterations is 2 hundred times. After training, the deep feature vector of a new patient is input into the model, and the model outputs that the risk grade of the patient's heart failure with preserved ejection fraction is "medium risk", and the heart failure type is "a specific type".
[0208] In this embodiment, for each deep feature in the deep feature vector, analyze the transmission path of the feature in the network and the number of layers participating in the calculation. Its feature depth may be higher, such as: the number of layers of parameters / the total number of layers. The feature breadth is measured by counting the occurrence frequency of the feature in different dimensions such as different samples, different time points, and different leads, and the feature breadth = the total number of occurrence frequencies / the total number of time points × the total number of samples.
[0209] Assume that the weight of the feature depth is set to 0.6, and the weight of the feature breadth is set to 0.4. The weighted calculation results of the two are used to obtain the feature importance.
[0210] In this embodiment, during the operation of the multi-modal dynamic decision-making algorithm, the process information of each deep feature participating in the decision-making is recorded, including the input value of the feature, the calculation process in the model, the contribution to the final decision result, etc., to form a process log. For example, for a group of patients receiving a certain drug treatment, observe the changes in the deep feature values before and after treatment, and the impact of these changes on the judgment of the risk level and heart failure type, so as to determine the treatment responsiveness of this deep feature. For a deep feature G, by analyzing the process log of the group of patients receiving drug A treatment, it is found that the feature value decreases significantly after treatment, and at the same time the risk level changes from "high risk" to "medium risk", indicating that this feature has good responsiveness to drug A treatment. By performing similar analyses on multiple deep features, the treatment responsiveness of each deep feature is obtained. Suppose the integrated information is: the risk level is "medium risk", the heart failure type is "a specific type", features F and G are important features, feature F has good responsiveness to drug B treatment, feature G has good responsiveness to physical therapy, feature F belongs to a time series feature, and feature G belongs to a spatial feature. Use natural language processing technology to generate a report: "The patient has a preserved ejection fraction heart failure with a medium risk level, and the heart failure type is [specific type]. After analysis, features F (time series feature) and G (spatial feature) are key features. Feature F responds well to drug B treatment, and feature G responds well to physical therapy. It is recommended that during the treatment process, drug B can be considered and combined with a physical therapy plan to improve the patient's condition."
[0211] The beneficial effects of the above technical solution are: using the multi-modal dynamic decision-making algorithm to analyze the deep feature vector, providing a quantitative reference index for doctors. Through the operation of the mining unit, the importance of each deep feature in the deep feature vector can be deeply understood, and the generated interpretable report can present the information to doctors and patients in an easy-to-understand way.
[0212] The present invention provides a method for classifying and predicting preserved ejection fraction heart failure based on deep learning, as Figure 2 shown, including:
[0213] Step 1: Automatically cut the electrocardiogram signal based on the adaptive R-wave detection algorithm to obtain the heartbeat cycle. Among them, the adaptive R-wave detection algorithm includes: multi-level filtering processing, dynamic threshold construction, and peak position constraint;
[0214] Step 2: Based on the CNN-LSTM network, parallel process the spatial features of the electrocardiogram signal and capture the time series features of the heartbeat cycle, dynamically balance the contributions of the spatial features and the time series features, and output a deep feature vector;
[0215] Step 3: Based on the multi-modal dynamic decision-making algorithm, evaluate the deep feature vector, predict the risk level and heart failure type of preserved ejection fraction heart failure, and generate an interpretable report.
[0216] The beneficial effects of the above technical solution are as follows: By means of multi-level filtering and dynamic threshold mechanism, the problem of missed detection of R waves caused by noise interference and motion artifacts is solved. The design based on the CNN-LSTM network ensures the detail of feature extraction, and the multi-modal dynamic decision algorithm ensures the prediction accuracy and improves the analysis efficiency.
[0217] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and its equivalent technologies, the present invention also intends to include these modifications and variations.
Claims
1. A deep learning-based classification and prediction system for heart failure with preserved ejection fraction, characterized by: include: A signal preprocessing module, configured to automatically segment the ECG signal to obtain a heartbeat cycle based on an adaptive R-wave detection algorithm, wherein the adaptive R-wave detection algorithm includes: multi-stage filtering processing, dynamic threshold construction, and peak location constraints; A feature extraction module is used to process the spatial features of the ECG signal and capture the temporal features of the heartbeat cycle in parallel based on the CNN-LSTM network, dynamically balance the contributions of the spatial and temporal features, and output a deep feature vector; a decision output module, configured to evaluate the deep feature vector based on a multimodal dynamic decision algorithm, predict the type of heart failure with a risk level of heart failure with preserved ejection fraction, and generate an interpretable report; Wherein, the feature extraction module includes: A parallel dual-channel convolution unit is used to extract single-lead waveform features of ECG signals and capture inter-lead correlations using a 1×15 intra-lead convolution kernel and a 12×1 cross-lead convolution kernel to obtain spatial features. The bidirectional LSTM unit is used to capture the forward and reverse timing changes of the ECG signal in each heartbeat cycle based on the bidirectional LSTM. The attention mechanism is combined to enhance the weight of key time nodes to obtain timing features. The gated fusion unit is used to dynamically balance the contributions of spatial and temporal features using gated fusion and output a 256-dimensional deep feature vector; Wherein, the signal preprocessing module includes: The filter construction submodule is used to construct a multi-stage filter to perform multi-stage filtering on the ECG signal. The multi-stage filter consists of a first-stage high-pass filter, a second-stage low-pass filter, and a third-stage median filter. The threshold determination submodule is used to calculate the signal mean and standard deviation within a set time window in real time based on the ECG signal after multi-stage filtering, and update the threshold according to the dynamic threshold formula; in, represents the dynamic threshold; 、 is the empirical coefficient, and ; is the corresponding signal mean; is the corresponding standard deviation; is the adjustment function; Indicates the number of peaks in the signal within the corresponding set time window; Indicates the number of valley values in the signal within the set time window; Indicates the time between adjacent peak points and valley points in the signal within the set time window; Respectively represent the corresponding set time window based on all The maximum, minimum and mean values of ; Indicates setting the time window.
2. The deep learning-based prediction system for heart failure with preserved ejection fraction according to claim 1, characterized in that: The signal preprocessing module further includes: The R-wave positioning submodule is used to search for signal peaks in the ECG signal after multi-stage filtering based on the dynamic threshold determination. When the signal peak exceeds the dynamic threshold, the peak is located. At the same time, constraints are introduced to determine the R-wave position, wherein the constraints include the minimum time interval and the maximum time interval between adjacent peaks, and the relative variation range of the peak amplitude; The cycle determination submodule is used to take the R wave position and the time period between adjacent R waves as a heartbeat cycle.
3. The deep learning-based prediction system for heart failure with preserved ejection fraction according to claim 2, characterized in that: Filter construction submodule, including: a first construction unit, configured to set a first frequency range and a high-pass cutoff frequency to an initial filter, input signals of different frequencies generated by a signal generator into the initial filter to obtain a first response curve, and construct a first cutoff sequence; a second construction unit, configured to set a second frequency range and a low-pass cutoff frequency to the initial filter, input signals of different frequencies generated by a signal generator into the initial filter to obtain a second response curve, and construct a second cutoff sequence; a third constructing unit, configured to set a third frequency range for the initial filter, input signals of different frequencies generated by the signal generator into the initial filter to obtain a third response curve, and construct a third difference sequence; a sequence determination unit, configured to, according to a multi-stage construction order and in accordance with a specified window, intercept a first sequence from the end of the first cutoff sequence and intercept a second sequence from the beginning of the second cutoff sequence to obtain a first transition sequence, intercept a third sequence from the end of the second cutoff sequence and intercept a fourth sequence from the beginning of the third difference sequence to obtain a second transition sequence; a first coefficient determination unit, configured to determine the maximum value sequence and the minimum value sequence in the first transition sequence and the second transition sequence, respectively, and determine the sequence fluctuation coefficient and the sequence fluctuation similarity coefficient of each maximum value sequence and each minimum value sequence, to obtain a first coefficient to be optimized for the corresponding transition sequence; The second coefficient determination unit is used to respectively obtain the number of maximum value anomalies and the number of minimum value anomalies in the first cutoff sequence, the second cutoff sequence, and the third difference sequence, and obtain the second coefficient to be optimized of the corresponding sequence; The circuit setting unit is used to determine the transition buffer circuit of each transition sequence according to the first coefficient to be optimized, the second coefficient to be optimized, and the corresponding impedance characteristics, and set it between the corresponding filter components to realize the construction of a multi-stage filter.
4. The deep learning-based classification and prediction system for heart failure with preserved ejection fraction according to claim 3, characterized in that: The circuit setting unit includes: A first design subunit is configured to obtain impedance measurements of transmission media of a first-stage high-pass filter and a second-stage low-pass filter in the initial filter, and to obtain a first impedance vector based on a first change in input impedance and output impedance of the first-stage high-pass filter, a second change in input impedance and output impedance of the second-stage low-pass filter, and a third change in output impedance of the first-stage high-pass filter and input impedance of the second-stage low-pass filter, and to establish a first design model of the transition buffer circuit based on a first coefficient to be optimized; The second design subunit is configured to obtain impedance measurements of transmission media of the secondary low-pass filter and the tertiary median filter in the initial filter, and to obtain a second impedance vector based on a fourth change in the input impedance and output impedance of the tertiary median filter, a second change in the input impedance and output impedance of the tertiary low-pass filter, and a fifth change in the output impedance of the tertiary low-pass filter and the input impedance of the tertiary median filter. Furthermore, the second design model of the transition buffer circuit is established based on the second coefficient to be optimized. The optimization and adjustment subunit is used to perform simulation tests on the design model to determine the participation accuracy of each component, and to adjust and optimize the corresponding design model until the set standards are met, thereby obtaining the specific structure and component parameters of each component in the design model that meets the set standards and preparing a transition buffer circuit.
5. The deep learning-based classification and prediction system for heart failure with preserved ejection fraction according to claim 1, characterized in that: The bidirectional LSTM unit includes: The sequence determination subunit is used to learn each heartbeat cycle signal based on a bidirectional LSTM network to obtain a hidden state sequence containing positive and negative time sequence features; an event configuration subunit, configured to configure an arbitration event for each hidden state in the hidden state sequence and receive an arbitration signal; a range determination subunit, configured to determine a priority range for each hidden state according to the arbitration signal and assign the priority range to the corresponding hidden state; The conversion subunit is used to construct a priority matrix according to the number of the hidden state sequences and the priority range of each hidden state, and convert the hidden state sequences to obtain time series features.
6. The deep learning-based classification and prediction system for heart failure with preserved ejection fraction according to claim 1, characterized in that: The decision output module includes: a grading unit, configured to input the deep feature vector into a multimodal dynamic decision algorithm to predict the risk level and type of heart failure with preserved ejection fraction, wherein the risk level includes: low risk, medium risk, and high risk; A mining unit, configured to mine the feature depth and feature breadth of each depth feature in the depth feature vector to obtain feature importance; At the same time, based on the process log of the multimodal dynamic decision algorithm, the treatment responsiveness of each deep feature is analyzed; A generating unit is configured to generate an interpretable report based on the importance and treatment responsiveness, and in combination with the feature type, risk level and heart failure type of the corresponding deep feature.
7. A deep learning-based classification and prediction method for heart failure with preserved ejection fraction, characterized by: include: Step 1: Automatically segmenting the ECG signal to obtain heartbeat cycles based on an adaptive R-wave detection algorithm, wherein the adaptive R-wave detection algorithm includes: multi-stage filtering processing, dynamic threshold construction, and peak location constraint; Step 2: Based on the CNN-LSTM network, the spatial features of the ECG signal and the temporal features of the heartbeat cycle are processed in parallel, the contribution of the spatial and temporal features is dynamically balanced, and a deep feature vector is output. Step 3: Evaluate the deep feature vector based on a multimodal dynamic decision algorithm, predict the type of heart failure with a risk level of heart failure with preserved ejection fraction, and generate an interpretable report; Wherein, step 2 includes: Using the intra-lead convolution kernel of 1×15 and the cross-lead convolution kernel of 12×1, the single-lead waveform features of the ECG signal are extracted in parallel and the correlation between leads is captured to obtain spatial features; Based on the bidirectional LSTM, the forward and reverse time series changes of the ECG signal in each heartbeat cycle are captured. The attention mechanism is combined to enhance the weight of key time nodes to obtain the time series features. Gated fusion is used to dynamically balance the contributions of spatial and temporal features, outputting a 256-dimensional deep feature vector; Wherein, step 1 includes: Constructing a multi-stage filter to perform multi-stage filtering on the ECG signal, wherein the multi-stage filter is composed of a first-stage high-pass filter, a second-stage low-pass filter, and a third-stage median filter; Based on the ECG signal after multi-stage filtering, the signal mean and standard deviation within the set time window are calculated in real time, and the threshold is updated according to the dynamic threshold formula; in, represents the dynamic threshold; 、 is the empirical coefficient, and ; is the corresponding signal mean; is the corresponding standard deviation; is the adjustment function; Indicates the number of peaks in the signal within the corresponding set time window; Indicates the number of valley values in the signal within the set time window; Indicates the time between adjacent peak points and valley points in the signal within the set time window; Respectively represent the corresponding set time window based on all The maximum, minimum and mean values of ; Indicates setting the time window.
Citation Information
Patent Citations
Ejecting fraction retention type heart failure diagnosis and typing system based on artificial intelligence
CN114550910A
ECG arrhythmia classification method and system based on GCNN-LSTM model
CN116350234A