Continuous heart rate monitoring method and device and readable storage medium
By fusing PPG signal and ACC signal, using logistic regression model to judge the same frequency situation and process it, combined with initial value selection and frequency tracking algorithm, the limitations of the prior art heart rate monitoring in complex scenarios are solved, and high-precision continuous heart rate monitoring is achieved.
Patent Information
- Application Number
- CN202510480327.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-05-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing continuous heart rate monitoring equipment has limitations in complex scenarios, especially the problems of motion artifact interference, difficulty in selecting initial values and insufficient prediction capabilities when signal quality is poor.
By obtaining the initial PPG signal and ACC signal, pre-processing is performed to obtain the PPG spectrum and ACC spectrum, and determining whether there is a same frequency situation based on the logistic regression model, and the same frequency processing is performed. If the heart rate value at the previous moment does not exist, an initial value selection algorithm is performed to determine the current heart rate value; if the heart rate value at the previous moment is present, the current heart rate value is determined based on the frequency tracking algorithm.
Effectively suppress the influence of motion noise, improve the accuracy of heart rate monitoring in motion and complex scenarios, and ensure the accuracy and stability of continuous heart rate monitoring.
Smart Images

Figure CN119988843A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a continuous heart rate monitoring method, device and readable storage medium. Background Art
[0002] Continuous heart rate monitoring is an important means of assessing heart health, especially in the early stages of cardiovascular disease. Abnormal heart rate often manifests as sudden, temporary or irregular fluctuations. It is difficult to capture these abnormalities with a single measurement, so continuous monitoring is required to provide complete heart rate change data. With the popularization of smart wearable devices, users' demand for convenient, comfortable and high-precision continuous heart rate monitoring technology is growing, which has promoted the continuous development of related technologies.
[0003] Currently, the mainstream continuous heart rate monitoring solutions are mainly divided into two categories: one is the heart rate chest strap based on ECG signals, which directly collects ECG signals through chest electrodes and has high accuracy, but it needs to be in close contact with the skin when worn, which can easily cause discomfort with long-term use, and the signal is easily interfered with in dynamic scenes; the other is the smart wearable device based on PPG signals, which uses photoelectric volumetric pulse wave technology to indirectly calculate the heart rate through wrist or arm sensors. This type of device has become the mainstream in the consumer market due to its small size and comfortable wearing, but its reliance on the characteristics of PPG signals has led to its limitations in complex scenarios.
[0004] The shortcomings of existing solutions are mainly reflected in two aspects: although ECG chest straps are highly accurate, they are not comfortable and have weak dynamic adaptability; PPG smart wearable devices face problems such as motion artifact interference, difficulty in selecting initial values, and insufficient prediction capabilities when signal quality is poor. Specifically, acceleration during exercise will cause PPG signal distortion, affecting the accuracy of heart rate calculation; the initial heart rate is difficult to accurately determine during exercise, resulting in subsequent tracking deviations. Traditional algorithms cannot effectively estimate heart rate, and data jumps or errors are prone to occur. In addition, some high-precision solutions require multiple sensors or complex algorithms, which increases equipment costs and power consumption. Summary of the invention
[0005] The purpose of the present invention is to provide a continuous heart rate monitoring method, which aims to solve the problem that the existing equipment cannot continuously monitor the heart rate and the monitoring heart rate data processing effect is poor. The continuous heart rate monitoring method provided by the present application includes: Obtaining initial PPG signal and initial ACC signal; Preprocessing the initial PPG signal and the initial ACC signal to obtain a PPG spectrum and an ACC spectrum; Analyzing the PPG spectrum and the ACC spectrum based on a logistic regression model spectrum to determine whether there is a co-frequency situation; if so, performing co-frequency processing on the PPG spectrum to obtain an adjusted PPG spectrum; if not, determining that the PPG spectrum is the adjusted PPG spectrum; Determine whether there is a heart rate value at the previous moment; If the previous heart rate value does not exist, executing an initial value selection algorithm based on the adjusted PPG spectrum to obtain a current heart rate value; The initial value selection algorithm includes: selecting multiple maximum peaks on the adjusted PPG spectrum, determining multiple adjacent peaks of each maximum peak in a preset time window, forming multiple peak curves with each maximum peak and adjacent peak in the preset time window, calculating the cumulative sum of the amplitude values corresponding to each peak curve, determining the curve with the highest cumulative sum as the true curve, and determining the frequency corresponding to the adjacent peak in the adjusted PPG spectrum corresponding to the last second in the true curve as the heart rate value; If the previous heart rate value exists, determining the current heart rate value based on a frequency tracking algorithm; The frequency tracking algorithm includes: determining and adjusting multiple peaks in the PPG spectrum, calculating evaluation values of each peak based on the heart rate at the previous moment, and determining the frequency corresponding to the highest evaluation value as the current heart rate value.
[0006] Based on the continuous heart rate monitoring method provided by the first aspect of the embodiment of the present application, optionally, preprocessing the initial PPG signal and the initial ACC signal to obtain a PPG spectrum and an ACC spectrum includes: The initial PPG signal and the initial ACC signal are processed by a Butterworth bandpass filter to obtain a second ACC signal and a second PPG signal, the cutoff frequencies of the bandpass filter are 0.5 Hz and 4 Hz, and the order is 6; Calculate the frequency spectrum of the second PPG signal of a specific window duration using a linear frequency modulation Z transform method to obtain the PPG spectrum, perform maximum value normalization on the PPG spectrum, and obtain a PPG spectrum with a length of 210; The combined acceleration signal is calculated according to the second ACC signal, and the calculation formula of the combined acceleration signal is as follows:
[0007] in is the combined acceleration signal, is the acceleration signal in the X-axis direction, is the acceleration signal in the Y-axis direction, It is the acceleration signal in the Z-axis direction; The frequency spectrum of the combined acceleration signal of a specific window duration is calculated using a linear frequency modulation Z transform method to obtain the ACC spectrum, and the ACC spectrum is normalized to the maximum value, so that the length of the obtained ACC spectrum is 210.
[0008] Based on the continuous heart rate monitoring method provided by the first aspect of the embodiment of the present application, optionally, judging whether there is a same frequency situation based on the ACC spectrum includes: A logistic regression model was established. The features used in the training process of the logistic regression model included: exercise intensity, exercise trend, mean, standard deviation, skewness, kurtosis, number of peaks of the ACC spectrum, and mean, standard deviation, skewness, kurtosis and number of peaks of the adjusted PPG spectrum. The logistic regression model was used to determine whether there was a same frequency situation based on the input features.
[0009] Based on the continuous heart rate monitoring method provided in the first aspect of the embodiment of the present application, optionally, the method further includes: Get the output value of the logistic regression model; When the output value of the logistic regression model is greater than the preset value for a continuous period of time, it is considered that there is a same frequency; The performing same-frequency processing on the PPG spectrum comprises: The same frequency processing of the PPG spectrum adopts the following formula: , ; in To adjust the PPG spectrum, For the ACC spectrum, is the PPG spectrum, is the frequency value after normalization.
[0010] Based on the continuous heart rate monitoring method provided by the first aspect of the embodiment of the present application, optionally, determining multiple adjacent peaks of each maximum peak within a preset time window includes: The preset time window is N seconds; The evaluation value of each peak is determined in the adjusted PPG spectrum corresponding to the second second, and the peak with the highest evaluation value is determined as the adjacent peak. The calculation rule of the evaluation value is:
[0011] is the evaluation value, is the amplitude corresponding to the peak, is the maximum peak value, is the peak being evaluated; According to the determination rule of the adjacent peaks in the second second, N-1 adjacent peaks are determined for the adjusted PPG spectrum within N seconds.
[0012] Based on the continuous heart rate monitoring method provided by the first aspect of the embodiment of the present application, optionally, The step of calculating the evaluation value of each peak value based on the heart rate at the previous moment includes: The evaluation value is calculated based on the following formula:
[0013] is the evaluation value, is the maximum amplitude value, is the frequency corresponding to the maximum amplitude value, is the heart rate at the previous moment.
[0014] Based on the continuous heart rate monitoring method provided in the first aspect of the embodiment of the present application, optionally, the method further includes: Establishing a neural network model, wherein the features analyzed by the neural network model include: exercise intensity, exercise trend, mean, standard deviation, skewness, kurtosis, number of peaks of ACC spectrum, mean, standard deviation, skewness, kurtosis of adjusted PPG spectrum, and the output of the neural network model is heart rate; Get the heart rate value based on the heart rate tracking algorithm; Determine whether the difference between the heart rate value obtained based on the heart rate tracking algorithm and the heart rate value at the previous moment is greater than a preset value; If the difference between the heart rate value obtained based on the heart rate tracking algorithm and the heart rate value at the previous moment is less than or equal to a preset value, then determining the heart rate value obtained based on the heart rate tracking algorithm as the current heart rate value; If the difference between the heart rate value obtained based on the heart rate tracking algorithm and the heart rate value at the previous moment is greater than a preset value, the heart rate value obtained based on the heart rate tracking algorithm and the heart rate value calculated by the neural network model are fused based on the Kalman filtering method to obtain the current heart rate value; If the difference between the heart rate value obtained based on the heart rate tracking algorithm and the heart rate value calculated by the neural network model is greater than the preset value for longer than the preset value, the final heart rate value is used as a label to enable the neural network model to perform real-time update learning.
[0015] A second aspect of an embodiment of the present application provides a continuous heart rate monitoring device, including: An acquisition unit, used for acquiring an initial PPG signal and an initial ACC signal; A preprocessing unit, used to preprocess the initial PPG signal and the initial ACC signal to obtain a PPG spectrum and an ACC spectrum; a same-frequency processing unit, configured to analyze the PPG spectrum and the ACC spectrum based on a logistic regression model spectrum to determine whether there is a same-frequency situation; if so, perform same-frequency processing on the PPG spectrum to obtain an adjusted PPG spectrum; if not, determine that the PPG spectrum is the adjusted PPG spectrum; A judgment unit, used to judge whether there is a heart rate value at the previous moment; an initial value selection unit, for executing an initial value selection algorithm based on the adjusted PPG spectrum to obtain a current heart rate value if the heart rate value at the previous moment does not exist; the initial value selection algorithm comprises: selecting a plurality of maximum peaks on the adjusted PPG spectrum, determining a plurality of adjacent peaks of each maximum peak within a preset time window, forming a plurality of peak curves with each maximum peak and adjacent peak within the preset time window, calculating the cumulative sum of the amplitude values corresponding to each peak curve, determining the curve with the highest cumulative sum as the true curve, and determining the frequency corresponding to the adjacent peaks in the adjusted PPG spectrum corresponding to the last second in the true curve as the heart rate value; A frequency tracking unit is used to determine the current heart rate value based on a frequency tracking algorithm if the heart rate value at the previous moment exists; the frequency tracking algorithm includes: determining to adjust multiple peaks in the PPG spectrum, calculating evaluation values of each peak value based on the heart rate at the previous moment, and determining the frequency corresponding to the highest evaluation value as the current heart rate.
[0016] Based on the continuous heart rate monitoring device provided by the second aspect of the embodiment of the present application, optionally, the preprocessing unit is specifically used for: The initial PPG signal and the initial ACC signal are processed by a Butterworth bandpass filter to obtain a second ACC signal and a second PPG signal, the cutoff frequencies of the bandpass filter are 0.5 Hz and 4 Hz, and the order is 6; Calculate the frequency spectrum of the second PPG signal of a specific window duration using a linear frequency modulation Z transform method to obtain the PPG spectrum, perform maximum value normalization on the PPG spectrum, and obtain a PPG spectrum with a length of 210; The combined acceleration signal is calculated according to the second ACC signal, and the calculation formula of the combined acceleration signal is as follows:
[0017] in is the combined acceleration signal, is the acceleration signal in the X-axis direction, is the acceleration signal in the Y-axis direction, It is the acceleration signal in the Z-axis direction; The frequency spectrum of the combined acceleration signal of a specific window duration is calculated using a linear frequency modulation Z transform method to obtain the ACC spectrum, and the ACC spectrum is normalized to the maximum value, so that the length of the obtained ACC spectrum is 210.
[0018] Based on the continuous heart rate monitoring device provided by the second aspect of the embodiment of the present application, optionally, the same frequency processing unit is further used for: A logistic regression model was established. The features used in the training process of the logistic regression model included: exercise intensity, exercise trend, mean, standard deviation, skewness, kurtosis, number of peaks of the ACC spectrum, and mean, standard deviation, skewness, kurtosis and number of peaks of the adjusted PPG spectrum. The logistic regression model was used to determine whether there was a same frequency situation based on the input features.
[0019] Based on the continuous heart rate monitoring device provided by the second aspect of the embodiment of the present application, optionally, the same frequency processing unit is further used for: Get the output value of the logistic regression model; When the output value of the logistic regression model is greater than the preset value for a continuous period of time, it is considered that there is a same frequency; The performing same-frequency processing on the PPG spectrum comprises: The same frequency processing of the PPG spectrum adopts the following formula: , ; in To adjust the PPG spectrum, For the ACC spectrum, is the PPG spectrum, is the frequency value after normalization.
[0020] Based on the continuous heart rate monitoring device provided by the second aspect of the embodiment of the present application, optionally, the initial value selection unit is further used to: the preset time window is N seconds; The evaluation value of each peak is determined in the adjusted PPG spectrum corresponding to the second second, and the peak with the highest evaluation value is determined as the adjacent peak. The calculation rule of the evaluation value is:
[0021] is the evaluation value, is the amplitude corresponding to the peak, is the maximum peak value, is the peak being evaluated; According to the determination rule of the adjacent peaks in the second second, N-1 adjacent peaks are determined for the adjusted PPG spectrum within N seconds.
[0022] Based on the continuous heart rate monitoring device provided by the second aspect of the embodiment of the present application, optionally, the frequency tracking unit is further used for: The evaluation value is calculated based on the following formula:
[0023] is the evaluation value, is the maximum amplitude value, is the frequency corresponding to the maximum amplitude value, is the heart rate at the previous moment.
[0024] Based on the continuous heart rate monitoring device provided by the second aspect of the embodiment of the present application, optionally, the frequency tracking unit is further used for: Establishing a neural network model, wherein the features analyzed by the neural network model include: exercise intensity, exercise trend, mean, standard deviation, skewness, kurtosis, number of peaks of ACC spectrum, mean, standard deviation, skewness, kurtosis of adjusted PPG spectrum, and the output of the neural network model is heart rate; Get the heart rate value based on the heart rate tracking algorithm; Determine whether the difference between the heart rate value obtained based on the heart rate tracking algorithm and the heart rate value at the previous moment is greater than a preset value; If the difference between the heart rate value obtained based on the heart rate tracking algorithm and the heart rate value at the previous moment is less than or equal to a preset value, then determining the heart rate value obtained based on the heart rate tracking algorithm as the current heart rate value; If the difference between the heart rate value obtained based on the heart rate tracking algorithm and the heart rate value at the previous moment is greater than a preset value, the heart rate value obtained based on the heart rate tracking algorithm and the heart rate value calculated by the neural network model are fused based on the Kalman filtering method to obtain the current heart rate value; If the difference between the heart rate value obtained based on the heart rate tracking algorithm and the heart rate value calculated by the neural network model is greater than the preset value for longer than the preset value, the final heart rate value is used as a label to enable the neural network model to perform real-time update learning.
[0025] The third aspect of the embodiment of the present application further provides a continuous heart rate monitoring device, including: CPU, memory, input and output interfaces, wired or wireless network interfaces, and power supply; The memory is a short-term storage memory or a persistent storage memory; The central processing unit is configured to communicate with the memory and execute instruction operations in the memory on the device to perform the method described in any one of the first aspects of the embodiments of the present application.
[0026] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, comprising instructions, which, when executed on a computer, enable the computer to execute a method as described in any one of the first aspects of the embodiment of the present application.
[0027] A fifth aspect of the embodiments of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute a method as described in any one of the first aspects of the embodiments of the present application.
[0028] It can be seen from the above technical scheme that the embodiment of the present application has the following advantages: the embodiment of the present application provides a continuous heart rate monitoring method, including: obtaining an initial PPG signal and an initial ACC signal; preprocessing the initial PPG signal and the initial ACC signal to obtain a PPG spectrum and an ACC spectrum; analyzing the PPG spectrum and the ACC spectrum based on a logistic regression model spectrum to determine whether there is a same-frequency situation, if there is the same-frequency situation, performing same-frequency processing on the PPG spectrum to obtain an adjusted PPG spectrum, if there is no same-frequency situation, determining that the PPG spectrum is the adjusted PPG spectrum; determining whether there is a heart rate value at the previous moment; if there is no heart rate value at the previous moment, performing initial value selection based on the adjusted PPG spectrum The algorithm is used to obtain the current heart rate value; the initial value selection algorithm includes: selecting multiple maximum peaks on the adjusted PPG spectrum, determining multiple adjacent peaks of each maximum peak within a preset time window, forming multiple peak curves with each maximum peak and adjacent peak within the preset time window, calculating the cumulative sum of the amplitude values corresponding to each peak curve, determining the curve with the highest cumulative sum as the true curve, and determining the frequency corresponding to the adjacent peaks in the adjusted PPG spectrum corresponding to the last second in the true curve as the heart rate value; if there is a heart rate value at the previous moment, the current heart rate value is determined based on the frequency tracking algorithm; the frequency tracking algorithm includes: determining multiple peaks in the adjusted PPG spectrum, calculating the evaluation value of each peak based on the heart rate at the previous moment, and determining the frequency corresponding to the highest evaluation value as the current heart rate value. This solution utilizes the fusion of the three-axis acceleration sensor (ACC) and the PPG signal, and determines whether the signal is of the same frequency through machine learning. If the signal is of the same frequency, the PPG spectrum is subjected to "spectral subtraction" processing to effectively suppress the influence of motion noise. In addition, a multi-round peak screening algorithm is designed. Through amplitude accumulation and trend analysis, the initial value of the true heart rate can be accurately located even when the signal quality is poor, providing a reliable starting point for subsequent tracking. High-precision continuous heart rate monitoring is achieved in complex scenarios such as exercise and signal attenuation, improving the accuracy and stability of continuous heart rate monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without creative work. It is understood that the drawings provided in this section are only used to better understand the present solution and do not constitute a limitation of the present application.
[0030] Figure 1 A schematic diagram of a flow chart of an embodiment of a continuous heart rate monitoring method provided by the present application; Figure 2 A schematic diagram of a flow chart of the pre-processing part provided in the embodiment of the present application; Figure 3 A flowchart of the same-frequency processing process provided in an embodiment of the present application; Figure 4 A flowchart of the execution process of the initial value selection algorithm provided in the embodiment of the present application; Figure 5 An example diagram of the initial selection algorithm provided in this application processing the PPG spectrum; Figure 6 A flowchart of the frequency tracking algorithm execution process provided in the embodiment of the present application; Figure 7 A schematic diagram of the PPG spectrum provided for this application; Figure 8 A structural schematic diagram of an embodiment of a continuous heart rate monitoring device provided by the present application; Fig. 9 This is another structural schematic diagram of an embodiment of the continuous heart rate monitoring device provided in this application. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application are clearly and completely described below. Obviously, the described embodiments are only embodiments of a part of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should belong to the scope of protection of the present application. At the same time, for the sake of clarity and simplicity, the description of well-known functions and structures is omitted in the following description.
[0032] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] Continuous heart rate monitoring is an important means of assessing heart health, especially in the early stages of cardiovascular disease. Abnormal heart rate often manifests as sudden, temporary or irregular fluctuations. It is difficult to capture these abnormalities with a single measurement, so continuous monitoring is required to provide complete heart rate change data. With the popularization of smart wearable devices, users' demand for convenient, comfortable and high-precision continuous heart rate monitoring technology is growing, which has promoted the continuous development of related technologies.
[0034] Currently, the mainstream continuous heart rate monitoring solutions are mainly divided into two categories: one is the heart rate chest strap based on ECG signals, which directly collects ECG signals through chest electrodes and has high accuracy, but it needs to be in close contact with the skin when worn, which can easily cause discomfort with long-term use, and the signal is easily interfered with in dynamic scenes; the other is the smart wearable device based on PPG signals, which uses photoelectric volumetric pulse wave technology to indirectly calculate the heart rate through wrist or arm sensors. This type of device has become the mainstream in the consumer market due to its small size and comfortable wearing, but its reliance on the characteristics of PPG signals has led to its limitations in complex scenarios.
[0035] Although ECG chest straps are highly accurate, they are not comfortable and have weak dynamic adaptability; PPG smart wearable devices face problems such as motion artifact interference, difficulty in selecting initial values, and insufficient prediction capabilities when signal quality is poor. Specifically, acceleration during exercise can cause PPG signal distortion, affecting the accuracy of heart rate calculation; the initial heart rate is difficult to accurately determine during exercise, resulting in subsequent tracking deviations. Traditional algorithms cannot effectively estimate heart rate, and data jumps or errors are prone to occur. In addition, some high-precision solutions require multiple sensors or complex algorithms, which increases equipment costs and power consumption.
[0036] To solve the above problems, this application provides a continuous heart rate monitoring method, please refer to Figure 1 , an embodiment of the present application includes: step 101-step 108.
[0037] 101. Obtain an initial PPG signal and an initial ACC signal.
[0038] Specifically, this solution can be applied to wrist wearable watches and bracelet devices. The PPG signal, i.e., the photoelectric volumetric pulse wave signal, is collected by a photoelectric sensor (such as a green LED + a photodiode) to reflect changes in blood vessel volume and the heart rate. The ACC signal, i.e., the three-axis acceleration signal, is collected by a MEMS acceleration sensor to reflect the wearer's motion state (such as stillness, walking, running, etc.).
[0039] 102. Preprocess the initial PPG signal and the initial ACC signal to obtain a PPG spectrum and an ACC spectrum.
[0040] Specifically, preprocessing the initial PPG signal and the initial ACC signal may include filtering the initial PPG signal and the initial ACC signal. A 6th-order Butterworth bandpass filter may be used with a cutoff frequency of 0.5Hz-4Hz. In the actual implementation process, the filter form and parameters may be adjusted according to actual conditions, and are not limited here. The spectrum calculation may use a linear frequency modulation Z transform (CZT) to calculate the spectrum of a specific window duration. ChirpZ-Transform (CZT) is an efficient spectrum analysis algorithm used to calculate the spectrum of a discrete signal within a specific frequency range. This allows for fast spectrum calculation within a local frequency range, thereby reducing computational complexity and making it more suitable for low-power devices.
[0041] 103. Based on the logistic regression model spectrum, analyze the PPG spectrum and ACC spectrum to determine whether there is a same frequency situation.
[0042] Specifically, a logistic regression model is established, and the exercise intensity, exercise trend, mean, standard deviation, skewness, kurtosis, number of peaks of the ACC spectrum, and the mean, standard deviation, skewness, kurtosis and number of peaks of the adjusted PPG spectrum are used as features in the model training process, and the output result is whether there is co-frequency. The logistic regression model analyzes these features to determine whether the PPG spectrum and the ACC spectrum are co-frequency. In actual operation, these feature data will be obtained first, and then input into the trained logistic regression model. The model will output an output value. If the output value meets certain conditions, it is determined that there is co-frequency. The specific form of the logistic regression model and the output value depend on the actual situation and training settings, and are not limited here.
[0043] In the field of heart rate monitoring, traditional methods often have difficulty in effectively dealing with the problem of signal co-frequency caused by motion interference. This step introduces a logistic regression model and integrates multi-dimensional signal features for co-frequency judgment, which greatly improves the accuracy and reliability of the judgment compared to the traditional single feature judgment method. By accurately judging the co-frequency situation, it can provide a basis for the subsequent processing of the PPG spectrum, effectively suppress the impact of motion noise on heart rate monitoring, and improve the accuracy of heart rate monitoring in complex sports scenarios. If co-frequency exists, execute step 104; if not, execute step 105.
[0044] 104. Perform frequency synchronization processing on the PPG spectrum to obtain an adjusted PPG spectrum.
[0045] If the same-frequency situation exists, the PPG spectrum is subjected to same-frequency processing to obtain an adjusted PPG spectrum. The specific same-frequency processing method is to subtract the noise generated by the movement from the PPG spectrum. Through this processing, the interference of the movement noise on the PPG spectrum can be effectively reduced, and the signal characteristics related to the heart rate can be highlighted, so that the subsequent calculation of the heart rate based on the PPG spectrum is more accurate.
[0046] 105. Determine the PPG spectrum to adjust the PPG spectrum.
[0047] Specifically, if the same frequency situation does not exist, the PPG spectrum is determined to be the adjusted PPG spectrum. That is, if there is no same frequency interference, there is no need to perform additional same frequency processing operations on the PPG spectrum, and it can be directly used as the basic data for subsequent heart rate calculation.
[0048] 106. Determine whether there is a heart rate value at the previous moment.
[0049] Specifically, during continuous heart rate monitoring, the heart rate data is continuously updated with the time series. The existence or non-existence of the heart rate value at the previous moment determines the calculation method of the current heart rate value. If there is no heart rate value at the previous moment, it means that this may be the initial stage of monitoring or the previous data is lost. At this time, an initial value selection algorithm is needed to determine the current heart rate value; if there is a heart rate value at the previous moment, the current heart rate value can be calculated based on the value using a frequency tracking algorithm. If the judgment result is that there is no heart rate value at the previous moment, execute step 107, that is, execute the initial value selection algorithm based on the adjustment of the PPG spectrum. If it is judged that there is a heart rate value at the previous moment, the process enters step 108, and the current heart rate value is determined based on the frequency tracking algorithm.
[0050] 107. Execute an initial value selection algorithm based on the adjusted PPG spectrum to obtain a current heart rate value.
[0051] If the previous heart rate value does not exist, executing an initial value selection algorithm based on the adjusted PPG spectrum to obtain a current heart rate value; The initial value selection algorithm includes: selecting multiple maximum peaks on the adjusted PPG spectrum, determining multiple adjacent peaks of each maximum peak within a preset time window, forming multiple peak curves with each maximum peak and adjacent peak within the preset time window, calculating the cumulative sum of the amplitude values corresponding to each peak curve, determining the highest cumulative sum as the true curve, and determining the frequency corresponding to the adjacent peaks in the adjusted PPG spectrum corresponding to the last second in the true curve as the heart rate value; the higher the cumulative sum, the higher the matching degree between the signal characteristics represented by the curve and the true heart rate may be. This is because the signal corresponding to the true heart rate should have a relatively stable and strong energy performance over a period of time, and the curve that best meets this feature can be screened out by the amplitude cumulative sum. The frequency corresponding to the adjacent peaks in the adjusted PPG spectrum corresponding to the last second in the true curve is determined as the heart rate value. This is based on the fact that in a stable heart rate signal, the frequency of the last second can better represent the current actual heart rate situation. Through multiple rounds of peak screening and trend analysis, the initial value of the true heart rate is located. Provide a reliable starting point for subsequent heart rate tracking.
[0052] 108. Determine the current heart rate value based on a frequency tracking algorithm.
[0053] The frequency tracking algorithm includes: determining and adjusting multiple peaks in the PPG spectrum, calculating the evaluation value of each peak based on the heart rate at the previous moment, and determining the frequency corresponding to the highest evaluation value as the current heart rate value. Specifically, the evaluation value may be composed of two parts: the intensity of the peak and the correlation with the heart rate at the previous moment. The highest evaluation value means that the frequency performs well in both signal strength and matching degree with the heart rate at the previous moment, and is most consistent with the actual heart rate at the current moment. This frequency tracking mechanism can dynamically adjust and determine the current heart rate in real time according to the changes in the PPG spectrum and the heart rate at the previous moment, adapt to the continuous changes in the heart rate of the human body under different motion states, and achieve accurate monitoring and tracking of the heart rate.
[0054] It can be seen from the above technical scheme that the embodiment of the present application has the following advantages: the embodiment of the present application provides a continuous heart rate monitoring method, including: obtaining an initial PPG signal and an initial ACC signal; preprocessing the initial PPG signal and the initial ACC signal to obtain a PPG spectrum and an ACC spectrum; analyzing the PPG spectrum and the ACC spectrum based on a logistic regression model spectrum to determine whether there is a same-frequency situation, if there is the same-frequency situation, performing same-frequency processing on the PPG spectrum to obtain an adjusted PPG spectrum, if there is no same-frequency situation, determining that the PPG spectrum is the adjusted PPG spectrum; determining whether there is a heart rate value at the previous moment; if there is no heart rate value at the previous moment, performing initial value selection based on the adjusted PPG spectrum The algorithm is used to obtain the current heart rate value; the initial value selection algorithm includes: selecting multiple maximum peaks on the adjusted PPG spectrum, determining multiple adjacent peaks of each maximum peak within a preset time window, forming multiple peak curves with each maximum peak and adjacent peak within the preset time window, calculating the cumulative sum of the amplitude values corresponding to each peak curve, determining the curve with the highest cumulative sum as the true curve, and determining the frequency corresponding to the adjacent peaks in the adjusted PPG spectrum corresponding to the last second in the true curve as the heart rate value; if there is a heart rate value at the previous moment, the current heart rate value is determined based on the frequency tracking algorithm; the frequency tracking algorithm includes: determining multiple peaks in the adjusted PPG spectrum, calculating the evaluation value of each peak based on the heart rate at the previous moment, and determining the frequency corresponding to the highest evaluation value as the current heart rate value. This solution utilizes the fusion of the three-axis acceleration sensor (ACC) and the PPG signal, and determines whether the signal is of the same frequency through machine learning. If the signal is of the same frequency, the PPG spectrum is subjected to "spectral subtraction" processing to effectively suppress the influence of motion noise. In addition, a multi-round peak screening algorithm is designed. Through amplitude accumulation and trend analysis, the initial value of the true heart rate can be accurately located even when the signal quality is poor, providing a reliable starting point for subsequent tracking. High-precision continuous heart rate monitoring is achieved in complex scenarios such as exercise and signal attenuation, improving the accuracy and stability of continuous heart rate monitoring.
[0055] Above Figure 1 The corresponding embodiment provides an overall description of the present solution. The following describes each part in detail. It can be understood that the various detailed descriptions can be combined arbitrarily in the actual implementation process to obtain a solution that meets the actual needs of the implementation environment. The specifics are not limited here. Please refer to Figure 2 , Figure 2 This is a schematic diagram of the preprocessing part of an embodiment of the present application, including steps 201 to 204.
[0056] 201. Obtain an initial PPG signal and an initial ACC signal.
[0057] The signal is collected through sensors worn on specific parts of the human body (such as the wrist, arm, finger, etc.). The PPG signal (photoplethysmogram signal) reflects the change of blood vessel volume with the heartbeat and can be used to indirectly calculate the heart rate; the ACC signal (acceleration signal) can reflect the movement state of the human body. The combined analysis of the two helps to suppress the impact of movement noise on heart rate monitoring in the future.
[0058] 202. Use a Butterworth bandpass filter to process the initial PPG signal and the initial ACC signal to obtain a second ACC signal and a second PPG signal.
[0059] Specifically, the collected initial PPG signal and initial ACC signal usually contain a lot of noise, and directly using them for analysis will affect the accuracy of the results. Therefore, a Butterworth bandpass filter is used to process them. The filter with a cutoff frequency of 0.5Hz and 4Hz and an order of 6 is selected because the frequency range corresponding to the human heart rate is roughly between 0.5-4Hz. The filter can effectively retain the signal components within this frequency range while suppressing noise at other frequencies. After filtering, a relatively pure second ACC signal and second PPG signal are obtained.
[0060] 203. Calculate the frequency spectrum of the second PPG signal of a specific window duration by using a linear frequency modulation Z transform method to obtain the PPG spectrum.
[0061] The spectrum of the second PPG signal with a specific window length (such as 8 seconds) is calculated using the linear frequency modulation Z transform (CZT) method to obtain the PPG spectrum. Compared with the traditional fast Fourier transform (FFT), CZT can more flexibly select the required frequency range for calculation and optimize it for the specific frequency range (31-240bpm) of heart rate monitoring. The PPG spectrum is then normalized to the maximum value to make the spectra of different signals comparable, and its length is fixed to 210, corresponding to a heart rate of 31-240bpm, which is convenient for subsequent processing and analysis.
[0062] 204. Calculate a combined acceleration signal according to the second ACC signal, and use a linear frequency modulation Z transform method to calculate a frequency spectrum of the combined acceleration signal of a specific window duration to obtain the ACC frequency spectrum.
[0063] Specifically, the combined acceleration signal is calculated according to the second ACC signal, and the calculation formula of the combined acceleration signal is as follows:
[0064] in is the combined acceleration signal, is the acceleration signal in the X-axis direction, is the acceleration signal in the Y-axis direction, is the acceleration signal in the Z-axis direction; calculating the resultant acceleration in this way can comprehensively reflect the motion acceleration of the wearer in three-dimensional space and more fully reflect the motion state.
[0065] Use the chirp-Z transform method to calculate the spectrum of the resultant acceleration signal for a specific window duration to obtain the ACC spectrum, and perform maximum normalization on the ACC spectrum. The length of the obtained ACC spectrum is 210. The adjustment of the ACC spectrum is the same as that of the PPG spectrum, which will not be elaborated here. The unified spectrum length can simplify the algorithm process and improve the calculation efficiency.
[0066] The above content describes the preprocessing process. Further, the co-frequency processing process can also be refined accordingly. Specifically, reference can be made to Figure 3 , an embodiment of the co-frequency processing process provided by this application includes: steps 301 to 305.
[0067] 301. Establish a logistic regression model.
[0068] Establish a logistic regression model. The features used in the training process of the logistic regression model include: exercise intensity, exercise trend, mean, standard deviation, skewness, kurtosis, number of peaks of the ACC spectrum, mean, standard deviation, skewness, kurtosis, and number of peaks of the adjusted PPG spectrum. The logistic regression model is used to judge whether there is a co-frequency situation based on the input features.
[0069] Among them, the exercise intensity intensity is calculated by finding the peak and valley points of the second ACC signal through an 8-second window with a sliding interval of 1 second, and then using the median. The formula is intensity = (median of the peak - median of the valley) / 4096 (4096 corresponds to 1 gravitational acceleration, specifically selected according to the sensor configuration). The exercise trend trend is obtained by fitting 15 exercise intensities with a sliding interval of 1 using linear regression and judging according to the slope of the fitting curve: when -0.3 < k < 0.3, the exercise trend is 0; when k <= -0.3, the exercise trend is -1; when k >= 0.3, the exercise trend is 1. These parameters can reflect the intensity and change direction of human movement and have important reference value for judging whether the signals are co-frequency.
[0070] The spectrum features include the mean, standard deviation, skewness, kurtosis, and number of peaks of the ACC spectrum (i.e., m_spectrum), as well as the mean, standard deviation, skewness, kurtosis, and number of peaks of the adjusted PPG spectrum (i.e., p_spectrum). These spectrum features describe the statistical characteristics and distribution of the signal from different angles. The mean reflects the average level of the signal, the standard deviation reflects the degree of dispersion of the signal, the skewness and kurtosis can further characterize the asymmetry of the signal distribution and the sharpness of the peak, and the number of peaks is related to the energy concentration of the signal. Combining these features can more comprehensively describe the characteristics of the PPG and ACC signals, and help the logistic regression model to more accurately determine the same frequency situation.
[0071] The logistic regression model is a machine learning model used to predict binary classification results. In this step, it is used to determine whether the PPG spectrum and the ACC spectrum are in the same frequency. In the actual implementation process, other deep learning models can indeed be selected to replace the logistic regression model to determine whether the PPG spectrum and the ACC spectrum are in the same frequency. The methods used for frequency determination include but are not limited to the machine learning methods used in this step. The above features can also be used to use other models for frequency determination, such as neural networks, XGBoost and other methods; 302. Obtain the output value of the logistic regression model.
[0072] After analyzing multiple features of exercise intensity, exercise trend, ACC spectrum, and PPG spectrum, the logistic regression model will output a value representing the judgment result. This value is the direct basis for judging whether the PPG spectrum and ACC spectrum are in the same frequency, and its result will determine the subsequent processing method of the PPG spectrum. If it is judged to be in the same frequency, the PPG spectrum needs to be processed in the same frequency to suppress the influence of motion noise; if it is judged to be different frequencies, the PPG spectrum is directly used as the basic data for subsequent heart rate calculation.
[0073] In practical applications, misjudgment of same frequency may lead to over-processing of PPG spectrum, thereby losing the real heart rate signal characteristics and affecting the accuracy of heart rate monitoring. Therefore, the present invention adds a strategy to make the same frequency judgment more inclined to different frequencies. By modifying the output judgment standard of the logistic regression model, the judgment threshold is set to 0.65. When the calculated logistic regression value value<=0.65, it is judged as different frequencies and output 0; when value>0.65, it is judged as same frequency and output 1. This setting raises the threshold for same frequency judgment and reduces the occurrence of misjudgment of same frequency. For example, in the process of continuous heart rate monitoring, the acceleration signal (ACC signal) generated when walking may be in the same frequency with the photoelectric volume pulse wave signal (PPG signal) generated by the heartbeat, interfering with the accurate monitoring of the heart rate. The adaptive adjustment of the logistic regression value in this scheme ensures that the PPG spectrum will not be easily processed when there is no sufficient evidence of the existence of same frequency interference, thereby retaining the heart rate information in the original signal to the greatest extent.
[0074] 303. When the output value of the logistic regression model is greater than the preset value for a continuous period of time, it is determined that there is a same frequency.
[0075] In actual monitoring, the output value of the logistic regression at a single moment may be affected by accidental factors or noise, resulting in misjudgment. In order to avoid this situation, this solution introduces the judgment of the time dimension. When the output value of the logistic regression model is greater than the preset value (value>0.65) for a continuous period of time, it is determined that there is co-frequency. For example, it is stipulated that when the output of the logistic regression is 1 for 3 consecutive seconds, it is considered to be co-frequency. This can effectively filter out short-term co-frequency signals that may be misjudged, and improve the accuracy and reliability of co-frequency judgment. If there is co-frequency, execute step 304; if not, execute step 305.
[0076] 304. Perform frequency co-processing on the PPG spectrum.
[0077] If there is a co-frequency situation, the noise generated by the motion state reflected by the ACC signal (acceleration signal) may be co-frequency with the PPG signal (photoplethysmography signal) at certain frequencies, and this co-frequency interference will seriously affect the accuracy of heart rate calculation. The principle of "spectral subtraction" is to use the noise characteristics reflected in the ACC spectrum to subtract the corresponding noise components from the PPG spectrum.
[0078] The same frequency processing of the PPG spectrum adopts the following formula: , ; in To adjust the PPG spectrum, For the ACC spectrum, is the PPG spectrum, is the frequency value after normalization.
[0079] That is, when the value of the ACC spectrum at a certain frequency i is greater than 0.4, or the value at its twice frequency 2i is greater than 0.4, it is considered that the PPG spectrum at this frequency is interfered by the same frequency from the ACC spectrum, so the value of the corresponding frequency of the PPG spectrum is set to 0; otherwise, the original value of the PPG spectrum is retained. Through the "spectral subtraction" process, these interfering frequencies can be removed and the spectrum information that is truly related to the heart rate can be retained.
[0080] 305. Determine that the PPG spectrum is the adjusted PPG spectrum.
[0081] If the output value of the logistic regression model does not meet the condition that the duration is greater than the preset value (for example, the output is 1 for 3 consecutive seconds), it is determined that there is no co-frequency. At this time, the original PPG spectrum is directly determined as the adjusted PPG spectrum. This is because in the absence of co-frequency interference, the heart rate information contained in the original PPG spectrum is not significantly affected by motion noise and can be directly used for subsequent heart rate calculations.
[0082] The above is a detailed description of the frequency synchronization process. The following is a detailed description of the initial value selection algorithm execution process. Please refer to Figure 4 An embodiment of the initial value selection algorithm execution process provided in the present application includes: steps 401 to 405.
[0083] When calculating the heart rate, it is necessary to determine whether there is a heart rate value at the previous moment. If there is no heart rate value at the previous moment, it means that it is in the initial heart rate calculation stage. At this time, the initial value selection algorithm is executed based on the adjusted PPG spectrum.
[0084] 401. Select multiple maximum peaks on the adjusted PPG spectrum.
[0085] Specifically, multiple maximum peaks are selected on the adjusted PPG spectrum. In actual implementation, the five largest peaks can be screened out from the adjusted PPG spectrum. These peaks contain frequency information related to the heart rate. However, since there may be noise interference in the signal, it is not accurate to determine the heart rate based solely on a single peak. Therefore, selecting multiple peaks can improve the reliability of heart rate judgment.
[0086] 402. The preset time window is N seconds: determining the evaluation value of each peak in the adjusted PPG spectrum corresponding to the second second, and determining the peak with the highest evaluation value as the adjacent peak.
[0087] Specifically, the evaluation value of each peak is determined in the adjusted PPG spectrum corresponding to the second second, and the peak with the highest evaluation value is determined as the adjacent peak. The calculation rule of the evaluation value is:
[0088] is the evaluation value, is the amplitude corresponding to the peak, is the maximum peak value, is the peak being evaluated.
[0089] This calculation rule takes into account the amplitude of the peak and the distance from the maximum peak. The larger the amplitude of the peak, the more significant the frequency component represented by the peak is in the signal; and the distance from the peak to the maximum peak reflects the degree of correlation between the peak and the main component in the spectrum. The closer the distance, the more likely it is to be related to the true heart rate. Through this calculation method, more representative peaks can be selected from many peaks.
[0090] 403. According to the second second adjacent peak determination rule, N-1 adjacent peaks are determined for the adjusted PPG spectrum within N seconds.
[0091] According to the method of step 402, respective adjacent peaks are determined in the adjusted PPG spectrum corresponding to each second within the preset time window (with a duration of N seconds).
[0092] 404. Form multiple peak curves from each maximum peak value and adjacent peak values within the preset time window.
[0093] Connecting these adjacent peaks in sequence will form multiple peak curves, which reflect the changing trend of the heart rate signal in the preset time window, and each curve contains the heart rate related information at different times.
[0094] 405. Calculate the cumulative sum of the amplitude values corresponding to the peak curves, determine that the curve with the highest cumulative sum is the real curve, and determine that the frequency corresponding to the adjacent peak in the adjusted PPG spectrum in the last second of the real curve is the heart rate value.
[0095] For each peak curve formed, calculate the cumulative sum of its corresponding amplitude values. The amplitude reflects the strength of the signal. The higher the cumulative sum, the stronger the energy of the signal represented by the curve in the entire time window, and the more likely it is the signal curve corresponding to the true heart rate. For example, if the amplitudes of adjacent peaks of a peak curve at each moment are relatively large, then the cumulative sum of its amplitudes will be higher, indicating that the curve can better reflect the characteristics of the heart rate signal.
[0096] Compare the amplitude accumulation and size of each peak curve, and determine the curve with the highest accumulation as the true curve. This is because the true heart rate signal usually has a relatively stable and strong energy performance over a period of time, so the curve with the highest accumulation best matches the characteristics of the true heart rate. The corresponding frequency of the adjacent peaks in the PPG spectrum corresponding to the last second of the true curve is determined as the heart rate value. Based on the continuity and real-time nature of the heart rate signal, the frequency of the last second can better represent the actual heart rate at the current moment, and in this way the current heart rate value can be accurately calculated.
[0097] For a specific example of the processing process, please refer to Figure 5 ,like Figure 5 At the beginning, due to the poor quality of the PPG signal, there are many bright spots in the spectrum. These bright spots contain the real heart rate, but it is impossible to distinguish. Select the 4 largest peaks, and form 4 curves 1 to 4 according to the description of 401 to 404 above. After the judgment in step 405, it is determined that curve 3 is the real heart rate value ( Figure 5 The black line in the middle is the heart rate result of the gold standard device Polar H10).
[0098] The above content describes the execution process of the initial value selection algorithm in detail. The following describes the frequency tracking algorithm process. Please refer to Figure 6 , an embodiment of the frequency tracking algorithm provided in the present application includes: steps 601 to 608.
[0099] 601. Determine and adjust multiple peaks in a PPG spectrum.
[0100] It is determined to adjust multiple peaks in the PPG spectrum, and the number of peaks can be determined according to actual conditions.
[0101] 602. Calculate evaluation values of each peak value based on the heart rate at the previous moment, and determine that the frequency corresponding to the highest evaluation value is the current heart rate.
[0102] Specifically, the evaluation value is calculated based on the following formula:
[0103] is the evaluation value, is the maximum amplitude value, is the frequency corresponding to the maximum amplitude value, is the heart rate at the previous moment.
[0104] The upper part of the formula is the maximum amplitude value of the peak, and the lower part is the absolute difference between the position of the maximum amplitude value and the heart rate at the previous moment; it reflects the difference between the current peak frequency and the heart rate at the previous moment. The smaller the difference, the closer the peak frequency is to the heart rate at the previous moment. In the case of relatively stable heart rate changes, it is more likely to represent the current true heart rate. 0.0001 is a minimum value added to prevent the denominator from being zero. The peak corresponding to the maximum ratio value is taken as the result of frequency tracking hr_trace.
[0105] 603. Establish a neural network model.
[0106] The spectrum signal obtained in the actual implementation process can be Figure 7 As shown in the figure, due to the poor PPG signal, the real heart rate cannot be found in the spectrum peak. The heart rate will have a large jump when the frequency tracking is used directly, and the displayed result is relatively abnormal, which brings a poor experience to the user. Therefore, the present invention proposes an online learning heart rate prediction scheme to optimize this problem, specifically, including: This application proposes an optimization scheme for constructing a neural network model. The input parameters of the model include exercise intensity, exercise trend, mean, standard deviation, skewness, kurtosis of the ACC spectrum (m_spectrum), and mean, standard deviation, skewness, and kurtosis of the adjusted PPG spectrum (p_spectrum). These parameters describe the state of motion and signal characteristics from multiple dimensions, providing rich information for the model. The label of the model is the current heart rate value. By training and learning these input parameters with the corresponding current heart rate value, the neural network model can dig out the potential relationship between the parameters and the heart rate, thereby realizing the function of predicting the heart rate based on the input parameters. It can be understood that the model structure of online heart rate learning is not limited to the neural network used, and other models such as multivariate linear regression models can also be used for online learning. Using the above features, these models can also predict and optimize the heart rate, providing more options and flexibility for heart rate monitoring.
[0107] 604. Obtain a heart rate value based on a heart rate tracking algorithm.
[0108] 605. Determine whether the difference between the heart rate value obtained based on the heart rate tracking algorithm and the heart rate value at the previous moment is greater than a preset value.
[0109] 606. Determine the heart rate value obtained based on the heart rate tracking algorithm as the current heart rate value.
[0110] The change of human heart rate is a continuous process without big jumps. If the difference between the heart rate value obtained based on the heart rate tracking algorithm and the heart rate value at the previous moment is less than or equal to the preset value, the heart rate value obtained based on the heart rate tracking algorithm is determined to be the current heart rate value, indicating that the heart rate is within the normal range of change, and the heart rate value obtained based on the heart rate tracking algorithm is determined to be the current heart rate value.
[0111] 607. Perform data fusion on the heart rate value obtained based on the heart rate tracking algorithm and the heart rate value calculated by the neural network model based on a Kalman filtering method to obtain a current heart rate value.
[0112] The change of human heart rate is a continuous process without big jumps. If the difference between the heart rate value obtained based on the heart rate tracking algorithm and the heart rate value at the previous moment is greater than the preset value, it means that the calculated result may be wrong. Then, the heart rate value obtained based on the heart rate tracking algorithm and the heart rate value calculated by the neural network model are fused based on the Kalman filter method to obtain the current heart rate value. Kalman filtering is a commonly used optimal estimation method that can comprehensively consider the information from different data sources and make the final result closer to the real heart rate by weighted fusion of the two heart rate values. For example, when the heart rate tracking algorithm fluctuates when the motion state changes greatly, and the neural network model predicts relatively stable, Kalman filtering can balance the advantages of the two and output a more reliable heart rate value.
[0113] 608. If the difference between the heart rate value obtained based on the heart rate tracking algorithm and the heart rate value calculated by the neural network model is greater than the preset value for longer than the preset value, the final heart rate value is used as a label to enable the neural network model to perform real-time update learning.
[0114] If the difference between the heart rate value obtained based on the heart rate tracking algorithm and the heart rate value calculated by the neural network model is greater than the preset value, the final heart rate value (the heart rate value obtained after Kalman filter fusion) is used as a label to update the neural network model in real time. By continuously using new accurate heart rate values as training data, the neural network model can adjust its own parameters, improve the accuracy of heart rate prediction, better adapt to different sports scenes and signal changes, and ensure the reliability of subsequent heart rate monitoring.
[0115] In addition, before outputting the heart rate value, the solution provided in this application will also smooth the tracked heart rate result to avoid large jumps in the heart rate result. Specifically, the heart rate smoothing adopts the formula hr_current=alpha*hr_pre+(1-alpha)*hr_trace, When abs(hr_pre-hr_trace)<=5, alpha is set to 0.3, making the result closer to hr_trace; When 5 < abs(hr_pre - hr_trace) <= 10, alpha takes the value of 0.5, making the result the average of the two; when abs(hr_pre - hr_trace) > 10, alpha takes the value of 0.7, making the result closer to hr_pre. Output the above heart rate result as the current heart rate result; Finally, obtain from the system whether to end the continuous heart rate measurement service. When receiving the flag to end the service, end the heart rate measurement service and output the maximum heart rate, minimum heart rate, and average heart rate during the heart rate measurement period, providing a basis for the user to evaluate their own health.
[0116] The above content describes the continuous heart rate monitoring method provided by the present application. To support the implementation of the above embodiments, the present application also provides a continuous heart rate monitoring device. Please refer to Figure 8 An embodiment of the continuous heart rate monitoring device provided by the present application includes: An acquisition unit 801, configured to acquire an initial PPG signal and an initial ACC signal; A preprocessing unit 802, configured to preprocess the initial PPG signal and the initial ACC signal to obtain a PPG spectrum and an ACC spectrum; A same-frequency processing unit 803, configured to analyze the PPG spectrum and the ACC spectrum based on a logistic regression model spectrum to determine whether there is a same-frequency situation. If there is the same-frequency situation, perform same-frequency processing on the PPG spectrum to obtain an adjusted PPG spectrum. If there is no such same-frequency situation, determine the PPG spectrum as the adjusted PPG spectrum; A judgment unit 804, configured to judge whether there is a heart rate value at the previous moment; An initial value selection unit 805, configured to, if there is no heart rate value at the previous moment, execute an initial value selection algorithm based on the adjusted PPG spectrum to obtain the current heart rate value. The initial value selection algorithm includes: selecting multiple maximum peaks on the adjusted PPG spectrum, determining multiple adjacent peaks of each maximum peak within a preset time window, forming multiple peak curves with each maximum peak and its adjacent peaks within the preset time window, calculating the sum of the amplitude values corresponding to each peak curve, determining the one with the highest sum as the real curve, and determining the frequency corresponding to the adjacent peak in the adjusted PPG spectrum corresponding to the last second in the real curve as the heart rate value; A frequency tracking unit 806, configured to, if there is a heart rate value at the previous moment, determine the current heart rate value based on a frequency tracking algorithm. The frequency tracking algorithm includes: determining multiple peaks in the adjusted PPG spectrum, calculating the evaluation value of each peak based on the heart rate at the previous moment, and determining the frequency corresponding to the highest evaluation value as the current heart rate.
[0117] In this embodiment, the process executed by each unit in the continuous heart rate monitoring device is similar to the continuous heart rate monitoring method process described in the embodiments corresponding to the aforementioned figures, and will not be repeated here.
[0118] Optionally, the preprocessing unit is specifically used for: The initial PPG signal and the initial ACC signal are processed by a Butterworth bandpass filter to obtain a second ACC signal and a second PPG signal, the cutoff frequencies of the bandpass filter are 0.5 Hz and 4 Hz, and the order is 6; Calculate the frequency spectrum of the second PPG signal of a specific window duration using a linear frequency modulation Z transform method to obtain the PPG spectrum, perform maximum value normalization on the PPG spectrum, and obtain a PPG spectrum with a length of 210; The combined acceleration signal is calculated according to the second ACC signal, and the calculation formula of the combined acceleration signal is as follows:
[0119] in is the combined acceleration signal, is the acceleration signal in the X-axis direction, is the acceleration signal in the Y-axis direction, It is the acceleration signal in the Z-axis direction; The frequency spectrum of the combined acceleration signal of a specific window duration is calculated using a linear frequency modulation Z transform method to obtain the ACC spectrum, and the ACC spectrum is normalized to the maximum value, so that the length of the obtained ACC spectrum is 210.
[0120] Optionally, the same-frequency processing unit is further used for: A logistic regression model was established. The features used in the training process of the logistic regression model included: exercise intensity, exercise trend, mean, standard deviation, skewness, kurtosis, number of peaks of the ACC spectrum, and mean, standard deviation, skewness, kurtosis and number of peaks of the adjusted PPG spectrum. The logistic regression model was used to determine whether there was a same frequency situation based on the input features.
[0121] Optionally, the same-frequency processing unit is further used for: Get the output value of the logistic regression model; When the output value of the logistic regression model is greater than the preset value for a continuous period of time, it is considered that there is a same frequency; The performing same-frequency processing on the PPG spectrum comprises: The same frequency processing of the PPG spectrum adopts the following formula: , ; in To adjust the PPG spectrum, For the ACC spectrum, is the PPG spectrum, is the frequency value after normalization.
[0122] Optionally, the initial value selection unit is further used for: the preset time window is N seconds; The evaluation value of each peak is determined in the adjusted PPG spectrum corresponding to the second second, and the peak with the highest evaluation value is determined as the adjacent peak. The calculation rule of the evaluation value is:
[0123] is the evaluation value, is the amplitude corresponding to the peak, is the maximum peak value, is the peak being evaluated; According to the determination rule of the adjacent peaks in the second second, N-1 adjacent peaks are determined for the adjusted PPG spectrum within N seconds.
[0124] Optionally, the frequency tracking unit is further used for: The evaluation value is calculated based on the following formula:
[0125] is the evaluation value, is the maximum amplitude value, is the frequency corresponding to the maximum amplitude value, is the heart rate at the previous moment.
[0126] Optionally, the frequency tracking unit is further used for: Establishing a neural network model, wherein the features analyzed by the neural network model include: exercise intensity, exercise trend, mean, standard deviation, skewness, kurtosis, number of peaks of ACC spectrum, mean, standard deviation, skewness, kurtosis of adjusted PPG spectrum, and the output of the neural network model is heart rate; Get the heart rate value based on the heart rate tracking algorithm; Determine whether the difference between the heart rate value obtained based on the heart rate tracking algorithm and the heart rate value at the previous moment is greater than a preset value; If the difference between the heart rate value obtained based on the heart rate tracking algorithm and the heart rate value at the previous moment is less than or equal to a preset value, then determining the heart rate value obtained based on the heart rate tracking algorithm as the current heart rate value; If the difference between the heart rate value obtained based on the heart rate tracking algorithm and the heart rate value at the previous moment is greater than a preset value, the heart rate value obtained based on the heart rate tracking algorithm and the heart rate value calculated by the neural network model are fused based on the Kalman filtering method to obtain the current heart rate value; If the difference between the heart rate value obtained based on the heart rate tracking algorithm and the heart rate value calculated by the neural network model is greater than the preset value for a period of time, the final heart rate value is used as a label to enable the neural network model to perform real-time update learning.
[0127] Fig. 9 It is a structural diagram of a continuous heart rate monitoring device provided in an embodiment of the present application. The continuous heart rate monitoring device 900 may include one or more central processing units (CPU) 901 and a memory 905. The memory 905 stores one or more application programs or data.
[0128] In this embodiment, the specific functional module division in the central processing unit 901 can be the same as the above Figure 8 The functional module division method of each unit described in is similar and will not be repeated here.
[0129] The memory 905 may be a volatile storage or a persistent storage. The program stored in the memory 905 may include one or more modules, each of which may include a series of instruction operations on the server. Furthermore, the central processor 901 may be configured to communicate with the memory 905 and execute a series of instruction operations in the memory 905 on the server 900.
[0130] The continuous heart rate monitoring device 900 may further include one or more power supplies 902 , one or more wired or wireless network interfaces 903 , one or more input and output interfaces 904 , and / or one or more operating systems.
[0131] The central processing unit 901 can execute the operations performed by the continuous heart rate monitoring method in the embodiments corresponding to the aforementioned figures, and the details will not be repeated here.
[0132] An embodiment of the present application also provides a computer storage medium, which is used to store computer software instructions used for the above-mentioned continuous heart rate monitoring method, including a program designed for executing the continuous heart rate monitoring method.
[0133] The continuous heart rate monitoring method can be as described above Figure 1 The continuous heart rate monitoring method described in .
[0134] The present application also provides a computer program product, which includes computer software instructions, which can be loaded by a processor to implement the above Figure 1 Figure 2 The process of any one of the continuous heart rate monitoring methods.
[0135] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the equivalent transformation of the circuit, the division of the unit, is only a logical function division, and there may be other division methods in actual implementation, 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 mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0136] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0137] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0138] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modification, equivalent substitution or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A continuous heart rate monitoring method, characterized in that: include: Obtaining initial PPG signal and initial ACC signal; Preprocessing the initial PPG signal and the initial ACC signal to obtain a PPG spectrum and an ACC spectrum; Analyzing the PPG spectrum and the ACC spectrum based on a logistic regression model spectrum to determine whether there is a co-frequency situation; if so, performing co-frequency processing on the PPG spectrum to obtain an adjusted PPG spectrum; if not, determining that the PPG spectrum is the adjusted PPG spectrum; Determine whether there is a heart rate value at the previous moment; If the previous heart rate value does not exist, executing an initial value selection algorithm based on the adjusted PPG spectrum to obtain a current heart rate value; The initial value selection algorithm includes: selecting multiple maximum peaks on the adjusted PPG spectrum, determining multiple adjacent peaks of each maximum peak in a preset time window, forming multiple peak curves with each maximum peak and adjacent peak in the preset time window, calculating the cumulative sum of the amplitude values corresponding to each peak curve, determining the curve with the highest cumulative sum as the true curve, and determining the frequency corresponding to the adjacent peak in the adjusted PPG spectrum corresponding to the last second in the true curve as the heart rate value; If the previous heart rate value exists, determining the current heart rate value based on a frequency tracking algorithm; The frequency tracking algorithm includes: determining and adjusting multiple peaks in the PPG spectrum, calculating evaluation values of each peak based on the heart rate at the previous moment, and determining the frequency corresponding to the highest evaluation value as the current heart rate value.
2. The continuous heart rate monitoring method according to claim 1, characterized in that: The preprocessing of the initial PPG signal and the initial ACC signal to obtain a PPG spectrum and an ACC spectrum includes: The initial PPG signal and the initial ACC signal are processed by a Butterworth bandpass filter to obtain a second ACC signal and a second PPG signal, the cutoff frequencies of the bandpass filter are 0.5 Hz and 4 Hz, and the order is 6; Calculate the frequency spectrum of the second PPG signal of a specific window duration using a linear frequency modulation Z transform method to obtain the PPG spectrum, perform maximum value normalization on the PPG spectrum, and obtain a PPG spectrum with a length of 210; The combined acceleration signal is calculated according to the second ACC signal, and the calculation formula of the combined acceleration signal is as follows: in is the combined acceleration signal, is the acceleration signal in the X-axis direction, is the acceleration signal in the Y-axis direction, It is the acceleration signal in the Z-axis direction; The frequency spectrum of the combined acceleration signal of a specific window duration is calculated using a linear frequency modulation Z transform method to obtain the ACC spectrum, and the ACC spectrum is normalized to the maximum value, so that the length of the obtained ACC spectrum is 210.
3. The continuous heart rate monitoring method according to claim 1, characterized in that: The determining whether there is a co-frequency situation based on the ACC spectrum includes: A logistic regression model was established. The features used in the training process of the logistic regression model included: exercise intensity, exercise trend, mean, standard deviation, skewness, kurtosis, number of peaks of the ACC spectrum, and mean, standard deviation, skewness, kurtosis and number of peaks of the adjusted PPG spectrum. The logistic regression model was used to determine whether there was a same frequency situation based on the input features.
4. The continuous heart rate monitoring method according to claim 3, characterized in that: The method further comprises: Get the output value of the logistic regression model; When the output value of the logistic regression model is greater than the preset value for a continuous period of time, it is considered that there is a same frequency; The performing same-frequency processing on the PPG spectrum comprises: The same frequency processing of the PPG spectrum adopts the following formula: , ; in To adjust the PPG spectrum, For the ACC spectrum, is the PPG spectrum, is the frequency value after normalization.
5. The continuous heart rate monitoring method according to claim 1, characterized in that: The step of determining a plurality of adjacent peaks of each maximum peak within a preset time window comprises: The preset time window is N seconds; The evaluation value of each peak is determined in the adjusted PPG spectrum corresponding to the second second, and the peak with the highest evaluation value is determined as the adjacent peak. The calculation rule of the evaluation value is: is the evaluation value, is the amplitude corresponding to the peak, is the maximum peak value, is the peak being evaluated; According to the determination rule of the adjacent peaks in the second second, N-1 adjacent peaks are determined for the adjusted PPG spectrum within N seconds.
6. The continuous heart rate monitoring method according to claim 1, characterized in that: The step of calculating the evaluation value of each peak value based on the heart rate at the previous moment includes: The evaluation value is calculated based on the following formula: is the evaluation value, is the maximum amplitude value, is the frequency corresponding to the maximum amplitude value, is the heart rate at the previous moment.
7. The continuous heart rate monitoring method according to claim 6, characterized in that: The method further comprises: Establishing a neural network model, wherein the features analyzed by the neural network model include: exercise intensity, exercise trend, mean, standard deviation, skewness, kurtosis, number of peaks of ACC spectrum, mean, standard deviation, skewness, kurtosis of adjusted PPG spectrum, and the output of the neural network model is heart rate; Get the heart rate value based on the heart rate tracking algorithm; Determine whether the difference between the heart rate value obtained based on the heart rate tracking algorithm and the heart rate value at the previous moment is greater than a preset value; If the difference between the heart rate value obtained based on the heart rate tracking algorithm and the heart rate value at the previous moment is less than or equal to a preset value, then determining the heart rate value obtained based on the heart rate tracking algorithm as the current heart rate value; If the difference between the heart rate value obtained based on the heart rate tracking algorithm and the heart rate value at the previous moment is greater than a preset value, the heart rate value obtained based on the heart rate tracking algorithm and the heart rate value calculated by the neural network model are fused based on the Kalman filtering method to obtain the current heart rate value; If the difference between the heart rate value obtained based on the heart rate tracking algorithm and the heart rate value calculated by the neural network model is greater than the preset value for longer than the preset value, the final heart rate value is used as a label to enable the neural network model to perform real-time update learning.
8. A continuous heart rate monitoring device comprising: An acquisition unit, used for acquiring an initial PPG signal and an initial ACC signal; A preprocessing unit, used to preprocess the initial PPG signal and the initial ACC signal to obtain a PPG spectrum and an ACC spectrum; a same-frequency processing unit, configured to analyze the PPG spectrum and the ACC spectrum based on a logistic regression model spectrum to determine whether there is a same-frequency situation; if so, perform same-frequency processing on the PPG spectrum to obtain an adjusted PPG spectrum; if not, determine that the PPG spectrum is the adjusted PPG spectrum; A judgment unit, used to judge whether there is a heart rate value at the previous moment; an initial value selection unit, configured to execute an initial value selection algorithm based on the adjusted PPG spectrum to obtain a current heart rate value if the previous heart rate value does not exist; The initial value selection algorithm includes: selecting multiple maximum peaks on the adjusted PPG spectrum, determining multiple adjacent peaks of each maximum peak in a preset time window, forming multiple peak curves with each maximum peak and adjacent peak in the preset time window, calculating the cumulative sum of the amplitude values corresponding to each peak curve, determining the curve with the highest cumulative sum as the true curve, and determining the frequency corresponding to the adjacent peak in the adjusted PPG spectrum corresponding to the last second in the true curve as the heart rate value; A frequency tracking unit is used to determine the current heart rate value based on a frequency tracking algorithm if the heart rate value at the previous moment exists; the frequency tracking algorithm includes: determining to adjust multiple peaks in the PPG spectrum, calculating evaluation values of each peak value based on the heart rate at the previous moment, and determining the frequency corresponding to the highest evaluation value as the current heart rate.
9. A continuous heart rate monitoring device, characterized in that: include: CPU, memory, input and output interfaces, wired or wireless network interfaces, and power supply; The memory is a short-term storage memory or a persistent storage memory; The central processing unit is configured to communicate with the memory, and execute instructions in the memory on the device to perform the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The method comprises instructions, which, when executed on a computer, cause the computer to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Estimating heart rate by tracking optical signal frequency components
CN107249445A
Heart rate detection method and electronic equipment
CN116058814A
Method and device for measuring exercise heart rate and storage medium
CN117281495A
Heart shock wave J wave positioning method and device based on heart rate local stability and medium
CN118476804A
Heart rate continuous detection method and device, electronic equipment and storage medium
CN119453969A
Cited By
Signal processing method, chip and electronic equipment
CN120570575A