Heart rate detection method and device for body fat scale
By combining bioelectric impedance analysis and photoplethysmography, the peak position difference between the two signal sources is extracted and corrected, and the problems of high noise and poor accuracy in heart rate detection in traditional body fat scales are solved, achieving higher accuracy heart rate measurement.
Patent Information
- Application Number
- CN202510707535.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-05-29
AI Technical Summary
Traditional body fat scales are susceptible to external factors when detecting heart rate, resulting in strong noise in the heart rate signal, affecting the accuracy and reliability of the measurement.
Combining bioelectrical impedance analysis (BIA) and photoplethysmography (PPG) methods, signal correction is performed to improve the accuracy of heart rate detection by extracting and analyzing the peak position differences of the two signals.
Through differential peak analysis and correction, the accuracy and reliability of heart rate detection are significantly improved, the system's adaptability to external interference is enhanced, and the impact of noise is reduced.
Smart Images

Figure CN120241011A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data recognition, and particularly relates to a heart rate detection method and device for a body fat scale. Background Art
[0002] With the improvement of people's health awareness, various intelligent devices that can measure body fat and heart rate have emerged in the market, especially body fat scales. Body fat scales use Bioelectrical Impedance Analysis (BIA) technology to detect physiological parameters such as the body fat percentage of users, and more and more body fat scales are beginning to integrate heart rate detection functions. However, when traditional body fat scales perform heart rate detection, there is a relatively large noise problem, which affects the accuracy and reliability of heart rate measurement.
[0003] The common heart rate detection method for current body fat scales is based on Bioelectrical Impedance Analysis (BIA) technology. BIA technology estimates body composition and heart rate by setting electrodes on the body fat scale and measuring the current passing through the body. However, due to the different electrode designs of body fat scales and the contact states between users and devices, the BIA method is easily affected by external factors such as skin resistance changes and poor contact, resulting in strong noise in the heart rate signal. In severe cases, the heart rate waveform cannot be accurately identified, and thus the heart rate detection accuracy is relatively low. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide a heart rate detection method and device for a body fat scale to solve the technical problem that the traditional technology is easily affected by external factors, resulting in strong noise in the heart rate signal.
[0005] The first aspect of the embodiments of the present invention provides a heart rate detection method for a body fat scale. The heart rate detection method for the body fat scale is applied to a body fat scale, and the body fat scale includes a bioelectrical resistance acquisition module and a photoplethysmography acquisition module. The heart rate detection method for the body fat scale includes: Obtaining first heartbeat data collected based on bioelectrical impedance analysis and second heartbeat data collected based on photoplethysmography; Extracting multiple first peak positions from the first heartbeat data and multiple second peak positions from the second heartbeat data; Extracting a first differential peak position from the multiple first peak positions and a second differential peak position from the multiple second peak positions; the first differential peak position or the second differential peak position refers to a peak position where the peak distributions of the first peak position and the second peak position in the same order are different; Generating a corrected peak position according to the multiple first peak positions, the multiple second peak positions, the first differential peak position, and the second differential peak position; Calculate the user's heart rate based on the peak time intervals among the calibrated peak positions.
[0006] Further, the step of extracting multiple first peak positions from the first heartbeat data includes: Intercept a fragment waveform data with a fixed length in the first heartbeat data; Collect multiple first sampling point data from the fragment waveform data based on a preset sampling frequency; wherein, the fragment waveform data includes the entire heartbeat cycle waveform data; Arrange the amplitudes of the multiple first sampling point data from largest to smallest to obtain ordered first sampling point data; Use the first sampling point data at a preset position in the ordered first sampling point data as the peak threshold; the preset position includes the tenth position in the ordered sampling point data; Collect multiple second sampling point data from the first heartbeat data based on a preset sampling frequency; Extract target second sampling point data greater than the peak threshold from the multiple second sampling point data; Extract adjacent sampling point data from the multiple target second sampling point data as a peak data set; the adjacent sampling point data refers to the target second sampling point data with adjacent sampling orders in the first heartbeat data; Use the average position of multiple consecutive sampling point data in the peak data set as the first peak position.
[0007] Further, the step of extracting the first differential peak position from the multiple first peak positions and extracting the second differential peak position from the multiple second peak positions includes: Calculate multiple first abscissa differences between adjacent first peak positions in the first heartbeat data; Calculate multiple second abscissa differences between adjacent second peak positions in the second heartbeat data; Subtract the second abscissa differences in the same order from the first abscissa differences to obtain an error value; Obtain the to-be-corrected first peak position and the to-be-corrected second peak position corresponding to the error value greater than the first threshold; Obtain the sample first peak position and the sample second peak position corresponding to the error not greater than the first threshold; Calculate a first similarity between the first peak data set corresponding to the to-be-corrected first peak position and the second peak data set corresponding to the sample first peak position; Calculate a second similarity between the first peak data set corresponding to the to-be-corrected second peak position and the second peak data set corresponding to the sample second peak position; If the first similarity is not greater than the second threshold and the second similarity is greater than the second threshold, then use the first peak position corresponding to the error value as the first differential peak position; If the first similarity is greater than the second threshold and the second similarity is not greater than the second threshold, then use the second peak position corresponding to the error value as the second differential peak position.
[0008] Further, the step of calculating the first similarity between the first peak data set corresponding to the first peak position to be corrected and the second peak data set corresponding to the sample first peak position includes: Calculate multiple first waveform features of the first peak data set; the multiple first waveform features include peak value, mean value, rise time, fall time, skewness and variance; Calculate multiple second waveform features of the second peak data set; Use the similarity between the multiple first waveform features and the multiple second waveform features as the first similarity.
[0009] Further, after the step of calculating the second similarity between the first peak data set corresponding to the first peak position to be corrected and the second peak data set corresponding to the sample second peak position, it further includes: If both the first similarity and the second similarity are less than the second threshold, then re-obtain new first heartbeat data and new second heartbeat data, and extract the first differential peak position in the new first heartbeat data and the second differential peak position in the new second heartbeat data.
[0010] Further, the step of generating a corrected peak position according to the multiple first peak positions, the multiple second peak positions, the first differential peak position and the second differential peak position includes: If the number of first differential peak positions is less than the number of second differential peak positions, then correct the first differential peak positions among the multiple first peak positions based on the multiple second peak positions, and use the corrected multiple first peak positions as the corrected peak position; If the number of first differential peak positions is not less than the number of second differential peak positions, then correct the second differential peak positions among the multiple second peak positions based on the multiple first peak positions, and use the corrected multiple second peak positions as the corrected peak position.
[0011] Further, if the number of the first differential peak positions is less than the number of the second differential peak positions, the step of correcting the first differential peak positions among the plurality of first peak positions based on the plurality of second peak positions and using the corrected plurality of first peak positions as the corrected peak positions includes: Obtaining a target second peak position having the same order as the first differential peak position; Replacing the first differential peak positions among the plurality of first peak positions with the target second peak positions having the same order to obtain the corrected plurality of first peak positions; Using the corrected plurality of first peak positions as the corrected peak positions.
[0012] A second aspect of the embodiments of the present invention provides a heart rate detection device for a body fat scale, including: An acquisition unit, configured to acquire first heartbeat data collected based on bioelectrical impedance analysis and second heartbeat data collected based on photoplethysmography; A first extraction unit, configured to extract a plurality of first peak positions from the first heartbeat data and extract a plurality of second peak positions from the second heartbeat data; A second extraction unit, configured to extract first differential peak positions from the plurality of first peak positions and extract second differential peak positions from the plurality of second peak positions; the first differential peak positions or the second differential peak positions refer to peak positions where there are differences in the peak distributions of the first peak positions and the second peak positions in the same order; A generation unit, configured to generate corrected peak positions according to the plurality of first peak positions, the plurality of second peak positions, the first differential peak positions, and the second differential peak positions; A calculation unit, configured to calculate the user's heart rate based on the peak time intervals in the corrected peak positions.
[0013] A third aspect of the embodiments of the present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the heart rate detection method of the body fat scale described in the first aspect above are implemented.
[0014] A fourth aspect of the embodiments of the present invention provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps in the heart rate detection method of the body fat scale described in the first aspect above are implemented.
[0015] The beneficial effects of the embodiments of the present invention compared with the prior art are as follows: By extracting the positions of multiple peaks in the BIA and PPG signals and analyzing the differences between them (i.e., the first differential peak position and the second differential peak position), the present invention can identify and correct the differences between the two signal sources. This correction method based on the differential peak positions can effectively eliminate the deviation of the two data sources in the peak positions, thereby reducing the errors caused by poor contact, interference noise, or postural changes. Traditional methods often rely only on the peaks of a single signal source and are easily affected by noise, while the present invention provides a more robust and accurate peak correction scheme by comparing the peak position differences of the two signals. By comprehensively considering the data of the two detection signals and the differential peak positions, the present invention significantly enhances the adaptability of the system to external interferences (such as poor skin contact, device movement, environmental light changes, etc.). In actual use, the BIA and PPG signals may be affected by different interference sources, but by fusing the data of the two and performing peak difference analysis, the influence of interference can be effectively reduced. By combining the two heart rate detection methods of BIA and PPG and through differential peak analysis and correction, the problems of large noise and poor accuracy existing in the heart rate measurement of traditional body fat scales are overcome, and the accuracy and reliability of heart rate detection are significantly improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for use in the embodiments or the description of related technologies. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can also obtain other drawings without creative efforts based on these drawings.
[0017] Figure 1 FIG. shows a schematic flowchart of a heart rate detection method for a body fat scale provided by the present invention; Figure 2 FIG. shows a schematic diagram of a heart rate detection device for a body fat scale provided by an embodiment of the present invention; Figure 3 FIG. shows a schematic diagram of a terminal device provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0018] In the following description, specific details such as specific system structures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present invention. However, those skilled in the art should clearly understand that the present invention can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present invention.
[0019] An embodiment of the present invention provides a heart rate detection method and device for a body fat scale to solve the technical problem of optimizing the power consumption of a beacon device while ensuring positioning accuracy.
[0020] First, the present invention provides a heart rate detection method for a body fat scale. Please refer to Figure 1 , Figure 1 which shows a schematic flowchart of a heart rate detection method for a body fat scale provided by the present invention. As Figure 1 shown, the heart rate detection method for the body fat scale may include the following steps: Step 101: Obtain first heartbeat data collected based on bioelectrical impedance analysis and second heartbeat data collected based on photoplethysmography; The body fat scale measures the impedance change of the body to current through a bioelectrical impedance module (Bioimpedance Analysis, BIA). These changes are closely related to the heartbeat rhythm. The body fat scale mainly uses this method when measuring body fat and body water, but it can also indirectly obtain heart rate information. A weak current is sent through the electrodes to measure the resistance change of body tissues. The heartbeat will cause tiny fluctuations in the resistance of body tissues. By analyzing these fluctuations, the heart rate can be inferred.
[0021] Photoplethysmography (PPG) detects changes in blood flow through an optical sensor (usually an LED and a photodiode). When the heart beats, the blood flow will cause tiny changes in the skin color. The sensor calculates the heart rate by detecting these changes. When the user stands on the scale, the sensor measures the blood flow changes through the tiny blood vessels on the soles of the feet to detect the heart rate. This method usually requires the user to stay still to ensure the accuracy of the measurement.
[0022] Step 102: Extract multiple first peak positions from the first heartbeat data and extract multiple second peak positions from the second heartbeat data; In the bioelectrical impedance data, the peaks correspond to the periodic changes of the heartbeat signal. Extracting multiple peak positions can help determine the rhythm of the heartbeat. Similarly, the peak positions extracted based on the photoplethysmography data can also provide periodic information about the heartbeat.
[0023] Specifically, step 102 specifically includes steps 1021 to 1028: Step 1021: Intercept a fragment waveform data with a fixed length in the first heartbeat data; The purpose of this step is to select a data segment containing a complete heartbeat cycle from the original first heartbeat data. Usually, the heartbeat waveform is periodic. Intercepting a complete cycle of data can help the algorithm accurately analyze the peak positions.
[0024] Step 1022: Collect multiple first sampled point data from the segment waveform data based on a preset sampling frequency; wherein, the segment waveform data includes the entire heartbeat cycle waveform data; In this step, the segment waveform is sampled using a preset sampling frequency. The sampling frequency determines the time resolution of the data, and by high-frequency sampling, the details of the heartbeat signal can be captured more precisely.
[0025] Step 1023: Arrange the amplitudes of the multiple first sampled point data from largest to smallest to obtain ordered first sampled point data; This operation sorts the sampled point data by amplitude, from largest to smallest. The purpose is to provide a basis for determining the threshold of the wave peak subsequently. The sorting process will help reveal the most significant fluctuating part in the signal, that is, the wave peak with the largest amplitude.
[0026] Step 1024: Use the first sampled point data at a preset position in the ordered first sampled point data as the wave peak threshold; the preset position includes the tenth position in the ordered sampled point data; Among the sorted sampled point data, select the point at the preset position as the wave peak threshold. This preset position is usually the tenth position in the ordered data, that is, the 10% position of the sorted data. The preset position is used to "intercept" a section of wave peak data in the sampled point data, which can be the tenth position or the eighth position, etc., and can be set based on the actual application scenario.
[0027] Step 1025: Collect multiple second sampled point data from the first heartbeat data based on a preset sampling frequency; In this step, continue to sample the original heartbeat waveform data (complete data) using a preset sampling frequency and obtain a second set of sampled point data. These sampled point data will be used for further analysis of the wave peaks in the heartbeat waveform.
[0028] Step 1026: Extract the target second sampled point data greater than the wave peak threshold from the multiple second sampled point data; Among the second set of sampled points, screen out the data points whose amplitudes are greater than the previously calculated wave peak threshold. According to the definition of the wave peak, the wave peak corresponds to the part with a larger amplitude in the waveform. Therefore, extracting the data points greater than the threshold can effectively identify the key wave peaks of the heartbeat waveform.
[0029] Step 1027: Extract the adjacent sampled point data among the multiple target second sampled point data as the wave peak data set; the adjacent sampled point data refers to the target second sampled point data that are adjacent in the sampling order in the first heartbeat data; At this step, select those adjacent sampling points in the target second sampling point data from the time series. These adjacent points represent that the sampling points are in the same peak region.
[0030] Step 1028: Use the average position of multiple consecutive sampling point data in the peak data set as the first peak position.
[0031] By calculating the average position of adjacent peak data, an accurate first peak position is obtained. This is because a peak is usually not a single sampling point but a region, and the peak data set represents multiple sampling points in this region. By calculating the average position of these points, the central position of the peak can be determined more stably and accurately.
[0032] In the embodiments corresponding to steps 1021 to 1028, by gradually processing the signal data and combining methods such as sampling, sorting, threshold setting, and adjacent point calculation, the accurate peak position can be effectively extracted from the heartbeat waveform. Each step aims to reduce the interference of noise and ensure the verification and confirmation of the peak position from different angles. The overall process emphasizes improving the accuracy of heart rate detection through data preprocessing, threshold selection, and precise calculation.
[0033] Among them, the extraction logic of the second peak position is the same as that of the first peak position. For the specific execution logic, please refer to steps 1021 to 1028.
[0034] Step 103: Extract the first differential peak position from the multiple first peak positions, and extract the second differential peak position from the multiple second peak positions; the first differential peak position or the second differential peak position refers to the peak position where the peak distributions of the first peak position and the second peak position in the same order are different; Between the first heartbeat data (bioelectrical impedance data) and the second heartbeat data (photoplethysmography data), there may be a situation where the peak positions in the same order are inconsistent. This inconsistent peak position is called the "differential peak position". The appearance of these differential peaks may be caused by factors such as external noise, signal interference, and sensor errors.
[0035] Similar to the first differential peak, extract the peaks in the second heartbeat data that are inconsistent with the peak positions in the bioelectrical impedance data to help identify potential errors in the signal.
[0036] Specifically, step 103 specifically includes steps 1031 to 1039: Step 1031: Calculate multiple first abscissa differences between adjacent first peak positions in the first heartbeat data; First, it is necessary to extract the positions of multiple peaks from the bioelectrical impedance data. The abscissa differences (i.e., the time intervals between adjacent peaks) of these peak positions will be calculated. Through these differences, the periodic differences between different peaks can be understood, providing a quantitative analysis of the signal periodicity.
[0037] Step 1032: Calculate multiple second abscissa differences between adjacent second peak positions in the second heartbeat data; The same operation will be performed on the heartbeat data collected by photoplethysmography to calculate the time interval (abscissa difference) between adjacent peaks. The purpose of this is to obtain the peak interval information in the second heartbeat data for subsequent comparison.
[0038] Step 1033: Subtract the first abscissa differences and the second abscissa differences in the same order to obtain an error value; Pair up the abscissa differences calculated from the bioelectrical impedance and photoplethysmography data one by one and calculate the difference between them. This error value represents the difference between the peak positions of the two signal data within the same time period, reflecting the differences in signal acquisition or interference.
[0039] Step 1034: Obtain the first peak position to be corrected and the second peak position to be corrected corresponding to the error value greater than the first threshold; For the differential peaks with error values greater than the preset first threshold, further correction is required. Here, the "peak position to be corrected" refers to those peak positions that may have inconsistent signals due to noise or other interference factors. By setting a threshold, these peak positions that need to be corrected are screened out.
[0040] Step 1035: Obtain the sample first peak position and the sample second peak position corresponding to the error not greater than the first threshold; In contrast to the previous step, if the error value is less than or equal to the first threshold, it means that the difference between these two peak positions is within an acceptable range. Therefore, these peaks can be used as "sample peak positions" for subsequent processing (it can be understood that the sample peak positions are the peak positions in the normal state). The sample peak positions are used to compare with the peak positions to be corrected to determine whether correction is necessary.
[0041] Step 1036: Calculate the first similarity between the first peak data set corresponding to the first peak position to be corrected and the second peak data set corresponding to the sample first peak position; Here, it is necessary to calculate the similarity between the set of first peak position data to be corrected (from bioelectrical impedance data) and the set of sample first peak position data (from photoplethysmography data). The similarity can be calculated by various methods, such as correlation, cross-validation, etc. The purpose is to quantify the degree of matching of the two peak sets in time. The following similarity calculation method is adopted in this embodiment: Specifically, step 1036 specifically includes steps A1 to A3: Step A1: Calculate multiple first waveform features of the set of first peak data; the multiple first waveform features include peak value, mean value, rise time, fall time, skewness, and variance; In this step, first, multiple waveform features are extracted from the set of first peak data (usually the peak data in the bioelectrical impedance signal). These features are used to describe the shape and characteristics of the peak, including but not limited to: Peak value: The maximum amplitude of the peak, representing the most significant point of the waveform.
[0042] Mean value: The average value of the waveform within one cycle or interval, reflecting the overall trend of the waveform.
[0043] Rise time: The time required for the waveform to reach the peak value from the starting point, reflecting the rising speed of the waveform.
[0044] Fall time: The time required for the waveform to fall from the peak value to the lowest point, reflecting the falling speed of the waveform.
[0045] Skewness: A measure of the skewness of the waveform, indicating whether the waveform is symmetric. If the skewness is positive, it means the waveform is skewed towards one side of the peak value; if it is negative, it means the waveform is skewed towards the other side.
[0046] Variance: The degree of fluctuation of the waveform data, describing the degree of dispersion of the waveform amplitude. High variance usually means there are large variations in the waveform.
[0047] These features can describe the shape, change speed, and symmetry of the peak data from different angles, thus providing detailed feature information for subsequent similarity calculation.
[0048] Step A2: Calculate multiple second waveform features of the set of second peak data; Next, the same type of waveform features are also extracted from the set of second peak data. This process is similar to the process of extracting the features of the first peak data before, aiming to ensure that the two sets of data are compared in the same dimension.
[0049] This includes calculating features such as the peak value, mean value, rise time, fall time, skewness, and variance of the second peak data. By extracting these features, it can ensure that the two sets of peak data are compared and analyzed from multiple aspects.
[0050] Step A3: Take the similarity between the multiple first waveform features and the multiple second waveform features as the first similarity.
[0051] After obtaining the features of the two sets of peak data, it is necessary to calculate the similarity between these two sets of features. The similarity calculation is to quantify the matching degree of the two sets of peak data in terms of shape, amplitude, speed, etc.
[0052] Among them, the similarity between the multiple first waveform features and the multiple second waveform features is calculated by the Euclidean distance.
[0053] The similarity between the multiple first waveform features and the multiple second waveform features can also be calculated in the following way: ;
[0054] ;
[0055] Among them, represents the peak value in the first waveform feature, represents the peak value in the second waveform feature, represents the difference between the two peak values, represents the maximum value between the two peak values, represents the mean value in the first waveform feature, represents the mean value in the second waveform feature, represents the difference between the two mean values, represents the maximum value between the two mean values, represents the rise time in the first waveform feature, represents the rise time in the second waveform feature, represents the difference between the two rise times, represents the maximum value between the two rise times, represents the fall time in the first waveform feature, represents the fall time in the second waveform feature, represents the difference between the two fall times, represents the maximum value between the two fall times, represents the skewness in the first waveform feature, represents the skewness in the second waveform feature, represents the difference between the two skewnesses, represents the maximum value between the two skewnesses, represents the variance in the first waveform feature, represents the variance in the second waveform feature, represents the difference between the two variances, represents the maximum value between the two variances, Indicates the similarity.
[0056] The above calculation process synthesizes multiple waveform features and unifies them within a framework, which can comprehensively reflect the similarity between two waveforms.
[0057] In the embodiments corresponding to steps A1 to A3, by extracting features from two groups of peak data and calculating the similarity between these features, the matching degree in terms of shape, amplitude, symmetry, etc. is evaluated. The extracted waveform features include peak value, mean value, rise time, fall time, skewness, and variance, which respectively reflect the properties of the peaks from different perspectives. The similarity calculation comprehensively considers all features and obtains a final similarity value through mathematical methods, which is used to determine whether two peak data sets are similar, thereby helping to identify the positions of different peaks. This method effectively improves the accuracy of peak matching and reduces the interference of errors and noise.
[0058] Step 1037: Calculate a second similarity between the first peak data set corresponding to the to-be-corrected second peak position and the second peak data set corresponding to the sample second peak position; The same operation will compare the data set of the to-be-corrected second peak position (from photoplethysmography data) and the data set of the sample second peak position (from bioelectrical impedance data), and calculate the second similarity. By comparing the similarity between the two data sets, the matching situation between the peaks is further confirmed.
[0059] Step 1038: If the first similarity is not greater than the second threshold and the second similarity is greater than the second threshold, then use the first peak position corresponding to the error value as the first different peak position; In this step, conditional judgment is used to decide whether to use a certain peak position as the different peak position. If the first similarity is less than or equal to the second threshold (indicating that the current peak of the bioelectrical impedance data has a large difference from the normal peak), and the second similarity is greater than the second threshold (indicating that the current peak of the photoplethysmography data is closer to the normal peak), then it is considered that there is a problem with the peak of the bioelectrical impedance data, and it is used as the "first different peak position".
[0060] Step 1039: If the first similarity is greater than the second threshold and the second similarity is not greater than the second threshold, then use the second peak position corresponding to the error value as the second different peak position.
[0061] If the situation is reversed, that is, the first similarity is relatively large (indicating that the current peak of the bioelectrical impedance data is closer to the normal peak), but the second similarity is relatively small (indicating that there is a large difference between the current peak of the photoplethysmography data and the normal peak), then it is considered that the peak position of the photoplethysmography data is incorrect, and it is taken as the "second differential peak position".
[0062] In the embodiments corresponding to steps 1031 to 1039, by calculating the abscissa difference between adjacent peaks, analyzing the peak errors, and combining the similarity calculation, the differential peak positions in the two data sources are accurately identified and corrected. Through this method, the peaks affected by external interference or device errors can be effectively found and corrected, thereby improving the accuracy of heart rate detection. This way of multiple comparison and similarity analysis enhances the robustness of the method, reduces the influence of noise and interference, and makes the final peak positioning more reliable.
[0063] As an alternative embodiment of the present invention, after step 1037, it further includes: if both the first similarity and the second similarity are less than the second threshold, new first heartbeat data and new second heartbeat data are re-obtained, and the first differential peak position in the new first heartbeat data and the second differential peak position in the new second heartbeat data are extracted.
[0064] The first similarity is used to measure the matching degree between the first peak data and the sample first peak data; the second similarity is used to measure the matching degree between the second peak data and the sample second peak data.
[0065] If both of these similarities are less than the preset second threshold, it indicates that there are significant differences between these two sets of peak data, which may be due to interference, noise, or unstable signals during data acquisition. At this time, data needs to be re-acquired to ensure more accurate subsequent peak correction.
[0066] In the case where the similarity values do not meet the requirements, the system will re-acquire data. The new first heartbeat data usually means re-acquiring the heartbeat waveform data from the bioelectrical impedance device; the new second heartbeat data means re-acquiring the heartbeat waveform data from the photoplethysmography.
[0067] The purpose of re-acquiring data is to ensure that the obtained waveform data has higher quality and stability, and reduce the influence caused by interference, noise, or device errors. By re-acquiring, new peak data can be obtained, providing a more reliable data basis for the next correction work.
[0068] After re-acquiring the new first heartbeat data and the second heartbeat data, the system needs to extract the first differential peak position and the second differential peak position again.
[0069] Step 104: Generate a corrected peak position based on the multiple first peak positions, the multiple second peak positions, the first differential peak position, and the second differential peak position; By comparing the peak positions in the first heartbeat data and the second heartbeat data, as well as their differential peak positions, the algorithm can comprehensively consider the peak information of these two data sources to generate a corrected peak position. This process helps to correct the errors in the original data and make the generated peak position more accurate.
[0070] Specifically, step 104 specifically includes steps 1041 to 1042: Step 1041: If the number of the first differential peak positions is less than the number of the second differential peak positions, correct the first differential peak positions among the multiple first peak positions based on the multiple second peak positions, and use the corrected multiple first peak positions as the corrected peak position; The number of the first differential peak positions being less than the number of the second differential peak positions indicates that there are fewer abnormal points among the multiple first peak positions and less data noise. Therefore, the heart rate data calculated based on the first heartbeat data is more accurate. Thus, taking the multiple first peak positions as the reference data, correct the first differential peak positions among the multiple first peak positions through the multiple second peak positions (it can be known from the above solution that the second peak position with the same order as the first differential peak position is normal data).
[0071] Specifically, step 1041 specifically includes steps B1 to B3: Step B1: Obtain the target second peak positions having the same order as the first differential peak positions; The system needs to find the target second peak positions according to the order of the first differential peak positions. These target second peak positions refer to the corresponding peak positions in the second heartbeat data that match the sample peak positions and correspond to the first differential peak positions.
[0072] This operation ensures that during the correction process, a consistent order and association are maintained between the first peak positions and the second peak positions. In other words, the system selects the corresponding positions in the second peak data by matching the order of the first peak positions to ensure the correspondence between the two.
[0073] Step B2: Replace the first differential peak positions among the multiple first peak positions with the target second peak positions having the same order to obtain the corrected multiple first peak positions; In this step, the system replaces the first differential peak positions among the multiple first peak positions with the target second peak positions obtained from the second peak data in order. In this way, the system can reduce the deviation or error caused by the differential peak positions.
[0074] For example, if a specific first difference peak position deviates greatly, the system will replace this position with the corresponding target second peak position, and after correction, a new and more accurate peak position is obtained.
[0075] Step B3: Use the corrected multiple first peak positions as the corrected peak positions.
[0076] The corrected peak positions are obtained by correcting the first peak data, and they will be used for subsequent peak analysis or data processing. In this way, the corrected peak positions will be more in line with the actual waveform trend and sample data, thereby improving the accuracy and reliability of subsequent processing.
[0077] In the embodiments corresponding to steps B1 to B3, the first peak data can be corrected by accurately matching the second peak data, thereby ensuring that the final peak positions are more accurate and reliable.
[0078] Step 1042: If the number of the first difference peak positions is not less than the number of the second difference peak positions, correct the second difference peak positions among the multiple second peak positions based on the multiple first peak positions, and use the corrected multiple second peak positions as the corrected peak positions.
[0079] The number of the first difference peak positions not less than the number of the second difference peak positions indicates that there are fewer outliers among the multiple second peak positions and less data noise. Therefore, the heart rate data calculated based on the second heartbeat data is more accurate. Therefore, using the multiple second peak positions as the reference data, correct the second difference peak positions among the multiple second peak positions through the multiple first peak positions (according to the above solution, the first peak position with the same order as the second difference peak position is normal data).
[0080] The specific execution principle of step 1042 is similar to that of steps B1 to B3. For the specific execution logic, refer to steps B1 to B3 and will not be elaborated here.
[0081] In the embodiments corresponding to steps 1041 to 1042, determine the correction priority by comparing the number of the first difference peak positions and the number of the second difference peak positions, so as to select the most suitable set of peak data for correction.
[0082] Step 105: Calculate the user's heart rate based on the peak time intervals in the corrected peak positions.
[0083] By analyzing the peak time intervals in the calibrated peak positions, the user's heart rate can be accurately calculated. Usually, the heart rate is deduced by measuring the time interval between adjacent peaks (i.e., the heartbeat cycle). Due to the application of calibrated peak positions, this process can better remove noise and errors, obtaining a more accurate heart rate value. Calculating the heart rate based on the peak time interval is a traditional technique and will not be elaborated here.
[0084] In the embodiments corresponding to steps 101 to 105, by extracting multiple peak positions in the BIA and PPG signals and analyzing the differences between them (i.e., the first differential peak position and the second differential peak position), the present invention can identify and correct the differences between the two signal sources. This calibration method based on differential peak positions can effectively eliminate the deviation of the peak positions of the two data sources, thereby reducing the errors caused by poor contact, interference noise, or posture changes. Traditional methods often rely only on the peaks of a single signal source and are easily affected by noise. However, the present invention provides a more robust and accurate peak calibration scheme by comparing the peak position differences of the two signals. By comprehensively considering the data of the two detection signals and the differential peak positions, the present invention significantly enhances the system's adaptability to external interferences (such as poor skin contact, device movement, environmental light changes, etc.). In actual use, the BIA and PPG signals may be affected by different interference sources, but by fusing the data of the two and performing peak difference analysis, the influence of interference can be effectively reduced. By combining the two heart rate detection methods of BIA and PPG and through differential peak analysis and calibration, the problems of large noise and poor accuracy in heart rate measurement of traditional body fat scales are overcome, and the accuracy and reliability of heart rate detection are significantly improved.
[0085] Such as Figure 2 The present invention provides a heart rate detection device for a body fat scale. Please refer to Figure 2 , Figure 2 shows a schematic diagram of a heart rate detection device for a body fat scale provided by the present invention. Such as Figure 2 shown, a heart rate detection device for a body fat scale includes: An acquisition unit 21, configured to acquire first heartbeat data collected based on bioelectrical impedance analysis and second heartbeat data collected based on photoplethysmography; A first extraction unit 22, configured to extract multiple first peak positions from the first heartbeat data and extract multiple second peak positions from the second heartbeat data; A second extraction unit 23, configured to extract a first differential peak position from the multiple first peak positions and extract a second differential peak position from the multiple second peak positions; the first differential peak position or the second differential peak position refers to the peak position where the peak distributions of the first peak position and the second peak position in the same order are different; A generating unit 24, configured to generate a corrected peak position according to the plurality of first peak positions, the plurality of second peak positions, the first differential peak position, and the second differential peak position. A calculating unit 25, configured to calculate a user's heart rate based on the peak time intervals in the corrected peak positions.
[0086] A heart rate detection device for a body fat scale provided by the present invention extracts a plurality of peak positions from BIA and PPG signals and analyzes the differences therebetween (i.e., the first differential peak position and the second differential peak position). The present invention can identify and correct the differences between the two signal sources. This correction method based on the differential peak positions can effectively eliminate the deviation of the two data sources in the peak positions, thereby reducing the errors caused by poor contact, interference noise, or posture changes. Traditional methods often rely only on the peaks of a single signal source and are easily affected by noise. However, the present invention provides a more robust and accurate peak correction scheme by comparing the peak position differences of the two signals. By comprehensively considering the data of the two detection signals and the differential peak positions, the present invention significantly enhances the adaptability of the system to external interferences (such as poor skin contact, device movement, ambient light changes, etc.). In actual use, the BIA and PPG signals may be affected by different interference sources. However, by fusing the data of the two and performing peak difference analysis, the influence of interference can be effectively reduced. By combining the two heart rate detection methods of BIA and PPG and performing differential peak analysis and correction, the problems of large noise and poor accuracy existing in the heart rate measurement of traditional body fat scales are overcome, and the accuracy and reliability of heart rate detection are significantly improved.
[0087] Figure 3 is a schematic diagram of a terminal device provided by an embodiment of the present invention. As Figure 3 shown, a terminal device 3 of this embodiment includes: a processor 30, a memory 31, and a computer program 32 stored in the memory 31 and executable on the processor 30, such as a heart rate detection program for a body fat scale. When the processor 30 executes the computer program 32, the steps in the above-mentioned embodiments of various heart rate detection methods for a body fat scale are implemented, such as Figure 1 the steps 101 to 105 shown. Alternatively, when the processor 30 executes the computer program 32, the functions of the respective units in the above-mentioned device embodiments are implemented, such as Figure 2 the functions of the units shown.
[0088] Exemplarily, the computer program 32 may be divided into one or more units, which are stored in the memory 31 and executed by the processor 30 to implement the present invention. The one or more units may be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program 32 in the terminal device 3. For example, the specific functions of the computer program 32 that can be divided into each unit are as follows: An acquisition unit, configured to acquire first heartbeat data collected based on bioelectrical impedance analysis and second heartbeat data collected based on photoplethysmography; A first extraction unit, configured to extract a plurality of first peak positions from the first heartbeat data and a plurality of second peak positions from the second heartbeat data; A second extraction unit, configured to extract a first differential peak position from the plurality of first peak positions and a second differential peak position from the plurality of second peak positions; the first differential peak position or the second differential peak position refers to a peak position where there is a difference in the peak distribution between the first peak position and the second peak position in the same order; A generation unit, configured to generate a corrected peak position according to the plurality of first peak positions, the plurality of second peak positions, the first differential peak position, and the second differential peak position; A calculation unit, configured to calculate the user's heart rate based on the peak time intervals in the corrected peak position.
[0089] The terminal device includes, but is not limited to, the processor 30 and the memory 31. Those skilled in the art can understand that Figure 3 This is only an example of a terminal device 3, and does not constitute a limitation on a terminal device 3. It may include more or fewer components than shown in the figure, or combine some components, or different components. For example, the terminal device may further include input / output devices, network access devices, buses, etc.
[0090] The processor 30 may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0091] The memory 31 may be an internal storage unit of the terminal device 3, such as a hard disk or memory of the terminal device 3. The memory 31 may also be an external storage device of the terminal device 3, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the terminal device 3. Further, the memory 31 may also include both the internal storage unit and the external storage device of the terminal device 3. The memory 31 is used to store the computer program and other programs and data required by the roaming control device. The memory 31 may also be used to temporarily store the data that has been output or will be output.
[0092] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The order of execution of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
[0093] It should be noted that the information interaction, execution process, etc. between the above-mentioned device / units, due to being based on the same concept as the method embodiment of the present invention, for its specific functions and the technical effects brought, please refer to the method embodiment part for details, and will not be elaborated here.
[0094] Those skilled in the art can clearly understand that for the convenience and conciseness of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of the present invention. The specific working process of the units and modules in the above system can refer to the corresponding process in the foregoing method embodiment, and will not be elaborated here.
[0095] The embodiment of the present invention also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned various method embodiments can be implemented.
[0096] An embodiment of the present invention provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal is enabled to execute the steps in the above-mentioned method embodiments when executed.
[0097] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, all or part of the processes in the above-mentioned method embodiments of the present invention can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the photographing device / terminal device, recording medium, computer memory, read-only memory (ROM), random access memory (Random Access Memory, RAM), electrical carrier signal, telecommunication signal, and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disc, etc.
[0098] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0099] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. A professional technician can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0100] In the embodiments provided by the present invention, it should be understood that the disclosed device / network device and method can be implemented in other ways. For example, the device / network device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there can 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 is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical or other forms.
[0101] The unit described as a separating component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, and it may be located in one place or distributed across multiple network units.
[0102] It should be understood that, as used in the specification of the present invention and the appended claims, the term "comprising" indicates the presence of the described features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or their combinations.
[0103] It should also be understood that the term "and / or" as used in the specification of the present invention and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0104] As used in the specification of the present invention and the appended claims, the term "if" may be interpreted, depending on the context, as "when", "once", "in response to determining", or "in response to detecting". Similarly, the phrases "if determined" or "if [the described condition or event] is detected" may be interpreted, depending on the context, as meaning "once determined", "in response to determining", "once [the described condition or event] is detected", or "in response to detecting [the described condition or event]".
[0105] In addition, in the description of the specification of the present invention and the appended claims, the terms "first", "second", "third", etc. are used only for differentiating descriptions and should not be construed as indicating or implying relative importance.
[0106] Reference to "one embodiment" or "some embodiments" or the like described in the specification of the present invention means that a particular feature, structure, or characteristic described in connection with that embodiment is included in one or more embodiments of the present invention. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear in different places in this specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in another way. The terms "comprising", "including", "having", and their variants all mean "including but not limited to", unless otherwise specifically emphasized in another way.
[0107] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A heart rate detection method for a body fat scale, characterized in that, The heart rate detection method of the body fat scale is applied to a body fat scale, which includes a bioelectrical impedance acquisition module and a photoplethysmography acquisition module. The heart rate detection method of the body fat scale includes: Obtaining first heartbeat data collected based on bioelectrical impedance analysis and second heartbeat data collected based on photoplethysmography; Extracting multiple first peak positions from the first heartbeat data and multiple second peak positions from the second heartbeat data; Extracting a first differential peak position from the multiple first peak positions and a second differential peak position from the multiple second peak positions; the first differential peak position or the second differential peak position refers to the peak position where the peak distributions of the first peak position and the second peak position in the same order are different; Generating a corrected peak position based on the multiple first peak positions, the multiple second peak positions, the first differential peak position, and the second differential peak position; Calculating the user's heart rate based on the peak time intervals in the corrected peak position.
2. The heart rate detection method of the body fat scale according to claim 1, wherein, The step of extracting multiple first peak positions from the first heartbeat data includes: Intercepting a segment waveform data with a fixed length in the first heartbeat data; Collecting multiple first sampling point data in the segment waveform data based on a preset sampling frequency; wherein, the segment waveform data includes the entire heartbeat cycle waveform data; Arranging the amplitudes of the multiple first sampling point data from largest to smallest to obtain ordered first sampling point data; Taking the first sampling point data at a preset position in the ordered first sampling point data as the peak threshold; the preset position includes the tenth position in the ordered sampling point data; Collecting multiple second sampling point data in the first heartbeat data based on a preset sampling frequency; Extracting target second sampling point data greater than the peak threshold from the multiple second sampling point data; Extracting adjacent sampling point data from the multiple target second sampling point data as a peak data set; the adjacent sampling point data refers to the target second sampling point data adjacent in sampling order in the first heartbeat data; Taking the average position of multiple consecutive sampling point data in the peak data set as the first peak position.
3. The heart rate detection method of the body fat scale according to claim 1, characterized in that The step of extracting a first differential peak position from the multiple first peak positions and a second differential peak position from the multiple second peak positions includes: Calculating multiple first abscissa differences between adjacent first peak positions in the first heartbeat data; Calculating multiple second abscissa differences between adjacent second peak positions in the second heartbeat data; Subtracting the first abscissa difference and the second abscissa difference in the same order to obtain an error value; Obtaining a first peak position to be corrected and a second peak position to be corrected corresponding to the error value greater than a first threshold; Obtaining a sample first peak position and a sample second peak position corresponding to the error not greater than the first threshold; Calculating a first similarity between the first peak data set corresponding to the first peak position to be corrected and the second peak data set corresponding to the sample first peak position; Calculate a second similarity between a first set of peak data corresponding to the second peak position to be corrected and a second set of peak data corresponding to the sample second peak position; If the first similarity is not greater than a second threshold and the second similarity is greater than the second threshold, then use the first peak position corresponding to the error value as the first differential peak position; If the first similarity is greater than the second threshold and the second similarity is not greater than the second threshold, then use the second peak position corresponding to the error value as the second differential peak position.
4. The heart rate detection method of the body fat scale according to claim 3, wherein, The step of calculating the first similarity between the first set of peak data corresponding to the first peak position to be corrected and the second set of peak data corresponding to the sample first peak position includes: Calculate multiple first waveform features of the first set of peak data; the multiple first waveform features include peak value, mean value, rise time, fall time, skewness, and variance; Calculate multiple second waveform features of the second set of peak data; Use the similarity between the multiple first waveform features and the multiple second waveform features as the first similarity.
5. The heart rate detection method of the body fat scale according to claim 3, wherein After the step of calculating the second similarity between the first set of peak data corresponding to the second peak position to be corrected and the second set of peak data corresponding to the sample second peak position, it further includes: If both the first similarity and the second similarity are less than the second threshold, then re-obtain new first heartbeat data and new second heartbeat data, and extract the first differential peak position in the new first heartbeat data and the second differential peak position in the new second heartbeat data.
6. The heart rate detection method of the body fat scale according to claim 1, characterized in that, The step of generating a corrected peak position according to the multiple first peak positions, the multiple second peak positions, the first differential peak position, and the second differential peak position includes: If the number of first differential peak positions is less than the number of second differential peak positions, then correct the first differential peak positions among the multiple first peak positions based on the multiple second peak positions, and use the corrected multiple first peak positions as the corrected peak position; If the number of first differential peak positions is not less than the number of second differential peak positions, then correct the second differential peak positions among the multiple second peak positions based on the multiple first peak positions, and use the corrected multiple second peak positions as the corrected peak position.
7. The heart rate detection method of the body fat scale according to claim 6, characterized in that, The step of, if the number of first differential peak positions is less than the number of second differential peak positions, then correcting the first differential peak positions among the multiple first peak positions based on the multiple second peak positions, and using the corrected multiple first peak positions as the corrected peak position includes: Obtain a target second peak position having the same order as the first differential peak position; Replace the first differential peak positions in the multiple first peak positions with the target second peak positions having the same order to obtain corrected multiple first peak positions; Use the corrected multiple first peak positions as the corrected peak position.
8. A heart rate detection device for a body fat scale, characterized in that, The heart rate detection device of the body fat scale includes: An acquisition unit, configured to acquire first heartbeat data collected based on bioelectrical impedance analysis and second heartbeat data collected based on photoplethysmography; A first extraction unit, configured to extract a plurality of first peak positions from the first heartbeat data and extract a plurality of second peak positions from the second heartbeat data; A second extraction unit, configured to extract a first differential peak position from the plurality of first peak positions and extract a second differential peak position from the plurality of second peak positions; the first differential peak position or the second differential peak position refers to a peak position where there is a difference in the peak distribution between the first peak position and the second peak position in the same order; A generation unit, configured to generate a corrected peak position according to the plurality of first peak positions, the plurality of second peak positions, the first differential peak position, and the second differential peak position; A calculation unit, configured to calculate the user's heart rate based on the peak time intervals in the corrected peak position.
9. A terminal device, characterized in that, The terminal device includes: a memory, a processor, and a heart rate detection program of a body fat scale stored on the memory and executable on the processor, and the heart rate detection program of the body fat scale is configured to implement the steps in the heart rate detection method of the body fat scale according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps in the heart rate detection method of the body fat scale according to any one of claims 1 to 7.
Citation Information
Patent Citations
Integrated detection system with function of measuring heart rate and body fat
CN111317472A
Heart beat detection method and heart beat detection device
JP2017042388A