Ejecting fraction retention heart failure classification prediction system and method based on deep learning
Through the deep learning ejaculation fraction-reserved heart failure classification prediction system, the high misdiagnosis rate and lack of grassroots resources in HFpEF diagnosis are solved, efficient and accurate heart failure risk assessment and management are achieved, and an interpretable diagnostic report is generated.
Patent Information
- Application Number
- CN202510736051.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-07-04
- 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 noise environments in the diagnosis of heart failure with ejaculation fraction (HFpEF), which leads to difficulties in early screening and management.
A deep learning-based ejection fraction-reserved heart failure classification prediction system is adopted, including a signal preprocessing module, a feature extraction module and a decision output module. Signal preprocessing removes noise through an adaptive R-wave detection algorithm. The feature extraction module uses the CNN-LSTM network to process the spatial and timing characteristics of the ECG signal in parallel. The decision output module generates an interpretable report through a multimodal dynamic decision algorithm.
It improves the accuracy of R-wave detection, enhances the detailed and predictive accuracy of ECG signal feature extraction, reduces uncertainty, improves analysis efficiency, and generates an interpretable diagnostic report.
Smart Images

Figure CN120241092A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the cross - technical field of intelligent healthcare and artificial intelligence, and particularly relates to a classification and 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 non - specific symptoms, examination complexity, and disease heterogeneity. The atypical clinical manifestations of patients lead to a misdiagnosis rate as high as 30% - 50%. The diagnosis depends on laboratory index natriuretic peptide levels, echocardiogram (left ventricular ejection fraction ≥ 50%), and diastolic function indexes (such as E / e′>9). Some patients even need invasive right heart catheterization. The high technical requirements and lack of primary healthcare resources limit the early screening of HFpEF. Although existing H2FPEF and HFA - PEFF scoring systems integrate multiple parameters (age, BMI, atrial fibrillation, etc.), their sensitivity decreases due to underestimated natriuretic peptide levels in obese populations, and it is difficult to collect grass - roots data, resulting in limited application. This regional imbalance in diagnostic efficacy directly leads to about 35% of patients progressing to the irreversible myocardial remodeling stage at the time of diagnosis. 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 AUC < 0.8 due to single - lead feature extraction, and the lack of an interpretable decision - making mechanism. All of the above lead to low accuracy and efficiency of automated analysis.
[0004] Therefore, the present invention proposes a classification and 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 and 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 and prediction system for heart failure with preserved ejection fraction based on deep learning, including: 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; A feature extraction module, which is used to parallel - process the spatial features of the electrocardiogram (ECG) 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; 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 risk level and heart failure type of heart failure with preserved ejection fraction, and generate an interpretable report.
[0007] Preferably, the feature extraction module includes: 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 in parallel to extract the single - lead waveform features of the ECG signal and capture the inter - lead correlation, so as to obtain spatial features; A bidirectional LSTM unit, which is used to capture the forward and backward temporal changes of the ECG signal in each heartbeat cycle based on bidirectional LSTM, and enhance the weights of key time nodes by combining an attention mechanism, so as to obtain temporal features; A gating fusion unit, which is used to dynamically balance the contributions of spatial and temporal features by gating fusion and output a 256 - dimensional deep feature vector.
[0008] Preferably, the signal pre - processing module includes: A filter construction sub - module, which is used to construct a multi - level filter and perform multi - level filtering on the ECG signal. The multi - level filter consists of a first - level high - pass filter, a second - level low - pass filter, and a third - level median filter; 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 ECG signal after multi - level filtering, and update the threshold according to the dynamic threshold formula;
[0009]
[0010] Wherein, 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 based on all within the corresponding set time window The maximum value, minimum value, and average value; Indicates the set time window; The R-wave positioning sub-module 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 located, 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 the peak amplitude between adjacent peaks; The period determination sub-module is used to regard the R-wave position and the time period between adjacent R-waves as a heartbeat period.
[0011] Preferably, the filter construction sub-module includes: 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; 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; The third construction unit is used to set the third frequency range for the initial filter, input signals of different frequencies generated by the signal generator into the initial filter to obtain the third response curve, and construct the third difference sequence; The sequence determination unit is used to intercept the first sequence from the end of the first cut-off sequence and the second sequence from the beginning of the second cut-off sequence according to the multi-stage construction order in a specified window to obtain the first transition sequence, and intercept the third sequence from the end of the second cut-off sequence and the fourth sequence from the beginning of the third difference sequence to obtain the second transition sequence; The first coefficient determination unit is used to respectively determine the maximum value sequence and the minimum value sequence in the first transition sequence and the second transition sequence, and determine the sequence fluctuation coefficient and the sequence fluctuation similarity coefficient of each maximum value sequence and each minimum value sequence to obtain the 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 existing in the first cut-off sequence, the second cut-off sequence, and the third difference sequence to obtain the second coefficient to be optimized for 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 and the second coefficient to be optimized, and in combination with the corresponding impedance characteristics, and set it between the corresponding filtering components to realize the construction of the multi-stage filter.
[0012] Preferably, the circuit setting unit includes: The first design subunit 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 a first impedance vector, and combine the first coefficient to be optimized to establish a first design model of the transition buffer circuit; The second design subunit 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 a second impedance vector, and combine the second coefficient to be optimized to establish a second design model of the transition buffer circuit; The optimization and adjustment subunit 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.
[0013] Preferably, the bidirectional LSTM unit includes: The sequence determination subunit is used to learn each heartbeat cycle signal based on the bidirectional LSTM network to obtain a hidden state sequence containing forward and backward timing features; The event configuration subunit is used to configure arbitration events for each hidden state in the hidden state sequence and receive arbitration signals; The range determination subunit is used to determine the priority range of each hidden state according to the arbitration signal and configure it 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 timing features.
[0014] Preferably, the decision output module includes: The level division unit is used to input the depth feature vector into the multi-modal dynamic decision algorithm to predict the risk level and heart failure type of heart failure with preserved ejection fraction, where the risk level includes: low risk, medium risk, and high risk; The mining unit is used 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 multi-modal dynamic decision algorithm, analyze the treatment responsiveness of each depth feature; A generation unit for generating an interpretable report based on such importance and treatment responsiveness, in combination with the feature type, risk level, and heart failure type corresponding to the depth features.
[0015] The present invention provides a deep learning-based classification and prediction method for heart failure with preserved ejection fraction, including: Step 1: Automatically segment the electrocardiogram signal based on an adaptive R-wave detection algorithm to obtain the cardiac cycle. Among them, the adaptive R-wave detection algorithm includes: multi-stage filtering processing, dynamic threshold construction, and peak position constraint; Step 2: Parallel process the spatial features of the electrocardiogram signal and capture the temporal features of the cardiac cycle based on a CNN-LSTM network, dynamically balance the contributions of the spatial features and temporal features, and output a depth feature vector; Step 3: Evaluate the depth 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.
[0016] Compared with the prior art, the beneficial effects of the present application are as follows: Through a multi-stage 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 refinement of feature extraction, and the multi-modal dynamic decision algorithm ensures prediction accuracy and improves the analysis efficiency.
[0017] Other features and advantages of the present invention will be described in the following specification, and part of them will be obvious from the specification or understood by implementing the present invention. The objectives and other advantages of the present invention can be achieved and obtained through the structures specifically pointed out in the written specification and the drawings.
[0018] The technical solutions of the present invention will be further described in detail below through the drawings and embodiments. Description of the Drawings
[0019] The drawings are used to provide a further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation to the present invention. In the drawings: Figure 1 It is a structural diagram of a deep learning-based classification and prediction system for heart failure with preserved ejection fraction in an embodiment of the present invention; Figure 2 It is a flowchart of a deep learning-based classification and prediction method for heart failure with preserved ejection fraction in an embodiment of the present invention. Detailed Embodiments
[0020] The preferred embodiments of the present invention will be described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only for the purpose of illustrating and explaining the present invention, and are not intended to limit the present invention.
[0021] The present invention provides a classification and prediction system for heart failure with preserved ejection fraction based on deep learning, as Figure 1 shown, including: A signal preprocessing module for automatically cutting 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 position constraint; A feature extraction module for parallel processing of the spatial features of the electrocardiogram signal and capturing the temporal features of the heartbeat cycle based on a CNN-LSTM network, dynamically balancing the contributions of the spatial features and the temporal features, and outputting a deep feature vector; A decision output module for evaluating the deep feature vector based on a multi-modal dynamic decision algorithm, predicting the risk level and heart failure type of heart failure with preserved ejection fraction, and generating an interpretable report.
[0022] In this embodiment, the multi-level filtering process is to perform multi-level filtering on the ECG signal to remove noise, solve the interference of baseline drift (≤0.5Hz) and electromyographic noise (≥100Hz). The original signal is first subjected to a first-level 0.5Hz high-pass filter, then a second-level 45Hz low-pass filter, and then a third-level median filter. The formula: First-level high-pass filter (removing baseline drift): Objective: Remove low-frequency noise (such as baseline drift) of ≤0.5Hz.
[0023] Formula:
[0024] Coefficients: , ; Design optimization: Based on the Butterworth filter, ensure that the passband ripple ≤0.5dB and the stopband attenuation ≥40dB.
[0025] Second-level low-pass filter (suppressing electromyographic noise): Objective: Remove high-frequency noise (such as electromyographic noise) of ≥100Hz.
[0026] Formula:
[0027] Coefficients: , ; Design optimization: Also based on the Butterworth filter.
[0028] Third-order median filtering (smoothing signal): Objective: To further smooth the signal and remove sharp noise.
[0029] Formula:
[0030] In this embodiment, the dynamic threshold is constructed as: Dual-threshold mechanism: Short-term threshold: Based on the local features of the Exponential Moving Average (EMA).
[0031] Long-term threshold: Maintain the extreme values of a sliding window of 128 sampling points.
[0032] The threshold fusion formula is:
[0033] Parameters:
[0034] In this embodiment, the peak localization constraint is: R-wave detection condition: ; 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 Through multi-level filtering (high-pass, low-pass, median filtering) and dynamic threshold mechanism (fusion of EMA and sliding window extreme values), the problem of missed detection of R-waves caused by noise interference and motion artifacts is solved.
[0035] 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%).
[0036] In this embodiment, the implementation steps of the CNN-LSTM spatio-temporal feature joint extraction network: Spatial feature extraction path (CNN branch): Intra-lead convolution: Extract the single-lead waveform features, and the convolution kernel is 1×15.
[0037]
[0038] Inter-lead convolution: Capture the inter-lead correlation, and the convolution kernel is 12×1.
[0039]
[0040] Feature fusion: After fusing F1 and F2, compress them to 128 dimensions through a 3×3 convolution.
[0041]
[0042] wherein denotes the convolutional kernel, and LN is Layer Normalization Temporal feature extraction path (LSTM branch): Bidirectional LSTM: captures heart rate variability features forward and extracts repolarization process features backward.
[0043]
[0044] Attention mechanism: dynamically weights temporal features.
[0045]
[0046] Temporal feature output:
[0047] Feature fusion: Gated fusion mechanism:
[0048]
[0049] In this embodiment, the multi-modal dynamic decision-making algorithm is as follows: Calculate the class probability distribution for each heartbeat, then calculate the bimodal confidence, and dynamically generate the final decision.
[0050] Beat-level prediction:
[0051] Confidence calculation:
[0052] Decision function:
[0053] Dynamic threshold:
[0054] Based on the constructed cascade filtering system, μVμV-level weak signal detection is realized. 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-making mechanism, the uncertain case rate is reduced to less than 3.2%. Among them, all weight matrices W and bias vectors b parameters need to be obtained through end-to-end training.
[0055] Performance metrics: Classification accuracy:
[0056] where TP is true positive, FP is false positive, FN is false negative, and TN is true negative.
[0057] Area Under the Receiver Operating Characteristic (ROC) Curve (AUC) Decision-making time: < 2 seconds per case (Intel i7-11800H processor) Specific application scenario one of the above technical solutions, for example: community screening scenario (1) Collect data using a portable 12-lead ECG device (2) Run the R-wave detection algorithm (sampling rate adaptively adjusted) (3) Output risk classification: Low risk (P < 0.3): Annual review is recommended Medium risk (0.3 ≤ P < 0.7): Refer for ultrasound examination High risk (P ≥ 0.7): Initiate the heart failure management process Specific application scenario two of the above technical solutions: For example, hospital diagnosis assistance (1) Connect to the HIS system to obtain historical ECG (2) Generate an interpretable report (including feature importance analysis) (3) Provide treatment responsiveness prediction (ΔP < 5% indicates an ineffective plan) In this embodiment, the multi-modal dynamic decision-making algorithm fuses 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 determines 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 fuses multi-faceted information 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.
[0058] The beneficial effects of the above technical solutions are: By means of a multi-stage 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 prediction accuracy is ensured through the multi-modal dynamic decision-making algorithm, improving the analysis efficiency.
[0059] The present invention proposes a classification prediction system for heart failure with preserved ejection fraction based on deep learning. The feature extraction module includes: A parallel dual-channel convolutional unit for using an intra-lead convolution kernel of 1×15 and an inter-lead convolution kernel of 12×1 to concurrently extract the single-lead waveform features of the electrocardiogram (ECG) signal and capture the inter-lead correlation, thereby obtaining spatial features. A bidirectional long short-term memory (LSTM) unit for capturing the forward and backward temporal variations of the ECG signal in each heartbeat cycle based on the bidirectional LSTM, and enhancing the weights of key time nodes in combination with the attention mechanism to obtain temporal features. A gated fusion unit for dynamically balancing the contributions of spatial and temporal features through gated fusion and outputting a 256-dimensional deep feature vector.
[0060] In this embodiment, the intra-lead convolution: uses a convolution kernel of size 1×15. In implementation, the ECG signal is regarded as a sequence data. For the waveform of the single-lead ECG 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 inter-lead convolution: adopts a convolution kernel of 12×1. The ECG signal usually has 12 leads. At this time, the data of the 12 leads at the same moment are regarded as a vector, and the convolution kernel slides in the lead dimension (each time for the 12-lead data at one moment), performing operations such as weighted summation on the data of the 12 leads to capture the correlation between the leads.
[0061] In this embodiment, for the input ECG signal, convolution operations are simultaneously performed using the intra-lead convolution kernel and the inter-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 reflecting the single-lead waveform features and the other group reflecting the inter-lead correlation. Combining these two groups of feature maps constitutes the spatial features of the ECG signal, providing an information basis for subsequent analysis of the spatial distribution of cardiac electrical activities.
[0062] 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 attention scores. Then, the softmax function is used to normalize the attention scores to obtain the attention weights at each time node, and these weights 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, and this vector 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.
[0063] In this embodiment, the spatial features and temporal features obtained previously 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, etc., and then summed) 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, which comprehensively combines 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.
[0064] 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 comprehensively combines 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.
[0065] 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: 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; 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 signal after multi-stage filtering, and update the threshold according to the dynamic threshold formula;
[0066]
[0067] Wherein, represents the dynamic threshold; and are empirical coefficients, and ; is the corresponding signal mean; is the corresponding standard deviation; is the adjustment function; represents the number of peaks existing in the signal within the corresponding set time window; represents the number of valleys existing 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; 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, locate the peak when the signal peak exceeds the dynamic threshold, and introduce constraint conditions 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; 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.
[0068] 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. By selecting appropriate resistor and capacitor values, the cut-off frequency is determined to filter out low-frequency noise in the ECG signal, such as baseline drift. Low-pass filtering can be implemented 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 (EMG) interference. Median filtering can be realized 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 IIR (Infinite Impulse Response) or FIR (Finite Impulse Response) filter design methods, can be used to achieve high-pass and low-pass filtering. Median filtering can be achieved by programming to sort and extract values from the signal sequence.
[0069] 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.
[0070] 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 interferences. Based on the determination of the dynamic threshold, peak search is performed on the ECG signal after multi-stage filtering. Starting from the signal start point, each data point is sequentially compared with the values of its adjacent points 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.
[0071] 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 signal fluctuation, and the adjustment function Δ1 combines information such as the number of peaks and valleys in the signal and time characteristics. 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 compared with 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 and is prone to missed detection or false detection of R-wave detection. The dynamic threshold formula can adaptively adapt to various electrocardiogram signal situations by calculating in real time and comprehensively adjusting the threshold with multiple factors, accurately identifying the R wave, which is the key link to achieve reliable electrocardiogram signal analysis.
[0072] 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 signal peaks or valleys is large within a certain period (max(Nf,Ng) is large), and there are obvious changes in the time interval between adjacent peak-valley points, Δ1 will adjust the threshold according to these situations, making the threshold more conform to the actual morphology of the signal, and further improving the accuracy and stability of R-wave detection.
[0073] The beneficial effects of the above technical solution are as follows: 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 facilitates further analysis of the characteristics of the electrocardiogram signal in each cycle.
[0074] 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: The first construction unit 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 the signal generator into the initial filter to obtain a first response curve, and construct a first cut-off sequence; The second construction unit 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 the signal generator into the initial filter to obtain a second response curve, and construct a second cut-off sequence; The third construction unit is used 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 intercept a first sequence from the end of a first cut-off sequence and a second sequence from the head of a second cut-off sequence according to a multi-level construction order within 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 head of a third difference sequence to obtain a second transition sequence; A first coefficient determination unit, configured to respectively determine a maximum value sequence and a minimum value sequence 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; 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; 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-level filter.
[0075] 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 oscilloscopes, spectrum analyzers, 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. Adjusting the parameters of the initial filter, setting the first frequency range and the high-pass cut-off frequency, operating the signal generator to generate signals and input them into the filter, measuring and recording the output signals to obtain the response curve, and extracting data from the curve to construct the first cut-off sequence. It should be noted that the method for obtaining the second cut-off sequence is similar to that of the first cut-off sequence, and will not be elaborated here.
[0076] 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-level filtering methods of high-pass filtering, low-pass filtering, and median filtering.
[0077] For example, the high-pass cut-off frequency is the lowest frequency limit in a high-pass filter that allows a signal to pass through, and the low-pass cut-off frequency is the highest frequency limit in a low-pass filter that allows a signal to pass through.
[0078] In this embodiment, the response curve is a curve representing the relationship between the frequency of the input signal of the filter 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 the frequency as the abscissa and the output amplitude as the ordinate, one can intuitively see how the filter processes signals of different frequencies.
[0079] 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 those in 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 formed by combining partial intercepts of different cut-off sequences or difference sequences, and it reflects the characteristics of the filter in the transition region between different frequency bands. For example, by combining partial intercepts from the end of the high-frequency cut-off sequence and the beginning of the low-frequency cut-off sequence, it reflects the characteristics of the transition region from high frequency to low frequency.
[0080] 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], and the minimum value sequence is [1, 2, 4].
[0081] In this embodiment, the sequence fluctuation coefficient: it is 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 it reflects the variation amplitude of the values in the sequence. The sequence fluctuation similarity coefficient: it is a coefficient that measures the degree of similarity 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.
[0082] 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.
[0083] 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, obtain the similarity coefficient as 0.6 by calculating the Pearson correlation coefficient of the two sequences. Combine these to obtain the first coefficient to be optimized.
[0084] 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 calculated 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.
[0085] 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.
[0086] 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 pre-set length for intercepting the sequence), 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 and 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 interception operations on the sequence data. Intercepting and combining the 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.
[0087] 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 subsequent design of the transition buffer circuit according to the transition characteristics.
[0088] 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 anomaly of the signal characteristics in each sequence.
[0089] 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.
[0090] 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).
[0091] 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 subsequent design of the transition buffer circuit in combination with the impedance characteristics to optimize the overall performance of the filter.
[0092] The beneficial effects of the above technical solution are as follows: The first cut-off sequence recording the high-frequency cut-off characteristics of the initial filter provides data support for the subsequent filter characteristic analysis and overall construction in the high-frequency band. The second cut-off sequence recording 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 the 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, provides parameters regarding the abnormal performance of the filter for circuit design, and facilitates the construction of a multi-stage filter.
[0093] 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: The first design sub-unit is used to measure the impedance of the transmission medium of the first-stage high-pass filter and the second-stage low-pass filter in the initial filter, and obtain a first impedance vector by combining the first change in the input impedance and output impedance of the first-stage high-pass filter, the second change in the input impedance and output impedance of the second-stage low-pass filter, and the third change in the output impedance of the first-stage high-pass filter and the input impedance of the second-stage low-pass filter. Then, in combination with the first coefficient to be optimized, a first design model of the transition buffer circuit is established. The second design sub-unit is used to measure the impedance of the transmission medium of the second-stage low-pass filter and the third-stage median filter in the initial filter, and obtain a second impedance vector by combining the fourth change in the input impedance and output impedance of the third-stage median filter, the second change in the input impedance and output impedance of the second-stage low-pass filter, and the fifth change in the output impedance of the second-stage low-pass filter and the input impedance of the third-stage median filter. Then, in combination with the second coefficient to be optimized, a second design model of the transition buffer circuit is established. The optimization and adjustment sub-unit is used to perform a simulation test 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, so as to 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.
[0094] In this embodiment, for the first - order high - pass filter, the variations of its input impedance \(Z_{in1}(f)\) and output impedance \(Z_{out1}(f)\) with the frequency \(f\) are respectively recorded; for the second - order low - pass filter, the variations of its input impedance \(Z_{in2}(f)\) and output impedance \(Z_{out2}(f)\) with the 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 \(\Delta Z_1 = Z_{in1}(f)Z_{out1}(f)-Z_{in1}(f)\) (at different frequencies); similarly, calculate the second variation \(\Delta Z_2\) of the input impedance and output impedance of the second - order low - pass filter. Calculate the third variation \(\Delta Z_3=Z_{in2}(f)-Z_{out1}(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: \(Z_1 = [\Delta Z_1,\Delta Z_2,\Delta Z_3]\).
[0095] 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 mode 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 \(C_1\), \(C_2\) and resistor \(R\) are preliminarily set. For example, \(C_1\) is in the range of \(0.1 - 1\ \mu F\), \(C_2\) is in the range of \(0.1 - 1\ \mu F\), and \(R\) is in the range of \(100 - 1000\ \Omega\).
[0096] 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 preliminarily set in the second design model. For example, \(L\) is in the range of \(1 - 10\ mH\), \(C\) is in the range of \(0.01 - 0.1\ \mu F\), and \(R\) is in the range of \(200 - 2000\ \Omega\).
[0097] 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. The simulation test and adjustment are repeated 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, the 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. The value of C1 is adjusted from 0.5 μF to 0.3 μF, and the simulation test is carried out 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, the second design model is operated on to determine its component parameters as L = 3 mH, C = 0.05 μF, R = 800 Ω. According to these parameters, the transition buffer circuit is prepared.
[0098] The beneficial effects of the above technical solutions 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 - stage filters, 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.
[0099] 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: 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; An event configuration subunit, configured to configure arbitration events for each hidden state in the hidden state sequence and receive arbitration signals; 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; 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.
[0100] 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 in chronological order 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 chronological order as a sequence with a length of 100. 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 the number of training iterations being 100 times. After training is completed, 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.
[0101] 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 physiological characteristics of the heart, such as a specific arbitration event being triggered by the hidden state corresponding to the occurrence of the R wave. Then, a mechanism for receiving arbitration signals is set. When an 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 when the 10th feature value in the vector is greater than 0.5, the arbitration event is triggered. For each hidden state in the hidden state sequence, this 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 feature value information.
[0102] 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".
[0103] 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 the 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 states at each time point, a weighted sum is calculated according to their priority weights to obtain a new feature vector, and this new vector is the final time series feature. Suppose there are 100 hidden states, and a 100×3 priority matrix is constructed. The numbers of the 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 time series feature vector.
[0104] The beneficial effects of the above technical solutions are as follows: Compared with the unidirectional LSTM network, the bidirectional LSTM can capture the time dependencies in the heartbeat cycle signal 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 time series features can highlight the important hidden state information and suppress the relatively unimportant information.
[0105] The present invention proposes a classification prediction system for heart failure with preserved ejection fraction based on deep learning. The decision output module includes: A grading unit for inputting the deep feature vector into a multi-modal dynamic decision algorithm to predict the risk level and heart failure type of heart failure with preserved ejection fraction, where the risk level includes: low risk, medium risk, and high risk; A mining unit for mining the feature depth and feature breadth of each deep feature in the deep feature vector to obtain feature importance; Meanwhile, based on the process log of the multi-modal dynamic decision algorithm, analyze the treatment responsiveness of each deep feature; A generation unit for generating an interpretable report according to the feature importance and treatment responsiveness, and in combination with the feature type, risk level, and heart failure type of the corresponding deep feature.
[0106] In this embodiment, a multi-modal dynamic decision 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 level 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 200 times. After training is completed, the deep feature vector of a new patient is input into the model, and the model outputs that the risk level of the patient's heart failure with preserved ejection fraction is "medium risk", and the heart failure type is "a specific type".
[0107] 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 statistically counting the occurrence frequencies of the feature in different dimensions such as different samples, different time points, and different leads, and the feature breadth = total occurrence frequency / total number of time points × total number of samples.
[0108] 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 calculation results of the two are weighted to obtain the feature importance.
[0109] 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 the treatment, as well as 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 value of this feature decreases significantly after the 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 a heart failure type of [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." The beneficial effects of the above technical solution are as follows: By using the multi-modal dynamic decision-making algorithm to analyze the deep feature vector, a quantitative reference index is provided 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 manner.
[0110] The present invention provides a method for classifying and predicting preserved ejection fraction heart failure based on deep learning, as Figure 2 shown, including: Step 1: Automatically cut the electrocardiogram signal based on the adaptive R-wave detection algorithm to obtain the heartbeat cycle, where the adaptive R-wave detection algorithm includes: multi-level filtering processing, dynamic threshold construction, and peak positioning constraint; 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; 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.
[0111] The beneficial effects of the above technical solution are as follows: By means of multi-stage 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 refinement of feature extraction, and the multi-modal dynamic decision algorithm ensures the prediction accuracy and improves the analysis efficiency.
[0112] 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 their equivalent technologies, the present invention is also intended to include these changes and modifications.
Claims
1. A classification and prediction system for heart failure with preserved ejection fraction based on deep learning, characterized in that, Including: A signal preprocessing module, which is used to automatically cut the electrocardiogram (ECG) signal based on an adaptive R-wave detection algorithm to obtain a heartbeat cycle. The adaptive R-wave detection algorithm includes: multi-level filtering processing, dynamic threshold construction, and peak position constraint; A feature extraction module, which is used to parallel process the spatial features of the ECG 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 temporal features, and output a deep feature vector; A decision output module, which is used to evaluate the deep feature vector based on a multi-modal dynamic decision algorithm, predict the heart failure type of the risk level of heart failure with preserved ejection fraction, and generate an interpretable report.
2. The deep learning-based heart failure classification and prediction system with preserved ejection fraction according to claim 1, wherein The feature extraction module includes: A parallel dual-channel convolution unit, which is used to parallel extract the single-lead waveform features of the ECG signal and capture the inter-lead correlation by using a 1×15 kernel for in-lead convolution and a 12×1 kernel for cross-lead convolution to obtain spatial features; A bidirectional LSTM unit, which is used to capture the forward and backward temporal changes of the ECG signal 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; 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.
3. The classification and prediction system for heart failure with preserved ejection fraction based on deep learning according to claim 1, characterized in that, The signal preprocessing module includes: A filter construction sub-module, which is used to construct a multi-level filter to perform multi-level filtering processing on the ECG signal. The multi-level filter is composed of a first-level high-pass filter, a second-level low-pass filter, and a third-level median filter; 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 ECG signal after multi-level filtering processing, and update the threshold according to a dynamic threshold formula; Among them, 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 existing in the signal within the corresponding set time window; represents the number of valleys existing 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; An R-wave positioning sub-module, which is used to search for signal peaks in the ECG signal after multi-level filtering processing 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. The constraint conditions include the minimum time interval, the maximum time interval, and the relative change range of the peak amplitude between adjacent peaks; 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.
4. The deep learning-based heart failure classification and prediction system with preserved ejection fraction according to claim 3, characterized in that, The filter construction sub-module includes: 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 with different frequencies generated by a signal generator into the initial filter to obtain a first response curve, and construct a first cut-off sequence; 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 with different frequencies generated by a signal generator into the initial filter to obtain a second response curve, and construct a second cut-off sequence; A third construction unit, which is used to set a third frequency range for the 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; 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 head of a second cut-off sequence according to a multi-level construction order within 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 head of a third difference sequence to obtain a second transition sequence; A first coefficient determination unit, configured to respectively determine a maximum value sequence and a minimum value sequence in the first transition sequence and the second transition sequence, 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; 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 to obtain a second coefficient to be optimized for the corresponding sequence; 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-level filter.
5. The deep learning-based heart failure classification and prediction system with preserved ejection fraction according to claim 4, characterized in that The circuit setting unit includes: A first design subunit, configured to measure the impedance of the transmission medium of the first-stage high-pass filter and the second-stage low-pass filter in the initial filter, and obtain a first impedance vector in combination with the first change of the input impedance and the output impedance of the first-stage high-pass filter, the second change of the input impedance and the output impedance of the second-stage low-pass filter, and the third change of the output impedance of the first-stage high-pass filter and the input impedance of the second-stage low-pass filter, and establish a first design model of the transition buffer circuit in combination with the first coefficient to be optimized; A second design subunit, configured to measure the impedance of the transmission medium of the second-stage low-pass filter and the third-stage median filter in the initial filter, and obtain a second impedance vector in combination with the fourth change of the input impedance and the output impedance of the third-stage median filter, the second change of the input impedance and the output impedance of the second-stage low-pass filter, and the fifth change of the output impedance of the second-stage low-pass filter and the input impedance of the third-stage median filter, and establish a second design model of the transition buffer circuit in combination with the second coefficient to be optimized; An optimization and adjustment subunit, configured to perform a simulation test 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 prepare the transition buffer circuit.
6. The classification and prediction system for heart failure with preserved ejection fraction based on deep learning according to claim 2, characterized in that, The bidirectional LSTM unit includes: A sequence determination subunit, configured to learn each heartbeat cycle signal based on a bidirectional LSTM network to obtain a hidden state sequence including forward and reverse timing 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 the priority range of each hidden state according to the arbitration signal and configure it to the corresponding hidden state; 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 timing features.
7. The deep learning-based heart failure classification and prediction system with preserved ejection fraction according to claim 1, wherein The decision output module includes: A level division unit, configured to input the depth feature vector into a multi-modal dynamic decision algorithm to predict the risk level and heart failure 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; Meanwhile, based on the process log of the multi-modal dynamic decision algorithm, analyze the treatment responsiveness of each depth feature; A generation unit, configured to generate an interpretable report according to the importance and treatment responsiveness, and in combination with the feature type, risk level, and heart failure type of the corresponding depth feature.
8. A classification and prediction method for heart failure with preserved ejection fraction based on deep learning, characterized in that, It includes: 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; Step 2: Based on a CNN-LSTM network, parallel process the spatial features of the electrocardiogram signal 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; Step 3: Based on a multi-modal dynamic decision algorithm, evaluate the depth feature vector, predict the risk level and heart failure type of heart failure with preserved ejection fraction, and generate an interpretable report.
Citation Information
Patent Citations
Classification method of heart beat based on BiLSTM-Attention deep neural network
CN109846472A
Ejection fraction estimation method based on deep learning, terminal and storage medium
CN112075956A
Arrhythmia classification algorithm of C-LSTM for physiological parameter monitoring
CN113397555A
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