Exercise heart rate detection method and device and readable storage medium
By combining the filtering processing and state judgment of PPG and ACC signals, the time domain and frequency domain combination method is used to solve the problem of motion artifact interference, and high-accurate heart rate monitoring is achieved in various motion scenarios.
Patent Information
- Application Number
- CN202510712501.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2045-05-30
AI Technical Summary
The existing exercise heart rate monitoring methods are insufficient in dynamic scenarios, with severe interference from motion artifacts, making it difficult to adaptively adjust the heart rate calculation strategy, and cannot meet the needs of diverse exercise scenarios.
Combining the PPG signal and ACC signal, the motion state is judged through filtering processing, combined acceleration average value and energy concentration degree, time domain information is used to determine the heart rate in a rest state, and spectrum reduction processing is performed in a motion state using the ACC spectrum homofrequency judgment and frequency tracking algorithm, and heart rate is determined by combining the frequency tracking algorithm.
Accurately suppress exercise artifacts in various exercise scenarios, quickly obtain heart rate information, and improve the accuracy and reliability of exercise heart rate monitoring.
Smart Images

Figure CN120227008A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data processing, and particularly relates to a method, device, and readable storage medium for detecting exercise heart rate. Background Art
[0002] Heart rate, as a key physiological indicator, is of great significance in the fields of health monitoring and medical diagnosis. Traditional heart rate monitoring methods perform poorly in dynamic scenarios, and motion artifacts can seriously affect the accuracy of heart rate measurement.
[0003] Current exercise heart rate monitoring solutions have many deficiencies. Methods based on accelerometers can reflect the exercise state to a certain extent, but it is difficult to accurately extract heart rate information; pure photoplethysmogram (PPG) technology is easily interfered by factors such as body jitter during exercise, resulting in a decline in signal quality and a large error in heart rate calculation. In addition, most existing technologies cannot adaptively select a suitable heart rate calculation method in complex exercise states and are difficult to meet the needs of diverse exercise scenarios.
[0004] With the popularization of wearable devices, users have higher and higher requirements for the accuracy and reliability of heart rate monitoring during exercise. Therefore, there is an urgent need for a technology that can effectively suppress motion artifacts and adaptively adjust the heart rate calculation strategy according to the exercise state to improve the performance of exercise heart rate monitoring and provide more accurate health data for users. Summary of the Invention
[0005] The purpose of the present invention is to provide a method for detecting exercise heart rate, aiming to solve the problem of poor heart rate detection effect in the existing exercise state. The method for detecting exercise heart rate provided by this application includes: Obtain an initial PPG signal and an initial ACC signal; Perform filtering processing on the initial PPG signal and the initial ACC signal to obtain a second PPG signal and a second ACC signal; Calculate the average combined acceleration within a preset time window based on the second ACC signal; Calculate the degree of energy concentration within the preset time window based on the second PPG signal; Determine whether it is in an exercise state based on the average combined acceleration and the degree of energy concentration; If not in the exercise state, determine the heart rate information based on time domain information; If in the exercise state, obtain the ACC spectrum and the PPG spectrum; Judge whether there is a frequency synchronization situation based on the relationship between the ACC spectrum and the heart rate at the previous moment; If there is the frequency synchronization situation, perform spectral subtraction processing on the PPG spectrum; Determine the heart rate information in the PPG spectrum after spectral subtraction processing and the PPG spectrum without spectral subtraction processing based on the frequency tracking algorithm.
[0006] Based on the exercise heart rate detection method provided in the first aspect of the embodiments of the present application, optionally, the filtering the initial PPG signal and the initial ACC signal to obtain a second PPG signal and a second ACC signal includes: Processing the initial PPG signal and the initial ACC signal with a Butterworth band-pass filter to obtain a second ACC signal and an intermediate PPG signal, the cut-off frequencies of the band-pass filter are 0.5 Hz and 4 Hz, and the order is 6; Using an adaptive filter, taking the second ACC signal as the input signal and the intermediate PPG signal as the desired signal to remove motion artifacts, and obtaining the second PPG signal.
[0007] Based on the exercise heart rate detection method provided in the first aspect of the embodiments of the present application, optionally, calculating the average combined acceleration within a preset time window based on the second ACC signal; calculating the energy concentration degree within the preset time window based on the second PPG signal includes: The ACC signal is a three-axis acceleration signal, and the first combined acceleration of the initial ACC signal is calculated according to the following formula:
[0008] Where 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; The duration of the preset time window is 8 seconds, and the maximum value of the first combined acceleration per second within 8 seconds is determined ; The average combined acceleration is calculated according to the following formula:
[0009] Where is the average combined acceleration is the maximum value of the first combined acceleration per second within the preset time window; Use the chirp Z-transform method to calculate the spectrum of the second PPG signal with a specific window duration to obtain the PPG spectrum, perform maximum value normalization on the PPG spectrum, and the obtained PPG spectrum length is 210; The energy concentration degree is calculated according to the following formula:
[0010] wherein is the frequency corresponding to the maximum amplitude value of the spectrum.
[0011] Based on the motion heart rate detection method provided in the first aspect of the embodiments of the present application, optionally, determining whether it is in a motion state based on the average combined acceleration and the degree of energy concentration includes: judging whether the continuous duration in which the average combined acceleration is less than a first preset value and the degree of energy concentration is less than a second preset value exceeds a preset duration; if it exceeds, it is determined that it is not in a motion state; if it does not exceed, it is determined that it is in a preset state.
[0012] Based on the motion heart rate detection method provided in the first aspect of the embodiments of the present application, optionally, judging whether there is a frequency synchronization situation based on the relationship between the ACC spectrum and the heart rate at the previous moment; if there is the frequency synchronization situation, performing spectrum subtraction processing on the PPG spectrum, including: determining multiple ACC spectrum peaks and performing multiple-frequency expansion; judging whether there is a spectrum peak at the ACC spectrum position corresponding to the heart rate at the previous moment, if there is, it is determined that there is a frequency synchronization situation and the flag is recorded as 1, otherwise the flag is recorded as 0; performing frequency synchronization processing based on the following formula: , When , , when it is negative, set it to 0; When , , when it is negative, set it to 0; When and , ; When and , .
[0013] Based on the motion heart rate detection method provided in the first aspect of the embodiments of the present application, optionally, determining heart rate information based on the frequency tracking algorithm in the PPG spectrum after spectrum subtraction processing and the PPG spectrum without spectrum subtraction processing includes: determining multiple spectrum peaks in the PPG spectrum after spectrum subtraction processing and the PPG spectrum without spectrum subtraction processing respectively; calculating the evaluation value of each spectrum peak based on the heart rate value at the previous moment, and determining the frequency corresponding to the highest evaluation value peak as the heart rate value; The formula for calculating the evaluation value is as follows:
[0014] 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.
[0015] Based on the exercise heart rate detection method provided in the first aspect of the embodiments of the present application, optionally, the method further includes: Establish a logistic regression model. The features used for training the logistic regression model include: the average value of the combined acceleration, the degree of energy concentration, the standard deviation, kurtosis, and skewness of the PPG spectrum without spectral subtraction, the standard deviation, kurtosis, and skewness of the PPG spectrum after spectral subtraction, the heart rate at the previous moment, the evaluation value, the amplitude and position of the peak corresponding to the maximum evaluation value. The logistic regression model is used to output the evaluation value of the current heart rate; Calculate the evaluation value of the heart rate value; If the evaluation value is lower than the preset value, then fuse 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 the Kalman filtering method to obtain the current heart rate value.
[0016] The second aspect of the embodiments of the present application provides an exercise heart rate detection device, including: An acquisition unit, configured to acquire an initial PPG signal and an initial ACC signal; A filtering unit, configured to perform filtering processing on the initial PPG signal and the initial ACC signal to obtain a second PPG signal and a second ACC signal; A combined acceleration average value calculation unit, configured to calculate the average value of the combined acceleration within a preset time window based on the second ACC signal; An energy concentration calculation unit, configured to calculate the degree of energy concentration within the preset time window based on the second PPG signal; A judgment unit, configured to determine whether it is in a motion state based on the average value of the combined acceleration and the degree of energy concentration; A time-domain heart rate determination unit, configured to determine heart rate information based on time-domain information if it is not in the motion state; A spectrum acquisition unit, configured to acquire an ACC spectrum and a PPG spectrum if it is in the motion state; A same-frequency judgment unit, configured to judge whether there is a same-frequency situation based on the relationship between the ACC spectrum and the heart rate at the previous moment; A spectral subtraction processing unit, configured to perform spectral subtraction processing on the PPG spectrum if there is the same-frequency situation; A frequency-domain heart rate determination unit, configured to determine heart rate information based on the frequency tracking algorithm in the PPG spectrum after spectral subtraction and the PPG spectrum without spectral subtraction.
[0017] Based on the motion heart rate detection device provided in the second aspect of the embodiments of the present application, optionally, the filtering unit is specifically configured to: Process the initial PPG signal and the initial ACC signal by using a Butterworth band-pass filter to obtain a second ACC signal and an intermediate PPG signal. The cut-off frequencies of the band-pass filter are 0.5 Hz and 4 Hz, and the order is 6; Use an adaptive filter to remove motion artifacts with the second ACC signal as the input signal and the intermediate PPG signal as the desired signal to obtain the second PPG signal.
[0018] Based on the motion heart rate detection device provided in the second aspect of the embodiments of the present application, optionally, The combined acceleration average value calculation unit is specifically configured to: The ACC signal is a three-axis acceleration signal, and the first combined acceleration of the initial ACC signal is calculated according to the following formula:
[0019] Where 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; The duration of the preset time window is 8 seconds, and the maximum value of the first combined acceleration per second within 8 seconds is determined ; The combined acceleration average value is calculated according to the following formula:
[0020] Where is the combined acceleration average value is the maximum value of the first combined acceleration per second within the preset time window; The energy concentration degree calculation unit is specifically configured to: Use the chirp Z-transform method to calculate the spectrum of the second PPG signal with a specific window duration to obtain the PPG spectrum, and perform maximum value normalization on the PPG spectrum. The length of the obtained PPG spectrum is 210; Calculate the energy concentration degree according to the following formula:
[0021] Where is the frequency corresponding to the maximum amplitude value of the spectrum.
[0022] Based on the motion heart rate detection device provided in the second aspect of the embodiments of the present application, optionally, the judgment unit is specifically configured to: Judge whether the continuous duration during which the average value of the combined acceleration is less than the first preset value and the degree of energy concentration is less than the second preset value exceeds the preset duration; If it exceeds, it is determined that the device is not in a motion state; If it does not exceed, it is determined that the device is in a preset state.
[0023] Based on the motion heart rate detection device provided in the second aspect of the embodiments of the present application, optionally, the same-frequency judgment unit is specifically configured to: Determine multiple ACC spectrum peaks and perform multiple-frequency multiplication expansion; Judge whether there is a spectrum peak at the ACC spectrum position corresponding to the heart rate at the previous moment. If there is, it is determined that there is a same-frequency condition and the flag is recorded as 1; otherwise, the flag is recorded as 0; The spectrum subtraction processing unit is specifically configured to: Perform same-frequency processing based on the following formula: , When At this time, , when it is negative, set it to 0; When At this time, , when it is negative, set it to 0; When And At this time, ; When And At this time, .
[0024] Based on the motion heart rate detection device provided in the second aspect of the embodiments of the present application, optionally, the frequency-domain heart rate determination unit is used to: Determine multiple spectrum peaks in the PPG spectrum after spectrum subtraction and the PPG spectrum without spectrum subtraction respectively; Calculate the evaluation value of each spectrum peak based on the heart rate value at the previous moment, and determine the frequency corresponding to the highest evaluation value peak as the heart rate value; The formula for calculating the evaluation value is as follows:
[0025] 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.
[0026] Based on the exercise heart rate detection device provided in the second aspect of the embodiments of the present application, optionally, the device further includes: A verification unit, where the verification unit is configured to: Establish a logistic regression model. The features used for training the logistic regression model include: the average combined acceleration, the degree of energy concentration, the standard deviation, kurtosis, and skewness of the PPG spectrum without spectral subtraction, the standard deviation, kurtosis, skewness, heart rate at the previous moment, evaluation value, amplitude and position of the peak corresponding to the maximum evaluation value of the PPG spectrum after spectral subtraction. The logistic regression model is used to output an evaluation value of the current heart rate; Calculate the evaluation value of the heart rate value; If the evaluation value is lower than a preset value, then fuse 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 the Kalman filtering method to obtain the current heart rate value.
[0027] The third aspect of the embodiments of the present application further provides an exercise heart rate detection device, including: A central processing unit, a memory, an input / output interface, a wired or wireless network interface, and a power supply; The memory is a transient memory or a persistent memory; The central processing unit is configured to communicate with the memory and execute the instruction operations in the memory on the device to execute the method described in any one of the first aspects of the embodiments of the present application.
[0028] The fourth aspect of the embodiments of the present application provides a computer-readable storage medium, including instructions, which when run on a computer, cause the computer to execute the method described in any one of the first aspects of the embodiments of the present application.
[0029] The fifth aspect of the embodiments of the present application provides a computer program product containing instructions, which when run on a computer, cause the computer to execute the method described in any one of the first aspects of the embodiments of the present application.
[0030] As can be seen from the above technical solutions, the embodiments of the present application have the following advantages: The present application provides a method for detecting exercise heart rate, including: obtaining an initial PPG signal and an initial ACC signal; performing filtering processing on the initial PPG signal and the initial ACC signal to obtain a second PPG signal and a second ACC signal; calculating an average combined acceleration within a preset time window based on the second ACC signal; calculating the degree of energy concentration within the preset time window based on the second PPG signal; determining whether it is in a motion state based on the average combined acceleration and the degree of energy concentration; if not in the motion state, determining heart rate information based on time-domain information; if in the motion state, obtaining an ACC spectrum and a PPG spectrum; determining whether there is a frequency synchronization situation based on the relationship between the ACC spectrum and the heart rate at the previous moment; if there is the frequency synchronization situation, performing spectral subtraction processing on the PPG spectrum; determining heart rate information in the PPG spectrum after spectral subtraction processing and the PPG spectrum without spectral subtraction processing based on a frequency tracking algorithm. This solution determines the motion state by combining the average combined acceleration and the degree of energy concentration, which is more comprehensive and accurate than judging by a single index and can adapt to various exercise scenarios. When not in the motion state, heart rate information is determined based on time-domain information. This method is simple and direct, with a small amount of calculation, and can quickly obtain the heart rate result. When in the motion state, first determine the frequency synchronization situation between the ACC spectrum and the heart rate at the previous moment, perform targeted spectral subtraction processing on the PPG spectrum, and then use the frequency tracking algorithm to determine heart rate information, which can effectively eliminate the interference of motion artifacts and accurately obtain the heart rate during exercise. Description of the Drawings
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts. It can be understood that the drawings provided in this part are only used to better understand the solution and do not constitute a limitation to the present application.
[0032] Figure 1 It is a schematic flowchart of an embodiment of the method for detecting exercise heart rate provided by the present application; Figure 2 It is a schematic flowchart of the preprocessing part provided by the embodiments of the present application; Figure 3 It is a schematic spectrum diagram during indoor cycling provided by the embodiments of the present application; Figure 4 It is a schematic flowchart of the frequency synchronization processing process provided by the present application; Figure 5A spectrum schematic diagram collected during walking provided by this application; Figure 6 A flowchart schematic diagram of the heart rate determination process provided by this application; Figure 7 A structural schematic diagram of an embodiment of the exercise heart rate detection device provided by this application; Figure 8 Another structural schematic diagram of an embodiment of the exercise heart rate detection device provided by this application. Detailed implementation manners
[0033] In order to enable those skilled in the art to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application. At the same time, for the sake of clear and concise description, the description of well-known functions and structures is omitted below.
[0034] The terms "first", "second", "third", "fourth", etc. (if any) in the specification, claims and above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments described here can be implemented in an order other than that illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0035] Heart rate, as a key physiological indicator, is of great significance in the fields of health monitoring and medical diagnosis. Traditional heart rate monitoring methods perform poorly in dynamic scenarios, and motion artifact interference will seriously affect the accuracy of heart rate measurement.
[0036] The current exercise heart rate monitoring solutions have many deficiencies. The method based on the accelerometer can reflect the exercise state to a certain extent, but it is difficult to accurately extract heart rate information; the pure photoplethysmogram (PPG) technology is easily interfered by factors such as body jitter during exercise, resulting in a decline in signal quality and a large error in heart rate calculation. In addition, most of the existing technologies cannot adaptively select a suitable heart rate calculation method in complex exercise states and are difficult to meet the needs of diverse exercise scenarios.
[0037] With the popularization of wearable devices, users have increasingly high requirements for the accuracy and reliability of heart rate monitoring during exercise. Therefore, there is an urgent need for a technology that can effectively suppress motion artifacts and adaptively adjust the heart rate calculation strategy according to the motion state to improve the performance of exercise heart rate monitoring and provide users with more accurate health data.
[0038] To solve the above problems, the present application provides a method for detecting exercise heart rate. Please refer to Figure 1 , an embodiment of the present application includes: Step 101 - Step 109.
[0039] 101. Obtain the initial PPG signal and the initial ACC signal.
[0040] Specifically, this solution can be applied to wrist-worn watches and bracelet devices. The PPG signal is the photoplethysmogram signal, which is collected by a photoelectric sensor (such as a green LED + a photodiode) and reflects the change in blood vessel volume, and can reflect the heart rate. The ACC signal is the three-axis acceleration signal, which is collected by a MEMS acceleration sensor and reflects the motion state of the wearer (such as stationary, walking, running, etc.).
[0041] 102. Perform filtering processing on the initial PPG signal and the initial ACC signal to obtain the second PPG signal and the second ACC signal.
[0042] Performing filtering processing on the initial PPG signal and the initial ACC signal to obtain the second PPG signal and the second ACC signal. Specifically, the preprocessing of 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 band-pass filter can be used, with a cut-off frequency of 0.5Hz - 4Hz. In the actual implementation process, the filter form and parameters can be adjusted according to the actual situation, which is not limited here. Further, to remove motion artifacts, adaptive filtering can also be performed, which is not limited specifically here.
[0043] 103. Calculate the average combined acceleration within a preset time window based on the second ACC signal.
[0044] Specifically, the ACC signal is the signal of a three-axis acceleration sensor. By averaging the acceleration values in three axes to obtain the average combined acceleration over a period of time, the average level of the wearer's motion acceleration during this period can be obtained. This average value can more comprehensively reflect the wearer's exercise intensity and provide a reference for subsequent determination of whether the wearer is in a motion state and heart rate calculation. For example, if the average combined acceleration is high, it indicates that the wearer may be in a relatively intense exercise state, which has a greater impact on the heart rate and needs to be considered in the heart rate calculation process.
[0045] 104. Calculate the degree of energy concentration within the preset time window based on the second PPG signal.
[0046] Specifically, analyze the second PPG signal within the preset time window to calculate its degree of energy concentration. The degree of energy concentration can be determined by calculating the energy distribution of the signal in different frequency bands. For example, the PPG signal can be transformed into the frequency domain using a spectral analysis method (such as Fourier transform), and then the proportion of the energy in each frequency band to the total energy can be calculated. A high degree of energy concentration indicates that the energy of the PPG signal is mainly concentrated in certain specific frequencies, which may represent the heart rate. A low degree of energy concentration means that the signal energy is more dispersed, and there may be more interference factors or poor signal quality.
[0047] 105. Determine whether the user is in a motion state.
[0048] Specifically, based on the average resultant acceleration calculated in steps 103 and 104 and the degree of energy concentration, determine whether the wearer is in a motion state. If the average resultant acceleration exceeds a certain preset threshold and the degree of energy concentration also meets certain conditions, it is determined that the user is in a motion state. Execute step 107; otherwise, it is determined that the user is not in a motion state, and execute step 106. The specific judgment rules can be adjusted according to the actual situation and are not limited here.
[0049] 106. Determine the heart rate information based on the time-domain information.
[0050] If not in the motion state, determine the heart rate information based on the time-domain information. The method of calculating the heart rate in the time domain is to identify the number of peaks and valleys within an 8-second window and then convert it into the corresponding heart rate. The specific implementation method is as follows: (1) When ppg(t) > 3000, and ppg(t) ≥ ppg(t - 1), ppg(t) ≥ ppg(t + 1), then the moment t is a peak. (2) When ppg(t) < -2000, and ppg(t) ≤ ppg(t - 1), ppg(t) ≤ ppg(t + 1), then the moment t is a valley. (3) Record the number of peaks peaknum and the number of valleys valleynum, and convert it into the corresponding heart rate through where num is the number of peaks or valleys. Obtain the peak heart rate and valley heart rate through step (3), and then compare them with the previous heart rate to select the result closer to the previous heart rate as the current heart rate information. In the actual implementation process, the specific numerical selection and calculation rules can be adjusted according to the actual situation and are not limited here.
[0051] 107. Determine whether there is a frequency synchronization situation based on the relationship between the ACC spectrum and the heart rate at the previous moment.
[0052] Specifically, if in a motion state, obtain the ACC spectrum and the PPG spectrum, and use the chirp-Z transform (CZT) method to perform spectral analysis on the ACC and PPG signals with a specific window duration (such as 8 seconds) to obtain the ACC spectrum. Determine whether there is a frequency synchronization situation based on the relationship between the ACC spectrum and the heart rate at the previous moment. The ACC spectrum reflects the energy distribution of motion acceleration at different frequencies. If some frequency components in the ACC spectrum are close to the frequencies corresponding to the heart rate at the previous moment, there may be a frequency synchronization situation.
[0053] Specifically, the determination rule is to compare the frequencies with higher energy in the ACC spectrum with the frequencies corresponding to the heart rate at the previous moment. If the difference between the two is within a certain range, it can be considered that there is a frequency synchronization situation. In the actual implementation process, the frequency synchronization determination rule can be determined according to the actual situation and is not limited here.
[0054] 108. Perform spectral subtraction processing on the PPG spectrum.
[0055] Specifically, if there is a frequency synchronization situation, perform spectral subtraction processing on the PPG spectrum. The signals generated by motion interfere with the PPG signal, resulting in the mixing of noise components with the same frequency as the ACC spectrum in the PPG spectrum. Spectral subtraction processing is to remove these interference components from the PPG spectrum.
[0056] By comparing the PPG spectrum and the ACC spectrum, find the frequency points in the PPG spectrum that are interfered by the same frequency. Then, according to a certain rule, adjust the amplitudes of the PPG spectrum at these frequency points. For example, set the amplitudes of the frequency points with severe interference to zero and retain the amplitudes of other frequency points that are not interfered or less interfered. In this way, the PPG spectrum after processing is less affected by motion noise and can more accurately reflect the true heart rate information. In the actual implementation process, the spectral subtraction processing rule can be determined according to the actual situation and is not limited here.
[0057] 109. Determine the heart rate information based on the frequency tracking algorithm in the PPG spectrum after spectral subtraction processing and the PPG spectrum without spectral subtraction processing.
[0058] Specifically, if spectral subtraction has been performed, determine the heart rate information in the PPG spectrum after spectral subtraction processing and the PPG spectrum without spectral subtraction processing. The purpose of spectral subtraction processing is to reduce the interference of motion noise on the PPG spectrum, but some useful information may be lost (such as in the case of walking or running). Therefore, referring to both spectra can more comprehensively determine the heart rate. If spectral subtraction has not been performed, directly determine the heart rate information in the PPG spectrum. The determination rules include two aspects: (1) The principle of the highest energy: The spectral peaks in the spectrum represent the energy distribution of the signal at different frequencies. The spectral peaks with higher energy are more likely to correspond to the true heart rate signal. Because the PPG signal generated by the heartbeat has a strong energy concentration at specific frequencies.
[0059] (2) The principle of having a small difference from the heart rate value at the previous moment: The change of the human heart rate is a relatively continuous process and will not undergo a drastic mutation in a short period of time. Therefore, the heart rate at the current moment should be relatively close to the heart rate at the previous moment. By screening out the spectral peaks with a small difference from the heart rate value at the previous moment, some false spectral peaks caused by noise or other interferences can be excluded, improving the accuracy of heart rate determination.
[0060] That is, determine that the spectral peak corresponding result with higher energy and a small difference from the heart rate value at the previous moment is the current heart rate information. In the actual implementation process, the operation rules can be determined according to the actual situation and are not limited here.
[0061] It can be seen from the above technical solutions that the embodiments of this application have the following advantages: This application provides a method for detecting exercise heart rate, including: obtaining an initial PPG signal and an initial ACC signal; performing filtering processing on the initial PPG signal and the initial ACC signal to obtain a second PPG signal and a second ACC signal; calculating the average combined acceleration within a preset time window based on the second ACC signal; calculating the degree of energy concentration within the preset time window based on the second PPG signal; determining whether it is in a motion state based on the average combined acceleration and the degree of energy concentration; if not in the motion state, determining the heart rate information based on the time-domain information; if in the motion state, obtaining the ACC spectrum and the PPG spectrum; determining whether there is a frequency synchronization situation based on the relationship between the ACC spectrum and the heart rate at the previous moment; if there is the frequency synchronization situation, performing spectral subtraction processing on the PPG spectrum; determining the heart rate information based on the frequency tracking algorithm in the PPG spectrum after spectral subtraction processing and the PPG spectrum without spectral subtraction processing. This solution combines the average combined acceleration and the degree of energy concentration to determine the motion state, which is more comprehensive and accurate than judging by a single index and can adapt to various exercise scenarios. When not in the motion state, the heart rate information is determined based on the time-domain information. This method is simple and direct, with a small amount of calculation, and can quickly obtain the heart rate result. When in the motion state, first determine the frequency synchronization situation between the ACC spectrum and the heart rate at the previous moment, perform targeted spectral subtraction processing on the PPG spectrum, and then use the frequency tracking algorithm to determine the heart rate information, which can effectively exclude the interference of motion artifacts and accurately obtain the heart rate during exercise.
[0062] The above content gives an overall introduction to this solution. Next, each link in this solution will be introduced in detail. First, for the preprocessing filtering part, refer to Figure 2 , Figure 2This is a schematic diagram of the preprocessing filtering process provided by this application, including steps 201 to 202.
[0063] 201. Use a Butterworth band-pass filter to process the initial PPG signal and the initial ACC signal to obtain a second ACC signal and an intermediate PPG signal.
[0064] The collected original PPG signal and initial ACC signal usually contain a lot of noise. In order to analyze and utilize these signals more accurately later, it is necessary to perform filtering processing on them. In this step, a Butterworth band-pass filter is used to process the initial PPG signal and the initial ACC signal, respectively obtaining an intermediate PPG signal and a second ACC signal.
[0065] Considering that the normal range of the human heart rate is approximately between [30, 240] bpm (beats per minute), after converting this range to frequency, it roughly corresponds to the frequency interval of 0.5Hz - 4Hz. Therefore, the cut-off frequencies of the band-pass filter are set to 0.5Hz and 4Hz, which can effectively retain the frequency components related to the heart rate while filtering out the noise interference of other frequencies. However, it should be noted that in actual applications, due to the physiological characteristics differences of different individuals, the performance characteristics of the device, and the specific usage scenarios, parameters such as the cut-off frequency and the order of the filter can be adjusted according to the actual situation. The parameters given here are only a common setting and do not constitute a limitation.
[0066] 202. Use an adaptive filter, take the second ACC signal as the input signal, and the intermediate PPG signal as the desired signal to remove motion artifacts and obtain the second PPG signal.
[0067] During the human body movement process, if the smart wearable device is worn loosely, the photodiode for receiving signals will shake with the body movement, which will cause the received PPG signal to be mixed with motion components, that is, the so-called motion artifacts. Moreover, the higher the intensity of the movement, the greater the interference to the PPG signal. Therefore, it is necessary to filter out this interference.
[0068] Since the ACC signal collected by the smart wearable device can well reflect the human body movement state, after completing the band-pass filtering process in step 201, this step uses an adaptive filter to further process the signal. The specific method is to take the second ACC signal as the input signal and the intermediate PPG signal as the desired signal, and use the algorithm of the adaptive filter to remove the motion artifacts in the intermediate PPG signal, and finally obtain the second PPG signal.
[0069] By adopting a processing method that combines band-pass filtering and adaptive filtering, the heart rate component in the PPG signal can be made more prominent, which helps to analyze the heart rate information more accurately subsequently. It should be noted that the specific type and parameter settings of the adaptive filter can be selected and adjusted according to actual requirements and signal characteristics, and no specific limitations are made here. Different adaptive filters may vary in terms of convergence speed, filtering effect, etc., and need to be optimized according to specific situations in practical applications, and no specific limitations are made here.
[0070] The following introduces the process and operation rules of the static state judgment part in this solution: (1)Calculate the average value of the combined acceleration.
[0071] The ACC signal is a three-axis acceleration signal, and the first combined acceleration of the initial ACC signal is calculated according to the following formula:
[0072] where 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; Convert to the actual acceleration value. For example, when the value of accm is 4096, the corresponding actual acceleration is 9.8m / s 2 , that is, 1g. The specific conversion method is related to the configuration of the ACC sensor, and the specific rules can be determined according to the actual situation, and no limitations are made here.
[0073] The duration of the preset time window is 8 seconds, and the maximum value of the first combined acceleration per second within 8 seconds is determined ; The average value of the combined acceleration is calculated according to the following formula:
[0074] where is the average value of the combined acceleration is the maximum value of the first combined acceleration per second within the preset time window; The weighting method is that the closer to the current time, the greater the weight, and the farther away, the smaller the weight. In this way, it can not only reduce the influence of outliers, but also reduce the delay and reflect the current state in a timely manner.
[0075] (2)Calculate the degree of energy concentration.
[0076] Calculate the spectrum of the second PPG signal with a specific window duration using the chirp Z-transform method to obtain the PPG spectrum. Normalize the maximum value of the PPG spectrum, and the length of the obtained PPG spectrum is 210; the corresponding heart rate is 31 - 240 bpm. When calculating the energy concentration degree, first find the position index1 of the maximum value of the PPG spectrum (the serial number starts from 1, and the actual heart rate starts from 31, and index1 has been incremented by 30), and then obtain the harmonic positions index2, index3, etc. in the range of [31, 240].
[0077] Calculate the energy concentration degree according to the following formula:
[0078] where is the frequency corresponding to the maximum amplitude value of the spectrum. The upper part of this formula is the sum of the energies of the highest peak and its harmonics, and the lower part is the sum of the energies of the entire spectrum. Their ratio can reflect the degree of energy concentration.
[0079] (3) Determine whether it is in a stationary state.
[0080] The reason for determining whether it is stationary by combining the energy concentration degree of the spectrum: As Figure 3 shown, when cycling indoors, although the movement amplitude is small, the spectrum is greatly affected by the movement. Directly calculating the heart rate from the time domain will have a large deviation ( Figure 3 The two right - hand side figures are the spectrum diagrams of the PPG signal, and the two left - hand side figures are the ACC spectrum diagrams. The brighter the color, the greater the amplitude of the frequency. The black line is the heart rate measurement result of the recognized gold - standard device Polar H10). Therefore, this solution is more accurate in determining whether it is stationary by using the amplitude threshold and the energy concentration threshold of the PPG signal spectrum.
[0081] Specifically, the judgment rules include: Starting from the 8th second, judge whether the average combined acceleration avg_accm is less than or equal to 1.3g per second, and record the duration t1. If it is greater than 1.3g, then t1 is cleared. When t1 is greater than 5, judge whether the energy concentration degree E is greater than or equal to 0.7, and record the duration t2. If E is less than 0.7, then t2 is cleared. When t2 is greater than 5, it is determined to be in a stationary state, and the time - domain heart rate calculation method is enabled. To reduce power consumption, calculate avg_accm per second, and calculate E every 10 seconds. Once either avg_accm or E does not meet the above conditions, the state is changed to the motion state, and the relevant parameters are reset, and the frequency - domain heart rate calculation method is enabled. In the actual implementation process, the judgment rules can be adjusted according to specific situations.
[0082] The following will describe the co - frequency processing process in detail. Please refer to Figure 4 , Figure 4Namely, it is a schematic flowchart of the co-frequency processing process provided by this application, including: step 401 to step 403.
[0083] The human heart rate usually ranges from 31 to 240 beats per minute (bpm). To accurately capture signals related to the heart rate, in this solution, only the frequency amplitudes between [31, 240] are retained when calculating the signal spectrum. The specific operation is to intercept the signal with a window length of 8 seconds, with a sliding interval of 1 second each time, and use the CZT (Chirp Z-Transform) method to calculate the spectrum of the PPG signal. This method can more accurately analyze the spectral characteristics of signals within a specific frequency range and is more suitable for scenarios with high frequency accuracy requirements such as exercise heart rate monitoring compared to traditional spectral analysis methods.
[0084] In actual monitoring, although the adaptive filtering technology has been used to filter out a certain degree of motion artifacts in the PPG signal, due to the complex and variable motion conditions, the brightest position in the PPG signal spectrum may still not be the true heart rate but the interference caused by motion artifacts. Therefore, further "spectrum subtraction" processing is essential. Before this, the first accm signal needs to be band-pass filtered to obtain the second accm signal. This step of band-pass filtering is to remove the frequency components in the accm signal that are irrelevant to heart rate monitoring and retain the frequency range that may be related to motion artifacts, making the subsequent analysis more targeted.
[0085] After that, calculate the spectra of the second PPG signal and the second accm signal every 8 seconds, denoted as p_spectrum and m_spectrum respectively, and perform maximum normalization on them. Through maximum normalization, the amplitude values of the frequencies are uniformly mapped between [0, 1]. This can eliminate the influence of different signal amplitude differences on subsequent processing, making the spectral data at different times and from different sources comparable and facilitating unified analysis and processing.
[0086] 401. Determine multiple ACC spectrum peaks and perform multi-frequency multiplication expansion.
[0087] Motion artifacts can appear anywhere in p_spectrum. When motion artifacts coincide with the heart rate, this phenomenon is called "co-frequency", which is particularly common in walking exercises, such as Figure 5 , Figure 5 The upper part is the determined position of the motion artifact, and the lower part is the position of the heart rate spectrum determined by the gold standard device. In walking exercises, since the frequency of the motion is very close to the true heart rate of the human body, general spectrum subtraction methods will not only remove motion artifacts but also weaken or even completely subtract the frequency components of the true heart rate, resulting in the inability to find the correct frequency in subsequent frequency tracking. Therefore, this solution improves the spectrum subtraction method for this problem. Specifically: The m_spectrum (ACC spectrum) contains various interference components, and the frequencies with relatively small amplitudes have relatively limited influence on the p_spectrum. Based on this characteristic, this solution screens out the "spectral peaks" with amplitudes greater than 0.3 from the m_spectrum. And to ensure the processing efficiency and effect, at most only the largest 5 "spectral peaks" are retained for subsequent spectral subtraction operations, denoted as [mpeak11, mpeak21, mpeak31, mpeak41, mpeak51]. The "spectral peak" defined here is not just a single peak point, but includes the position of the peak and the position range with amplitudes greater than 0.3 on both sides of the peak. This definition method more comprehensively covers the frequency regions that may interfere with the PPG signal. Considering that the harmonics of motion artifacts may also have a greater impact on the p_spectrum, in order to more comprehensively suppress motion artifacts, the extracted spectral peaks need to be expanded to include the 1 / 2 multiple frequency and 3 / 2 multiple frequency, that is, to make the expanded ACC spectrum include the frequencies of sub-harmonics, so as to obtain [mpeak11, mpeak21, mpeak31, mpeak41, mpeak51, mpeak12, mpeak22, mpeak32, mpeak42, mpeak52, mpeak13, mpeak23, mpeak33, mpeak43, mpeak53]. The specific expansion rules are as follows: First, find 5 peaks from the m_spectrum, and record the start position, end position, maximum position of each peak and the amplitude of the entire peak. Then perform the 1 / 2 multiple frequency expansion. Move each of the above-obtained peaks to the position obtained by dividing the position corresponding to its maximum peak value by 2 (rounding down), and then add the amplitude at the original position. If the result after addition is greater than 1, only retain it as 1. This is to avoid signal distortion or abnormality caused by too large amplitude values. At the same time, for the part outside the heart rate range [30, 240], since it has nothing to do with heart rate monitoring, it is directly discarded. The expansion method of the 3 / 2 multiple frequency is similar to that of the 1 / 2 multiple frequency. Similarly, move the peak to the position obtained by multiplying the position corresponding to the maximum peak value by 3 / 2 (rounding down), and perform the amplitude addition and range judgment processing.
[0088] Finally, set the amplitudes at the remaining positions outside the spectral peaks to 0. After such processing, the influence of possible interfering spectral peaks and their harmonics can be highlighted, the interference of other irrelevant frequency components can be reduced, making the spectrum more concise and clear, facilitating subsequent co-frequency judgment and spectral subtraction operations. Then, recombine m_spectrum according to the rule that the amplitudes at the same positions are added, and if the sum is greater than 1, keep 1, and set the amplitudes at the remaining positions outside the spectral peaks to 0, further optimizing the spectral characteristics. Through this expansion method, motion artifacts and real heart rates can be more accurately distinguished, thereby effectively retaining real heart rate information and reducing the interference of motion artifacts on subsequent frequency tracking and heart rate calculation.
[0089] 402. Determine whether there is a spectral peak at the ACC spectral position corresponding to the heart rate at the previous moment.
[0090] Determine whether there is a spectral peak at the ACC spectral position corresponding to the heart rate at the previous moment. The specific determination method is to check whether there is a value greater than 0 within the range of m_spectrum(hr_pre - 10:hr_pre + 10), where hr_pre is the heart rate at the previous moment. If there is a value greater than 0 within this range, it indicates that there is a spectral peak at the ACC spectral position corresponding to the heart rate at the previous moment, which also means that there may be a co-frequency phenomenon. At this time, set the flag bit flag to 1; otherwise, if there is no value greater than 0, set flag to 0. In this way, the co-frequency situation can be effectively determined, providing an accurate basis for subsequent spectral subtraction processing. It can be understood that the determination method and rules can be adjusted according to the actual situation and are not limited here.
[0091] 403. Perform co-frequency processing.
[0092] The specific spectral subtraction method is as follows: , When is negative, set it to 0; When is negative, set it to 0; When is negative, set it to 0; When and , ; When and , ; Meaning of the above formula: The heart rate change of the human body is a continuous process without large jumps. Therefore, the heart rate of the previous moment is used for interval division, and it is less likely that the current heart rate is less than 0.5 times the heart rate of the previous moment or greater than 1.5 times the heart rate of the previous moment. Therefore, the spectral subtraction coefficient is (1 - 1.2 * m_spectrum(i)), making the frequency amplitude of p_spectrum smaller in this interval; when in the range of [0.5hr_pre, 1.5hr_pre] and there is no frequency overlap, the spectral subtraction coefficient remains unchanged, and when there is frequency overlap, the spectral subtraction coefficient is (1 - m_spectrum(i) / 2), making the frequency amplitude of p_spectrum larger in this interval. The spectral subtraction method of this solution makes the frequency amplitude of non-heart rate smaller and the frequency amplitude of possible heart rate larger, making the subsequent frequency tracking more accurate; In addition, considering that in the case of frequency overlap, the spectrum of the motion component may still be stronger than that of the heart rate component after spectral subtraction. To avoid continuous interference of this situation on heart rate monitoring, this solution adopts a special processing strategy: when the frequency overlap lasts for 5 seconds, it is forced to switch to the non-frequency overlap spectral subtraction method, and then switch back to the frequency overlap situation after 5 seconds, with a 5-second interval for switching. This switching mechanism can dynamically adjust between different spectral subtraction methods, ensuring that in a complex motion environment, motion artifacts can always be effectively suppressed, the true heart rate signal can be accurately captured, and thus high-precision heart rate monitoring can be achieved.
[0093] The following details the heart rate determination process in the method provided by the embodiments of the present application. Specifically, please refer to Figure 6 , Figure 6 which is a schematic flowchart of a process for determining the heart rate provided by the present application, including: steps 601 to 606.
[0094] 601. Determine multiple spectral peaks in the PPG spectrum after spectral subtraction processing and the PPG spectrum without spectral subtraction processing respectively.
[0095] Frequency tracking is mainly based on a principle: The heart rate change of the human body is a continuous process with a small heart rate change per second. Therefore, this solution performs frequency tracking near the heart rate of the previous moment. Specifically: 1) Find the largest 5 peaks in the unsubtracted p_spectrum, denoted as [ppeak11, ppeak12, ppeak13, ppeak14, ppeak15]; 2) Find the largest 5 peaks in the p_spectrum after spectral subtraction, denoted as [ppeak21, ppeak22, ppeak23, ppeak24, ppeak25]; The number of peaks selected during the actual implementation process can be adjusted according to the actual situation, and no limitation is set here. For the case without spectral subtraction, only 5 peaks can be directly selected.
[0096] 602. Calculate the evaluation value of each spectral peak based on the heart rate value at the previous moment, and determine that the frequency corresponding to the peak with the highest evaluation value is the heart rate value.
[0097] The formula for the evaluation value is as follows:
[0098] 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. The upper part of the formula is the maximum amplitude value of this 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.
[0099] Calculate the evaluation value corresponding to each peak, and determine that the heart rate corresponding to the peak with the highest evaluation value is the current real-time heart rate.
[0100] 603. Establish a logistic regression model.
[0101] Specifically, the results obtained by frequency tracking based on the above steps 601 to 602 are not necessarily correct, so this result needs to be verified. The present application further establishes a logistic regression model. The features used for training the logistic regression model include: the average value of the combined acceleration, the degree of energy concentration, the standard deviation, kurtosis, and skewness of the PPG spectrum without spectral subtraction, the standard deviation, kurtosis, and skewness of the PPG spectrum after spectral subtraction, the heart rate at the previous moment, the evaluation value, the amplitude and position of the peak corresponding to the maximum evaluation value. The logistic regression model is used to output the evaluation value of the current heart rate. The model outputs the evaluation value of the current heart rate through learning and analysis of these features. This evaluation value can quantify the reliability of the current heart rate result.
[0102] 604. Calculate the evaluation value of the heart rate value.
[0103] Obtain the evaluation value calculated based on the logistic regression model based on the current parameters. And judge the situation of the current evaluation value. If the evaluation value is high, it means that the obtained heart rate value meets the expectation and no further processing is required. If the heart rate value is low, then execute step 605.
[0104] 605. Perform corresponding processing based on the size of the evaluation value.
[0105] High reliability situation (p≥0.8): When the evaluation value p output by the logistic regression model is greater than or equal to 0.8, it indicates that the currently selected heart rate result has high reliability under the model evaluation. This means that from the comprehensive judgment of various features, the degree of conformity between this heart rate value and the true heart rate is high, and no additional processing is required, and it is directly recognized as a valid result.
[0106] Medium reliability situation (0.3<p<0.8): If the evaluation value is between 0.3 and 0.8, it means that there is a certain degree of uncertainty in the current heart rate result. At this time, the currently selected result and the heart rate at the previous moment are used for data fusion using the Kalman filter. Because the change of the human heart rate is continuous, the heart rate at the previous moment is an important reference. By fusing the two through the Kalman filter, the heart rate curve can be effectively smoothed, avoiding sudden jumps in the heart rate result caused by data fluctuations or local algorithm errors, making the heart rate value more in line with the human physiological law, and improving the stability of heart rate monitoring.
[0107] Low reliability situation (p≤0.3): When p is less than or equal to 0.3, the reliability of the current heart rate result is low. First, use the heart rate at the previous moment as the current result. This is a conservative strategy based on the continuity of the heart rate to prevent the output of incorrect heart rate values. If this situation lasts for 5 seconds, it indicates that it is difficult for the algorithm to obtain a reliable heart rate in a short time. At this time, linear prediction is performed using the heart rate in the previous 20 seconds. Linear prediction is based on the trend of heart rate change and can reasonably infer the current heart rate to a certain extent, replacing the current unreliable result. This not only avoids the bad experience caused by the long-term non-update of the heart rate but also gradually approaches the true heart rate, reflecting the effective response to abnormal situations and the attention to user experience. If the predicted result is used as the heart rate result for more than 15 seconds, it is determined that there is a serious error in the previous heart rate tracking, and all parameters are initialized and reset to get out of the error tracking state and accurately obtain the heart rate again.
[0108] 606. Perform smoothing processing.
[0109] Specifically, in order to avoid large jumps in the heart rate result, whether it is the heart rate result calculated in the time domain or the heart rate result calculated in the frequency domain needs to be smoothed. Specifically, it is necessary to compare the difference between the heart rate value at the previous moment and the current heart rate value and handle them according to different situations.
[0110] Slight change situation (|hr_current - hr_pre|≤3): When the difference between the current heart rate value (hr_current) and the heart rate value at the previous moment (hr_pre) is less than or equal to 3, no smoothing processing is performed. Because in this case, the heart rate change is within the normal small fluctuation range of the human body, directly outputting the current heart rate value can accurately reflect the instantaneous state of the heart rate, and no additional smoothing operation is required, ensuring the real-time and accuracy of the data.
[0111] Small change condition (3 < |hr_current - hr_pre| ≤ 10): If the heart rate difference is greater than 3 and less than or equal to 10, the weighted average of the heart rate results in the previous 3 seconds and the current result is used as the current heart rate result, and the weight of the data closer to the current time is greater. This is because there is a certain inertia in heart rate changes, and recent data can better reflect the current trend. Through weighted averaging, not only can the heart rate curve be smoothed and the influence of accidental fluctuations be reduced, but also the change trend of the current heart rate can be highlighted, making the result more consistent with the actual heart rate changes.
[0112] Large change condition (|hr_current - hr_pre| > 10): When the heart rate difference is greater than 10, the average of the heart rate results in the previous 7 seconds and the current result is used as the current heart rate result. A large heart rate difference may be caused by interference or algorithm anomalies. At this time, averaging the heart rate data over a longer period (7 seconds) can effectively smooth out the violent fluctuations, make the heart rate result more stable, avoid misjudgment caused by abnormal data, and ensure that the output heart rate value conforms to the physiological characteristics of continuous human heart rate changes.
[0113] Finally, obtain from the system whether to continue measuring the heart rate. 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 within the heart rate measurement period.
[0114] The above content describes the exercise heart rate detection method provided by this application. To support the implementation of the above embodiments, this application also provides an exercise heart rate detection device. Please refer to Figure 7 One embodiment of the exercise heart rate detection device provided by this application includes: An acquisition unit 701, configured to acquire an initial PPG signal and an initial ACC signal; A filtering unit 702, configured to perform filtering processing on the initial PPG signal and the initial ACC signal to obtain a second PPG signal and a second ACC signal; A resultant acceleration average calculation unit 703, configured to calculate the average value of the resultant acceleration within a preset time window based on the second ACC signal; An energy concentration degree calculation unit 704, configured to calculate the energy concentration degree within the preset time window based on the second PPG signal; A determination unit 705, configured to determine whether it is in a motion state based on the average value of the resultant acceleration and the energy concentration degree; A time-domain heart rate determination unit 706, configured to, if not in the motion state, determine the heart rate information based on time-domain information; A spectrum acquisition unit 707, configured to, if in the motion state, acquire an ACC spectrum and a PPG spectrum; A same-frequency determination unit 708, configured to determine whether there is a same-frequency situation based on the relationship between the ACC spectrum and the heart rate at the previous moment; A spectrum subtraction processing unit 709, configured to perform spectrum subtraction processing on the PPG spectrum if there is the same-frequency situation; A frequency-domain heart rate determination unit 710, configured to determine heart rate information based on a frequency tracking algorithm in the PPG spectrum after spectrum subtraction processing and the PPG spectrum without spectrum subtraction processing.
[0115] Based on the above Figure 7 In the corresponding embodiment, optionally, the filtering unit is specifically configured to: Use a Butterworth band-pass filter to process the initial PPG signal and the initial ACC signal to obtain a second ACC signal and an intermediate PPG signal, where the cut-off frequencies of the band-pass filter are 0.5 Hz and 4 Hz, and the order is 6; Use an adaptive filter, take the second ACC signal as an input signal, and the intermediate PPG signal as a desired signal to remove motion artifacts, and obtain the second PPG signal.
[0116] Based on the above Figure 7 In the corresponding embodiment, optionally, The combined acceleration average value calculation unit is specifically configured to: The ACC signal is a three-axis acceleration signal, and calculate the first combined acceleration of the initial ACC signal according to the following formula:
[0117] Where 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; The duration of the preset time window is 8 seconds, and determine the maximum value of the first combined acceleration per second within 8 seconds ; Calculate the combined acceleration average value according to the following formula:
[0118] Where is the combined acceleration average value is the maximum value of the first combined acceleration per second within the preset time window; The energy concentration degree calculation unit is specifically configured to: Calculate the spectrum of the second PPG signal with a specific window duration using the chirp Z-transform method to obtain the PPG spectrum, perform maximum normalization on the PPG spectrum, and the length of the obtained PPG spectrum is 210; Calculate the degree of energy concentration according to the following formula:
[0119] where is the frequency corresponding to the maximum amplitude value of the spectrum.
[0120] Based on the above Figure 7 corresponding embodiment, optionally, the determination unit is specifically configured to: Determine whether the continuous duration in which the average combined acceleration is less than the first preset value and the degree of energy concentration is less than the second preset value exceeds the preset duration; If it exceeds, it is determined that the state is not a motion state; If it does not exceed, it is determined that the state is the preset state.
[0121] Based on the above Figure 7 corresponding embodiment, optionally, the same-frequency determination unit is specifically configured to: Determine multiple ACC spectrum peaks and perform multiple-frequency expansion; Determine whether there is a spectrum peak at the ACC spectrum position corresponding to the heart rate at the previous moment. If there is, it is determined that there is a same-frequency condition and the flag is recorded as 1, otherwise the flag is recorded as 0; The spectrum subtraction processing unit is specifically configured to: Perform same-frequency processing according to the following formula: , When , , when it is negative, set it to 0; When , , when it is negative, set it to 0; When and , ; When and , .
[0122] Based on the above Figure 7 corresponding embodiment, optionally, the frequency-domain heart rate determination unit is used to: Determine multiple spectrum peaks in the PPG spectrum after spectrum subtraction and the PPG spectrum without spectrum subtraction respectively; Calculate the evaluation value of each spectral peak based on the heart rate value at the previous moment, and determine the frequency corresponding to the peak evaluation value as the heart rate value; The formula for calculating the evaluation value is as follows:
[0123] 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.
[0124] Based on the above Figure 7 corresponding embodiment, optionally, the device further includes: A verification unit, and the verification unit is used for: Establish a logistic regression model, and the features used in the training of the logistic regression model include: the average value of the combined acceleration, the degree of energy concentration, the standard deviation, kurtosis, and skewness of the PPG spectrum without spectral subtraction, the standard deviation, kurtosis, skewness, the heart rate at the previous moment, the evaluation value, the amplitude and position of the peak corresponding to the maximum evaluation value of the PPG spectrum after spectral subtraction. The logistic regression model is used to output the evaluation value of the current heart rate; Calculate the evaluation value of the heart rate value; If the evaluation value is lower than the preset value, 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 filtering method to obtain the current heart rate value.
[0125] In this embodiment, the processes executed by each unit in the exercise heart rate detection device are similar to the processes of the exercise heart rate detection method described in the corresponding embodiments of the foregoing figures, and will not be elaborated here.
[0126] Figure 8 FIG. is a schematic structural diagram of an exercise heart rate detection device provided by an embodiment of the present application. The exercise heart rate detection device 800 may include one or more central processing units (CPUs) 801 and a memory 805. One or more application programs or data are stored in the memory 805.
[0127] In this embodiment, the specific functional module division in the central processor 801 may be similar to the functional module division method of each unit described in the foregoing Figure 8 and will not be elaborated here.
[0128] Among them, the memory 805 can be volatile storage or persistent storage. The program stored in the memory 805 can include one or more modules, and each module can include a series of instruction operations on the server. Further, the central processing unit 801 can be configured to communicate with the memory 805 and execute a series of instruction operations in the memory 805 on the server 800.
[0129] The exercise heart rate detection device 800 may further include one or more power supplies 802, one or more wired or wireless network interfaces 803, one or more input / output interfaces 804, and / or one or more operating systems.
[0130] The central processing unit 801 can perform the operations executed by the exercise heart rate detection method in the corresponding embodiments of the foregoing figures, and details are not described herein again.
[0131] An embodiment of the present application also provides a computer storage medium, which is used to store computer software instructions for the above exercise heart rate detection method, and includes a program designed for the exercise heart rate detection method.
[0132] The exercise heart rate detection method can be as described above Figure 1 in the exercise heart rate detection method described.
[0133] An embodiment of the present application also provides a computer program product, which includes computer software instructions, and the computer software instructions can be loaded by a processor to implement the process of the exercise heart rate detection method of any one of the above Figure 1 Figure 2 in the exercise heart rate detection method.
[0134] In several embodiments provided by 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 merely illustrative. For example, the equivalent transformation of circuits and the division of units are only a logical function division. In actual implementation, there may be other division methods. 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 displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces, and the indirect coupling or communication connection of devices or units can be in electrical, mechanical or other forms.
[0135] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place, or they can be distributed to multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0136] In addition, each functional unit in various embodiments of the present application may be integrated into one processing unit, may exist separately as individual physical units, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware or in the form of software functional units.
[0137] The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, or improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for detecting exercise heart rate, characterized in that, Including: Obtain an initial PPG signal and an initial ACC signal; Perform filtering processing on the initial PPG signal and the initial ACC signal to obtain a second PPG signal and a second ACC signal; Calculate the average resultant acceleration within a preset time window based on the second ACC signal; Calculate the degree of energy concentration within the preset time window based on the second PPG signal; Determine whether it is in a motion state based on the average resultant acceleration and the degree of energy concentration; If not in the motion state, determine the heart rate information based on time-domain information; If in the motion state, obtain the ACC spectrum and the PPG spectrum; Judge whether there is a frequency synchronization situation based on the relationship between the ACC spectrum and the heart rate at the previous moment; If there is the frequency synchronization situation, perform spectral subtraction processing on the PPG spectrum; Determine the heart rate information from the PPG spectrum after spectral subtraction processing and the PPG spectrum without spectral subtraction processing based on a frequency tracking algorithm.
2. The exercise heart rate detection method according to claim 1, wherein The performing filtering processing on the initial PPG signal and the initial ACC signal to obtain a second PPG signal and a second ACC signal includes: Use a Butterworth band-pass filter to process the initial PPG signal and the initial ACC signal to obtain a second ACC signal and an intermediate PPG signal. The cut-off frequencies of the band-pass filter are 0.5 Hz and 4 Hz, and the order is 6th order; Use an adaptive filter, take the second ACC signal as the input signal, and the intermediate PPG signal as the desired signal to remove motion artifacts, and obtain the second PPG signal.
3. The exercise heart rate detection method according to claim 1, wherein The calculating the average resultant acceleration within a preset time window based on the second ACC signal; calculating the degree of energy concentration within the preset time window based on the second PPG signal includes: The ACC signal is a three-axis acceleration signal. Calculate the first resultant acceleration of the initial ACC signal according to the following formula: wherein 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; The duration of the preset time window is 8 seconds, and the maximum value of the first combined acceleration per second within 8 seconds is determined ; Calculate the average resultant acceleration according to the following formula: wherein is the average value of the combined acceleration is the maximum value of the first combined acceleration per second within the preset time window; Use the chirp Z-transform method to calculate the spectrum of the second PPG signal with a specific window duration to obtain the PPG spectrum, perform maximum normalization on the PPG spectrum, and the obtained PPG spectrum length is 210; Calculate the degree of energy concentration according to the following formula: wherein is the frequency corresponding to the maximum amplitude value of the spectrum.
4. The motion heart rate detection method according to claim 1, characterized in that The determining whether it is in a motion state based on the average resultant acceleration and the degree of energy concentration includes: Judge whether the continuous duration in which the average resultant acceleration is less than a first preset value and the degree of energy concentration is less than a second preset value exceeds a preset duration; If it exceeds, it is determined that it is not in a motion state; If it does not exceed, it is determined that it is in a preset state.
5. The motion heart rate detection method according to claim 1, characterized in that The judging whether there is a frequency synchronization situation based on the relationship between the ACC spectrum and the heart rate at the previous moment; If there is the frequency synchronization situation, the performing spectral subtraction processing on the PPG spectrum includes: Determine multiple ACC spectrum peaks and perform multi-octave expansion; Determine whether there is a spectral peak at the ACC spectral position corresponding to the heart rate at the previous moment. If there is, it is determined that there is a same-frequency situation and the flag is recorded as 1; otherwise, the flag is recorded as 0. Perform same-frequency processing based on the following formula: , When , When it is negative, set it to 0; When is and is negative, set it to 0; When and then ; When and then 。 6. The exercise heart rate detection method according to claim 1, wherein The method for determining heart rate information in the PPG spectrum after spectral subtraction processing and the PPG spectrum without spectral subtraction processing based on the frequency tracking algorithm includes: Determine multiple spectral peaks in the PPG spectrum after the spectral subtraction processing and the PPG spectrum without the spectral subtraction processing respectively; Calculate the evaluation value of each spectral peak based on the heart rate value at the previous moment, and determine the frequency corresponding to the highest evaluation value peak as the heart rate value; The formula for calculating the evaluation value is as follows: 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 method according to claim 6, characterized in that, The method further includes: Establish a logistic regression model. The features used for training the logistic regression model include: the combined acceleration average value, the energy concentration degree, the standard deviation, kurtosis, and skewness of the PPG spectrum without spectral subtraction, the standard deviation, kurtosis, skewness, heart rate at the previous moment, evaluation value, amplitude and position of the peak corresponding to the maximum evaluation value of the PPG spectrum after spectral subtraction. The logistic regression model is used to output the evaluation value of the current heart rate; Calculate the evaluation value of the heart rate value; If the evaluation value is lower than the preset value, then fuse 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 the Kalman filtering method to obtain the current heart rate value.
8. A sports heart rate detection device, characterized in that, It includes: An acquisition unit for acquiring an initial PPG signal and an initial ACC signal; A filtering unit for filtering the initial PPG signal and the initial ACC signal to obtain a second PPG signal and a second ACC signal; A combined acceleration average value calculation unit for calculating the combined acceleration average value within a preset time window based on the second ACC signal; An energy concentration degree calculation unit for calculating the energy concentration degree within the preset time window based on the second PPG signal; A judgment unit for determining whether it is in a motion state based on the combined acceleration average value and the energy concentration degree; A time-domain heart rate determination unit for determining heart rate information based on time-domain information if it is not in the motion state; A spectrum acquisition unit for acquiring an ACC spectrum and a PPG spectrum if it is in the motion state; A same-frequency judgment unit for judging whether there is a same-frequency situation based on the relationship between the ACC spectrum and the heart rate at the previous moment; A spectral subtraction processing unit for performing spectral subtraction processing on the PPG spectrum if there is the same-frequency situation; A frequency-domain heart rate determination unit for determining heart rate information in the PPG spectrum after spectral subtraction processing and the PPG spectrum without spectral subtraction processing based on the frequency tracking algorithm.
9. A sports heart rate detection device, characterized in that, It includes: A central processing unit, a memory, an input-output interface, a wired or wireless network interface, and a power supply; The memory is a transient memory or a persistent memory; The central processing unit is configured to communicate with the memory and execute the instruction operations in the memory on the device to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, It includes instructions that, when run on a computer, cause the computer to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Real-time heart rate detection method and system
CN110801214A
Heart rate prediction and model training method and system, wearable device and medium
CN119862375A
Heart rate detection method and device based on electrocardiosignal and readable storage medium
CN119908693A
System and method of photoplethysmography based heart-rate estimation in presence of motion artifacts
US20210030289A1
Deep learning-based heart rate detection method and wearable device
US20240156361A1
Cited By
Heart rate data analysis system and method
CN120643201A
Exercise heart rate acquisition method and device and readable storage medium
CN120827358A
A method, device and readable storage medium for acquiring a motion heart rate
CN120827358B