ECG signal prediction method for patients with acute heart failure
Through multimodal signal processing and transfer learning technology, combined with parallel multi-scale convolution and attention mechanism, the rapid adaptability problem of electrocardiogram prediction in patients with acute heart failure is solved, efficient and accurate electrocardiogram prediction is achieved, and real-time synchronization of mechanical circulation support devices is supported.
Patent Information
- Application Number
- CN202510476681.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2045-04-16
AI Technical Summary
The existing ECG-R peak prediction methods are difficult to achieve rapid and accurate ECG signal prediction in patients with acute heart failure, especially in the absence of personalized data and rapid changes in physiological parameters, which makes it difficult to meet the real-time synchronization needs of mechanical cycle support devices.
Multimodal signal processing and transfer learning technology are adopted to acquire and preprocess the ECG signal, and multimodal signal data set is constructed, and ECG signal prediction model is used for training, combining parallel multi-scale convolution and attention mechanisms to achieve ECG signal prediction for patients with acute heart failure.
It improves the accuracy and robustness of ECG signal prediction, can quickly adapt to patient physiological changes, ensure the accuracy and real-time of prediction results, and provides reliable pulsation mode support for the mechanical circulation support device.
Smart Images

Figure CN119989289B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cardiac motion prediction, and in particular to a method for predicting electrocardiogram signals of patients with acute heart failure. Background Art
[0002] Acute heart failure is a rapidly progressive and highly dangerous cardiovascular emergency, typically triggered by events such as myocardial infarction, myocarditis, or severe arrhythmias. The patient's heart's pumping function plummets, unable to meet the body's metabolic needs. This can easily lead to life-threatening complications such as acute pulmonary edema, hypoperfusion shock, and multiple organ failure.
[0003] Mechanical circulatory support (MCS) devices play an important role in the treatment of patients with acute heart failure. They can partially or completely replace the heart's pumping function, providing effective support for improving hemodynamic status and maintaining organ perfusion. However, current MCS technology is mostly used in patients with chronic heart failure, especially pulsation patterns based on ECG-R peak prediction, which significantly optimize hemodynamic performance by synchronizing with the patient's natural heartbeat. This technology usually relies on personalized modeling of individual patients, requiring long-term collection of patient physiological data and complex model training.
[0004] For patients with acute heart failure, this personalized modeling has significant limitations. Because acute attacks often occur without warning, there is insufficient time to complete modeling and training. Furthermore, a patient's physiological parameters can change rapidly with their condition, increasing the difficulty of real-time synchronization. Therefore, achieving accurate ECG signal prediction in acute situations requires a technology that is highly robust and rapidly adaptable to meet the physiological characteristics of different patients. Summary of the Invention
[0005] The present invention provides a method, system, device and medium for predicting electrocardiogram signals of patients with acute heart failure, so as to solve the problem that it is difficult to achieve accurate prediction of electrocardiogram signals of patients with acute heart failure in a timely manner.
[0006] In a first aspect, a method for predicting electrocardiogram signals of patients with acute heart failure is provided, comprising the following steps:
[0007] S1: Obtain historical ECG signals from patients with acute heart failure and perform preprocessing to generate multimodal signals including feature-enhanced ECG signals, dynamic features, and power spectral density, and then construct an acute heart failure sample dataset;
[0008] S2: Obtain a pre-trained ECG signal prediction model, which takes a multimodal signal as input and outputs an ECG signal within a preset time period in the future; based on transfer learning technology, the pre-trained ECG signal prediction model is trained using an acute heart failure sample dataset to obtain an acute heart failure ECG signal prediction model;
[0009] S3: Acquire the ECG signals of patients with acute heart failure in real time and preprocess them to obtain real-time multimodal signals, which are then input into the acute heart failure ECG signal prediction model to predict the ECG signals of patients with acute heart failure within a preset time period in the future.
[0010] Furthermore, in step S1, the preprocessing process includes:
[0011] S1.1: Use the adaptive noise cancellation method to denoise the ECG signal through the least mean square adaptive filter;
[0012] S1.2: resampling the denoised ECG signal to the target sampling rate, and then performing wavelet transform to obtain the feature-enhanced ECG signal;
[0013] S1.3: Extract dynamic features based on the time-varying rate of the feature-enhanced ECG signal to obtain dynamic features;
[0014] S1.4: Use fast Fourier transform to calculate the frequency domain features of the feature-enhanced ECG signal and obtain the power spectral density.
[0015] Furthermore, in step S2, the ECG signal prediction model includes a multimodal signal feature embedding module, a parallel multi-scale convolution module, an attention module, and a linear output layer;
[0016] The multimodal signal feature embedding module is used to embed the multimodal signal; the parallel multi-scale convolution module is used to perform implicit ECG segmentation on the embedded multimodal signal and extract its multi-scale physiological features; the attention module is used to perform weighted fusion of the multi-scale physiological features, and the linear output layer outputs the ECG signal within a preset time period in the future.
[0017] Furthermore, the multimodal signal feature embedding module uses a one-dimensional convolutional layer and two linear layers to map the feature-enhanced ECG signal, dynamic features, and power spectral density to a higher-dimensional latent space, sets the embedding dimension to align the multimodal signals, and then merges them;
[0018] The parallel multi-scale convolution module includes three independent convolution branches, which respectively extract features at three different time scales, corresponding to capturing the short-term features of the P wave and QRS wave, the mid-term features of the T wave and PR interval, and the long-term features of the QT interval; each convolution branch includes a first convolution layer, a pooling layer, and a second convolution layer connected in sequence;
[0019] The attention module performs global average pooling on the feature maps output by each convolution branch to obtain a global feature vector for each convolution branch; the global feature vector of each convolution branch is input into two fully connected neural networks to generate the weight corresponding to each convolution branch, and then the feature maps of the three convolution branches are weightedly fused to obtain a fused feature.
[0020] Furthermore, in step S2, when the pre-trained ECG signal prediction model is trained using the acute heart failure sample dataset, the parameters of the multimodal signal feature embedding module and the parallel multi-scale convolution module are frozen, and the parameters of the attention module and the linear output layer are adjusted using the acute heart failure sample dataset.
[0021] Furthermore, the ECG signal data of patients with acute heart failure is continuously acquired, and the acquired data is used to continue online training of the acute heart failure ECG signal prediction model.
[0022] Furthermore, it also includes:
[0023] The predicted ECG signal of the acute heart failure patient within a preset time period in the future is input into an R-peak detector to detect the moment when the future R-peak appears.
[0024] In a second aspect, a system for predicting electrocardiogram signals of patients with acute heart failure is provided, comprising the following steps:
[0025] The data processing module is used to obtain and preprocess the historical ECG signals of patients with acute heart failure to generate multimodal signals including feature-enhanced ECG signals, dynamic features, and power spectral density, thereby constructing an acute heart failure sample dataset;
[0026] A transfer learning module is used to obtain a pre-trained ECG signal prediction model. The ECG signal prediction model inputs a multimodal signal and outputs an ECG signal within a preset time period in the future. Based on transfer learning technology, the pre-trained ECG signal prediction model is trained using an acute heart failure sample dataset to obtain an acute heart failure ECG signal prediction model.
[0027] The signal prediction module is used to obtain the ECG signals of patients with acute heart failure in real time and perform preprocessing to obtain real-time multimodal signals, and input them into the acute heart failure ECG signal prediction model to predict the ECG signals of patients with acute heart failure within a preset time period in the future.
[0028] According to a third aspect, an electronic device is provided, including:
[0029] Memory on which computer programs or instructions are stored;
[0030] A processor is used to load and execute the computer program or instructions to implement the electrocardiogram signal prediction method for patients with acute heart failure as described above.
[0031] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program or instruction is stored, including: when the computer program or instruction is executed by a processor, the method for predicting electrocardiogram signals for patients with acute heart failure as described above is implemented.
[0032] The present invention proposes a method for predicting electrocardiogram signals in patients with acute heart failure, which has the following beneficial effects:
[0033] (1) The present invention extracts multimodal signals including feature-enhanced ECG signals, dynamic features, and power spectral density as model input, which has more dimensional information and enhances the model's ability to respond to signal changes. Feature-enhanced ECG signals ensure high-quality signal input, and dynamic features and power spectral density further improve the distinguishability and comparability of features, providing the model with more comprehensive feature input and significantly improving the prediction accuracy and robustness of ECG signals.
[0034] (2) In the absence of a large amount of personalized data, the present invention can enable the model to quickly adapt to the physiological changes of patients with acute heart failure based on transfer learning and multimodal signal processing, ensuring the accuracy and real-time nature of the prediction results. It avoids the problems of complex modeling and long-term training in traditional methods, and achieves efficient and accurate ECG signal prediction in acute heart failure scenarios, thereby providing reliable support for the pulsation pattern of mechanical circulatory support devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0036] Figure 1 This is a flow chart of a method for predicting electrocardiogram signals for patients with acute heart failure provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0037] To make the objectives, technical solutions, and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail below. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other implementations obtained by those of ordinary skill in the art without inventive effort are within the scope of protection of the present invention.
[0038] In the treatment of acute heart failure, acute attacks often occur without warning, and patients' physiological parameters change rapidly. Existing ECG-R peak prediction methods (commonly used in chronic heart failure) are difficult to handle in these situations. Existing technologies often rely on personalized modeling of long-term data, which makes real-time prediction difficult. Based on this, the present invention proposes an ECG signal (electrocardiogram) prediction scheme that can quickly adapt to the physiological characteristics of patients with acute heart failure. In the absence of a large amount of personalized data, this scheme, based on transfer learning and multimodal signal processing, can achieve efficient and accurate ECG signal prediction in acute heart failure scenarios, thereby providing reliable support for the pulsation pattern of mechanical circulatory support devices.
[0039] like Figure 1 As shown, this embodiment provides a method for predicting ECG signals of patients with acute heart failure, comprising the following steps:
[0040] S1: Obtain historical ECG signals from patients with acute heart failure and perform preprocessing to generate multimodal signals including feature-enhanced ECG signals, dynamic features, and power spectral density, and then construct an acute heart failure sample dataset. The preprocessing process includes denoising, interpolation, dynamic feature extraction, or frequency domain feature extraction.
[0041] S2: Obtain a pre-trained ECG signal prediction model, which takes a multimodal signal as input and outputs an ECG signal within a preset time period in the future; based on transfer learning technology, the pre-trained ECG signal prediction model is trained using an acute heart failure sample dataset to obtain an acute heart failure ECG signal prediction model;
[0042] S3: Acquire the ECG signals of patients with acute heart failure in real time and preprocess them to obtain real-time multimodal signals, which are then input into the acute heart failure ECG signal prediction model to predict the ECG signals of patients with acute heart failure within a preset time period in the future.
[0043] The ECG signal prediction method for patients with acute heart failure provided in the above embodiment has the following advantages:
[0044] (1) Multimodal signal processing: The present invention extracts multimodal signals including feature-enhanced ECG signals, dynamic features, and power spectral density as model input, which contains more dimensional information and enhances the model's ability to respond to signal changes. Feature-enhanced ECG signals ensure high-quality signal input, and dynamic features and power spectral density further improve the distinguishability and comparability of features, providing the model with more comprehensive feature input and significantly improving the prediction accuracy and robustness of ECG signals.
[0045] (2) Rapid adaptation and optimization of acute scenarios based on transfer learning: A key innovation of the present invention is the ability to adapt to acute scenarios based on transfer learning. Transfer learning allows the model to quickly adapt to the real-time data of patients with acute heart failure after being pre-trained on a large-scale ECG signal dataset. Therefore, in the absence of a large amount of personalized data, the present invention can enable the model to quickly adapt to the physiological changes of patients with acute heart failure based on transfer learning and multimodal signal processing, ensuring the accuracy and real-time nature of the prediction results, avoiding the problems of complex modeling and long training in traditional methods, and achieving efficient and accurate ECG signal prediction in acute heart failure scenarios, thereby providing reliable support for the pulsation pattern of mechanical circulatory support devices.
[0046] In some embodiments, in step S1, the pre-processing process includes:
[0047] S1.1: Use the adaptive noise cancellation method to remove noise (such as myoelectric noise, power supply interference, and baseline drift) from the ECG signal through a least mean square adaptive filter. The specific process is as follows:
[0048] The reference noise signal is recorded as r(t), where t represents the discrete time index and the filter order is set to M. The noise estimate output by the adaptive filter at time t can be expressed as:
[0049] ;
[0050] Where, represents the noise estimate; Represents the mth coefficient of the filter, which is updated as follows:
[0051] ;
[0052] in, Represents the learning rate, which is used to control the magnitude of each iteration coefficient update; is the error signal, which is determined by the following formula:
[0053] ;
[0054] in, Represents the main channel ECG signal (containing useful components and noise). When the filter gradually converges on the noise estimation, the estimated noise can be filtered out from the ECG signal:
[0055] ;
[0056] Where, Represents the denoised ECG signal.
[0057] S1.2: Resample the denoised ECG signal to the target sampling rate, and then obtain the feature-enhanced ECG signal through wavelet transform; specifically,
[0058] The original ECG signal sampling rate of different acquisition devices , uniformly resample the collected signals to the target sampling rate , while preserving the global and local characteristics of the signal;
[0059] Timeline of the original ECG signal for:
[0060] ;
[0061] Feature-enhanced ECG signal timeline for:
[0062] ;
[0063] Where N is the number of sampling points of the original ECG signal, L is the number of sampling points of the feature-enhanced ECG signal, is the original ECG signal sampling rate, Target sampling rate of ECG signals for feature enhancement;
[0064] By interpolation ( ) or extract ( ) method, the denoised ECG signal Corresponding to the timeline The resampled signal is obtained , and then perform discrete wavelet decomposition, which is expressed as follows:
[0065] ;
[0066] Where, is the number of decomposition layers, is the current decomposition level, is the translation index of the wavelet singular function, No. The detail coefficient at the layer scale, For the The approximate coefficient at the layer scale, is the scaling function, is the wavelet function;
[0067] Finally, the approximate coefficients and detail coefficients obtained by discrete wavelet decomposition are used to generate feature-enhanced ECG signals through the following mapping relationship: :
[0068] ;
[0069] Where, The coefficients are fitted with a function, which may be an IDWT or other predetermined rule, for mapping the combination of the approximation coefficients and the detail coefficients back to the time domain.
[0070] The method of resampling to the target sampling rate is resampling or interpolation. Its use is applicable to data sets with different sampling frequencies. The resampled signal is then input into the wavelet transform to remove useless information and highlight key ECG features. It should be noted that the number of retained layers in the wavelet transform process must be less than the number of decomposition layers. For example, if the number of decomposition layers in the wavelet transform is 7, the number of retained layers is 1-6. The number of retained layers is not fixed and can be selected as needed, but it must be less than the number of decomposition layers.
[0071] S1.3: Extract dynamic features based on the time-varying rate of the feature-enhanced ECG signal to obtain dynamic features; specifically, the following steps are included:
[0072] Computational feature enhancement of ECG signals The time rate of change of , extract the first-order difference features:
[0073] ;
[0074] Where, is the first-order difference of the time rate of change;
[0075] The first-order difference results are then standardized to highlight the comparability of features:
[0076] ;
[0077] Where, is the first-order difference of the normalized time rate of change;
[0078] exist A copy padding value is added at the end of to align the length of the feature-enhanced ECG signal.
[0079] S1.4: Use fast Fourier transform to calculate the frequency domain features of the feature-enhanced ECG signal and obtain the power spectrum density. The process is as follows:
[0080] ;
[0081] Where, represents the power spectral density, represents the fast Fourier transform.
[0082] S1.5: Sample construction: The three feature quantities of feature-enhanced ECG signals, dynamic features, and power spectral density are integrated according to the category dimension and divided into sliding windows to obtain several samples with multimodal signals as input and ECG signals of a preset future duration as output, thereby constructing an acute heart failure sample dataset.
[0083] High-quality signal input is ensured through adaptive noise cancellation and wavelet transform reconstruction. The extraction of dynamic features and frequency domain features further improves the distinguishability and comparability of features, providing more comprehensive feature input for subsequent models. This innovation significantly improves the prediction accuracy and robustness of ECG signals.
[0084] In some embodiments, the ECG signal prediction model may select a basic model, including a multimodal signal feature embedding module, a convolution block, and a linear output layer. However, in order to further improve the prediction accuracy of the model, in some preferred embodiments, the basic model is further improved, and the ECG signal prediction model includes a multimodal signal feature embedding module, a parallel multi-scale convolution module, an attention module, and a linear output layer; the multimodal signal feature embedding module is used to embed the multimodal signal; the parallel multi-scale convolution module is used to perform implicit ECG segmentation on the embedded multimodal signal and extract its multi-scale physiological features; the attention module is used to perform weighted fusion of the multi-scale physiological features, and the linear output layer outputs the ECG signal within a preset time period in the future.
[0085] Specifically, the multimodal signal feature embedding module uses a one-dimensional convolutional layer and two linear layers to respectively enhance the feature of the ECG signal. , dynamic features and power spectral density Mapping to a higher-dimensional latent space to achieve more adequate feature expression is done as follows:
[0086] ;
[0087] Where, 、 、 They represent the embedded feature-enhanced ECG signal, dynamic features, and power spectral density, respectively; Conv1D represents a one-dimensional convolutional layer, and FC represents a linear layer;
[0088] The embedding dimension is usually set to D, and the multimodal signals are aligned and merged through embedding, which can be expressed as follows:
[0089] ;
[0090] Where, Represents the merged multimodal signal.
[0091] In order to fully capture the temporal features of different physiological time scales in the ECG signal, the parallel multi-scale convolution module includes three independent convolution branches, named Conv Block 1, Conv Block 2 and Conv Block 3. The three independent convolution branches perform feature extraction at three different time scales, that is, feature extraction is performed on the information in the short time window, medium time window and long time window, respectively, corresponding to capturing the short-term features of the P wave and QRS wave, the medium-term features of the T wave and PR interval, and the long-term features of the QT interval. Each convolution branch includes a first convolution layer, a pooling layer and a second convolution layer connected in sequence, gradually expanding the receptive field of the convolution. Specifically, the structure of the convolution branch is as follows:
[0092] ;
[0093] in, and Represent the convolution kernel sizes of the first and second convolution layers respectively, Indicates the pooling window size.
[0094] Short-term dependency (corresponding to Conv Block 1): aims to capture the temporal dependency of about 0.05 s, and is mainly used to extract short-term features in the cardiac depolarization process such as P waves and QRS waves;
[0095] Mid-time dependency (corresponding to Conv Block 2): The goal is to capture the timing dependency of about 0.12 s, which corresponds to mid-term features of the repolarization process such as atrioventricular node conduction and T waves;
[0096] Long-term dependency (corresponding to Conv Block 3): The target is set to a temporal dependency of about 0.20 s, which is used to extract long-term features such as the QT interval from cardiac depolarization to the end of repolarization.
[0097] Convolution branch input data: Segment the signal using a sliding window strategy The size of each window is , the step length is .
[0098] Sampling time calibration: If Each data corresponds to t seconds, so the time represented by each data is .
[0099] Convolution branch parameter description: the first convolution layer The convolution kernel size is (3, k1), the stride is 1, and same padding is used (in the convolution operation, zero padding is added to the edge of the input so that the output size after the convolution operation is consistent with the input size). The number of output channels is ; The pooling layer uses maximum pooling, and the pooling window size and step size are , shortening the time dimension to ;The second convolutional layer The convolution kernel size is (3, k2), the stride is 1, the same padding is used, and the number of output channels is .
[0100] The receptive field of each convolution branch is:
[0101] ;
[0102] Where, Represents the receptive field of the convolution branch; corresponding to the time scale:
[0103] ;
[0104] Where, Represents the receptive field at the time scale of the convolution branch;
[0105] To ensure accurate extraction of short-term, medium-term, and long-term dependencies, the size relationship of the convolution kernel needs to satisfy the following formula:
[0106] ;
[0107] In the following embodiments, B=250 and t=0.5s are used as an example for description. The corresponding three convolution branches take 0.05s, 0.12s, and 0.20s respectively; k1, p, and k2 in Conv Block 1 are 5, 7, and 3 respectively; k1, p, and k2 in Conv Block 2 are 7, 9, and 6 respectively; k1, p, and k2 in Conv Block 3 are 11, 15, and 6 respectively. The output feature map of each convolution branch is .
[0108] The attention module performs global average pooling on the feature maps output by each convolution branch, extracts global features, and calculates the mean in the time dimension, thereby compressing the feature map of each channel into a scalar, which is expressed as follows:
[0109] ;
[0110] Where, is the feature map of the i-th convolution branch, is the global feature vector of the i-th convolution branch. After completing the global average pooling, The input is shared by two layers of fully connected neural network ( , the number of neurons are and ) to generate a dynamic weight vector. The specific formula is as follows:
[0111] ;
[0112] Where, Represents the weight corresponding to the i-th convolution branch; The weights automatically obtained by training are then used for weighted fusion of features:
[0113] ;
[0114] Where, Indicates fusion features.
[0115] The linear output layer performs single-channel dimensionality reduction to achieve prediction output :
[0116] ;
[0117] Where, , is the linear output layer weight matrix, T is the length to be predicted, that is, the future preset time length; b is the bias term.
[0118] The above embodiment uses a parallel multi-scale convolution module to extract various temporal features from ECG signals through three different convolution paths (short-term, medium-term, and long-term dependency features). This design innovation addresses the complexity of ECG signals at different time scales. For example, short-term dependency features primarily capture rapidly changing ECG waveforms such as P waves and QRS waves, medium-term dependency features focus on features with longer time windows such as the PR interval and T wave, and long-term dependency features focus on long-term changes in cardiac repolarization such as the QT interval. Through this innovative design, the model can accurately capture ECG variation characteristics at different time scales, improving the model's prediction accuracy.
[0119] In addition, a multi-scale feature fusion method based on the attention mechanism was used. Global average pooling was used to extract global features from each convolution branch, and then the attention mechanism was used to perform weighted fusion of features at different scales. This method effectively solved the problem of how to identify the most important features from multi-scale information, improving the model's adaptability to complex signals and its prediction accuracy. This innovation, through feature weighting and fusion, further enhanced the model's adaptability to data from patients with acute heart failure.
[0120] In some embodiments, when a pre-trained ECG signal prediction model is trained using an acute heart failure sample dataset, the parameters of the multimodal signal feature embedding module and the parallel multi-scale convolution module are frozen, and the parameters of the attention module and the linear output layer are fine-tuned using the acute heart failure sample dataset.
[0121] In some embodiments, the following steps are also included: S4: inputting the predicted ECG signal of the acute heart failure patient within a preset future time period into the R-peak detector to detect the time when the future R-peak will appear; and then the pulsation of the mechanical circulatory support device can be modulated according to the time when the future R-peak will appear.
[0122] The entire implementation process can be further described as follows:
[0123] (1) Model initialization and pre-training.
[0124] The ECG signal prediction model is fully pre-trained on a large-scale historical ECG signal dataset to lay the foundation for subsequent rapid adaptation. The specific process is as follows:
[0125] Dataset construction: A large dataset of ECG signals from healthy individuals and patients with chronic heart failure is used. Data augmentation techniques (such as adding random noise, signal shifting, and scaling) are used to simulate signal interference and individual differences in real-world scenarios, improve data diversity and the generalization ability of the model, and construct the dataset using the method in step S1.
[0126] Feature Learning Process: The aforementioned dataset is input into the ECG signal prediction model for pre-training. During the pre-training phase, the model first extracts temporal features at different time scales using parallel multi-scale convolutional modules: short-term features focus on rapidly changing signal structures during cardiac depolarization (such as P waves and QRS complexes), medium-term features (such as the PR interval and T wave) focus on the medium-term patterns of atrioventricular node conduction and repolarization, and long-term features (such as the QT interval) focus on the long-term signal changes from depolarization to the end of repolarization. Finally, an attention layer is used to perform a weighted fusion of these multi-scale features, capturing long-term temporal dependencies and cross-band feature interactions in the signal, further optimizing feature representation to cope with the diversity of complex ECG waveforms.
[0127] Frozen convolution module: After pre-training is completed, the parameters of the multimodal signal feature embedding module and the parallel multi-scale convolution module are frozen to ensure the stability of feature extraction and the universal application of ECG waveforms in the transfer learning process, providing a high-quality feature foundation for subsequent real-time adaptation and transfer learning.
[0128] (2) Real-time adaptation and fine-tuning for acute scenarios.
[0129] In the treatment of acute heart failure, the model needs to adapt to real-time patient data based on transfer learning. The specific process is as follows:
[0130] Real-time signal preprocessing: The real-time ECG signal of the acute heart failure patient is processed according to the method of step S1, and denoising, interpolation, dynamic feature extraction and frequency domain feature calculation are performed to generate a multimodal signal to provide complete feature information for subsequent processing.
[0131] Feature transfer and fine-tuning: The preprocessed real-time multimodal signal is fed into the ECG signal prediction model for training. Features are extracted using a frozen parallel multi-scale convolutional module and fed into the attention module for feature weighting and adjustment. The attention module dynamically fine-tunes feature weights based on the real-time signal characteristics of acute patients, enabling rapid adaptation to individual physiological changes and ensuring the model can capture the complex changes and transient fluctuations in the ECG signals of patients with acute heart failure in real time.
[0132] Fine-tuning the linear output layer: After fine-tuning the attention module, the generated features are input into the linear output layer. By fine-tuning the linear output layer, the model can make accurate predictions based on the physiological characteristics of acute patients, providing high-quality output for subsequent prediction tasks.
[0133] (3) Prediction and continuous adaptation.
[0134] After completing real-time adaptation and fine-tuning, the model enters the prediction phase and continuously adapts to optimize the prediction results. The specific process includes:
[0135] Prediction task: For an input ECG signal, use a real-time fine-tuned model to accurately output a signal of a preset duration in the future, providing support for treatment decisions for patients with acute heart failure.
[0136] Continuous Adaptation: As more real-time data is input, the model continues to train and fine-tune online to adapt to the dynamic changes in the patient's physiological state, ensuring continuous improvement in prediction accuracy. Through this continuous adaptability, the model can cope with the physiological changes and uncertainties of acute heart failure patients during treatment, maintaining high-precision prediction results.
[0137] The embodiment of the present invention further provides an electrocardiogram signal prediction system for patients with acute heart failure, comprising the following steps:
[0138] The data processing module is used to obtain and preprocess the historical ECG signals of patients with acute heart failure to generate multimodal signals including feature-enhanced ECG signals, dynamic features, and power spectral density, thereby constructing an acute heart failure sample dataset;
[0139] A transfer learning module is used to obtain a pre-trained ECG signal prediction model. The ECG signal prediction model inputs a multimodal signal and outputs an ECG signal within a preset time period in the future. Based on transfer learning technology, the pre-trained ECG signal prediction model is trained using an acute heart failure sample dataset to obtain an acute heart failure ECG signal prediction model.
[0140] The signal prediction module is used to obtain the ECG signals of patients with acute heart failure in real time and perform preprocessing to obtain real-time multimodal signals, and input them into the acute heart failure ECG signal prediction model to predict the ECG signals of patients with acute heart failure within a preset time period in the future.
[0141] It should be understood that the functional unit modules in various embodiments of the present invention can be concentrated in one processing unit, or each unit module can exist physically separately, or two or more unit modules can be integrated into one unit module, and can be implemented in the form of hardware or software.
[0142] An embodiment of the present invention further provides an electronic device, including:
[0143] Memory on which computer programs or instructions are stored;
[0144] A processor is used to load and execute the computer program or instructions to implement the electrocardiogram signal prediction method for patients with acute heart failure as described above.
[0145] An embodiment of the present invention further provides a computer-readable storage medium having a computer program or instruction stored thereon, comprising: when the computer program or instruction is executed by a processor, the method for predicting electrocardiogram signals of patients with acute heart failure as described above is implemented.
[0146] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.
[0147] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0148] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0149] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0150] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0151] Although the embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and are not to be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.
Claims
1. A method for predicting electrocardiogram signals in patients with acute heart failure, characterized in that: The steps include: S1: Obtain historical ECG signals from patients with acute heart failure and perform preprocessing to generate multimodal signals including feature-enhanced ECG signals, dynamic features, and power spectral density, and then construct an acute heart failure sample dataset; S2: Obtain a pre-trained ECG signal prediction model, which takes a multimodal signal as input and outputs an ECG signal within a preset time period in the future; based on transfer learning technology, the pre-trained ECG signal prediction model is trained using an acute heart failure sample dataset to obtain an acute heart failure ECG signal prediction model; S3: Acquire and preprocess the ECG signals of patients with acute heart failure in real time to obtain real-time multimodal signals, and input them into the acute heart failure ECG signal prediction model to predict the ECG signals of patients with acute heart failure within a preset time period in the future; In step S1, the preprocessing process includes: S1.1: Use the adaptive noise cancellation method to denoise the ECG signal through the least mean square adaptive filter; S1.2: Resample the denoised ECG signal to the target sampling rate and combine it with wavelet transform to obtain the feature-enhanced ECG signal; S1.3: Extract dynamic features based on the time-varying rate of the feature-enhanced ECG signal to obtain dynamic features; S1.4: Use fast Fourier transform to calculate the frequency domain features of the feature-enhanced ECG signal and obtain the power spectral density; In step S2, the ECG signal prediction model includes a multimodal signal feature embedding module, a parallel multi-scale convolution module, an attention module, and a linear output layer; The multimodal signal feature embedding module is used to embed the multimodal signal; the parallel multi-scale convolution module is used to perform implicit ECG segmentation on the embedded multimodal signal and extract its multi-scale physiological features; the attention module is used to perform weighted fusion of the multi-scale physiological features, and the linear output layer outputs the ECG signal within a preset time period in the future.
2. The method for predicting electrocardiogram signals of patients with acute heart failure according to claim 1, wherein: The multimodal signal feature embedding module uses a one-dimensional convolutional layer and two linear layers to map the feature-enhanced ECG signal, dynamic features, and power spectral density to a higher-dimensional latent space, sets the embedding dimension to align the multimodal signals, and then merges them; The parallel multi-scale convolution module includes three independent convolution branches, which respectively extract features at three different time scales, corresponding to capturing the short-term features of the P wave and QRS wave, the mid-term features of the T wave and PR interval, and the long-term features of the QT interval; each convolution branch includes a first convolution layer, a pooling layer, and a second convolution layer connected in sequence; The attention module performs global average pooling on the feature maps output by each convolution branch to obtain a global feature vector for each convolution branch; the global feature vector of each convolution branch is input into two fully connected neural networks to generate the weight corresponding to each convolution branch, and then the feature maps of the three convolution branches are weightedly fused to obtain a fused feature.
3. The method for predicting electrocardiogram signals of patients with acute heart failure according to claim 1, wherein: In step S2, when the pre-trained ECG signal prediction model is trained using the acute heart failure sample dataset, the parameters of the multimodal signal feature embedding module and the parallel multi-scale convolution module are frozen, and the parameters of the attention module and the linear output layer are adjusted using the acute heart failure sample dataset.
4. The method for predicting electrocardiogram signals of patients with acute heart failure according to claim 1, wherein: Continuously acquire ECG signal data from patients with acute heart failure, and use the acquired data to continue online training of the acute heart failure ECG signal prediction model.
5. The method for predicting electrocardiogram signals of patients with acute heart failure according to claim 1, wherein: Also includes: The predicted ECG signal of the acute heart failure patient within a preset time period in the future is input into an R-peak detector to detect the moment when the future R-peak appears.
Citation Information
Patent Citations
Electrocardiosignal-based mental workload classification method and system
CN112617851A
Heart pulsation state prediction method, blood pump control method, equipment and storage medium
CN119033380A