PPG peak detection method based on signal quality mask and dual-stage verification
By employing a signal quality masking and two-stage verification method, combined with a sliding window and backward verification mechanism, the problems of false detection, missed detection, and multiple detection in PPG signal peak detection are solved, achieving high-precision peak detection that is suitable for wearable devices and sleep monitoring.
Patent Information
- Application Number
- CN202511359549.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-23
- Publication Date
- 2026-01-02
AI Technical Summary
Existing PPG signal peak detection methods are prone to false positives, false negatives, and false positives when faced with respiratory disturbances, motion artifacts, baseline drift, and noise interference, which affects the estimation of heart rate and blood oxygen saturation.
A signal quality mask and two-stage verification method is adopted. A comprehensive quality score model is generated by linearly fusing the signal quality index (SQI) and the coefficient of variation (CV). Combined with a sliding window and backward verification mechanism, the accuracy and robustness of peak detection are ensured.
It significantly reduces the false positive and false negative rates, improves the accuracy of peak detection, and remains stable even under significant body movement conditions, meeting real-time processing requirements and suitable for wearable devices and sleep monitoring.
Smart Images

Figure CN121256341A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of biomedical signal processing and intelligent detection, and in particular to a PPG peak detection method based on signal quality mask and two-stage verification. BACKGROUND Photoplethysmography (PPG) is a non-invasive technique that uses changes in light absorption and reflection to detect changes in cardiovascular volume, and has wide application in heart rate, pulse, blood oxygen and other vital sign monitoring. PPG signal usually shows periodic fluctuations, and its main peak value (systolic peak) reflects the arrival of each heart beat, so accurate detection of the peak value is a key prerequisite for subsequent functions such as heart rate estimation, variability analysis, and cardiovascular risk warning.
[0002] However, PPG signals are usually affected by respiratory disturbance, motion artifact, baseline drift, noise interference, etc., which leads to the following problems for conventional peak detection methods: False detection, such as falsely determining a peak at a rising edge or a noise spike; missed detection, where a true pulse wave peak is obscured by a local abnormal waveform; and multiple detection, where multiple local extrema are detected within a single beat cycle.
[0003] Existing methods such as fixed threshold-based extremum discrimination, standard algorithms such as scipy.find_peaks, and Pan-Tompkins variants have certain adaptability problems or are sensitive to noise, which affects the estimation of physiological indicators such as heart rate and blood oxygen saturation. SUMMARY
[0004] The purpose of the present application is to provide a method for real-time monitoring of PPG signal peaks with high precision, low false detection and low missed detection, to solve the problems raised in the background.
[0005] To achieve the above purpose, the present application adopts the following technical solution, comprising: S1, obtaining original PPG signal sampling sequence data and synchronously collected three-axis acceleration signals as body motion reference signals, and preprocessing the original PPG signal sampling sequence data; wherein is the acceleration signal of the x-axis, is the acceleration signal of the y-axis, is the z-axis acceleration signal; S2, based on the preprocessed data of S1, calculating the signal quality index SQI per second by the spectral energy proportion of the PPG signal within a fixed time period, and calculating the body motion coefficient of variation CV based on the three-axis acceleration signals; S3, linearly fusing the signal quality index SQI and the body motion coefficient of variation CV to obtain a comprehensive quality score Score model: S4, based on the data pre-processed in S1, set a sliding window, in each window interval search for the local maximum value in the interval, and record the position index as the signal amplitude at the position is and record the local maximum value as the first candidate peak value; S5, based on the first candidate peak value obtained in S4, perform backward verification and dynamic correction to determine the final position of the candidate peak and add it to the peak list; S6, to avoid detecting local peaks multiple times in a cardiac cycle, update the starting position of the next sliding window to , that is, skip sample points, repeat steps S4 and S5 to confirm the peak and add it to the peak list; this is equivalent to applying a physiological rhythm constraint and setting a minimum peak interval to prevent over-detection.
[0006] S7, set a score threshold, mark the artifact mask area according to the comprehensive quality score Score model described in step S3, remove abnormal peaks from the peak list, and output the peak position index in the peak list as the final peak sequence. The artifact is proposed according to the Score threshold; set a signal score threshold, when the comprehensive score Score is less than the set threshold, the corresponding time period is recorded as an artifact area, which is removed in the subsequent peak confirmation stage, thereby reducing the artifact detection rate and improving the robustness.
[0007] Preferably, the S1 pre-processing of the original PPG signal sample sequence data includes band-pass filtering of the PPG original signal, which can eliminate baseline drift, respiratory interference and high-frequency noise; and Z-score standardization processing of the filtered signal to improve the consistency of peak detection caused by different signal amplitude ranges.
[0008] Preferably, the calculation method of the signal quality index SQI in S2 includes: performing CZT (Chirp-Z Transform) transformation on the PPG data in the five-second window after pre-processing to obtain the main peak frequency; based on the instantaneous heart rate value, dynamically adjusting the bandwidth factor to obtain the final adaptive bandwidth; centered on the main peak frequency, setting the interval according to the adaptive bandwidth, and calculating the signal quality index SQI: ; wherein is the accumulated power in the interval, is the sum of the full-band power.
[0009] Preferably, the calculation method of the moving coefficient of variation CV in S2 comprises: Taking the modulus of the three-axis acceleration vector in a one-second signal window (corresponding to a sampling rate of fs); According to the modulus, the standard deviation and the mean value are calculated to obtain the body motion coefficient of variation CV per second: ; In the formula, is the modulus of the three-axis acceleration in a one-second signal window, is the mean value of , is the variance of , and i is the body motion index.
[0010] The body motion coefficient of variation CV is used to reflect the fluctuation degree of the acceleration signal in the time period.
[0011] Preferably, the step S3 of generating a comprehensive quality score Score model comprises: S301, in order to enhance the discrimination ability of the signal quality index SQI and the moving coefficient CV, a nonlinear mapping function is further applied to the two indexes, the hyperbolic tangent function is adopted for the original value of the signal quality index SQI to enhance the mapping to highlight the high-quality signal segment, and the Sigmoid function is adopted for the moving coefficient CV to perform suppression mapping to suppress the influence of high body motion noise; S302, the and are fused in a linear weighted manner to obtain a comprehensive quality score Score model: ; In the formula, is the enhanced mapping of SQI, is the suppression mapping of CV, and are weight factors, respectively used to balance the importance of signal quality and motion interference, and .
[0012] Preferably, the setting of the sliding window in the step S4 comprises that the length of the sliding window is , the corresponding sampling rate is , the sample length is . The starting position of the window is set as subscript , and the ending position of the window is .
[0013] Preferably, the backward verification and dynamic correction in the step S5 comprise: S501, set the length of the backward verification interval according to the length of the time interval covering a normal ascending segment of a beat , which is the sample number corresponding to one-third of the sampling rate; S502, set the search interval based on the position of the first candidate peak and the length of the verification interval , search for a larger peak value in the search interval from the position of the first candidate peak; S503, if not found, keep the original candidate peak position Record the first candidate peak position as the final candidate peak position and record it in the peak value list; S504, if a larger peak value is found, update the candidate peak position to the index position corresponding to the extreme value Record the position as the final candidate peak position and record it in the peak value list.
[0014] Compared with the prior art, the embodiments of the present application have at least the following advantages or beneficial effects: The two-stage verification mechanism of the present application, which determines the final candidate peak value by signal quality mask and sliding window search for candidate peak value, makes the peak value detection accuracy of this method high, and the false detection rate and the missed detection rate are significantly lower than those of the existing method; The anti-movement interference ability is strong, even in the case of obvious body movement, the peak value detection can still be stable; The real-time performance is good, combined with the sliding window and rhythm jump strategy, it can adapt to the real-time processing requirement; The present application can be widely applied to wearable devices, sleep monitoring, heart rate variability analysis, etc.
[0015] The artifact mask generated by the linear fusion of SQI and CV can effectively eliminate false peaks in low-quality signal segments, significantly reducing false detection. For the case of multiple local extreme values appearing in the same heart cycle, the sliding window combined with the rhythm constraint strategy only retains the true peak value of each heart cycle, thereby suppressing the multiple detection phenomenon. For the real peak value covered by the local abnormal waveform or motion interference, the backward verification mechanism can find a higher peak value in the candidate peak interval and dynamically correct the peak position, effectively reducing the missed detection rate. BRIEF DESCRIPTION OF DRAWINGS
[0016] Figure 1 is the overall flowchart of the present application; Figure 2 is the flowchart of the present application for generating an artifact mask; Figure 3 is the flowchart of steps S4, S5 and S6 of the present application; Figure 4 is the effect diagram of the method of the present application in clinical data collection, wherein (a) is false detection and (b) is missed detection. DETAILED DESCRIPTION
[0017] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0018] Referring to Figures 1-4 , the present application provides a PPG peak detection method based on signal quality mask and two-stage verification: S1, obtaining original PPG signal sampling sequence data and synchronously collected three-axis acceleration signals , , , preprocessing the original PPG signal sampling sequence data; The preprocessing of the original PPG signal sampling sequence data in S1 includes: Performing band-pass filtering on the PPG original signal, and setting the filter passband range to 0.5-5 Hz to eliminate baseline drift, respiratory interference and high-frequency noise; and recording the filtered signal as ; Performing Z-score standardization processing on the filtered signal , and the standardization formula is as follows: ; Wherein, is the average value of the filtered signal , and is the standard deviation. This step converts the signal into a standard distribution with a mean of 0 and a standard deviation of 1, making the calculation simpler and more efficient.
[0019] Referring to Figure 2 , S2, calculating the signal quality index SQI per second based on the spectral energy proportion of the PPG signal in a fixed time period based on the preprocessed data in S1, and calculating the body motion coefficient of variation CV based on the three-axis acceleration signals; The calculation method of SQI (Signal Quality Index, SQI) in S2 includes: Performing CZT transformation on the PPG data in each 5-second window to obtain the frequency sequence freqs and the corresponding power spectrum power_spectrum, and obtaining the main peak frequency of the power spectrum ; Based on the estimated instantaneous heart rate value (hr_est), setting the basic bandwidth to 0.1 Hz, and dynamically adjusting the bandwidth factor according to the heart rate change: ; Obtaining the final adaptive bandwidth; ; Centered on the main peak frequency, within the interval The accumulated power is used as signal energy (signal_power), and the total power is the sum of the power across the entire frequency band (total_power). The signal quality index (SQI) is then calculated. ; In the formula, This represents the cumulative power within the interval. It is the sum of the power across the entire frequency band.
[0020] The calculation method for CV in S2 includes: The magnitude of the triaxial acceleration vector within a one-second signal window is taken to calculate the body dynamics intensity. ; In the formula, where The acceleration signal along the x-axis. Let be the acceleration along the y-axis. The acceleration is along the z-axis. The standard deviation and mean of the modulus are calculated based on the modulus length to obtain the coefficient of variation (CV) of body motion per second. ; In the formula, The three-axis acceleration modulus within a one-second signal window. for The mean, for Variance, where i is the volume index.
[0021] S3. Linearly fuse the SQI and CV to obtain the comprehensive quality score model: S301. To enhance the distinguishing ability of the signal quality index (SQI) and the moving average (CV), a nonlinear mapping function is further applied to them, and the original SQI value is enhanced by using the hyperbolic tangent function. The Sigmoid function is used to suppress mapping in CV. .
[0022] Enhanced mapping This maps SQI to the 0~1 interval, and the mapping function is: ; Parameters in the formula The steepness of the control function curve determines the sensitivity of the score to changes in the SQI; parameters The position of the control curve's shift corresponds to the SQI threshold. In this example, is set to 5, is set to 0.6.
[0023] Inhibition mapping is a representation of CV mapping to inhibition of body motion: ; In the formula, is a control curve slope, which determines the inhibition strength of CV change; is a control function inflection point position, which determines the tolerance of the system to motion disturbance. In this example, is set to 5, is set to 0.3.
[0024] S302, in a linear weighted manner, the and are fused to obtain a comprehensive quality score Score model: ; In the formula, is an enhanced mapping of SQI, is an inhibition mapping of CV, and are weight factors, respectively used to balance the importance of signal quality and motion disturbance, and ; In this embodiment, take (main contribution), (secondary constraint).
[0025] Referring to Figure 3 , S4, based on the data preprocessed by S1, set a sliding window, set the window duration to seconds, and the corresponding sampling rate is , then the window sample length sampling points; search for the local maximum value in each window interval and mark it as the first candidate peak, mark the position index as , and the signal amplitude at this position is : S5, based on the first candidate peak obtained in S4, the final position of the candidate peak is determined by backward verification and dynamic correction and is added to the peak value list, and the backward verification and dynamic correction includes: S501, according to the time length covering a normal beat rising segment, set the length of the backward verification interval; set the verification interval length to points; S502, based on the position of the first candidate peak and the length of the verification interval, set the search interval , in the search interval, from the position of the first candidate peak, search backward to find whether there is a larger peak value in the search interval; S503, if not found, record the first candidate peak position as the final candidate peak position , and record in the peak value list; S504, if a larger peak value is found, replace the first candidate peak position, update the index position to , record the position as the final candidate peak position, and record in the peak value list.
[0026] S6, update the starting position of the next sliding window according to the physiological rhythm to , that is, skip sample points, repeat steps S4 and S5 to confirm the peak value and record it in the peak value list; it is equivalent to applying a physiological rhythm constraint, setting the minimum peak interval to about 0.33 seconds, and preventing over-detection.
[0027] S7, set the score threshold to 60, mark the artifact mask region according to the comprehensive quality score Score model described in step S3, remove the abnormal peak value in the peak value list, and output the peak value position index in the peak value list as the final peak sequence. Optionally, linear interpolation is used to fill the abnormal peak position to smooth the final heart rate curve.
[0028] In summary, according to the method, the collected data in the clinic has the effect as shown in Figure 4 , wherein the red dots in the first subgraph are peak points, and the peak detection results (red dots) of the present application significantly reduce false detection and multiple detection points compared with the traditional method, verifying the effectiveness of the method in practical application. When facing body motion interference, the peak detection of the traditional peak detection method is prone to multiple detection and false detection at the rising edge noise or sharp peak of the waveform. The artifact mask generated by the linear fusion of SQI and CV in the present application can effectively remove the false peaks in the low-quality signal segment, significantly reducing false detection. For the case of multiple local extreme values in the same heart cycle, the sliding window combined with the rhythm constraint strategy only retains the true peak value of each heart cycle, thereby suppressing the multiple detection phenomenon. For the true peak value covered by the local abnormal waveform or motion interference, the backward verification mechanism can find a higher peak value in the candidate peak interval and dynamically correct the peak position, effectively reducing the miss detection rate.
[0029] The above content is only an example and description of the structure of the present application, and those skilled in the art can make various modifications or supplements to the described specific embodiments or use similar ways to replace them, as long as they do not deviate from the structure of the present application or exceed the scope defined by the present claims, which shall be within the protection scope of the present application.
Claims
1. A PPG peak detection method based on signal quality mask and two-stage verification, characterized in that, The method comprises the following steps: S1, acquiring original PPG signal sampling sequence data and synchronously collected three-axis acceleration signals, and preprocessing the original PPG signal sampling sequence data; S2, calculating a signal quality index SQI per second based on the spectral energy proportion of the PPG signal in a fixed time period according to the data after preprocessing in S1, and calculating a body motion coefficient of variation CV based on the three-axis acceleration signals; S3, linearly fusing the signal quality index SQI and the body motion coefficient of variation CV to obtain a comprehensive quality score Score model; S4, setting a sliding window, searching for a local maximum value in each window interval and marking it as a first candidate peak; S5, performing backward verification and dynamic correction based on the first candidate peak obtained in S4 to determine the final position of the candidate peak and add it to the peak list; S6, updating the starting bit of the sliding window according to the physiological rhythm and the candidate peak position obtained in S5, repeating steps S4 and S5 until all PPG signal sequences are traversed, confirming the peak and adding it to the peak list; S7, setting a score threshold, marking a pseudo-mask region according to the comprehensive quality score Score model in step S3, removing abnormal peaks in the peak list, and outputting the peak position index in the peak list as a final peak sequence.
2. The PPG peak detection method based on signal quality mask and two-stage verification according to claim 1, characterized in that, The preprocessing of the original PPG signal sampling sequence data in S1 comprises band-pass filtering the PPG original signal and performing Z-score standardization processing on the filtered signal.
3. The PPG peak detection method based on signal quality mask and two-stage verification according to claim 1, characterized in that, The calculation method of the signal quality index SQI in S2 comprises: performing CZT transformation on the PPG data in a five-second window after preprocessing to obtain a main peak frequency; based on the instantaneous heart rate value, dynamically adjusting a bandwidth factor to obtain a final adaptive bandwidth; centering on the main peak frequency, setting an interval according to the adaptive bandwidth, and calculating the signal quality index SQI: ; wherein is the power accumulated in the interval, is the sum of the full-band power.
4. The PPG peak detection method based on signal quality mask and two-stage verification according to claim 3, characterized in that, the final adaptive bandwidth is: ; In the formula, is a bandwidth factor.
5. The PPG peak detection method based on signal quality mask and two-stage verification according to claim 1, characterized in that, The calculation method of the body motion coefficient of variation CV in S2 comprises: taking the module length of the three-axis acceleration vector of a one-second signal window; calculating the standard deviation and mean value of the module length to obtain the body motion coefficient of variation CV per second: ; wherein is the three-axis acceleration module length in a one-second signal window, is the mean of is the variance of i is the body motion index. 6. The PPG peak detection method based on signal quality mask and two-stage verification of claim 1, wherein, The step S3 of generating a comprehensive quality score Score model comprises: S301, the signal quality index SQI original value is enhanced mapped by using a hyperbolic tangent function The body movement coefficient of variation CV is inhibited mapped by using a Sigmoid function ; S302、in a linearly weighted manner to the with fusion, get the comprehensive quality score Score model: ; wherein is an enhancement mapping of the signal quality index SQI, is a suppression mapping of the body motion coefficient of variation CV, and are weight factors for balancing the importance of signal quality and motion interference, respectively, and .
7. The PPG peak detection method based on signal quality mask and two-stage verification according to claim 1, characterized in that, The setting of the sliding window in step S4 comprises: the length of the sliding window, the corresponding sampling rate, and the window sample length.
8. The PPG peak detection method based on signal quality mask and two-stage verification of claim 1, wherein, The backward verification and dynamic correction in step S5 comprises: S501, setting the length of the backward verification interval according to the length of time covering a normal beat rising segment; S502, based on the position of the first candidate peak and the length of the verification interval, setting a search interval, and searching for a larger peak value from the position of the first candidate peak backward in the search interval; S503, if no larger peak value is found, recording the position of the first candidate peak as the final candidate peak position and adding it to the peak list; S504, if a larger peak value is found, replacing the position of the first candidate peak, recording the position as the final candidate peak position, and adding it to the peak list.
Citation Information
Cited By
Coke pushing frequency abnormity identification method and device, electronic equipment and medium
CN122221107A