A PPG signal lightweight diffusion denoising method, system, device and medium

The PPG signal denoising method, which utilizes multi-scale one-dimensional convolutional structures and lightweight attention computation, addresses the shortcomings of existing technologies in noise suppression and waveform restoration. It achieves efficient denoising in resource-constrained scenarios, thereby improving signal quality and processing accuracy.

CN122478485BActive Publication Date: 2026-08-25TIANJIN POLYTECHNIC UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610954035.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-30
Publication Date
2026-08-25
Estimated Expiration
2046-06-30

AI Technical Summary

Technical Problem

Existing PPG signal denoising techniques are difficult to effectively suppress multi-source mixed noise, and in resource-constrained scenarios, it is difficult to achieve complex noise suppression and waveform restoration, resulting in a decline in signal quality and affecting the accuracy of subsequent processing such as heart rate detection and blood oxygen estimation.

Method used

By employing a multi-scale one-dimensional convolutional structure and a lightweight attention computation method, a dual-branch feature sequence is constructed by superimposing reference noise and clean signal. Multi-layer residual fusion and noise prediction are then performed, and training is conducted by combining diffuse noise prediction loss and waveform morphology loss to achieve denoising of PPG signals.

Benefits of technology

While maintaining temporal characteristics and physiological morphology, it reduces the number of model parameters and computational complexity, improves denoising efficiency and signal stability, and reduces the risk of spectral shift and insufficient recovery of local details.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122478485B_ABST
    Figure CN122478485B_ABST
Patent Text Reader

Abstract

The present application relates to the field of signal denoising, and provides a PPG signal light-weight diffusion denoising method, system, device and medium, which comprises generating reference noise and obtaining a pure signal to obtain a reference signal; the pure signal is added with noise to obtain a diffusion noise signal; a multi-scale one-dimensional convolution structure is constructed, the diffusion noise signal and the reference signal are respectively convolved through the multi-scale one-dimensional convolution structure to obtain a double-branch feature sequence; light-weight attention calculation is performed on the double-branch feature sequence to obtain an updated double-branch feature sequence, multi-layer residual fusion and noise prediction are performed on the updated double-branch feature sequence to obtain a noise prediction result; the diffusion noise prediction loss, the average spectral amplitude difference and the waveform form loss of the noise prediction result are calculated to obtain a prediction loss, and the target prediction model is obtained through training according to the prediction loss, and the PPG signal is denoised through the target prediction model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of signal denoising technology, and in particular to a lightweight diffusion denoising method, system, device and medium for PPG signals. Background Technology

[0002] PPG (Photoplethysmography) signal is a one-dimensional physiological signal obtained by collecting changes in peripheral blood volume in the human body through photoelectric sensors. It can reflect heart rate, vascular elasticity, blood perfusion status, and some cardiovascular activity information. Due to the non-invasive, low-cost, and easy-to-integrate characteristics of PPG signal acquisition devices, they have been widely used in smart bracelets, smartwatches, portable health monitoring devices, and remote medical monitoring systems.

[0003] In practical applications, PPG signals are typically acquired by wearable devices or portable acquisition terminals at points such as the wrist, fingertips, and earlobes. Because PPG signals have relatively small amplitudes and are easily affected by factors such as human movement, changes in sensor contact, relative displacement between the skin and probe, changes in ambient light, power supply interference, and momentary contact anomalies, the raw PPG signal often contains various noise components. Common noises include Gaussian white noise, baseline drift, motion artifacts, electromyography artifacts, sudden contact artifacts, and 50Hz or 60Hz power frequency interference.

[0004] Under various noise interferences, PPG signals are prone to signal degradation issues such as baseline shift, periodic structure disorder, main peak amplitude distortion, peak position shift, trough drift, weakening or disappearance of diphthoplasts, and local amplitude abrupt changes. Degraded PPG signal quality directly affects the accuracy and stability of subsequent processing steps such as heart rate detection, blood oxygen estimation, blood pressure estimation, sleep monitoring, exercise health assessment, and cardiovascular status analysis. The technical goal of PPG signal denoising is not only to reduce noise amplitude but also to maintain or restore key morphological features of the PPG signal, such as periodic structure, main peak, trough, diphthoplasts, rising edge, and falling edge, under complex noise conditions.

[0005] Furthermore, PPG signal denoising is typically applied in resource-constrained scenarios such as wearable devices, mobile terminals, or edge computing devices. These devices face limitations in storage capacity, computing resources, power consumption control, and real-time response, making it difficult to deploy denoising models with large parameter scales, high computational complexity, or long inference latency. Therefore, PPG signal denoising methods for practical applications not only need to possess complex noise suppression and waveform restoration capabilities but also need to meet the requirements of lightweight models, low computational overhead, and real-time edge processing.

[0006] Existing lightweight denoising techniques for PPG signals have the following main shortcomings: 1. Insufficient complex noise modeling makes it difficult to simultaneously suppress multi-source mixed noise such as Gaussian white noise, baseline drift, motion artifacts, sudden contact artifacts, and power frequency interference; 2. The noise reduction process lacks effective constraints on the key physiological morphology of PPG, which can easily cause waveform distortion such as the main peak, trough, diphtheria wave, rising edge and falling branch. 3. The loss function constraints are relatively simple. Existing methods mostly rely on time-domain amplitude error or a single reconstruction loss, lacking joint constraints on multi-scale frequency domain features, periodic components and waveform change trends, which may result in spectral shift or insufficient recovery of local details in the denoised signal. 4. It is difficult to balance lightweight structure and noise reduction performance. Model compression or structural simplification can easily lead to a decrease in the ability to suppress complex noise, insufficient recovery of waveform details, or reduced reconstruction stability. Summary of the Invention

[0007] The present invention aims to at least solve one of the technical problems existing in related technologies. To this end, the present invention provides a lightweight diffusion denoising method, system, device, and medium for PPG signals, achieving strong noise suppression capability for PPG signals using a lightweight model.

[0008] This invention provides a lightweight diffusion denoising method for PPG signals, comprising: S1: Generate reference noise and obtain a clean signal. Superimpose the reference noise and the clean signal to obtain the reference signal. S2: Determine the random diffusion step, and add noise to the clean signal according to the random diffusion step to obtain the diffused noise signal; S3: Construct a multi-scale one-dimensional convolutional structure, and convolve the diffused noise signal and the reference signal respectively through the multi-scale one-dimensional convolutional structure to obtain a dual-branch feature sequence; S4: Perform lightweight attention calculation on the dual-branch feature sequence to obtain the updated dual-branch feature sequence. Perform multi-layer residual fusion and noise prediction on the updated dual-branch feature sequence to obtain the noise prediction result. S5: Calculate the diffusion noise prediction loss, average spectral amplitude difference, and waveform shape loss of the noise prediction results. Obtain the prediction loss through the diffusion noise prediction loss, average spectral amplitude difference, and waveform shape loss. Train the target prediction model based on the prediction loss and use the target prediction model to denoise the PPG signal.

[0009] According to the present invention, a lightweight diffusion denoising method for PPG signals is provided, wherein step S1 further includes: S11: Determine the noise component set including Gaussian white noise, baseline drift noise, motion artifact noise, electrode motion artifact noise and power frequency interference noise, mix the noise component set to obtain reference noise, and obtain the pure signal; S12: Determine the noise scaling factor, and superimpose the reference noise and the clean signal according to the noise scaling factor to obtain the reference signal.

[0010] According to the present invention, a lightweight diffusion denoising method for PPG signals is provided. In step S2, a random diffusion step is determined, a cumulative coefficient is generated based on the random diffusion step, an initial diffusion noise is determined, and the clean signal is denoised using the initial diffusion noise and the cumulative coefficient to obtain the diffusion noise signal.

[0011] According to the lightweight diffusion denoising method for PPG signals provided by the present invention, step S3 further includes: S31: Construct the multi-scale one-dimensional convolutional structure including a conditional one-dimensional signal encoder and a target one-dimensional signal encoder; S32: Input the reference signal into the conditional one-dimensional signal encoder for convolution to obtain conditional branch features; input the diffused noise signal into the target one-dimensional signal encoder for convolution to obtain target branch features. S33: The target branch feature and the conditional branch feature are concatenated to obtain the dual-branch feature sequence.

[0012] According to a lightweight diffusion denoising method for PPG signals provided by the present invention, in step S4, conditional branch features are extracted from the dual-branch feature sequence, and key feature generation, query feature generation and value feature generation are performed on the conditional branch features to obtain conditional attention input. Lightweight attention calculation is performed on the conditional attention input to obtain updated conditional branch features. The target branch features are extracted from the dual-branch feature sequence. Query features are generated from the target branch features, and key features and value features are generated from the dual-branch feature sequence to obtain the target attention input. Lightweight attention calculation is performed on the target attention input to obtain the updated target branch features. The updated target branch features and the updated conditional branch features are concatenated to obtain the updated dual-branch feature sequence.

[0013] According to the lightweight diffusion denoising method for PPG signals provided by the present invention, in step S4, a one-dimensional projection layer and a gated activation layer are established, a residual module is established through the one-dimensional projection layer and the gated activation layer, multiple residual modules are combined to form a multi-layer residual module, and the updated dual-branch feature sequence is fused through the multi-layer residual module.

[0014] According to the lightweight diffusion denoising method for PPG signals provided by the present invention, step S5 further includes: S51: Acquire and sample the initial diffusion noise to obtain the sampled initial diffusion noise. Sample the noise prediction result to obtain the sampled prediction result. Calculate the diffusion noise prediction loss using the sampled initial diffusion noise and the sampled prediction result. S52: Obtain a denoised signal based on the noise prediction result and the diffused noise signal, determine the segmentation scale, segment the denoised signal according to the segmentation scale and calculate the segmented spectral amplitude difference, and calculate the average spectral amplitude difference based on the segmented spectral amplitude difference. S53: Calculate the first-order denoised difference and the second-order denoised difference of the denoised signal, calculate the first-order pure difference and the second-order pure difference of the pure signal, and calculate the waveform morphology loss based on the first-order denoised difference, the second-order denoised difference, the first-order pure difference and the second-order pure difference. S54: The predicted loss is obtained by weighted summation of the spread noise prediction loss, the average spectral amplitude difference and the waveform morphology loss. The target prediction model is trained based on the prediction loss and then used to denoise the PPG signal.

[0015] The present invention also provides a lightweight diffusion denoising system for PPG signals, comprising: Signal superposition module: used to generate reference noise and obtain clean signal, and superimpose the reference noise and clean signal to obtain reference signal; Signal noise addition module: used to determine the random diffusion step, and add noise to the clean signal according to the random diffusion step to obtain the diffused noise signal; Dual-branch feature sequence module: used to construct a multi-scale one-dimensional convolutional structure, which convolves the diffuse noise signal and the reference signal respectively to obtain a dual-branch feature sequence; Noise prediction module: Used to perform lightweight attention calculation on the dual-branch feature sequence to obtain the updated dual-branch feature sequence, perform multi-layer residual fusion and noise prediction on the updated dual-branch feature sequence to obtain the noise prediction result; Model training module: used to calculate the spread noise prediction loss, average spectral amplitude difference and waveform shape loss of the noise prediction results. The prediction loss is obtained through the spread noise prediction loss, average spectral amplitude difference and waveform shape loss. The target prediction model is obtained by training based on the prediction loss. The target prediction model is used to denoise the PPG signal.

[0016] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the PPG signal lightweight diffusion denoising method as described above.

[0017] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a PPG signal lightweight diffusion denoising method as described above.

[0018] The above-described one or more technical solutions in the embodiments of the present invention have at least one of the following technical effects: This invention provides a lightweight diffusion denoising method, system, device, and medium for PPG signals. By generating reference noise, it can effectively simulate common noise. Through multi-scale one-dimensional convolutional structures and lightweight attention computation, it can reduce the number of model parameters, floating-point operations, and model storage while maintaining the ability to model temporal features and conditional guidance, thereby improving the training and inference efficiency of denoising. In the process of constructing the prediction loss, the average spectral amplitude difference is used to simultaneously constrain the global spectral structure of the entire PPG signal and the spectral details of local segments, reducing the risk of spectral shift, loss of periodic components, or insufficient local frequency domain recovery in the denoising results. The waveform morphology loss constrains the local slope and curvature changes of the PPG signal through first-order and second-order differences, which helps to maintain key morphological structures such as main peaks, troughs, rising edges, and falling branches. Therefore, compared with training methods that only use a single temporal amplitude error, this scheme can improve the stability of the denoised signal in terms of frequency domain consistency and physiological morphology preservation.

[0019] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0021] Figure 1 This is a schematic flowchart of a lightweight diffusion denoising method for PPG signals provided by the present invention.

[0022] Figure 2 This is a schematic diagram of the structure of a lightweight diffusion denoising system for PPG signals provided by the present invention.

[0023] Figure 3 This is a schematic diagram of the structure of a lightweight diffusion denoising device for PPG signals provided by the present invention.

[0024] Figure label: 100. Signal superposition module; 200. Signal noise addition module; 300. Dual-branch feature sequence module; 400. Noise prediction module; 500. Model training module; 810. Processor; 820. Communication interface; 830. Memory; 840. Communication bus. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention. The following embodiments are used to illustrate this invention but cannot be used to limit the scope of this invention.

[0026] In the description of the embodiments of the present invention, it should be noted that the terms "first", "second" and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0027] In the description of the embodiments of the present invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "connected" and "linked" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in the embodiments of the present invention based on the specific circumstances.

[0028] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0029] The following is combined Figures 1 to 3 Specific embodiments of the present invention are described below. Figure 1 A flowchart illustrating a lightweight diffusion denoising method for PPG signals provided by this invention includes: S1: Generate reference noise and obtain a clean signal. Superimpose the reference noise and the clean signal to obtain the reference signal. Furthermore, the objective of this stage is to acquire a clean signal and generate reference noise, thereby generating reference noise. Specifically, step S1 further includes: S11: Determine the noise component set including Gaussian white noise, baseline drift noise, motion artifact noise, electrode motion artifact noise and power frequency interference noise, mix the noise component set to obtain reference noise, and obtain the pure signal; S12: Determine the noise scaling factor, and superimpose the reference noise and the clean signal according to the noise scaling factor to obtain the reference signal.

[0030] The specific implementation method for the above steps in this embodiment is as follows: To simulate common noise interference encountered during actual data acquisition by wearable devices, a set of noise components needs to be defined. This set includes Gaussian white noise, baseline drift noise, motion artifact noise, electrode motion artifact noise, and power frequency interference noise. Baseline drift noise, motion artifact noise, and electrode motion artifact noise are candidate segments randomly selected from a publicly available real noise database and truncated according to the length of the PPG signal segments to obtain realistic noise segments that match the preset quality requirements. Gaussian white noise and power frequency interference noise are generated using a preset noise model.

[0031] Subsequently, the participation factors and weights of different noises were determined, and the noises in the noise component set were combined in a random participation manner using the participation factors and weights to obtain the reference noise. By randomly changing the noise segments, noise participation combinations, and noise weights, the reference noise can cover the noise types and noise intensity variations under different real-world acquisition scenarios. The clean signal is the PPG signal selected from the dataset that has undergone outlier removal, segmentation, normalization, and length unification processing.

[0032] The signal-to-noise ratio (SNR) is then determined from a preset range. A noise scaling factor is determined based on the SNR. The reference noise is then weighted using the noise scaling factor, and the reference noise and the clean signal are superimposed to obtain the reference signal.

[0033] S2: Determine the random diffusion step, and add noise to the clean signal according to the random diffusion step to obtain the diffused noise signal; Furthermore, the purpose of this stage is to add noise to the clean signal to obtain a diffused noise signal. Specifically, in step S2, a random diffusion step is determined, a cumulative coefficient is generated based on the random diffusion step, an initial diffused noise is determined, and the clean signal is added with noise using the initial diffused noise and the cumulative coefficient to obtain the diffused noise signal.

[0034] The specific implementation method for the above steps in this embodiment is as follows: First, a random diffusion step t needs to be randomly selected from a preset diffusion step range. The diffusion step represents the current noise level. Then, the diffusion noise scheduling coefficient is determined based on the random diffusion step, and then the cumulative coefficient when the random diffusion step is t is determined based on the diffusion noise scheduling coefficient. In addition, it is necessary to determine the initial diffusion noise. Thus, the pure signal is obtained through initial diffusion noise and diffusion random coefficients. By adding noise, the diffused noise signal at a random diffusion step of t can be obtained. : .

[0035] S3: Construct a multi-scale one-dimensional convolutional structure, and convolve the diffused noise signal and the reference signal respectively through the multi-scale one-dimensional convolutional structure to obtain a dual-branch feature sequence; Furthermore, the objective of this stage is to obtain a dual-branch feature sequence through convolution using a multi-scale one-dimensional convolutional structure. Specifically, step S3 further includes: S31: Construct the multi-scale one-dimensional convolutional structure including a conditional one-dimensional signal encoder and a target one-dimensional signal encoder; S32: Input the reference signal into the conditional one-dimensional signal encoder for convolution to obtain conditional branch features; input the diffused noise signal into the target one-dimensional signal encoder for convolution to obtain target branch features. S33: The target branch feature and the conditional branch feature are concatenated to obtain the dual-branch feature sequence.

[0036] The specific implementation method for the above steps in this embodiment is as follows: First, a multi-scale one-dimensional convolutional structure needs to be constructed, including a conditional one-dimensional signal encoder and a target one-dimensional signal encoder. Here, the conditional and target one-dimensional signal encoders use the same structure, but their parameters are independent to adapt to the feature distributions of the reference signal and the diffused noise signal, respectively. Both the conditional and target one-dimensional signal encoders employ a multi-scale depth-separable one-dimensional convolutional structure. Specifically, multiple one-dimensional convolutional branches with kernel scales of 1, 3, 5, 7, 9, and 11 are set to extract local waveform features and periodic variation features of the PPG signal under different time receptive fields. The outputs of each scale convolutional branch are concatenated along the channel dimension to form a multi-scale feature representation.

[0037] The depthwise separable one-dimensional convolutional structure includes depthwise convolution and pointwise convolution. Depthwise convolution is used to extract local waveform features in the time dimension, while pointwise convolution is used to perform channel mapping. This structure reduces the number of convolutional parameters and computational cost while maintaining multi-scale feature extraction capabilities. The reference signal is input into a conditional one-dimensional signal encoder for convolution to obtain conditional branch features. By inputting the diffused noise signal into the target one-dimensional signal encoder for convolution, the target branch features can be obtained. Finally, the target branch features and conditional branch features are concatenated to obtain the dual-branch feature sequence h.

[0038] S4: Perform lightweight attention calculation on the dual-branch feature sequence to obtain the updated dual-branch feature sequence. Perform multi-layer residual fusion and noise prediction on the updated dual-branch feature sequence to obtain the noise prediction result. Furthermore, the objective of this stage is to perform lightweight attention computation to obtain an updated dual-branch feature sequence, followed by multi-layer residual fusion and noise prediction to obtain the noise prediction result. Specifically, in step S4, conditional branch features are extracted from the dual-branch feature sequence, and key feature generation, query feature generation, and value feature generation are performed on the conditional branch features to obtain conditional attention input. Lightweight attention computation is then performed on the conditional attention input to obtain updated conditional branch features. The target branch features are extracted from the dual-branch feature sequence. Query features are generated from the target branch features, and key features and value features are generated from the dual-branch feature sequence to obtain the target attention input. Lightweight attention calculation is performed on the target attention input to obtain the updated target branch features. The updated target branch features and the updated conditional branch features are concatenated to obtain the updated dual-branch feature sequence.

[0039] In step S4, a one-dimensional projection layer and a gated activation layer are established. A residual module is established through the one-dimensional projection layer and the gated activation layer. Multiple residual modules form a multi-layer residual module. The updated dual-branch feature sequence is fused using the multi-layer residual module.

[0040] The specific implementation method for the above steps in this embodiment is as follows: First, conditional branch features are extracted from the dual-branch feature sequence. Then, a query feature extraction function Q(), a key feature extraction function K(), and a value feature extraction function V() are constructed. The conditional branch features are input into these extraction functions respectively, thus generating key features, query features, and value features, obtaining the conditional attention input for the conditional branch features. Next, lightweight attention calculation is performed on the conditional attention input to obtain the updated conditional branch features. : in, To illustrate the lightweight attention computation function, taking the updating of conditional branch features as an example, the specific computation method of the lightweight attention computation function is as follows: Here, `softmax()` represents the softmax transformation, `d` represents the channel dimension of the query feature and the key feature, `E` represents the learnable first sequence dimension compression matrix, `F` represents the learnable second sequence dimension compression matrix, `T` represents the transpose, and `M` represents the attention mask term. In the attention mask term, for connections where information is allowed to be read, the corresponding term of `M` is 0; for connections where information is prohibited from being read, the corresponding term of `M` is negative infinity, making the attention weight of that connection zero after normalization. When calculating and updating the target branch feature, the lightweight attention calculation function operates in the same way, except that the input is replaced with the target attention input. This allows for sequence dimension compression of the key and value features, reducing computational complexity and storage usage.

[0041] Subsequently, target branch features are extracted from the dual-branch feature sequence. These target branch features are then input into the query feature extraction function for query feature generation. The dual-branch feature sequence is then input into the key feature extraction function and the value feature extraction function for key feature generation and value feature generation, respectively, to obtain the target attention input. Lightweight attention computation is then performed on the target attention input to obtain the updated target branch features. : This allows the target branch feature to simultaneously read its own features and those of the conditional branch feature when updating its own features, thus enabling the conditional branch feature to provide unidirectional guidance for the denoising process. Finally, the updated target branch feature and the updated conditional branch feature are concatenated to obtain the updated dual-branch feature sequence.

[0042] Next, a one-dimensional projection layer and a gated activation layer need to be established, and these two layers are concatenated to form a residual module. Multiple residual modules are constructed and concatenated to form a multi-layer residual module. The updated bi-branch feature sequence is then input into the multi-layer residual module. In each residual module, the input is first projected into gated and filtered features in the one-dimensional projection layer. Then, a nonlinear transformation is performed on the gated and filtered features in the gated activation layer to obtain residual features and skip connection features. The residual features are passed to the next residual module as input, and the skip connection features are used for feature fusion of the residual features from multiple residual modules. In the multi-layer residual module, the input of the first residual module is the updated bi-branch feature sequence.

[0043] Next, based on the residual features output by the last residual module, feature fusion is performed on the residual features output by the last residual module using the residual features of each residual module, thus completing multi-layer residual fusion and obtaining the noise fusion result. For the noise fusion result, only the content obtained by updating the target branch features is extracted and decoded to obtain the noise prediction result.

[0044] S5: Calculate the diffusion noise prediction loss, average spectral amplitude difference, and waveform shape loss of the noise prediction results. Obtain the prediction loss through the diffusion noise prediction loss, average spectral amplitude difference, and waveform shape loss. Train the target prediction model based on the prediction loss and use the target prediction model to denoise the PPG signal.

[0045] Furthermore, the objective of this stage is to obtain the prediction loss, train a target prediction model based on the prediction loss, and then use the target prediction model to denoise the PPG signal. Specifically, step S5 further includes: S51: Acquire and sample the initial diffusion noise to obtain the sampled initial diffusion noise. Sample the noise prediction result to obtain the sampled prediction result. Calculate the diffusion noise prediction loss using the sampled initial diffusion noise and the sampled prediction result. S52: Obtain a denoised signal based on the noise prediction result and the diffused noise signal, determine the segmentation scale, segment the denoised signal according to the segmentation scale and calculate the segmented spectral amplitude difference, and calculate the average spectral amplitude difference based on the segmented spectral amplitude difference. S53: Calculate the first-order denoised difference and the second-order denoised difference of the denoised signal, calculate the first-order pure difference and the second-order pure difference of the pure signal, and calculate the waveform morphology loss based on the first-order denoised difference, the second-order denoised difference, the first-order pure difference and the second-order pure difference. S54: The predicted loss is obtained by weighted summation of the spread noise prediction loss, the average spectral amplitude difference and the waveform morphology loss. The target prediction model is trained based on the prediction loss and then used to denoise the PPG signal.

[0046] The specific implementation method for the above steps in this embodiment is as follows: First, the initial diffuse noise needs to be obtained and sampled according to the signal length to obtain the initial diffuse noise of the k-th sample. It is also necessary to sample the noise prediction results to obtain the prediction result of the kth sample. This allows us to calculate the predicted loss for diffuse noise. : Where L is the signal length of the diffused noise signal.

[0047] Next, a denoised signal needs to be obtained based on the noise prediction results and the diffused noise signal. : in, This is the result of noise prediction.

[0048] Because PPG signals exhibit significant periodicity, relying solely on diffuse noise prediction is insufficient to fully reflect the restoration results of the main frequency components and local spectral structure after denoising. Therefore, an average spectral amplitude difference is introduced. First, the segmentation scale S needs to be determined, which includes multiple sub-segmentation scales s. The sub-segmentation scales can take values ​​of 1, 2, and 4, representing the number of segments the signal is divided into. Subsequently, the denoised signal is segmented according to the sub-segmentation scales, resulting in the r-th segment of the denoised signal at the s-th sub-segmentation scale. The clean signal is segmented according to the sub-segment scale to obtain the r-th segment of the clean signal at the s-th sub-segment scale. Then, the difference in spectral amplitude of the segmented spectrum at the s-th sub-segment scale is calculated. : in, For Fourier transform, To obtain the norm, To calculate the spectral amplitude, after calculating the segmented spectral amplitude differences across all sub-segment scales, the segment weights for the s-th sub-segment scale are determined. This allows for the calculation of the average spectral amplitude difference. : .

[0049] Furthermore, since the main peaks, troughs, rising edges, and falling edges in PPG signals are important physiological morphological features, relying solely on spread noise prediction loss and average spectral amplitude differences may still lead to excessive smoothing of local waveforms or distortion of peak-trough structures. Therefore, it is also necessary to calculate the first-order and second-order denoising differences of each sample of the denoised signal, and the first-order and second-order pure differences of each sample of the clean signal. Here, the first-order difference of the k-th sample of the signal is calculated. The method is as follows: in, For the k-th sampled signal segment, Given the (k+1)th sampled signal segment, calculate the second-order difference of the kth sample of the signal. The method is as follows: in, Let be the signal segment sampled at the (k+2)th sample. When calculating the denoised first-order difference and denoised second-order difference using the above method, simply substitute the denoised signal segment into the above formula; when calculating the clean first-order difference and clean second-order difference using the above method, simply substitute the clean signal segment into the above formula.

[0050] Then the waveform shape loss was calculated. : Where β represents the first-order difference constraint weight coefficient, This represents the weighting coefficients of the second-order difference constraint. This represents the first-order difference for denoising the k-th sample. This represents the pure first-order difference of the k-th sample. This represents the denoised second-order difference of the k-th sample. Let represent the pure second-order difference of the k-th sample.

[0051] Finally, the prediction loss is obtained by weighted summation of the spread noise prediction loss, the average spectral amplitude difference, and the waveform morphology loss. Next, steps S3 to S4 are used as the noise prediction model and trained. The goal is to minimize the prediction loss; the noise prediction model is continuously trained, and the parameters within the noise prediction model composed of steps S3 to S4 are adjusted to obtain the target prediction model. Then, the actual acquired PPG signal is input into the trained target prediction model instead of the spread noise signal, allowing for the prediction of noise in the actual acquired PPG signal, and thus denoising the actual acquired PPG signal.

[0052] The effectiveness of a lightweight diffusion denoising method for PPG signals was also verified here. The method used in this invention was compared with existing wavelet threshold denoising models and transformer conditional diffusion denoising models. The comparison results are shown in Table 1. Table 1. Comparison of denoising results between this method and existing methods.

[0053] Among them, the wavelet threshold denoising model and the transformer conditional diffusion denoising model are both existing methods. The number of parameters represents the number of parameters that the model needs to train, in M. The model size represents the storage occupied by the model, in MB. FLOPs represents the number of floating-point operations per second, in G. The single-sample inference time represents the time required to complete denoising, in ms. RMSE is the root mean square error, MAE is the mean absolute error, and the signal-to-noise ratio improvement represents the improvement in the signal-to-noise ratio of the denoised PPG signal compared to the original PPG signal. It can be seen that the performance of this method is significantly improved compared to existing technologies.

[0054] The present invention provides a lightweight diffusion denoising device for PPG signals. The lightweight diffusion denoising device for PPG signals described below can be referred to in correspondence with the lightweight diffusion denoising method for PPG signals described above.

[0055] Figure 2 A schematic diagram of a lightweight diffusion denoising system for PPG signals is shown below. Figure 2 As shown, a lightweight diffusion denoising method for PPG signals as described above includes: Signal superposition module 100: used to generate reference noise and obtain a clean signal, and superimpose the reference noise and the clean signal to obtain a reference signal; Signal noise addition module 200: used to determine the random diffusion step, and add noise to the clean signal according to the random diffusion step to obtain the diffused noise signal; Dual-branch feature sequence module 300: used to construct a multi-scale one-dimensional convolutional structure, which convolves the diffused noise signal and the reference signal respectively to obtain a dual-branch feature sequence; Noise prediction module 400: used to perform lightweight attention calculation on the dual-branch feature sequence to obtain an updated dual-branch feature sequence, perform multi-layer residual fusion and noise prediction on the updated dual-branch feature sequence to obtain the noise prediction result; Model training module 500: Used to calculate the spread noise prediction loss, average spectral amplitude difference and waveform shape loss of the noise prediction result. The prediction loss is obtained through the spread noise prediction loss, average spectral amplitude difference and waveform shape loss. The target prediction model is obtained by training based on the prediction loss. The PPG signal is denoised by the target prediction model.

[0056] Figure 3 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 3As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other via the communication bus 840. The processor 810 can call a computer program in the memory 830 to execute a PPG signal lightweight diffusion denoising method, which includes: S1: Generate reference noise and obtain a clean signal. Superimpose the reference noise and the clean signal to obtain the reference signal. S2: Determine the random diffusion step, and add noise to the clean signal according to the random diffusion step to obtain the diffused noise signal; S3: Construct a multi-scale one-dimensional convolutional structure, and convolve the diffused noise signal and the reference signal respectively through the multi-scale one-dimensional convolutional structure to obtain a dual-branch feature sequence; S4: Perform lightweight attention calculation on the dual-branch feature sequence to obtain the updated dual-branch feature sequence. Perform multi-layer residual fusion and noise prediction on the updated dual-branch feature sequence to obtain the noise prediction result. S5: Calculate the diffusion noise prediction loss, average spectral amplitude difference, and waveform shape loss of the noise prediction results. Obtain the prediction loss through the diffusion noise prediction loss, average spectral amplitude difference, and waveform shape loss. Train the target prediction model based on the prediction loss and use the target prediction model to denoise the PPG signal.

[0057] Furthermore, when the computer program in the aforementioned memory 830 can be implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0058] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the aforementioned PPG signal lightweight diffusion denoising method, the method comprising: S1: Generate reference noise and obtain a clean signal. Superimpose the reference noise and the clean signal to obtain the reference signal. S2: Determine the random diffusion step, and add noise to the clean signal according to the random diffusion step to obtain the diffused noise signal; S3: Construct a multi-scale one-dimensional convolutional structure, and convolve the diffused noise signal and the reference signal respectively through the multi-scale one-dimensional convolutional structure to obtain a dual-branch feature sequence; S4: Perform lightweight attention calculation on the dual-branch feature sequence to obtain the updated dual-branch feature sequence. Perform multi-layer residual fusion and noise prediction on the updated dual-branch feature sequence to obtain the noise prediction result. S5: Calculate the diffusion noise prediction loss, average spectral amplitude difference, and waveform shape loss of the noise prediction results. Obtain the prediction loss through the diffusion noise prediction loss, average spectral amplitude difference, and waveform shape loss. Train the target prediction model based on the prediction loss and use the target prediction model to denoise the PPG signal.

[0059] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0060] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0061] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A lightweight diffusion denoising method for PPG signals, characterized in that, include: S1: Generate reference noise and obtain a clean signal. Superimpose the reference noise and the clean signal to obtain the reference signal. S2: Determine the random diffusion step, and add noise to the clean signal according to the random diffusion step to obtain the diffused noise signal; S3: Construct a multi-scale one-dimensional convolutional structure, and convolve the diffused noise signal and the reference signal respectively through the multi-scale one-dimensional convolutional structure to obtain a dual-branch feature sequence; S4: Perform lightweight attention calculation on the dual-branch feature sequence to obtain the updated dual-branch feature sequence. Perform multi-layer residual fusion and noise prediction on the updated dual-branch feature sequence to obtain the noise prediction result. S5: Calculate the diffusion noise prediction loss, average spectral amplitude difference, and waveform shape loss of the noise prediction results. Obtain the prediction loss through the diffusion noise prediction loss, average spectral amplitude difference, and waveform shape loss. Train the target prediction model based on the prediction loss and use the target prediction model to denoise the PPG signal.

2. The lightweight diffusion denoising method for PPG signals according to claim 1, characterized in that, Step S1 further includes: S11: Determine the noise component set including Gaussian white noise, baseline drift noise, motion artifact noise, electrode motion artifact noise and power frequency interference noise, mix the noise component set to obtain reference noise, and obtain the pure signal; S12: Determine the noise scaling factor, and superimpose the reference noise and the clean signal according to the noise scaling factor to obtain the reference signal.

3. The lightweight diffusion denoising method for PPG signals according to claim 1, characterized in that, In step S2, a random diffusion step is determined, a cumulative coefficient is generated based on the random diffusion step, an initial diffusion noise is determined, and the clean signal is noise-added using the initial diffusion noise and the cumulative coefficient to obtain the diffusion noise signal.

4. The lightweight diffusion denoising method for PPG signals according to claim 1, characterized in that, Step S3 further includes: S31: Construct the multi-scale one-dimensional convolutional structure including a conditional one-dimensional signal encoder and a target one-dimensional signal encoder; S32: Input the reference signal into the conditional one-dimensional signal encoder for convolution to obtain conditional branch features; input the diffused noise signal into the target one-dimensional signal encoder for convolution to obtain target branch features. S33: The target branch feature and the conditional branch feature are concatenated to obtain the dual-branch feature sequence.

5. The lightweight diffusion denoising method for PPG signals according to claim 1, characterized in that, In step S4, conditional branch features are extracted from the dual-branch feature sequence, and key features, query features, and value features are generated on the conditional branch features to obtain conditional attention input. Lightweight attention calculation is performed on the conditional attention input to obtain updated conditional branch features. The target branch features are extracted from the dual-branch feature sequence. Query features are generated from the target branch features, and key and value features are generated from the dual-branch feature sequence to obtain the target attention input. Lightweight attention calculation is performed on the target attention input to obtain the updated target branch features. The updated target branch features and the updated conditional branch features are concatenated to obtain the updated dual-branch feature sequence.

6. The lightweight diffusion denoising method for PPG signals according to claim 1, characterized in that, In step S4, a one-dimensional projection layer and a gated activation layer are established. A residual module is established through the one-dimensional projection layer and the gated activation layer. Multiple residual modules form a multi-layer residual module. The updated dual-branch feature sequence is fused using the multi-layer residual module.

7. The lightweight diffusion denoising method for PPG signals according to claim 1, characterized in that, Step S5 further includes: S51: Acquire and sample the initial diffusion noise to obtain the sampled initial diffusion noise. Sample the noise prediction result to obtain the sampled prediction result. Calculate the diffusion noise prediction loss using the sampled initial diffusion noise and the sampled prediction result. S52: Obtain a denoised signal based on the noise prediction result and the diffused noise signal, determine the segmentation scale, segment the denoised signal according to the segmentation scale and calculate the segmented spectral amplitude difference, and calculate the average spectral amplitude difference based on the segmented spectral amplitude difference. S53: Calculate the first-order denoised difference and the second-order denoised difference of the denoised signal, calculate the first-order pure difference and the second-order pure difference of the pure signal, and calculate the waveform morphology loss based on the first-order denoised difference, the second-order denoised difference, the first-order pure difference and the second-order pure difference. S54: The predicted loss is obtained by weighted summation of the spread noise prediction loss, the average spectral amplitude difference and the waveform morphology loss. The target prediction model is trained based on the prediction loss and then used to denoise the PPG signal.

8. A lightweight diffusion denoising system for PPG signals, used to perform a lightweight diffusion denoising method for PPG signals as described in any one of claims 1 to 7, characterized in that, include: Signal superposition module: used to generate reference noise and obtain clean signal, and superimpose the reference noise and clean signal to obtain reference signal; Signal noise addition module: used to determine the random diffusion step, and add noise to the clean signal according to the random diffusion step to obtain the diffused noise signal; Dual-branch feature sequence module: used to construct a multi-scale one-dimensional convolutional structure, which convolves the diffuse noise signal and the reference signal respectively to obtain a dual-branch feature sequence; Noise prediction module: Used to perform lightweight attention calculation on the dual-branch feature sequence to obtain the updated dual-branch feature sequence, perform multi-layer residual fusion and noise prediction on the updated dual-branch feature sequence to obtain the noise prediction result; Model training module: used to calculate the spread noise prediction loss, average spectral amplitude difference and waveform shape loss of the noise prediction results. The prediction loss is obtained through the spread noise prediction loss, average spectral amplitude difference and waveform shape loss. The target prediction model is obtained by training based on the prediction loss. The target prediction model is used to denoise the PPG signal.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements a lightweight diffusion denoising method for PPG signals as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements a lightweight diffusion denoising method for PPG signals as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Heart rate prediction and model training method and system, wearable device and medium

    CN119862375A

  • Fetal heart rate signal data enhancement method based on conditional diffusion model

    CN121313132A