A conversion model for generating an ECG signal from a PPG signal
By combining the periodic sensing module and the Transformer framework with the adaptive aggregation module, the problem of ignoring periodicity when converting PPG signals to ECG is solved, resulting in more accurate ECG signals, convenient heart monitoring, and the acquisition of more comprehensive ECG information using PPG devices.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2026-03-27
AI Technical Summary
Existing studies on PPG to ECG conversion ignore the periodicity of cardiovascular signals, resulting in insufficient accuracy of the generated ECG signals. This makes it impossible to accurately reconstruct key features such as QRS complex, RR interval, and ST segment deviation, thus limiting the clinical application of PPG in routine cardiac monitoring.
A periodic sensing module is used to identify and extract the periodic components of the PPG signal. Combined with the Transformer extraction framework and the adaptive aggregation module, the changes within and between periods are captured through a self-attention mechanism and a feedforward network. A linear transformation is performed using a single-layer perceptron to generate an accurate ECG signal.
It improves the accuracy of converting PPG signals to ECG signals, enabling the use of portable PPG devices to obtain more comprehensive ECG information, thus achieving convenient and effective cardiac monitoring.
Smart Images

Figure CN119377637B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of electrocardiogram, and particularly relates to a conversion model for generating an ECG signal from a PPG signal. BACKGROUND
[0002] Electrocardiography (ECG) as a standard method of heart monitoring is widely used in clinical diagnosis because it can provide comprehensive heart information. However, traditional ECG acquisition usually requires attaching sensors to the chest and may stimulate the skin through electrodes, which not only brings discomfort to the subjects, but also makes long-term monitoring difficult, thus limiting its applicability in daily health monitoring. Although some researchers have proposed more comfortable wearable devices, these solutions still focus on sensor design and have not been practically applied in daily heart monitoring.
[0003] Photoplethysmography (PPG) for daily heart monitoring has become an attractive solution. Currently, the effectiveness of using PPG to estimate heart rate has been proven. PPG is a non-invasive optical signal that measures changes in blood volume within the skin, usually through a sensor worn on the wrist (such as a smartwatch), to continuously monitor heart status. PPG is more accessible and friendly to obtain than ECG, but it cannot provide detailed heart activity such as P wave or QRS complex that ECG has, limiting its clinical application.
[0004] PPG and ECG signals have physiological correlation, ECG captures the electrical physiological activity of the heart, while PPG measures its mechanical movement, both reflecting the same cardiac process. In addition, the peripheral blood volume changes recorded by PPG are directly affected by myocardial activity, which is controlled by the sinoatrial node (SA) electrical signal. The intrinsic correlation between PPG and ECG has inspired the research of converting PPG signal to ECG signal, combining the advantages of both, to promote continuous and long-term heart monitoring without affecting the accuracy of diagnosis.
[0005] Existing PPG-to-ECG conversion studies all rely on peak detection or simple mapping techniques to generate, which often ignore the inherent periodicity of cardiovascular signals. This periodicity is crucial for generating high-fidelity ECGs from PPG signals. On the one hand, PPG and ECG represent two signals of the same cardiac cycle, both generated by the rhythmic activity of the heart, with their start, duration, and end closely related to the periodic fluctuations of the heart. Therefore, ignoring the periodic information will directly affect the accuracy of the generated ECG. On the other hand, accurate conversion requires preserving the physiological information of the signal when reconstructing the ECG signal from the PPG signal. If the characteristics of the cycle are ignored, key features such as QRS complex, RR interval, and ST segment offset cannot be accurately reconstructed, reducing the clinical value of the generated ECG signal. SUMMARY
[0006] To solve the above technical problems, the present application provides a conversion model for generating ECG signals from PPG signals, aiming to enhance the adaptability of input data modeling, strengthen the capture of physiological features, and improve the accuracy of generated ECG signals by aligning the signals based on the cardiac cycle, thereby providing a convenient and effective cardiac monitoring technology.
[0007] The technical solutions adopted are as follows:
[0008] A conversion model for generating ECG signals from PPG signals, the conversion model comprising:
[0009] a cycle-aware module for identifying and extracting the periodic components in the original input PPG signal, determining the frequency related to the cardiac cycle, reshaping the input time series, and obtaining a two-dimensional cycle view formed by k different cycles;
[0010] a Transformer extraction framework that divides the two-dimensional cycle view formed by k different cycles into multiple blocks Patch i corresponding to the cardiac cycle, and inputs each block Patch i to an embedding layer and an encoding layer in turn to capture the output representation X″ i of the intra-cycle and inter-cycle changes in the PPG signal data, and then reshapes to obtain a feature sequence matching the length of the original PPG signal
[0011] an adaptive aggregation module that aggregates the feature sequence using a weight aggregation method to obtain the aggregated feature X;
[0012] a single-layer perceptron that inputs the aggregated feature X into the linear layer of the single-layer perceptron for linear transformation, maps the features extracted from the PPG signal to the ECG signal representation, and obtains the reconstructed ECG signal.
[0013] In particular, the periodicity-aware module employs a Fast Fourier Transform to identify and extract periodic components in the raw input PPG signal, determine the frequency associated with the basic cardiac cycle, whose expression is:
[0014] A = Amp(FFT(X))
[0015] where FFT(·) is the process of transforming a signal fast to determine its frequency components;
[0016] Amp(·) denotes the calculation of the amplitude;
[0017] is an amplitude array, where the j-th value A j describes the intensity of the periodic basis function of frequency j, corresponding to the period length;
[0018] the raw input L is the length of the time series.
[0019] Further, the largest k amplitude values are selected from the PPG signal, and the corresponding frequencies {f1,..., f k}, amplitudes The k period lengths {c1,..., c k} corresponding to the frequencies are selected; after obtaining the period lengths {c1, c2,..., c k} and frequencies {f1, f2,..., f k}, a period two-dimensional view Cycle i of the input data is constructed, whose expression is:
[0020]
[0021] where, is the i-th reshaped time series based on the frequency f i , and the rows and columns represent the intra-period and inter-period changes under the corresponding period length c i , respectively.
[0022] Padding(·) is the padding constructor; Reshape(·) is the reshaping function.
[0023] Preferably, the period two-dimensional view Cycle i is reshaped to obtain a two-dimensional period view formed by k different periods, whose expression is:
[0024]
[0025] reshaped as where T represents a predetermined hyper-parameter;
[0026] The resulting set of patches {Patch1, …, Patch k is a two-dimensional view formed by k different cycles.
[0027] Preferably, the plurality of patches Patch i are input into an embedding layer in the Transformer extraction framework to obtain an embedding representation where c i is the cycle length of patch Patch i and d model is the dimension of the model, whose expression is:
[0028] X′ i = Embedding(Patch i ), i ∈ {1, 2, …, k}
[0029] The resulting embedding representation X′ i is processed by an encoding layer in the Transformer extraction framework to obtain an output representation whose expression is:
[0030] X″ i = TransformerEncoder(X′ i ), i ∈ {1, 2, …, k}
[0031] After reshaping by the truncation method, a feature sequence matching the length of the original PPG signal is obtained whose expression is:
[0032] Preferably, the encoding layer in the Transformer extraction framework processes the embedding representation X ′ i using a double mechanism, on the one hand, a self-attention mechanism is used to capture the inter-cycle dependencies in the PPG signal; on the other hand, a feedforward network is used to model the intra-cycle dependencies in the PPG signal, capturing detailed local features within each cycle.
[0033] Further preferably, a weight aggregation method is used to aggregate the k feature sequences to obtain an aggregated feature X, whose expression is:
[0034]
[0035] where:
[0036] ω iindicates weights that are derived from the amplitudes of the input frequencies.
[0037] The technical scheme of the present application has the following advantages:
[0038] A. The PPG-to-ECG signal conversion model provided by the present application enhances the adaptability of input data modeling, strengthens physiological feature capture, and improves the accuracy of generated ECG signals through signal alignment based on the heart cycle, thereby providing convenient and effective heart monitoring.
[0039] B. Compared with the prior art, the heart monitoring technology based on PPG to generate ECG signals designed by the present application can use the PPG signal acquired by a wearable device to reconstruct an ECG signal with more comprehensive information. Compared with existing methods, the conversion model proposed by the present application can use a simpler and more portable PPG acquisition device (such as an electronic watch) to replace a complex ECG acquisition device in the signal acquisition stage, and obtain a more realistic and comprehensive ECG signal for heart monitoring.
[0040] C. The present application trains a supervised conversion model on a PPG-ECG paired data set and migrates it to a PPG data set for ECG signal generation, ultimately achieving multi-dimensional generation effect evaluation and analysis from two dimensions of upstream and downstream. Through this research, the present application can effectively combine the advantages of PPG devices, capture physiological features within the cycle, and infer accurate and clinically valuable ECG signals, ultimately achieving more accurate heart monitoring. BRIEF DESCRIPTION OF DRAWINGS
[0041] In order to more clearly illustrate the specific embodiments of the present application, the drawings required in the specific embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0042] Figure 1 is the PPG-to-ECG signal conversion model based on cycle provided by the present application;
[0043] Figure 2 is the heart monitoring technology framework and flowchart based on PPG to generate ECG signals provided by the present application. DETAILED DESCRIPTION
[0044] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0045] like Figure 1 As shown, this invention provides a conversion model for generating ECG signals from PPG signals. The conversion model comprises four parts: a periodicity sensing module, a Transformer extraction framework, an adaptive aggregation module, and a single-layer perceptron. The periodicity sensing module identifies and extracts periodic components from the original input PPG signal, determines frequencies related to the cardiac cycle, reconstructs the input time series, and obtains a two-dimensional periodic view formed by k different cycles. The Transformer extraction framework divides the two-dimensional periodic view formed by the k different cycles into multiple patches corresponding to the cardiac cycle. i and each block patch i The data is sequentially input into the embedding layer and the coding layer for processing, and the output representation X″ captures the intra-period and inter-period variations in the PPG signal data. i After reshaping, a feature sequence matching the length of the original PPG signal is obtained. The adaptive aggregation module uses a weighted aggregation method to aggregate feature sequences. The aggregated features X are obtained; the single-layer perceptron inputs the aggregated features X into the linear layer of the single-layer perceptron and performs a linear transformation on them, mapping the features extracted from the PPG signal to the ECG signal representation, thus obtaining the reconstructed ECG signal.
[0046] The following sections will provide a detailed description of the three main components: the periodicity sensing module, the Transformer extraction framework, and the adaptive aggregation module.
[0047] 1) Periodicity Sensing Module: Considering the potential periodicity of cardiovascular activity is crucial for generating more realistic ECGs from PPGs. The main objective of this invention is to detect and extract these periodic components. A Fast Fourier Transform (FFT) is used to identify and extract periodic components from the input signal, accurately determining the frequencies associated with the fundamental cardiac cycle. Original Input L is the length of the time series. The FFT formula used is as follows:
[0048] A = Amp(FFT(X))
[0049] FFT(·) refers to the process of rapidly transforming a signal to determine its frequency components, while Amp(·) represents the calculation of amplitude. is an amplitude array, where the j-th value A j describes the strength of the periodic basis function of frequency j, corresponding to the period length.
[0050] Meanwhile, considering the sparsity of the frequency domain, to avoid high-frequency noise, the present application preferably only selects the largest k amplitude values and finds the corresponding most important frequencies {f1,..., f k} and their amplitudes where k is a hyperparameter. These selected frequencies correspond to the k period lengths {c1,..., c k}.
[0051] Due to the conjugate property of the frequency domain, only frequencies in the range are considered.
[0052]
[0053]
[0054] where argTopk(·) is the top-k index selection function, which means getting the indices of the largest k amplitudes from a set of amplitudes A, and the indices correspond to the frequencies. After obtaining the periods {c1, c2,..., c k} and frequencies {f1, f2,..., f k}, the period view of the input data is constructed. Specifically, the input time series is adaptively reshaped into a two-dimensional tensor according to the following formula:
[0055]
[0056] where, represents the i-th reshaped time series based on the frequency f i , which semantically corresponds to the cardiac cycle view. The rows and columns represent the intra-period and inter-period changes under the corresponding period length c i , respectively. It should be noted that if does not match , it will be padded with zeros.
[0057] In addition, the periods extracted by FFT fluctuate in real time, so the feature dimension f i of will change with the change of the input . In order to facilitate the input into the embedding layer, it is necessary to convert this variable-size Cycle i into a fixed-feature-dimension block.
[0058] The last value is filled to make up for the shortage, or the redundant part is truncated to achieve. The specific process is as follows:
[0059]
[0060] Padding(·) is a padding constructor, and the last value is used to fill up the insufficient length T; Trunc(·) is a truncation function, and the length T is directly truncated when it exceeds.
[0061] Accordingly, the present application will be reshaped as where T represents a predetermined hyperparameter. The final result is a set of patches {Patch1,..., Patch k}, which represents a two-dimensional view formed by k different cycles, and the process is as follows Figure 1 as shown in the right side of the diagram.
[0062] 2) Cycle-aware Transformer extraction framework
[0063] The Transformer is used as the main feature extraction architecture because it can capture long-range dependencies and local features in the data. The uniqueness of the present application is to design a cycle-based PPG signal block, which divides the PPG signal into multiple blocks corresponding to the cardiac cycle. This adaptive partitioning can ensure that the model accurately captures the changes within and between cycles, which is crucial for accurate physiological analysis.
[0064] The adaptively divided patches constitute a multi-resolution, multi-branch network, where each branch processes the calculation as follows:
[0065] In the Transformer extraction framework, there is an embedding layer and an encoding layer, and multiple blocks Patch i are input into the embedding layer of the Transformer extraction framework to obtain the embedding representation where c i is the cycle length of the block Patch i , d model is the dimension of the model, and this embedding process maps the original input to a higher-dimensional space, making it easier for the Transformer to capture complex patterns in the data. Its expression is:
[0066] X′ i = Embedding(Patch i ), i∈{1,2, …, k}
[0067] Embedding(·) is an embedding layer function that maps the block Patch i to a higher-dimensional space, making it easier for the Transformer to capture complex patterns in the data. Its expression is:The signal is converted into a dense continuous vector representation, which is used to capture the semantic relationships of the input items.
[0068] The resulting embedding representation X′ i After processing through the encoding layers in the Transformer extraction framework, the self-attention mechanism in the encoding layers focuses on capturing inter-cycle dependencies (relationships between different cardiac cycles) by simultaneously attending to various parts of the signal. On the other hand, feed-forward networks are employed to model intra-cycle dependencies, capturing detailed local features within each cycle. This dual mechanism enables the Transformer to learn a rich set of features that represent both global trends and local variations in the PPG signal. After processing through the Transformer, the output representation X″ i has a size of whose expression is:
[0069] X″ i = TransformerEncoder(X′ i ), i ∈ {1, 2,..., k}
[0070] TransformerEncoder(·) is an encoder function that encodes the input using multi-head self-attention mechanisms and feed-forward networks to capture global dependencies in the input data.
[0071] To convert the k features {X″1,..., X″ k} into a format suitable for further analysis or prediction, restoring the time series shape of the signal, the following operations are performed:
[0072]
[0073] This is achieved by reshaping the two-dimensional representation into a one-dimensional sequence of features and then truncating to ensure that the final sequence length matches the original signal length L.
[0074] 3) Adaptive aggregation module
[0075] The amplitudes {A1,..., A k} reflect the relative importance of the most prominent k cycles, corresponding to the importance of patches at different resolutions. For example, when the amplitude of the i-th frequency A i in the PPG signal is large, it indicates that the corresponding cycle c f is more important, and therefore, the related scale feature is given a greater weight w i .
[0076] The computation process can be formalized as follows:
[0077]
[0078] {ω1,..., ω k} = Softmax({A1,..., A k})
[0079] Topk(·) is a top-K selection function that selects the top-K largest amplitudes from the input data; Softmax(·) is a normalized exponential function that converts the input vector into a probability distribution, each value of the output is between 0 and 1, and the sum is 1.
[0080] Therefore, the application aggregates k features according to the weight to obtain the aggregated feature X, which is used for linear transformation by the linear layer of the single-layer perceptron, and the expression formula used is as follows:
[0081]
[0082] wherein is a feature sequence representation learned based on the i-th cycle, and ω i represents the weight of . Since the weight is derived from the amplitude of the input frequency, this adaptive aggregation method can ensure that the weighting process is closely combined with the signal characteristics.
[0083] The aggregated feature X is input into the linear layer of the single-layer perceptron for linear transformation, so as to map the feature X extracted from the PPG signal to the ECG signal representation, and realize the conversion of the PPG signal to the ECG signal. The heart monitoring based on the PPG signal generated by the ECG signal can reconstruct the PPG signal obtained by the wearable device into the ECG signal with more comprehensive information. Compared with the existing method, the application can use a simpler and more portable PPG acquisition device such as an electronic watch in the signal acquisition stage, instead of a complex ECG acquisition device, and obtain a more real and comprehensive ECG signal for heart monitoring.
[0084] As shown in Figure 2 , the application designs a PPG-to-ECG conversion model based on cycles, first performs supervised training on the PPG-ECG paired dataset, and migrates it to the PPG dataset for ECG signal generation, and finally realizes multi-dimensional generation effect evaluation and analysis from the upstream and downstream dimensions. Through this research, the conversion model provided by the application can effectively combine the advantages of PPG devices, capture physiological characteristics within the cycle, obtain accurate and clinically valuable ECG signals through reasoning, generate ECG signals through PPG signals, and be used for cardiovascular task analysis, and finally realize more accurate heart monitoring.
[0085] The application does not describe the prior art.
[0086] Obviously, the above-mentioned embodiments are only examples for clearly illustrating the present application, but not limitation to the embodiments. Based on the above description, other different forms of changes or variations can be made by those skilled in the art. Here, it is not necessary and also impossible to enumerate all the embodiments. The obvious changes or variations derived from the above description are still within the protection scope of the present application.
Claims
1. A conversion model for generating an ECG signal from a PPG signal, characterized in that, The conversion model comprises: A cycle perception module, configured to identify and extract periodic components in the original input PPG signal, determine a frequency related to a cardiac cycle, and reshape the input time series to obtain a two-dimensional cycle view formed by k different cycles; A transformer extraction framework divides a two-dimensional periodic view formed by k different cycles into a plurality of patches corresponding to cardiac cycles i , and inputs each patch i to an embedding layer and an encoding layer in sequence to capture intra-cycle and inter-cycle variations in the PPG signal data and output a representation X" i , and after reshaping, a feature sequence matching the length of the original PPG signal an adaptive aggregation module that aggregates the sequence of features using a weight aggregation method resulting aggregated features X; A single-layer perception machine, configured to input the aggregated features X into a linear layer of the single-layer perception machine, perform linear transformation on the linear layer, and map the features extracted from the PPG signal to an ECG signal representation to obtain a reconstructed ECG signal. The cycle perception module adopts fast Fourier transform to identify and extract periodic components in the original input PPG signal, determine a frequency related to a basic cardiac cycle, and the expression is: A = Amp(FFT(X)) Wherein: FFT(·) is a process of fast transforming a signal to determine frequency components thereof; Amp(·) represents calculating an amplitude; is an amplitude array, where the jth value A j describes the strength of the periodic basis function of frequency j, corresponding to the period length; raw input L is the length of the time series; Select the k largest amplitude values from the PPG signal and find the corresponding frequencies {f1,…,f2}. k },amplitude Select k period lengths {c1,…,c} corresponding to the frequency k }; This yields the period lengths {c1,c2,…,c k } and frequencies {f1,f2,…,f k After that, construct the input data. Cycle (two-dimensional view) i Its expression is: wherein, is based on the frequency f i of the i-th reshaped time series, the rows and columns represent intra- and inter-period variations, respectively, over a corresponding period length c i . Padding(·) is a padding constructor; and Reshape(·) is a reshaping function.
2. The conversion model for generating an ECG signal from a PPG signal according to claim 1, characterized in that, The cycle two-dimensional view Cycle i reshaping, k different cycles are formed, and the expression is: will be reshaped as where T represents a predetermined hyperparameter; The resulting set of patches {Patch1,…,Patch k } is a two-dimensional view formed by k different periods.
3. The conversion model for generating an ECG signal from a PPG signal according to claim 1, wherein, a plurality of patches Patch i are input into an embedding layer in the Transformer extraction framework to obtain an embedding representation where c i is the period length of the patch Patch i d model is the dimension of the model, the expression of which is: X′ i = Embedding(Patch i ), i e {1,2,…,k} The resulting embedded representation X' i After processing by the encoding layers in the Transformer extraction framework, an output representation is obtained The expression is: X" i = TransformerEncoder(X' i ), i e {1,2,…,k} The feature sequence with the length matching the original PPG signal is obtained after remodeling by the truncation method The expression thereof is:
4. The conversion model for generating an ECG signal from a PPG signal according to claim 3, characterized in that, The encoding layer in the Transformer extraction framework adopts a double mechanism on the embedding representation X' i The processing adopts a self-attention mechanism to capture the inter-period dependency in the PPG signal, and adopts a feedforward network to model the intra-period dependency in the PPG signal and capture detailed local features within each period.
5. The conversion model for generating an ECG signal from a PPG signal according to claim 1, wherein, aggregating k feature sequences using a weight aggregation method obtain aggregated features X, The expression is: wherein: ω i denotes the weight of the input frequency, which is derived from the amplitude of the input frequency.
Citation Information
Patent Citations
PPG and ECG automatic conversion intelligent algorithm, storage medium and computer system
CN115270848A
Multi-scale context-based multivariate time sequence signal analysis method
CN116244585A