Method for reconstructing electrocardiosignal from photoelectric volume pulse wave signal, cardiovascular disease risk prediction method and equipment

By using a generative adversarial network model to preprocess and personalize the photoplethysmography (PPG) signal, the waveform distortion problem of PPG signal under motion artifacts and individual differences is solved, and high-fidelity and stable electrocardiogram signal reconstruction and cardiovascular disease risk prediction are achieved.

CN121662364APending Publication Date: 2026-03-13HUNAN UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-27
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing wearable health monitoring devices based on photoplethysmography (PPG) technology suffer from low signal-to-noise ratio and severe waveform distortion under motion artifacts, ambient light interference, and low perfusion conditions, making it difficult to accurately reflect cardiac electrical activity. Furthermore, they lack personalized adaptation mechanisms, resulting in insufficient accuracy in predicting cardiovascular disease risk.

Method used

A generative adversarial network model is used to preprocess the photoplethysmography (PPG) signal. Time and frequency domain constraints are introduced, and the ECG signal is generated through iterative optimization of the loss function. Personalized fine-tuning is performed by combining the user's historical physiological data to eliminate artifacts and improve the signal-to-noise ratio, ensuring the consistency of the reconstructed signal in the time and frequency domains.

Benefits of technology

It achieves high-fidelity and stable ECG signal reconstruction among different individuals, improves the accuracy of ECG signal waveform detection and arrhythmia recognition, and enhances the individualized adaptability and accuracy of cardiovascular disease risk prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121662364A_ABST
    Figure CN121662364A_ABST
Patent Text Reader

Abstract

The invention provides a method for reconstructing an electrocardiosignal from a photoelectric volume pulse wave signal and a cardiovascular disease risk prediction method and device. The method comprises the steps that the photoelectric volume pulse wave signal and a real electrocardiosignal are obtained; the photoelectric volume pulse wave signals are preprocessed; the preprocessed photoelectric volume pulse wave signals and the real electrocardiosignals serve as input of a generative adversarial network model, the generative adversarial network model is trained through loss function iterative optimization, and a pre-trained electrocardiosignal reconstruction model is obtained; taking historical photoelectric volume pulse wave signals and electrocardiosignals of an individual to be tested as input of the pre-training electrocardiosignal reconstruction model, and training the pre-training electrocardiosignal reconstruction model to obtain an electrocardiosignal reconstruction model; according to the method, the individualized adaptability of the reconstructed ECG can be improved while the reconstructed ECG with high fidelity and stability is obtained, and the electrocardiosignal waveform detection accuracy, the arrhythmia recognition rate and the like are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of medical signal processing technology, and specifically relates to a method for reconstructing electrocardiogram signals from photoplethysmography pulse wave signals, a method and device for predicting cardiovascular disease risk. Background Technology

[0002] Most existing wearable health monitoring devices rely on photoplethysmography (PPG) technology to detect parameters such as heart rate and blood oxygenation. While these devices offer advantages such as being non-invasive and easy to use, they still have significant limitations in application. First, PPG signals are highly susceptible to motion artifacts, ambient light interference, and low perfusion conditions, resulting in low signal-to-noise ratios and severe waveform distortion, making it difficult to accurately reflect cardiac electrical activity, especially under pathological conditions. Second, current research attempts to analyze PPG and infer ECG (electrocardiogram) features using traditional machine learning methods or shallow neural networks. However, these methods struggle to fully characterize the complex nonlinear coupling between PPG and ECG, and their reconstruction of key clinical features such as the P wave, QRS complex, and T wave is not stable enough. High-fidelity reconstruction of these key features is difficult to achieve, failing to meet the accuracy requirements for cardiovascular disease risk prediction.

[0003] In addition, existing models generally lack personalized adaptation mechanisms and have limited generalization ability among different individuals. They often perform well on group data but their accuracy decreases on individual users, which seriously restricts their application in early prediction of cardiovascular disease risk and long-term health monitoring.

[0004] Patent application CN 120323983 A discloses a method for reconstructing electrocardiogram (ECG) signals from photoplethysmography (PPG). The method includes constructing a deep learning model based on generative adversarial networks (GANs), training the deep learning model by optimizing generator and discriminator parameters through supervised learning based on PPG and ECG signal pairs, and deploying the trained model in a portable device to collect PPG signals in real time and generate ECG signals for health monitoring. While it uses a universal model to generate ECGs for all users, factors such as vascular characteristics, skin condition, age, and gender can lead to significant differences in PPG signals among individuals, making it difficult for the universal model to achieve the required accuracy for cardiovascular disease risk prediction across all individuals. Summary of the Invention

[0005] The purpose of this invention is to address the shortcomings of existing technologies by providing a method for reconstructing electrocardiogram (ECG) signals from photoplethysmography (PPG) pulse wave signals, a method and device for predicting cardiovascular disease risk, thereby improving the individualized adaptability and reconstruction accuracy of the reconstructed ECG signals and enhancing the accuracy of individualized cardiovascular disease risk prediction.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0007] A method for reconstructing electrocardiogram (ECG) signals from photoplethysmography (PPG) pulse waves includes the following steps:

[0008] S1. Acquire photoplethysmography (PPG) signals and real electrocardiogram (ECG) signals;

[0009] S2. Preprocess the photoplethysmography signal;

[0010] S3. The preprocessed photoplethysmography (PPG) signal and the real electrocardiogram (ECG) signal are used as inputs to the generative adversarial network (GAN) model. The GAN model is trained by iterative optimization using a loss function to obtain a pre-trained ECG signal reconstruction model.

[0011] S4. Use the photoplethysmography (PPG) signal and electrocardiogram (ECG) signal of the individual's history as input to the pre-trained ECG signal reconstruction model, and train the pre-trained ECG signal reconstruction model to obtain the ECG signal reconstruction model.

[0012] The expression for the loss function is as follows:

[0013]

[0014] in, This represents the loss function of the pre-trained ECG signal reconstruction model. For time domain weights, For frequency domain weights, To counter the loss function, Let the mean squared error constrain the loss function. For keypoint constraint loss function, This is the frequency domain loss function.

[0015] Factors such as vascular characteristics, skin condition, age, and gender can lead to significant differences in PPG signals among individuals, making it difficult for universal models to achieve the required accuracy for all individuals. This invention utilizes users' historical physiological data to perform personalized fine-tuning of the model, automatically correcting signal distortion caused by individual differences (such as skin thickness and blood circulation status), thereby achieving adaptive adjustment of the model to different users.

[0016] Meanwhile, this invention introduces mean square error, waveform key point constraints, and frequency domain constraints into the loss function to prevent the overall mean from being correct but the shape from being misaligned and distorted due to using only point-to-point errors. This ensures that the generated signal is consistent with the real signal in terms of time domain and spectral characteristics, and guarantees the accuracy of the reconstructed ECG signal waveform in key morphological features, thereby effectively improving the fidelity and stability of the waveform.

[0017] This invention can improve the individualized adaptability of reconstructed ECG while obtaining high fidelity and stability, and enhance the accuracy of ECG waveform detection and arrhythmia recognition.

[0018] Furthermore, the specific process of S2 includes:

[0019] The photoplethysmography (PPG) signal is filtered to remove baseline drift and high-frequency noise.

[0020] An adaptive filtering algorithm is used to eliminate motion artifacts in the filtered photoplethysmography signal by using motion data as a condition.

[0021] This invention can eliminate artifacts caused by wrist swing, gait, or limb acceleration, thereby obtaining PPG raw data with a higher signal-to-noise ratio.

[0022] Furthermore, the expression for the mean squared error constrained loss function is as follows:

[0023]

[0024] in, This is a real electrocardiogram signal. To reconstruct the electrocardiogram (ECG) signal, N represents the number of ECG signals.

[0025] This invention calculates the difference between the reconstructed ECG waveform and the real ECG in a point-to-point manner, ensuring that the overall waveform shape remains consistent.

[0026] Furthermore, the expression for the keypoint constraint loss function is as follows:

[0027]

[0028]

[0029] in, For waveform timing, The amplitude of the waveform; For positional weights, For magnitude weighting, Indicates the starting position of the P wave. Indicates the peak position of the P wave. Indicates the termination position of the P wave. Indicates the starting position of the QRS complex. Indicates the peak position of the QRS complex. Indicates the termination position of the QRS group. Indicates the starting position of the T wave. Indicates the peak position of the T wave. This indicates the termination position of the T wave.

[0030] This invention applies weighted constraints to the start and end positions, peak positions, and amplitudes of the P wave, QRS complex, and T wave to avoid missed R peaks or abnormal P and T wave morphologies. These constraints effectively ensure the reliability of time-domain indicators such as heart rate and heart rate variability (HRV), preventing misjudgments caused by waveform distortion.

[0031] Furthermore, take the window length set For each window length s, the power spectral density (PSD) within the segment is calculated and the difference is obtained. The expression for the frequency domain loss function is as follows:

[0032]

[0033] in, For frequency, This represents the power spectral density of the reconstructed electrocardiogram signal. The power spectral density of the actual electrocardiogram signal is represented by s, where s represents the window length.

[0034] Frequency domain constraints are used to ensure that the spectral characteristics of the generated signal are consistent with those of the real signal.

[0035] Spectral loss: Minimize the difference in power spectral density between the reconstructed signal and the real signal to avoid the situation where the model generates a waveform that looks similar but has distorted spectrum.

[0036] Multi-scale frequency domain constraints: In addition to power spectral density (PSD) alignment in the frequency domain, the spectral loss is calculated and summed under different time window lengths, thereby simultaneously constraining the low-frequency band (heart rate rhythm, baseline drift) and the high-frequency band (QRS details), avoiding the frequency band bias caused by a single window length, and improving waveform fidelity and dynamic characteristics.

[0037] This invention maintains the stability of the signal spectrum distribution even in motion or in the presence of environmental noise through frequency domain constraints, ensuring that the dynamic characteristics of the electrocardiogram and clinical prediction parameters are not affected.

[0038] Furthermore, in S3, the performance of the pre-trained ECG signal reconstruction model is evaluated using the Pearson correlation coefficient between the real ECG signal and the reconstructed ECG signal, the mean square error between the real ECG signal and the reconstructed ECG signal, and the Fréchet distance between the real ECG signal and the reconstructed ECG signal.

[0039] Furthermore, in S4, the performance of the ECG signal reconstruction model is evaluated using the Pearson correlation coefficient between the real ECG signal and the reconstructed ECG signal, the mean square error between the real ECG signal and the reconstructed ECG signal, the Fréchet distance between the real ECG signal and the reconstructed ECG signal, and the R-peak accuracy.

[0040] Further, in S4, the pre-trained ECG signal reconstruction model is iteratively trained, and the model corresponding to the Pearson correlation coefficient between the real ECG signal and the reconstructed ECG signal being greater than or equal to the first threshold and the R-peak accuracy being greater than or equal to the second threshold is taken as the final ECG signal reconstruction model.

[0041] If the upper limit of iterative training is reached and there is no model that satisfies the condition that the Pearson correlation coefficient between the real ECG signal and the reconstructed ECG signal is greater than or equal to the first threshold, and the R-peak accuracy is greater than or equal to the second threshold, then the model corresponding to the maximum value of the Pearson correlation coefficient between the real ECG signal and the reconstructed ECG signal will be used as the final ECG signal reconstruction model.

[0042] This embodiment focuses on Pearson correlation coefficient and R-peak accuracy, combined with multiple indicators such as mean squared error and Fréchet distance, and specifies a dual threshold and a backoff strategy when the threshold is not met. This ensures that morphological consistency (PCC) and event detectability (RPA) are achieved simultaneously, and avoids overfitting and indicator degradation through upper limit selection and backoff.

[0043] Based on the same inventive concept, the present invention also provides a method for predicting cardiovascular disease risk, comprising the following processes:

[0044] A1. Real-time acquisition of photoplethysmography (PPG) signals;

[0045] A2. Input the photoplethysmography (PPG) pulse wave signal into the ECG signal reconstruction model to obtain the reconstructed ECG signal;

[0046] A3. Use heartbeat template matching or interpolation methods to compensate for distorted or missing segments in the reconstructed electrocardiogram signal;

[0047] A4. Input the supplemented reconstructed electrocardiogram signal into the cardiovascular disease risk prediction model to obtain the cardiovascular disease risk prediction.

[0048] Based on the same inventive concept, the present invention also provides an electronic device, comprising:

[0049] One or more processors;

[0050] A memory storing one or more programs that, when executed by one or more processors, cause the one or more processors to implement the steps of a method for reconstructing electrocardiogram signals from photoplethysmography (PPG) pulse wave signals and a method for predicting cardiovascular disease risk.

[0051] Based on the same inventive concept, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of a method for reconstructing electrocardiogram signals from photoplethysmography (PPG) pulse wave signals and a method for predicting cardiovascular disease risk.

[0052] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0053] This invention introduces both time-domain and frequency-domain constraints during the training of the generative adversarial network (GAN) model. By introducing time-domain constraints, it ensures that the reconstructed waveform maintains a high degree of consistency with the real ECG signal in key morphological features such as the QRS complex, P wave, and T wave. This allows the reconstructed results to meet the requirements of R-peak detection, heart rate calculation, and arrhythmia analysis, effectively improving the fidelity and stability of the waveform. By introducing frequency-domain constraints, this invention guarantees the authenticity and stability of the generated signal's spectral distribution, avoiding false detections of arrhythmias caused by frequency mismatch. Through the comprehensive application of time-domain and frequency-domain constraints, this invention can generate high-fidelity and stable ECG signals under both resting and various exercise states, fulfilling the dual needs of continuous monitoring and clinical early warning.

[0054] This invention utilizes users' historical physiological data to perform personalized fine-tuning of the model, which can automatically correct signal distortion caused by individual differences (such as skin thickness, blood circulation status, etc.), thereby achieving adaptive adjustment of the model for different users.

[0055] This invention can improve the individualized adaptability of reconstructed ECG while obtaining high fidelity and stability, and enhance the accuracy of ECG signal waveform detection and arrhythmia recognition rate. Attached Figure Description

[0056] Figure 1 This is a schematic diagram of a cardiovascular disease prediction system according to an embodiment of the present invention;

[0057] Figure 2 This is a schematic diagram of the method for reconstructing electrocardiogram signals from photoplethysmography (PPG) pulse wave signals according to an embodiment of the present invention.

[0058] Figure 3 This is a schematic diagram of a generative adversarial network model according to an embodiment of the present invention;

[0059] Figure 4 This is a schematic diagram of the electrocardiogram signal waveform according to an embodiment of the present invention;

[0060] Figure 5 This is a schematic diagram of a cardiovascular disease prediction model according to an embodiment of the present invention;

[0061] Figure 6 This is a schematic diagram of electrocardiogram signal reconstruction according to an embodiment of the present invention. Detailed Implementation

[0062] The present invention will be described in detail below with reference to embodiments. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of the present invention can be combined with each other.

[0063] Example 1

[0064] like Figure 1 This embodiment provides a cardiovascular disease prediction system based on personalized fine-tuning of pulse wave signals to reconstruct electrocardiogram signals. The system includes a signal acquisition module, a signal processing and conversion module, a personalized fine-tuning module, an intelligent prediction module, and a terminal display module, which work together to complete the entire process from pulse wave signal acquisition to electrocardiogram signal reconstruction and cardiovascular disease prediction.

[0065] The system acquires multi-wavelength optical signals in real time using a wrist-worn photoplethysmography (PPG) sensor and compensates for motion artifacts using an accelerometer. The signal processing and conversion module, based on a generative adversarial network (GAN), converts the PPG signal into a clinically usable electrocardiogram (ECG) waveform with high fidelity under dual constraints in the time and frequency domains. The personalized fine-tuning module adaptively optimizes the model using the user's historical physiological data to improve the individualized accuracy of the reconstruction results. The intelligent prediction module automatically analyzes the calibrated ECG signal to achieve early warning and auxiliary prediction of various cardiovascular diseases such as arrhythmia and myocardial infarction. The terminal display module provides a visual presentation of real-time waveforms and prediction information.

[0066] PPG: Photoplethysmography (PPG) is a method that uses optical technology to detect changes in blood volume.

[0067] ECG: Electrocardiogram (ECG) is a standard medical technique for recording the electrical activity of the heart. It measures the bioelectrical signals generated by the heart muscle with each beat. An ECG waveform is a curve with characteristic peaks and troughs (P wave, QRS complex, T wave).

[0068] like Figure 2 The method for reconstructing electrocardiogram (ECG) signals from photoplethysmography (PPG) pulse wave signals includes the following steps:

[0069] Step 1: The signal acquisition module employs a wrist-worn photoplethysmography (PPG) sensor, combined with multi-wavelength light sources (red and infrared light) and a photodetector, to achieve highly sensitive acquisition of changes in blood volume. The signal acquisition module also integrates a triaxial accelerometer and a gyroscope to detect motion and compensate for artifacts, thereby obtaining raw PPG data with a higher signal-to-noise ratio.

[0070] Step 2: Preprocess the photoplethysmography (PPG) signal and the actual electrocardiogram (ECG) signal.

[0071] (1) Signal preprocessing

[0072] First, the raw PPG signal is bandpass filtered, typically in the frequency range of 0.5–40 Hz, to remove low-frequency baseline drift and high-frequency electromagnetic / environmental interference. Further, an adaptive filtering algorithm (such as LMS or RLS filtering) is used, with motion signals acquired by an accelerometer or gyroscope as reference input, to estimate and eliminate artifacts caused by wrist swing, gait, or limb acceleration in real time, thereby obtaining a preliminarily purified PPG signal.

[0073] 1) Original signal sampling and segmentation

[0074] Sampling rate: Assume that both the PPG signal and the reference ECG signal (real ECG signal) are sampled at a rate of [value missing]. .

[0075] Window length and overlap: A fixed-duration window t'=8 s is used, and the number of sample points in the window... The overlap ratio of adjacent windows is r=50%.

[0076] 2) Normalization / Standardization

[0077] Perform z-score normalization on each window:

[0078]

[0079] Where x represents the original data point, This represents the standardized value. , The mean and standard deviation of this window.

[0080] 3) Noise Reduction and Reference Channel

[0081] Primary filtering: Bandpass filter 0.5-40 Hz, removing DC (high-pass) and power frequency interference (50Hz).

[0082] Adaptive filtering: Using accelerometer / gyroscope data as input, motion artifacts are eliminated.

[0083] (2) Artifact detection and segmentation:

[0084] The PPG signal after preliminary filtering is subjected to quality inspection, and contaminated segments are identified by various means. Segments containing artifacts are identified by wavelet transform, correlation coefficient detection or heartbeat morphology deviation detection.

[0085] First, wavelet transform analysis is used to analyze the energy distribution of the PPG signal at different scales; any abnormal spikes are identified as artifacts. Second, the correlation coefficient between the PPG signal and a high-quality heartbeat template is matched; if the correlation is below a threshold, it is marked as abnormal. Third, artifacts are detected by checking whether morphological parameters such as the heartbeat interval and QRS width significantly deviate from the normal range. Detected artifact segments are marked and weighted or preferentially compensated in subsequent processing to prevent them from directly entering the subsequent model.

[0086] Step 3 involves reconstructing the preprocessed PPG signal using a deep learning model. A conditional generative adversarial network (GAN) can be used, where the generator maps the distorted PPG fragments to a waveform close to that of a real ECG, and a discriminator evaluates the authenticity of the generated signal, thereby continuously optimizing the output quality. In some implementations, variational autoencoders (VAEs) or temporal convolutional networks (TCNs) can also be used to predict missing or distorted portions to recover the complete ECG signal morphology.

[0087] In this embodiment, the preprocessed photoplethysmography (PPG) signal and the real electrocardiogram (ECG) signal are used as inputs to the generative adversarial network (GAN) model. The GAN model is trained by iterative optimization of the loss function to obtain the ECG signal reconstruction model.

[0088] The signal processing and conversion module uses a Generative Adversarial Network (GAN) as its core algorithm framework, comprising two sub-networks: a generator and a discriminator. Figure 3 The generator receives the original PPG signal as input and outputs a reconstructed ECG waveform through multi-layer convolution and temporal modeling structures. The discriminator is used to determine whether the input waveform is a real ECG or a generated ECG, thereby guiding the generator to continuously optimize the output quality. To ensure the usability of the waveform, this embodiment introduces both temporal and frequency domain constraints during the GAN training process: temporal constraints ensure that the reconstructed waveform maintains a high degree of consistency with the real ECG in key morphological features such as QRS groups, P waves, and T waves, thereby effectively improving the fidelity and stability of the waveform.

[0089] 1) Time-domain constraints

[0090] Temporal constraints are primarily used to ensure the accuracy of the reconstructed ECG waveform in key morphological features. By introducing mean squared error (MSE) and morphological keypoint constraints into the loss function, the generated signal is made consistent with the real signal point-by-point in the time domain. Specifically, this includes:

[0091] Mean squared error constraint: The difference between the reconstructed waveform and the real ECG is calculated in a point-to-point manner to ensure that the overall waveform shape remains consistent.

[0092] Key point constraints: Weighted constraints are applied to the start and end positions, peak positions, and amplitudes of P waves, QRS complexes, and T waves to avoid missed R peaks or abnormal P and T wave morphologies. Key morphological events are penalized and corrected item by item to prevent morphological misalignment and distortion caused by using only point-to-point errors, even if the overall mean is correct.

[0093] The above constraints can effectively ensure the reliability of time-domain indicators such as heart rate and heart rate variability (HRV), and avoid misjudgment caused by waveform distortion.

[0094] 2) Frequency domain constraints

[0095] Frequency domain constraints are used to ensure that the spectral characteristics of the generated signal are consistent with those of the real signal. The power spectral density is obtained through Fourier transform, and the spectral distributions of the generated signal and the real ECG are compared. A spectral consistency term is then added to the loss function. Specifically, this includes:

[0096] Spectral loss: Minimize the difference in power spectral density between the reconstructed signal and the real signal to avoid GAN generating waveforms that look similar but have distorted spectra.

[0097] Multi-scale frequency domain constraints: In addition to power spectral density (PSD) alignment in the frequency domain, spectral loss is calculated and summed under different time window lengths (e.g., short window / medium window / long window) to simultaneously constrain low-frequency bands (heart rate rhythm, baseline drift) and high-frequency bands (QRS details), avoiding frequency band bias caused by a single window length and improving waveform fidelity and dynamic characteristics.

[0098] Frequency domain constraints can maintain the stability of the signal spectrum distribution even in motion or in the presence of environmental noise, ensuring that the dynamic characteristics of the electrocardiogram and clinical prediction parameters are not affected.

[0099] This embodiment introduces time-domain constraints to ensure the accuracy of the reconstructed signal on key ECG waveforms (P, QRS, T), enabling the reconstruction results to meet clinical needs for R-peak detection, heart rate calculation, and arrhythmia analysis. By introducing frequency-domain constraints, the authenticity and stability of the generated signal's spectral distribution are guaranteed, avoiding false detections of arrhythmias caused by frequency mismatch. The combined use of time-domain and frequency-domain constraints enables the generation of high-fidelity, stable ECG signals under both resting and various exercise states, fulfilling the dual requirements of continuous monitoring and clinical early warning.

[0100] The expression for the loss function is as follows:

[0101]

[0102] in, Represents the loss function. For time domain weights, For frequency domain weights, To counter the loss function, Let the mean squared error constrain the loss function. For keypoint constraint loss function, This is the frequency domain loss function.

[0103] Generative Adversarial Networks (GANs) are generative models trained using a pair of neural networks in a game-theoretic manner. In a GAN, a discriminator neural network D is trained to distinguish between real and synthetic ECG signals, while a generator neural network G is trained to generate ECGs from the latent space, aiming to make them indistinguishable from the discriminator. Real ECG signals y are derived from the data distribution. The signal z comes from a noise prior. (Representing a random noise vector, typically sampled randomly from a simple distribution (such as the standard normal distribution), G and D jointly optimize a non-artificial objective. The expression for the adversarial loss function of the generative adversarial network is as follows:

[0104]

[0105] in, The adversarial loss function is defined by E, where E is the expected value. This indicates that y is derived from the distribution of real data. obtained from sampling, This indicates that z is derived from the distribution of random noise data. obtained from sampling, The output of the discriminator is the judgment of the real sample y. It is a fake data sample generated by the generator from random noise z. It is a discriminator pair The judgment output.

[0106] The discriminator aims to output a high probability of a valid ECG signal and a low probability of a synthetic ECG signal, corresponding to the values ​​of log D(y) and log (1-D(G(z))) respectively. G and D are trained simultaneously until G can successfully deceive D.

[0107] The expression for the mean squared error constrained loss function is as follows:

[0108]

[0109] in, This is a real electrocardiogram signal. To reconstruct the electrocardiogram (ECG) signal, N represents the number of ECG signals.

[0110] The expression for the key point constraint loss function is as follows:

[0111]

[0112]

[0113] in, Timing of waveforms (event timing (start / peak / end)). The amplitude of the waveform; For positional weights, For magnitude weights, such as Figure 4 , Indicates the starting position of the P wave. Indicates the peak position of the P wave. Indicates the termination position of the P wave. Indicates the starting position of the QRS complex. Indicates the peak position of the QRS complex. Indicates the termination position of the QRS group. Indicates the starting position of the T wave. Indicates the peak position of the T wave. This indicates the termination position of the T wave.

[0114] Take the long set of windows For each window length s, the power spectral density (PSD) within the segment is calculated and the difference is obtained. The expression for the frequency domain loss function is as follows:

[0115]

[0116] in, For frequency, This represents the power spectral density of the reconstructed electrocardiogram signal. This represents the power spectral density of a real electrocardiogram signal.

[0117] To evaluate the model's performance, this embodiment uses several metrics to measure the relationship between each real ECG signal in the test set and its reconstructed ECG.

[0118] The Pearson correlation coefficient (PCC) is a parameter that measures the magnitude of the correlation between an ECG signal and its reconstructed signal. The PCC ranges from -1 to 1, where the magnitude of the PCC indicates the strength of the correlation, and the sign of the PCC indicates whether the correlation is positive or negative.

[0119]

[0120] in, and These represent the real ECG signal and the reconstructed ECG signal, respectively. and These represent the mean values ​​of the real ECG signal and the reconstructed ECG signal, respectively. This represents the Euclidean distance, and T represents the transpose operation.

[0121] Mean squared error (MSE) measures the difference between the true ECG signal and its reconstructed ECG, called the error, and aggregates the magnitude of these errors. The closer the MSE is to zero, the more accurate the reconstruction.

[0122]

[0123] The Fréchet distance (FD) examines the position and order of points on an ECG waveform and synthesizes them into a curve to measure the similarity of the signals. The closer the FD is to zero, the more similar the real ECG signal is to its reconstructed ECG, and the more diverse the synthesized ECG is.

[0124]

[0125] Among them, the function FD represents the Euclidean distance between two corresponding points on the true ECG and reconstructed ECG curves, FD is the shortest Euclidean distance between any corresponding points on the true ECG and reconstructed ECG curves, and m represents the number of samples.

[0126] Step 4: Building upon this, the personalized fine-tuning module utilizes the user's historical physiological data (including a small number of real ECG and PPG samples) to perform transfer learning and parameter calibration on the pre-trained model (pre-trained ECG signal reconstruction model). This module can automatically correct signal distortion caused by individual differences (such as skin thickness, blood circulation status, etc.), thereby achieving adaptive adjustment of the model for different users. Through personalized fine-tuning, the individualized adaptability of reconstructed ECGs can be significantly improved, enhancing the accuracy of QRS detection and the arrhythmia recognition rate.

[0127] By collecting a small number of PPG and ECG samples from individuals, iterative training is performed on the ECG signal reconstruction model to generate a fine-tuned model (the final ECG signal reconstruction model). Then, the fine-tuned model is used for inference to obtain ECGs with high fidelity.

[0128] (1) Training

[0129] In step 3, the generator (G) and discriminator (D) have been trained using a public dataset, and the model parameters have basic PPG to ECG mapping capabilities. Then, historical user data (PPG and ECG) are input as new samples into the pre-trained model. Using real user signals (historical ECG and PPG samples) as a reference, the loss function and the following metrics are calculated, and iterative training is performed. Based on the model saving strategy, models that meet the criteria are saved as new models.

[0130] (2) Indicators

[0131] 1) The evaluation metrics mentioned above include the Pearson correlation coefficient (PCC) between the real ECG signal and the reconstructed ECG signal, the mean square error (MSE) between the real ECG signal and the reconstructed ECG signal, and the Fréchet distance (FD) between the real ECG signal and the reconstructed ECG signal.

[0132] 2) R-peak accuracy:

[0133] set up For real electrocardiogram signals, For the reconstructed ECG signal. The same Pan-Tompkins R-wave detector was applied to both signals, from... Obtain the reference R-wave index set ,from Obtain the predicted R-wave index set from the middle Given the sample domain tolerance True positives (TPs) are calculated using a one-to-one greedy matching method. The process is traversed in ascending order. In the unused predictions, if there exists a Make Then ( , Pairing, TP increases by 1, and will Marked as used (no prediction can match multiple reference peaks). Unmatched False negative (FN); unmatched It is a false positive (FP).

[0134] The R-peak accuracy RPA is:

[0135]

[0136] in, A set representing the peak locations of the R wave in a real electrocardiogram signal (e.g., sampling point numbers). This represents the set of R-wave peak locations in the reconstructed electrocardiogram signal, when... When, the formula simplifies to .

[0137] (3) Model saving strategy

[0138] To avoid situations where a single optimal standard is actually unusable, this embodiment employs a dual-threshold gating + priority-based saving strategy:

[0139] 1) Step S41 (Update Optimal)

[0140] If the current PCC > PCC* (* represents the historical best value), then update PCC* to PCC and temporarily store the current model as "PCC-candidate";

[0141] If the current RPA > RPA* (* represents the historical best value), then update RPA* to RPA and temporarily store the current model as "RPA-candidate";

[0142] 2) Step S42 (Dual Threshold Early Stop and Overall Optimal)

[0143] If and only if both PCC*≥0.85 and RPA*≥0.9 are simultaneously satisfied, the overall usable threshold is reached, training is stopped, and the model that simultaneously triggers both optimal values ​​(or the one that most recently satisfies both values) is saved as the model with the best overall performance.

[0144] 3) Step S43 (rollback strategy if threshold is not reached)

[0145] If the entire fine-tuning process still fails to satisfy S42 after reaching the fixed iteration limit (i.e., 200 times), then the model with the best (maximum value) PCC among all candidates is selected as the optimal model for rollback and deployment.

[0146] This embodiment uses PCC and RPA as the core, combined with MSE / FD multi-index constraints, and specifies dual thresholds (PCC≥0.85, RPA≥0.90) and a rollback and saving strategy when the values ​​are not met. This ensures that morphological consistency (PCC) and event detectability (RPA) are achieved simultaneously, and avoids overfitting and index degradation through upper limit selection and rollback.

[0147] During signal reconstruction, accelerometer or gyroscope data is simultaneously introduced as auxiliary information. Motion state features are jointly modeled with the PPG signal using an attention mechanism or conditional input method. The PPG signal and motion state features (accelerometer or gyroscope data, i.e., IMU) are aligned by timestamp (e.g., PPG 125–256 Hz, IMU 50–200 Hz; linear interpolation / resampling to the same sampling rate) and a unified window (e.g., 4–8 s). The motion state features and PPG signal are then used as inputs into the model. This significantly enhances the model's robustness in motion scenarios, avoids motion artifacts disrupting the PQRST wavegroup, and thus improves the stability and reliability of ECG reconstruction.

[0148] Step 5: Acquire PPG signal segments in real time and reconstruct ECG using the new model saved above.

[0149] For reconstructed ECG signal segments exhibiting severe distortion or partial loss, this embodiment further employs heartbeat template matching or interpolation methods for compensation. For example, when a single heartbeat is completely distorted, it is replaced with a high-quality heartbeat template, and amplitude and baseline corrections are performed based on neighboring signals; if it is only a short-term loss, linear interpolation or cubic spline interpolation is used to recover the waveform. If necessary, the processed signal can also be resampled to ensure time series consistency and the accuracy of subsequent analysis.

[0150] Amplitude and baseline correction steps based on nearby heartbeats:

[0151] 1) Determine the boundary and adjacent reference segments

[0152] Record the start and end times of the distorted / missing segments as follows: , The undistorted and adjacent valid ECG segments on both sides of the fragment are selected as the neighboring signals and are denoted as the left reference segment. (adjacent) (Previous) and right reference segment (adjacent) (After that). Each segment takes a fixed duration window (the duration of one heartbeat cycle) and is used only for amplitude and baseline estimation.

[0153] 2) Baseline estimation and correction

[0154] exist and Inside, take the short window closest to the boundary. The mean of the boundary line is used as the boundary line:

[0155]

[0156] in, Indicates the left boundary line. Indicates the right boundary line. This indicates that the mean value is being calculated.

[0157] Take a picture of the template that is about to be pasted. Alternatively, apply a linear baseline transition to both ends of the waveform to be interpolated, so that the endpoints of the template / interpolation segment are aligned with the baseline. , Alignment:

[0158]

[0159] Will This serves as the baseline within the segment, and subtraction / addition is performed to eliminate DC offset differences with adjacent segments and avoid splicing jumps.

[0160] 3) Amplitude correction

[0161] exist and The root mean square (RMS) of the short windows closest to the boundary is calculated separately, and the average of these values ​​is used as the neighboring amplitude scale. :

[0162]

[0163] in, This indicates the search for the root mean square. Indicates the boundary value of the left reference segment. This represents the boundary value of the right reference segment.

[0164] Take a picture of the template (Baseline correction has been completed) Calculate the same statistic. The scaling factor s' is obtained:

[0165]

[0166] The entire segment to be pasted / interpolated is scaled proportionally by the scale factor to match the amplitude with the neighboring signal.

[0167] Step 6, Post-processing and verification:

[0168] The reconstructed ECG signal after compensation is automatically verified. First, the Pan-Tompkins algorithm is used to detect the QRS complex in the reconstructed ECG signal, extract the R peak position, and calculate the heart rate. Then, Gaussian function fitting is applied to a single heartbeat to restore the complete morphology of the P wave, QRS complex, and T wave. Simultaneously, the Dynamic Time Warping (DTW) method is used to align and compare the reconstructed ECG signal with the real ECG signal point by point, thereby quantitatively evaluating the consistency of the waveform. If the quality indicators of the reconstructed ECG signal (such as RMSE, correlation coefficient, and QRS detection sensitivity) reach the preset threshold, the compensation is confirmed to be effective and enters the prediction module; otherwise, it is marked as needing review or sent to the front end for further processing.

[0169] Step 7: The intelligent prediction module automatically analyzes the personalized calibrated ECG signal, extracting heart rate variability, rhythm patterns, and morphological features. It then uses a deep learning network model (cardiovascular disease risk prediction model) to identify and issue early warnings for typical cardiovascular diseases such as arrhythmias and myocardial infarction in real time. This module can also synchronously transmit the prediction results to a cloud server or medical terminal, enabling remote medical care and doctor-assisted decision-making.

[0170] Specific process:

[0171] Employing a deep learning network model structure based on 1D CNN (such as...) Figure 5 This allows for the full exploration of subtle changes and deep features in the waveform over time, thereby achieving high-precision classification.

[0172] All ECG signals were normalized to address amplitude scaling and eliminate offset effects. R-peak detection was then used for segmentation, excluding the first and last heartbeats. The ECG segments were then fed into a deep learning network model for training and testing. Each ECG beat consisted of 500 samples (200 before the R-peak and 300 after the R-peak).

[0173] Step 8: The terminal display module can display the reconstructed ECG waveform and prediction results in real time on mobile devices (such as mobile phones and tablets) or medical monitoring platforms. Users and doctors can intuitively obtain health status information, realizing cross-scenario applications from daily health management to clinical auxiliary prediction.

[0174] This system and method have the following advantages:

[0175] 1) High-fidelity signal conversion: The time-domain and frequency-domain constraints are introduced into the generative adversarial network (GAN) to ensure that the waveform shape and spectral characteristics are consistent with the real ECG, thus solving the problems of waveform distortion and spectrum mismatch in existing methods.

[0176] 2) Personalized fine-tuning mechanism: Model parameters are calibrated based on users' historical physiological data to achieve adaptive adjustment across individuals, which significantly improves the accuracy of individualized prediction, something that is lacking in existing technologies.

[0177] 3) Integrated intelligent prediction: This system not only achieves high-precision conversion from PPG to ECG, but also integrates disease identification and early warning functions, truly realizing a complete closed loop from signal acquisition to clinical-level prediction.

[0178] This implementation of a signal acquisition-signal conversion-intelligent prediction system and method achieves high-fidelity PPG to ECG conversion under dual constraints in the time and frequency domains using a Generative Adversarial Network (GAN). It also introduces a personalized fine-tuning model, adaptively optimizing the model using the user's historical physiological data, significantly improving the individualized adaptability and reconstruction accuracy of the signal. This addresses issues such as PPG signal waveform distortion, insufficient cross-individual generalization, and lack of reliability. Combined with an intelligent analysis module, the system can perform real-time analysis of calibrated ECG signals, enabling early warning and auxiliary prediction of cardiovascular diseases such as arrhythmias and myocardial infarction. This effectively overcomes the limitations of existing technologies in waveform fidelity, individual universality, and clinical reliability. This embodiment realizes a low-power, real-time, personalized PPG-ECG conversion and disease prediction system with clinical predictive value.

[0179] Example 2

[0180] Table 1 shows the comparative experimental data between this solution and existing technologies. The relevant evaluation indicators of this solution are superior to those of existing technologies. The ECG reconstruction effect of this solution is as follows: Figure 6As shown, the reconstructed ECG is basically consistent with the real ECG.

[0181] Table 1 Comparative experimental data between this solution and existing technologies

[0182] [1]Zhu, Q.; Tian, ​​X.; Wong, CW; Wu, M. Learning your heart actions from pulse: ECG waveform reconstruction from PPG. IEEE Internet Things J.2021, 8, 16734–16748. [2]Vo, K.; Naeini, EK; Naderi, A.; Jilani, D.; Rahmani, AM; Dutt, N.; Cao, H. P2E-WGAN: ECG waveform synthesis from PPG with conditionalwasserstein generative adversarial networks. In Proceedings of the 36thAnnual ACM Symposium on Applied Computing, Virtual Event, 22–26 March 2021;pp. 1030–1036. [3]Sarkar, P.; Etemad, A. CardioGAN: Attentive Generative AdversarialNetwork with Dual Discriminators for Synthesis of ECG from PPG. InProceedings of the AAAI Conference on Artificial Intelligence, Delhi, India,2–9 February 2021; Volume 35, pp. 488–496.

[0183] DCT: Each PPG cycle is subjected to a Discrete Cosine Transform (DCT) with its synchronized ECG cycle. A linear mapping is learned in the coefficient domain, and then the inverse transform is performed to obtain the synthesized ECG. Advantages: Simple to implement, interpretable, and computationally inexpensive. Technical challenges: The cross-modal relationship between PPG and ECG exhibits significant nonlinearity and time-varying characteristics, making it difficult to cover with a linear mapping.

[0184] P2E-WGAN: Uses generative adversarial learning to directly learn the nonlinear mapping from PPG segments to ECG segments. Advantages: Strong representational ability, captures nonlinearity and individual differences. Technical challenges: QRS rounding, T-wave drift, requires frequency domain / morphological loss and multi-discriminator suppression.

[0185] CardioGAN: Learns the inverse mapping of PPG↔ECG using CycleGAN / bidirectional adversarial learning, enabling morphological transfer even in scenarios without strict one-to-one pairing or weak pairing. Suitable for wearable applications where data alignment is difficult. Advantages: Low alignment requirements; can utilize large amounts of weakly paired / unpaired data; bidirectional learning helps preserve physiological rhythms. Technical issues: Cyclic consistency does not guarantee a one-to-one correspondence between morphological and semantic meanings, potentially leading to R / QRS mismatches.

[0186] Example 3

[0187] This embodiment provides an electronic device, including:

[0188] One or more processors;

[0189] A memory that stores one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the steps of a method for reconstructing electrocardiogram signals from photoplethysmography pulse wave signals and a method for predicting cardiovascular disease risk.

[0190] In some implementations, the memory may be high-speed random access memory (RAM), and may also include non-volatile memory, such as at least one disk storage device.

[0191] In other implementations, the processor can be any type of general-purpose processor, such as a central processing unit (CPU) or a digital signal processor (DSP), and there is no limitation here.

[0192] This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of a method for reconstructing electrocardiogram signals from photoplethysmography (PPG) pulse wave signals and a method for predicting cardiovascular disease risk.

[0193] The above embodiments should be understood as being used only to illustrate the present invention more clearly, and not to limit the scope of the present invention. After reading the present invention, any modifications of the present invention in various equivalent forms by those skilled in the art fall within the scope defined by the appended claims.

Claims

1. A method for reconstructing electrocardiogram (ECG) signals from photoplethysmography (PPG) pulse wave signals, characterized in that, Includes the following steps: S1. Acquire photoplethysmography (PPG) signals and real electrocardiogram (ECG) signals; S2. Preprocess the photoplethysmography signal; S3. The preprocessed photoplethysmography (PPG) signal and the real electrocardiogram (ECG) signal are used as inputs to the generative adversarial network (GAN) model. The GAN model is trained by iterative optimization using a loss function to obtain a pre-trained ECG signal reconstruction model. S4. Use the photoplethysmography (PPG) signal and electrocardiogram (ECG) signal of the individual's history as input to the pre-trained ECG signal reconstruction model, and train the pre-trained ECG signal reconstruction model to obtain the ECG signal reconstruction model. The expression for the loss function is as follows: ; in, This represents the loss function of the pre-trained ECG signal reconstruction model. For time-domain weights, For frequency domain weights, To counteract the loss function, The loss function is constrained by the mean square error. For keypoint constraint loss function, This is the frequency domain loss function.

2. The method for reconstructing electrocardiogram signals from photoplethysmography (PPG) waves according to claim 1, characterized in that, The specific process of S2 includes: The photoplethysmography (PPG) signal is filtered to remove baseline drift and high-frequency noise. An adaptive filtering algorithm is used to eliminate motion artifacts in the filtered photoplethysmography signal by using motion data as a condition.

3. The method for reconstructing electrocardiogram signals from photoplethysmography (PPG) waves according to claim 1, characterized in that, The expression for the mean squared error constrained loss function is as follows: ; in, This is a real electrocardiogram signal. To reconstruct the electrocardiogram (ECG) signal, N represents the number of ECG signals.

4. The method for reconstructing electrocardiogram signals from photoplethysmography (PPG) waves according to claim 1, characterized in that, The expression for the key point constraint loss function is as follows: ; ; in, For waveform timing, The amplitude of the waveform; For positional weights, For magnitude weighting, Indicates the starting position of the P wave. Indicates the peak position of the P wave. Indicates the termination position of the P wave. Indicates the starting position of the QRS complex. Indicates the peak position of the QRS complex. Indicates the termination position of the QRS group. Indicates the starting position of the T wave. Indicates the peak position of the T wave. This indicates the termination position of the T wave.

5. The method for reconstructing electrocardiogram signals from photoplethysmography (PPG) waves according to claim 1, characterized in that, The expression for the frequency domain loss function is as follows: ; in, For frequency, This represents the power spectral density of the reconstructed electrocardiogram signal. The power spectral density of the actual electrocardiogram signal is represented by s, where s represents the window length.

6. The method for reconstructing electrocardiogram signals from photoplethysmography (PPG) waves according to claim 1, characterized in that, In S3, the performance of the pre-trained ECG signal reconstruction model is evaluated using the Pearson correlation coefficient between the real and reconstructed ECG signals, the mean square error between the real and reconstructed ECG signals, and the Fréchet distance between the real and reconstructed ECG signals.

7. The method for reconstructing electrocardiogram signals from photoplethysmography (PPG) waves according to claim 1, characterized in that, In S4, the performance of the ECG signal reconstruction model is evaluated using the Pearson correlation coefficient between the real and reconstructed ECG signals, the mean square error between the real and reconstructed ECG signals, the Fréchet distance between the real and reconstructed ECG signals, and the R-peak accuracy.

8. The method for reconstructing electrocardiogram signals from photoplethysmography (PPG) waves according to claim 7, characterized in that, In S4, the pre-trained ECG signal reconstruction model is iteratively trained. The model with a Pearson correlation coefficient between the real ECG signal and the reconstructed ECG signal that is greater than or equal to the first threshold and an R-peak accuracy that is greater than or equal to the second threshold is taken as the final ECG signal reconstruction model. If the upper limit of iterative training is reached and there is no model that satisfies the condition that the Pearson correlation coefficient between the real ECG signal and the reconstructed ECG signal is greater than or equal to the first threshold, and the R-peak accuracy is greater than or equal to the second threshold, then the model corresponding to the maximum value of the Pearson correlation coefficient between the real ECG signal and the reconstructed ECG signal will be used as the final ECG signal reconstruction model.

9. A method for predicting cardiovascular disease risk, characterized in that, Includes the following processes: A1. Real-time acquisition of photoplethysmography (PPG) signals; A2. Input the photoplethysmography (PPG) pulse wave signal into the ECG signal reconstruction model to obtain the reconstructed ECG signal; A3. Use heartbeat template matching or interpolation methods to compensate for distorted or missing segments in the reconstructed electrocardiogram signal; A4. Input the compensated reconstructed ECG signal into the cardiovascular disease risk prediction model to obtain the cardiovascular disease risk prediction.

10. An electronic device, characterized in that, include: One or more processors; A memory having stored one or more programs thereon, which, when executed by the one or more processors, cause the one or more processors to perform the steps of the method of any one of claims 1-8 and the method of claim 9.

Citation Information

Patent Citations

  • Method for reconstructing electrocardiosignal through photoelectric volume pulse wave based on deep learning

    CN120323983A