Peak value detection method and device, storage medium and computer program product

By dynamically adjusting the detection window and adaptively generating the peak detection threshold, the problem of false detection and missed detection in traditional peak detection under noise variation environment is solved, and higher detection accuracy and adaptability are achieved, which is suitable for signal change and stable scenarios.

CN121456537APending Publication Date: 2026-02-03LUXSHARE PRECISION TECH(NANJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511318947.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-16
Publication Date
2026-02-03

AI Technical Summary

Technical Problem

Traditional peak detection methods are prone to a surge in false detection rates in high-noise environments and miss important peaks in low-noise environments when faced with signals with varying noise levels, resulting in poor accuracy and versatility.

Method used

By acquiring sampled data, the detection window size is dynamically adjusted according to data changes, and a peak detection threshold is adaptively generated based on statistical features. Combined with fifth-order Dobessie wavelet denoising and normalization, peak detection of ECG signals is optimized.

Benefits of technology

It improves the accuracy and adaptability of peak detection, takes into account both the detailed capture of signal abrupt changes and the statistical stability of signals when they are stable, reduces false detections and missed detections, and enhances real-time performance and equipment compatibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121456537A_ABST
    Figure CN121456537A_ABST
Patent Text Reader

Abstract

The invention relates to a peak detection method and device, a storage medium and a computer program product. The method comprises the following steps: acquiring sampling data, and determining data change information according to the sampling data; a preset detection window is switched according to the data change information, different detection windows are different in size, and the detection window dynamically selects part of data in the sampling data based on a set rule; calculating according to the data in the detection window to obtain parameters representing data characteristics; and generating a peak detection threshold according to the parameters, and executing peak detection in the detection window through the peak detection threshold. By adopting the method, the accuracy and the universality of peak detection can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of peak detection, in particular to a peak detection method and device, a storage medium and a computer program product. BACKGROUND

[0002] In the fields of signal processing, biomedical engineering, financial data analysis, etc., data processing is the core link to support business decision-making. Data acquisition needs to be completed through professional equipment or systems, and then the data is processed and transformed into structured data that can be analyzed. Peak detection, as a key technical link, directly determines the accuracy of data interpretation and the reliability of subsequent application. The traditional peak detection method usually adopts a fixed threshold detection strategy, such as directly setting the threshold value as the global mean plus a fixed multiple of the standard deviation. The traditional peak detection method has the following significant defects: when facing signals with varying noise levels, a fixed threshold value can easily lead to a sharp increase in false detection rate in a high-noise environment and missed important peaks in a low-noise environment. The accuracy and universality of peak detection in related technologies are poor. SUMMARY

[0003] Therefore, the embodiments of the peak detection method, device, storage medium and computer program product are provided, and at least one embodiment can solve the technical problems of the related art, such as the fixed threshold value easily leading to a sharp increase in false detection rate in a high-noise environment, missing important peaks in a low-noise environment, poor accuracy and universality of peak detection.

[0004] In a first aspect, the present application provides a peak detection method, which comprises:

[0005] Obtaining sampling data, and determining data variation information according to the sampling data;

[0006] Switching a preset detection window according to the data variation information, different detection windows having different sizes, and the detection window being dynamically selected based on a set rule to part of the sampling data;

[0007] Calculating a parameter representing data characteristics according to the data in the detection window;

[0008] Generating a peak detection threshold value according to the parameter, and performing peak detection in the detection window through the peak detection threshold value.

[0009] In some embodiments of the method, the switching of the preset detection window according to the data variation information comprises:

[0010] In a case where the data variation information meets a first preset condition, the detection window is determined as a first detection window corresponding in size; otherwise, the detection window is determined as a second detection window corresponding in size.

[0011] The size of the first detection window is smaller than the size of the second detection window.

[0012] In some embodiments of the method, the parameters include a mean value and a standard deviation of data in the detection window, and the generating a peak detection threshold according to the parameters comprises:

[0013] The peak detection threshold is calculated according to the mean value, the standard deviation, and a dynamic coefficient.

[0014] In some embodiments of the method, the method further comprises adjusting the dynamic coefficient according to the mean value and the standard deviation.

[0015] A target ratio is calculated according to a ratio of a current detection window standard deviation to a mean value of historical detection window standard deviations.

[0016] In a case where the target ratio satisfies a second preset condition, a value of a first interval is taken as the dynamic coefficient, the first interval representing a maximum time interval between adjacent peaks in the sampling signal; otherwise, the dynamic coefficient is determined according to the first interval, a second interval, and the target ratio, the second interval representing a minimum time interval between adjacent peaks in the sampling signal.

[0017] In some embodiments of the method, the performing peak detection in the detection window by using the peak detection threshold comprises:

[0018] In a case where a data point is a maximum value in the detection window and a value of the data point is greater than the peak detection threshold, the data point is determined as a peak.

[0019] In some embodiments of the method, an interval between a current peak detection and a previous peak detection is greater than or equal to a preset interval.

[0020] In some embodiments of the method, the data change information includes a data change rate, and the method further comprises:

[0021] The data change rate is calculated according to a sum of absolute values of differences between adjacent data points.

[0022] In some embodiments of the method, the method further comprises:

[0023] The sampling data is denoised by using a fifth-order Morlet wavelet, and then normalized to obtain processed sampling data.

[0024] The data change information is calculated according to absolute values of differences between adjacent data points of the processed sampling data.

[0025] According to a second aspect of the embodiments of the present disclosure, a peak detection device is provided, which comprises a memory, a processor and a data acquisition module, the data acquisition module is configured to acquire sampling data, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0026] Obtaining the sampling data, and determining data variation information according to the sampling data;

[0027] Switching preset detection windows according to the data variation information, different detection windows have different sizes, and the detection windows dynamically select part of the sampling data based on a set rule;

[0028] Calculating a parameter representing a data feature according to data in the detection window;

[0029] Generating a peak detection threshold according to the parameter, and performing peak detection in the detection window through the peak detection threshold.

[0030] According to a third aspect of the embodiments of the present disclosure, a computer readable storage medium is provided. The computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the following steps:

[0031] Obtaining the sampling data, and determining data variation information according to the sampling data;

[0032] Switching preset detection windows according to the data variation information, different detection windows have different sizes, and the detection windows dynamically select part of the sampling data based on a set rule;

[0033] Calculating a parameter representing a data feature according to data in the detection window;

[0034] Generating a peak detection threshold according to the parameter, and performing peak detection in the detection window through the peak detection threshold.

[0035] According to a fourth aspect of the embodiments of the present disclosure, a computer program product is provided. The computer program product comprises a computer program, and the computer program is executed by a processor to implement the following steps:

[0036] Obtaining the sampling data, and determining data variation information according to the sampling data;

[0037] Switching preset detection windows according to the data variation information, different detection windows have different sizes, and the detection windows dynamically select part of the sampling data based on a set rule;

[0038] Calculating a parameter representing a data feature according to data in the detection window;

[0039] generate a peak detection threshold according to the parameter, and perform peak detection in the detection window through the peak detection threshold.

[0040] The peak detection scheme provided by the embodiments of the present application can adaptively adjust the size of the detection window through the data change information, can take into account the detail capture when the signal is suddenly changed and the statistical stability when the signal is smooth, can dynamically determine the peak detection threshold according to the statistical characteristics, so as to avoid false detection and missed detection as much as possible, and can take into account the real-time performance and the device adaptability, thereby providing reliable technical support for the health detection function.

[0041] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and are not limiting to the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0042] The accompanying drawings incorporated in and forming a part of the specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure without imposing on the disclosure limitations that are inconsistent with the principles of the disclosure.

[0043] Figure 1 a flowchart of a peak detection method according to an exemplary embodiment is shown;

[0044] Figure 2 a flowchart of a step of adjusting the detection window according to an exemplary embodiment is shown;

[0045] Figure 3 a flowchart of a step of determining a dynamic coefficient according to an exemplary embodiment is shown;

[0046] Figure 4 a block diagram of a peak detection device according to an exemplary embodiment is shown;

[0047] Figure 5 an internal structure diagram of a wearable device according to an exemplary embodiment is shown. DETAILED DESCRIPTION

[0048] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.

[0049] It should be noted that the terms "first", "second", and the like in the description and in the claims of the present disclosure and above-described figures are used to distinguish between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of the terms so-termed as such can be interchanged, where appropriate, to enable the embodiments of the present disclosure described herein to be carried out in other sequences than those described or illustrated herein. The implementations described in the following example embodiments are not meant to represent all implementations consistent with the present disclosure. Rather, they are simply examples of apparatuses and methods consistent with some aspects of the present disclosure. The terms "comprises", "comprising", or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, additional same or equivalent elements can be present in a process, method, article, or apparatus including the described elements, unless otherwise restricted. For example, the use of the terms first, second, etc. to designate names, does not imply any particular order.

[0050] In some embodiments of the present disclosure, the execution of the peak detection method can be controlled by a unified controller or by multiple controllers. These controllers can include controllers of local terminals or controllers of remote servers. In some implementations, the peak detection method can also be completed by the controllers of local terminals and the controllers of servers jointly. The local terminal described in the present disclosure can include, but is not limited to, various robotic devices, vehicle-mounted devices, personal computers, notebook computers, smart phones, tablet computers, wearable devices, medical devices, VR (Virtual Reality) virtual devices, etc. The server described can be a server, a server cluster, a distributed system, a cloud processing platform, a server containing a blockchain node, and a combination of the above devices. The controller described in the present disclosure can include various control units capable of realizing logical processing functions, including but not limited to CPU (Central Processing Unit), PLC (Programmable Logic Controller), ECU (Electronic Control Unit), MCU (Microcontroller Unit), FPGA (Field Programmable Gate Array), CPLD (Complex Programmable logic device), and the like, as well as one or more logical function units, chips, and the like. Combination of controllers.

[0051] In some embodiments of the present disclosure, a peak detection method is provided, as shown in Figure 1 The method comprises the following steps:

[0052] S20, obtaining sampling data, and determining data change information according to the sampling data.

[0053] In some embodiments of the present disclosure, the sampling data generally refers to the initial data directly obtained from the signal acquisition device, and the sampling data can be used to reflect the original characteristics of the target object. The target object generally refers to an individual who needs to collect sampling data. The core characteristic of the target object is the source of physiological signals (pulse, heart sound, electrocardiogram). In some embodiments, the sampling data can include pulse data, electrocardiogram data and heart sound data. The pulse data generally refers to the physiological signal obtained by PPG (PhotoPlethysmo Graphy). The pulse data is generally obtained by irradiating the skin with a light signal emitted by a light-emitting diode, detecting the intensity change of the reflected or transmitted light by a photoelectric sensor, and indirectly reflecting the blood volume fluctuation of the arterial blood vessels with the heart beat. The heart sound data generally refers to the physiological signal collected by PCG (phonocardiogram). The heart sound data is generally obtained by recording the vibration sound generated by the valve closing and blood flow during the heart contraction and relaxation process by a sensor, and converting it into a time sequence vibration wave. The electrocardiogram data generally refers to the physiological signal collected by ECG (Electrocardiogram). The electrocardiogram data is generally obtained by detecting the potential difference generated by the heart rhythm electrical activity by a body surface electrode, and recording the electrical signal change of the myocardial cell excitation and recovery process. The pulse data, heart sound data and electrocardiogram data can be sequence data.

[0054] In some embodiments of the present disclosure, the data change information generally refers to the information used to quantify the fluctuation degree of adjacent data points or data segments in the sampling data, which is used to reflect the dynamic change trend of the data. In some examples, the dynamic change trend can be signal mutation, and the dynamic change trend can also be signal stability. The data change information can include data change rate, which can be determined by calculating the sum of absolute values of adjacent data point difference.

[0055] S22, switching a preset detection window according to the data change information, different detection window sizes are different, and the detection window is dynamically selected from part of the sampling data based on a setting rule.

[0056] In some embodiments of the present disclosure, the detection window generally refers to a sub-data segment delimited for analyzing the characteristics of the sampling data, and the range (including the size of the detection window) can be dynamically adjusted according to the data change information, which is used to focus on the detailed characteristics of the data.

[0057] In some embodiments, the detection window size can be adaptively adjusted according to the data variation information, so as to adapt to signal mutation and signal smooth scenarios.

[0058] S24, calculating a parameter representing a data feature according to the data in the detection window.

[0059] In some embodiments of the present disclosure, the parameter can include a statistical feature. The statistical feature generally refers to a statistical quantity calculated based on the data in the detection window, reflecting the data distribution law in the detection window, and used to describe the central tendency, dispersion degree and other characteristics of the data. The statistical feature can include mean and standard deviation. The statistical feature can also include skewness and kurtosis, etc. The mean is used to reflect the central tendency of the data. The standard deviation is used to reflect the dispersion degree of the data. The skewness and kurtosis are used to reflect the distribution characteristics of the data.

[0060] S26, generating a peak detection threshold according to the parameter, and performing peak detection in the detection window through the peak detection threshold.

[0061] In some embodiments of the present disclosure, the peak detection threshold generally refers to a critical value for determining whether a data point in the detection window is a peak value. The peak detection generally refers to determining whether a data point is an accurate peak value based on the peak detection threshold and the feature in the detection window.

[0062] In some embodiments, the peak detection method can be applied to wearable devices. The wearable devices can include earphone-type devices, augmented reality (AR) glasses devices, VR glasses devices, smart bracelets, smart watches and the like. The earphone-type devices can include headphones, earphones, bone conduction earphones, wireless Bluetooth earphones and the like. The above wearable devices can integrate sensors to collect the above sampling data. For example, PPG sensors, ECG sensors and heart sound sensors can be integrated. The PPG sensor is used to collect pulse data; the ECG sensor is used to collect electrocardiogram data; and the heart sound sensor is used to collect heart sound data.

[0063] In some embodiments of the present disclosure, the detection window size can be adaptively adjusted through the data variation information, which can take into account the detail capture in signal mutation and the statistical stability in signal smoothness; the peak detection threshold can be dynamically determined according to the statistical feature, so as to avoid false detection and missed detection as much as possible, and to take into account the real-time performance and device adaptability, thereby providing reliable technical support for health detection functions.

[0064] In some embodiments of the present disclosure, the method further comprises:

[0065] The sampling data is denoised by a fifth-order Morlet wavelet, and then normalized to obtain the processed sampling data.

[0066] According to the processed sampling data, the absolute value of the difference between adjacent data points is calculated to determine the data change information.

[0067] In some embodiments of the present disclosure, the sampling data generally refers to the original physiological signal collected by an electrocardiogram. The sampling data can be collected by an ECG sensor. The electrocardiogram data generally detects the potential difference generated by the electrical activity of the heart rhythm through body surface electrodes, and records the electrical signal changes of the myocardial cell excitation and recovery process. In some embodiments, denoising processing can be performed by a five-order Morlet wavelet, and the amplitude and morphology of the R-wave peak can be maximally preserved during the denoising process. Compared with traditional filtering methods, excessive attenuation of high-frequency effective components can be avoided. Low-frequency baseline drift and high-frequency electromyography can also be filtered out through multi-layer wavelet decomposition, which can improve the signal-to-noise ratio. The sudden electrode noise has stronger inhibition ability, and the denoised electrocardiogram signal can still remain stable in the motion scene. Through linear transformation normalization processing, the signal can be unified to the [0, 1] interval, and the calculation deviation of the data change information caused by the amplitude difference can be avoided. The threshold value for subsequent peak detection is calculated based on statistical characteristics, the data distribution after normalization is more stable, the problem of high and low threshold value caused by the amplitude fluctuation of the original signal can be reduced, and the detection logic is more reliable.

[0068] In some embodiments of the present disclosure, the noise characteristics and individual differences of the electrocardiogram signal are optimized. In the peak detection scene of the electrocardiogram signal, denoising processing is performed by a five-order Morlet wavelet, and then normalized processing is performed to obtain the processed electrocardiogram signal, which can provide high-quality input data for subsequent adaptive detection window adjustment and peak detection, reduce the problem of high and low threshold value caused by the amplitude fluctuation of the sampling data, make the detection logic more reliable, and thus improve the peak detection accuracy and the adaptability to the peak detection scene of the electrocardiogram signal.

[0069] In some embodiments of the present disclosure, as shown in Figure 2 S22 includes:

[0070] S222, in a case where the data change information meets a first preset condition, determining the detection window as a first detection window of a corresponding size;

[0071] S224, otherwise, determining the detection window as a second detection window of a corresponding size.

[0072] The size of the first detection window is smaller than the size of the second detection window.

[0073] In some embodiments of the present disclosure, the data change information includes a data change rate, and the method further includes:

[0074] The data change rate is calculated according to the sum of the absolute values of the differences between adjacent data points.

[0075] In some embodiments of the present disclosure, the size of the detection window can be adaptively adjusted by the data variation rate, i.e., by calculating the sum S of absolute values of differences between adjacent data points.

[0076] In some embodiments of the present disclosure, the first preset condition can be greater than the first preset threshold, or can be greater than or equal to the first preset threshold.

[0077] In some examples, when the data variation rate S is greater than or greater than or equal to the first preset threshold S0, it can be determined that it is a signal mutation region, and a small detection window w min can be used to capture rapid changes, and at this time the small detection window w min is determined as the corresponding detection window as the first detection window; when the data variation rate S is less than or equal to the first preset threshold S0, it can be determined that it is a signal stable region, and a large detection window w max can be used to obtain stable statistical characteristics, and at this time the large detection window w max is determined as the corresponding detection window as the second detection window. The size of the detection window can be adaptively adjusted by the data variation rate, rapid changes can be captured by the small detection window, key data can be covered, and peak value characteristics can be diluted due to the large detection window, so as to adapt to the signal mutation scene. Stable statistical characteristics can be obtained by the large detection window, and the average effect of more data points can be adapted to the signal stable scene, a more reliable statistical basis can be provided for subsequent adaptive threshold generation, and finally the accuracy, real-time performance and anti-interference ability of peak value detection can be improved.

[0078] In an embodiment, the small detection window can be set to 5 data points, or can be set to 10 data points, or can be set to any value of data points between 5 and 10. In another embodiment, the large detection window can be set to 20 data points, or can be set to 50 data points, or can be set to any value of data points between 20 and 50.

[0079] In other examples, S0 can be set to 0.2, w min can be set to 8, w max can be set to 32. In some embodiments, when the data variation rate S is equal to the first preset threshold S0, it can be classified as a signal mutation region, or can be classified as a signal stable region, which can be set according to the actual scene. It should be noted that the values of the first preset threshold S0, the first detection window w min , and the second detection window w max are only exemplary and are not actual limitations, and the specific values can be set according to the actual scene.

[0080] In some embodiments of the present disclosure, compared with the fixed detection window adopted by the conventional peak detection method, the size of the detection window can be adaptively adjusted according to the data change rate, the key data can be covered by a small detection window, the dilution of peak characteristics caused by a too large detection window can be avoided, and thus the signal mutation scene can be adapted; a large detection window can be used to adapt to the signal stable scene through the averaging effect of more data points, a more reliable statistical basis can be provided for subsequent adaptive threshold generation, and finally the accuracy, real-time performance and anti-interference ability of peak detection can be improved.

[0081] In some embodiments of the present disclosure, the parameters include the mean and the standard deviation of the data in the detection window, and S26 includes:

[0082] The peak detection threshold is calculated according to the mean, the standard deviation and a dynamic coefficient.

[0083] In some embodiments, the parameters can include the local mean and the local standard deviation of the data in the detection window. The local mean generally refers to the average value of the local data points in the current detection window, and is used to reflect the intermediate level or overall trend of the local data. The local standard deviation generally reflects the fluctuation degree of the local data points in the current detection window.

[0084] In some embodiments of the present disclosure, the peak detection threshold can be determined according to the mean, the standard deviation and a dynamic coefficient according to the following formula (1).

[0085]

[0086] In formula (1), T is the peak detection threshold, μ is the mean, is the standard deviation, and T is the dynamic coefficient. The peak detection threshold can be dynamically generated based on the statistical characteristics to adapt to different noise environments and signal characteristics. The dynamic coefficient generally refers to a factor or coefficient used to quantify the noise level of the current detection window. In some embodiments, the dynamic coefficient can be dynamically adjusted according to the noise level of the current detection window (such as a high noise level or a low noise level) to dynamically adapt to high noise environments and low noise environments, and to avoid high noise false detection and / or low noise missing detection caused by a fixed coefficient.

[0087] In some embodiments of the present disclosure, in the related art, in a high noise environment, noise is easily misjudged as a peak, and in a low noise environment, weak amplitude peaks are easily missed; by dynamically adjusting the dynamic coefficient according to the noise level of the current detection window, the high noise environment and the low noise environment can be dynamically adapted, and high noise false detection and / or low noise missing detection caused by a fixed coefficient can be avoided.

[0088] In some embodiments of the present disclosure, as shown in Figure 3 the method further comprises adjusting the dynamic coefficient according to the mean and the standard deviation.

[0089] 120、according to the target ratio calculated by the ratio of the standard deviation of the current detection window and the mean of the standard deviations of the historical detection windows;

[0090] 140、in the case that the target ratio meets the second preset condition, taking the value of the first interval as the dynamic coefficient, the first interval representing the maximum time interval between adjacent peaks in the sampling signal;

[0091] 160、otherwise, determining the dynamic coefficient according to the first interval, the second interval and the target ratio, the second interval representing the minimum time interval between adjacent peaks in the sampling signal.

[0092] In some embodiments of the present disclosure, the target ratio generally refers to the ratio of the standard deviation of the current detection window and the mean of the standard deviations of the historical detection windows. The target ratio can be calculated by the following formula (2):

[0093]

[0094] In formula (2), is the standard deviation of the current detection window, is the mean of the standard deviations of the historical detection windows, and r is the target ratio.

[0095] The second preset condition can be greater than the second preset threshold, or greater than or equal to the second preset threshold. The second preset threshold generally refers to a critical threshold for distinguishing between a high-noise environment and a low-noise environment. The second preset threshold can be determined based on the noise distribution characteristics of the sampling signal.

[0096] In some embodiments, whether the current environment is in a high-noise environment or a low-noise environment can be determined by whether the target ratio is greater than or greater than or equal to the second preset threshold. In the case that the target ratio is greater than the second preset threshold, the first interval can be taken as the dynamic coefficient; in the case that the target ratio is less than or equal to the second preset threshold, the dynamic coefficient can be determined according to the first interval, the second interval and the target ratio.

[0097] In some examples, when r>1.5, it can be determined that the environment is in a high-noise environment, and the dynamic coefficient can be determined as In other examples, when r≥1.5, it can also be determined that the environment is in a high-noise environment, and the dynamic coefficient can be determined as .

[0098] In some examples, when r<1.5, it can be determined that the environment is in a low-noise environment. In other examples, when r≤1.5, it can also be determined that the environment is in a low-noise environment. Specifically, the dynamic coefficient can be determined according to the following formula (3).

[0099]

[0100] In formula (3), is a first interval, the first interval representing a maximum time interval between adjacent peaks in the sampling signal. is a second interval, the second interval representing a minimum time interval between adjacent peaks in the sampling signal. r is the target ratio described above.

[0101] In some examples, the first interval may be a maximum time interval of the heart rate signal; and the second interval may be a minimum time interval of the heart rate signal. The time intervals can be converted into the number of data points in combination with a sampling rate. Taking an electrocardiogram as an example, a normal range of the heart rate signal is 40-200 bpm, corresponding to a period of 300-600 ms. If the sampling rate is 100 Hz, the period is 60-200 data points. It should be noted that, in the case where the target ratio is equal to the second preset threshold, for example, r = 1.5, it can be classified as a high-noise environment, or it can be classified as a low-noise environment, which can be set according to actual conditions.

[0102] In some embodiments of the present disclosure, the first interval and / or the second interval can be used to associate the physiological limit of the sampling signal, to quantify the noise level of the target ratio, and to achieve smooth adjustment of the linear interpolation implementation coefficient, so as to better adapt to a dynamic noise environment. Whether the target ratio is greater than the second preset threshold can be used to determine the current noise environment, and the dynamic coefficient can be dynamically adjusted to reduce the false detection rate in a high-noise environment and to improve the detection sensitivity in a low-noise environment, thereby avoiding missed detection in a low-noise environment.

[0103] In some embodiments of the present disclosure, S26 further includes:

[0104] In the case where the data point is the maximum value in the detection window and the numerical value of the data point is greater than the peak detection threshold, the data point is determined to be a peak.

[0105] In some embodiments of the present disclosure, the preset peak condition is met by simultaneously satisfying that the data point is the maximum value in the detection window and the numerical value of the data point is greater than the peak detection threshold, thereby avoiding false peak misjudgment or weak peak missed detection caused by a single condition. Wherein, the data point is the maximum value in the detection window, that is, in the current detection window (for example, the first detection window or the second detection window), the numerical value of the data point x i to be determined needs to be greater than the numerical value of all other data points in the detection window, that is, x i > x j , j∈[1,N],j≠i). Wherein, N is the number of data points in the detection window, and xj is other data points in the detection window except xi. At the same time, it also needs to satisfy that the numerical value of the candidate peak needs to exceed the peak detection threshold T, that is, x i > T iT is an adaptive threshold value corresponding to the position. i

[0106] In some embodiments of the present disclosure, the interval between the current peak detection and the previous peak detection is greater than or equal to a preset interval.

[0107] In the peak detection, the interval between the current peak detection and the previous peak detection is not less than a preset interval D min .

[0108] In some examples, the preset interval generally refers to the minimum interval allowed between two adjacent peak detections. The preset interval can include 10-20 data points, which can be 10 data points, 20 data points, or any number of data points between 10 and 20. By controlling the interval between two adjacent peak detections, repeated detection of adjacent peaks can be avoided.

[0109] In some embodiments of the present disclosure, false peak misjudgment or weak peak missed detection caused by a single condition can be avoided by simultaneously satisfying the double judgment conditions that the data point is the maximum value in the detection window and the value of the data point is greater than the peak detection threshold; the accuracy, scene adaptability, and anti-interference ability of the entire peak detection process can be improved by coordinating with the dynamic adjustment of the detection window mechanism and the adaptive peak detection threshold, thereby providing accurate peak data support for accurate analysis of health data.

[0110] Some peak detection methods provided by the present disclosure can adaptively adjust the detection window size based on data change information, and can balance the detail capture when the signal is suddenly changed and the statistical stability when the signal is smooth; the peak detection threshold can be dynamically determined based on statistical characteristics, so as to avoid misjudgment and missed detection as much as possible, and to balance the real-time performance and device adaptability, thereby providing reliable technical support for health detection functions.

[0111] It can be understood that each embodiment of the above method in the specification is described in a progressive manner, and the same / similar parts between each embodiment can be referred to each other, and each embodiment mainly describes the difference from other embodiments. The relevant parts can be referred to the description of other method embodiments.

[0112] ​It should be understood that although the steps in the flowcharts involved in the drawings are shown in sequence according to the direction of the arrows, these steps are not necessarily executed in sequence according to the direction of the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the drawings can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least part of other steps or other steps or stages.

[0113] Based on the description of the peak detection method embodiment described above, the present disclosure also provides a peak detection device for implementing the peak detection method described above. The device can include a system (including a distributed system), software (application), module, component, controller, server, terminal, etc. using the method described in the embodiments of the present disclosure and combining the necessary implementation hardware. Based on the same innovative concept, the device in one or more embodiments provided by the embodiments of the present disclosure is described in the following embodiments. Since the implementation scheme of the device to solve the problem is similar to the method, the implementation of the specific device in the embodiments of the present disclosure can be referred to the implementation of the foregoing method, and the repeated parts will not be described. The term "unit" or "module" used below can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware is also possible and is conceived.

[0114] The peak detection device can be widely used in finance, medical treatment, communication engineering, industrial monitoring and other fields. In financial transactions and risk analysis, the peak detection device can be used for stock / cryptocurrency price monitoring, market sentiment analysis, and transaction volume anomaly detection, etc. In medical monitoring and diagnosis, the peak detection device can be applied to detect electrocardio, heart sound or pulse signal, calculate heart rate, detect arrhythmia, etc. It can also be applied to respiratory monitoring, blood pressure / oxygen monitoring and electroencephalogram analysis, etc. In wireless communication and signal processing, the peak detection device can be applied to radio frequency signal analysis, identification of instantaneous peak in high frequency signal, radar and sonar, etc. In industrial monitoring and automation, the peak detection device can be applied to vibration monitoring, monitoring of power grid voltage / current peak, environmental sensing, etc.

[0115] For specific details, please refer to Figure 4The device 200 can include a memory 220, a processor 240 and a data acquisition module 260. The data acquisition module 260 is configured to acquire sampling data. The memory 220 stores a computer program. The processor 240 implements the peak detection method when executing the computer program. The modules in the peak detection device can be implemented by software, hardware or a combination thereof. The modules can be embedded in the processor of the computer device or independent of the processor, or stored in the memory of the computer device in the form of software, so as to be called and executed by the processor.

[0116] The peak detection device can include a wearable device. The wearable device can include a headphone-type device, an augmented reality glasses device, a VR glasses device, a smart bracelet, a smart watch and the like. The headphone-type device can include a headphone, an earphone, a bone conduction earphone, a wireless Bluetooth earphone and the like. The wearable device can integrate a sensor to acquire sampling data through the data acquisition module. For example, the wearable device can integrate a PPG sensor, an ECG sensor and a heart sound sensor and the like. The PPG sensor is configured to acquire pulse data. The ECG sensor is configured to acquire electrocardiogram data. The heart sound sensor is configured to acquire heart sound data.

[0117] The peak detection device can further include a computer device, which can be a server. An internal structure diagram of the computer device can be as shown in Figure 5 The computer device includes a processor, a memory and a network interface connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The database of the computer device is configured to store sampling data. The network interface of the computer device is configured to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement a peak detection method.

[0118] Those skilled in the art can understand that Figure 5 The structure shown in the above description is only a block diagram of part of the structure related to the scheme of the present application, and does not limit the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.

[0119] According to the foregoing related method and device embodiment description, the present disclosure also provides a computer readable storage medium, when the instructions in the computer readable storage medium are executed by the processor of the computer device, the computer device can implement the peak detection method as any embodiment of the present disclosure.

[0120] According to the foregoing related method and device embodiment description, the present disclosure also provides a computer program product, comprising a computer program, which is executed by the processor to implement the peak detection method as any embodiment of the present disclosure.

[0121] Each of the embodiments in the present specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments. In particular, for the hardware + program type embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the related parts can be referred to the part of the method embodiment.

[0122] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties.

[0123] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0124] It should be noted that the above-mentioned apparatus, computer device, storage medium and computer program product, etc. according to the description of the method embodiments can also include other embodiments. The specific implementation can refer to the description of the related method embodiments. Meanwhile, the mutual combination of the features of each method and the embodiments of the apparatus, device and server constitutes new embodiments, which still belong to the scope of the embodiments covered by the present disclosure, and will not be described one by one here.

[0125] For ease of description, the above apparatus is described in various modules with functions respectively. Of course, when implementing one or more of the present specification, the functions of each module can be implemented in one or more software and / or hardware, and modules implementing the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The above-described apparatus embodiments are only illustrative, for example, the division of modules or units is only a logical function division, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the coupling, communication connection, etc. between the apparatuses or units shown or described can be directly and / or indirectly coupled / connected in a manner, which can be through some standard or self-defined interface, protocol, etc., and is in an electrical, mechanical or other form.

[0126] Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure following the general principles thereof and including such departures from the present disclosure that come within known use or custom in the art to which the present disclosure pertains. The specification and examples are to be regarded as illustrative only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0127] It should be understood that the present disclosure is not limited to the precise structures herein described and illustrated in the drawings, and that various modifications and changes can be made without departing from its scope.

Claims

1. A peak detection method, characterized in that, The method includes: Acquire sampling data and determine data change information based on the sampling data; The preset detection window is switched according to the data change information. Different detection windows have different sizes. The detection window dynamically selects a portion of the sampled data based on the set rules. Parameters characterizing the data features are calculated based on the data within the detection window; A peak detection threshold is generated based on the parameters, and peak detection is performed within the detection window using the peak detection threshold.

2. The peak detection method according to claim 1, characterized in that, The step of switching the preset detection window based on the data change information includes: If the data change information meets the first preset condition, the detection window is determined as a first detection window of the corresponding size; otherwise, the detection window is determined as a second detection window of the corresponding size. The size of the first detection window is smaller than the size of the second detection window.

3. The peak detection method according to claim 1, characterized in that, The parameters include the mean and standard deviation of the data within the detection window, and the generation of the peak detection threshold based on the parameters includes: The peak detection threshold is calculated based on the mean, the standard deviation, and the dynamic coefficient.

4. The peak detection method according to claim 3, characterized in that, The method further includes adjusting the dynamic coefficient based on the mean and the standard deviation: The target ratio is calculated based on the ratio of the current standard deviation of the detection window to the mean of the standard deviations of the historical detection windows; When the target ratio meets the second preset condition, the value of the first interval is used as a dynamic coefficient, where the first interval represents the maximum time interval between adjacent peaks in the sampled signal. Otherwise, the dynamic coefficient is determined based on the first interval, the second interval, and the target ratio, whereby the second interval characterizes the minimum time interval between adjacent peaks in the sampled signal.

5. The peak detection method according to claim 1, characterized in that, The step of performing peak detection within the detection window using the peak detection threshold includes: If the data point is the maximum value within the detection window and the value of the data point is greater than the peak detection threshold, the data point is determined to be the peak value.

6. The peak detection method according to claim 1, characterized in that, The interval between the current peak detection and the previous peak detection is greater than or equal to the preset interval.

7. The peak detection method according to claim 1, characterized in that, The data change information includes the data change rate, and the method further includes: The rate of change of data is calculated by summing the absolute values ​​of the differences between adjacent data points.

8. A peak detection device, characterized in that, The device includes a memory, a processor, and a data acquisition module. The data acquisition module is used to acquire sampled data. The memory stores a computer program. When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that, It stores a computer program thereon, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 7.

10. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1 to 7.