Heart rate detection method and apparatus, storage medium, and terminal
Patent Information
- Application Number
- CN202610922542.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-24
- Publication Date
- 2026-08-18
AI Technical Summary
[0003]本申请提供一种心率检测方法、装置、存储介质以及终端,以解决现有心率检测方法存在的准确率低等技术问题
本申请提供一种心率检测方法,通过多个心率检测设备采集用户的脉搏波信号和加速度信号,依据相应的脉搏波信号和加速度信号计算各心率检测设备对应的心率值;采集用户的运动状态数据,基于运动状态数据确定用户的运动强度趋势;其中,运动强度趋势包括以下至少一种状态:运动状态数据满足第一预设条件时对应的第一强度变化趋势,运动状态数据满足第二预设条件时对应的第二强度变化趋势,以及运动状态数据满足第三预设条件时的第三强度变化趋势;确定多个心率检测设备中当前被选定用于输出心率数据的第一心率检测设备,基于第一心率检测设备对应的心率值计算用户的第一心率变化趋势,依据第一心率变化趋势和运动强度趋势确定第一心率检测设备对应的第一趋势判断结果,并确定第一心率检测设备在各心率检测设备中的漏光情况;基于第一趋势判断结果和漏光情况,从多个心率检测设备中确定目标心率检测设备,并输出目标心率检测设备对应的心率值。不同佩戴位置在运动中的受力和震动情况不同,通过多个设备采集信号并计算心率值,可以获取不同质量的信号源,有助于在后续步骤中更准确地评估每个设备的心率测量质量,并在一个设备受干扰或信号质量下降时,有其他设备的数据作为补充或替代,从而提高整体心率测量的稳定性和可靠性;在不同的运动强度下,心率的变化模式是不同的,采集并分析用户的运动状态数据,可以准确判断用户的运动强度趋势,有助于区分真实的心率变化和由运动伪影引起的异常心率读数,为后续判断心率数据的合理性提供了外部依据;确定当前输出心率数据的第一心率检测设备,然后计算该设备的心率变化趋势,并将其与用户的运动强度趋势进行对比分析,在逻辑层面检测数据是否符合生理规律,在物理层面进行漏光检测,实现了对当前输出数据的双重质量评估,为后续是否需要切换设备提供了关键依据;根据前面的趋势判断结果和漏光情况,系统能够智能地决定是否需要切换到其他心率检测设备以获取更准确的心率数据,这种自适应切换机制确保了即使在某个设备受干扰或信号质量下降的情况下,系统仍能输出稳定、可靠的心率值,从而提高了运动等动态场景下心率监测的实用性和用户体验。
Smart Images

Figure CN122581707A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wearable device technology, and in particular to a heart rate detection method, device, storage medium and terminal. Background Technology
[0002] Existing heart rate detection solutions are widely used in various wearable devices and portable health monitoring products. When users are at rest or engaged in low-intensity exercise, these solutions typically provide relatively accurate monitoring results. However, when users are engaged in high-intensity exercise, these existing solutions often have limitations, resulting in lower accuracy of heart rate recognition results. Summary of the Invention
[0003] This application provides a heart rate detection method, device, storage medium, and terminal to solve the technical problems of low accuracy in existing heart rate detection methods.
[0004] In a first aspect, embodiments of this application provide a heart rate detection method, the method comprising: The user's pulse wave signal and acceleration signal are collected by multiple heart rate detection devices, and the heart rate value corresponding to each heart rate detection device is calculated based on the corresponding pulse wave signal and acceleration signal. Collect user's motion state data and determine the user's motion intensity trend based on the motion state data; wherein, the motion intensity trend includes at least one of the following states: a first intensity change trend corresponding to the motion state data meeting a first preset condition, a second intensity change trend corresponding to the motion state data meeting a second preset condition, and a third intensity change trend corresponding to the motion state data meeting a third preset condition. The system identifies the first heart rate detection device currently selected for outputting heart rate data among multiple heart rate detection devices. Based on the heart rate value corresponding to the first heart rate detection device, it calculates the user's first heart rate change trend. Based on the first heart rate change trend and the exercise intensity trend, it determines the first trend judgment result corresponding to the first heart rate detection device and determines the light leakage situation of the first heart rate detection device in each heart rate detection device. Based on the first trend judgment result and light leakage, the target heart rate detection device is determined from multiple heart rate detection devices, and the heart rate value corresponding to the target heart rate detection device is output.
[0005] Secondly, embodiments of this application provide a heart rate detection device, the device comprising: The heart rate signal acquisition module is used to acquire the user's pulse wave signal and acceleration signal through multiple heart rate detection devices, and calculate the heart rate value corresponding to each heart rate detection device based on the corresponding pulse wave signal and acceleration signal. The motion data acquisition module is used to collect the user's motion state data and determine the user's motion intensity trend based on the motion state data; wherein, the motion intensity trend includes at least one of the following states: a first intensity change trend corresponding to the motion state data meeting a first preset condition, a second intensity change trend corresponding to the motion state data meeting a second preset condition, and a third intensity change trend corresponding to the motion state data meeting a third preset condition. The device verification module is used to determine the first heart rate detection device currently selected for outputting heart rate data among multiple heart rate detection devices, calculate the user's first heart rate change trend based on the heart rate value corresponding to the first heart rate detection device, determine the first trend judgment result corresponding to the first heart rate detection device based on the first heart rate change trend and the exercise intensity trend, and determine the light leakage situation of the first heart rate detection device in each heart rate detection device. The device switching module is used to determine the target heart rate detection device from multiple heart rate detection devices based on the first trend judgment result and light leakage, and output the heart rate value corresponding to the target heart rate detection device.
[0006] Thirdly, embodiments of this application provide a computer storage medium storing a plurality of instructions adapted for loading by a processor and executing the steps of the method described above.
[0007] Fourthly, embodiments of this application provide a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is adapted to be loaded by the processor and to execute the steps of the above-described method.
[0008] The beneficial effects of the technical solutions provided in some embodiments of this application include at least the following: This application provides a heart rate detection method, which involves collecting a user's pulse wave signal and acceleration signal from multiple heart rate detection devices, calculating the heart rate value corresponding to each heart rate detection device based on the corresponding pulse wave signal and acceleration signal; collecting the user's exercise state data, and determining the user's exercise intensity trend based on the exercise state data; wherein, the exercise intensity trend includes at least one of the following states: a first intensity change trend corresponding to the exercise state data meeting a first preset condition, a second intensity change trend corresponding to the exercise state data meeting a second preset condition, and a third intensity change trend corresponding to the exercise state data meeting a third preset condition; determining the first heart rate detection device currently selected for outputting heart rate data from among the multiple heart rate detection devices, calculating the user's first heart rate change trend based on the heart rate value corresponding to the first heart rate detection device, determining the first trend judgment result corresponding to the first heart rate detection device based on the first heart rate change trend and the exercise intensity trend, and determining the light leakage situation of the first heart rate detection device among the multiple heart rate detection devices; and determining the target heart rate detection device from among the multiple heart rate detection devices based on the first trend judgment result and the light leakage situation, and outputting the heart rate value corresponding to the target heart rate detection device. Different wearing positions experience varying forces and vibrations during exercise. By acquiring signals from multiple devices and calculating heart rate values, signal sources of varying quality can be obtained. This helps to more accurately evaluate the heart rate measurement quality of each device in subsequent steps. Furthermore, if one device experiences interference or signal quality degradation, data from other devices can supplement or replace it, thereby improving the overall stability and reliability of heart rate measurement. Heart rate variation patterns differ under different exercise intensities. Collecting and analyzing the user's exercise status data can accurately determine the user's exercise intensity trend, helping to distinguish between genuine heart rate changes and abnormal heart rate readings caused by motion artifacts. This provides external evidence for subsequent judgment of the reasonableness of heart rate data. The final output heart rate value is determined. The system first detects the heart rate from a heart rate monitoring device, then calculates the heart rate trend of that device and compares it with the user's exercise intensity trend. At the logical level, it checks whether the data conforms to physiological laws, and at the physical level, it detects light leakage. This dual quality assessment of the current output data provides a crucial basis for deciding whether to switch devices. Based on the trend judgment and light leakage, the system can intelligently decide whether to switch to another heart rate monitoring device to obtain more accurate heart rate data. This adaptive switching mechanism ensures that even if a device is interfered with or its signal quality deteriorates, the system can still output stable and reliable heart rate values, thereby improving the practicality and user experience of heart rate monitoring in dynamic scenarios such as exercise. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 An exemplary system architecture diagram of a heart rate detection method provided in this application embodiment; Figure 2 A flowchart illustrating a heart rate detection method provided in an embodiment of this application; Figure 3 A flowchart illustrating a heart rate detection method provided in an embodiment of this application; Figure 4 A flowchart illustrating a heart rate detection method provided in an embodiment of this application; Figure 5 A structural block diagram of a heart rate detection device provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application. Detailed Implementation
[0011] To make the features and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0012] In the following description, when referring to the accompanying drawings, the same numbers in different drawings denote the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0013] Existing heart rate monitoring solutions are widely used in various wearable devices and portable health monitoring products. They primarily utilize photoplethysmography (PPG) technology, employing multiple sensors to collect the user's pulse wave signals and combining them with acceleration data to calculate the heart rate value. When the user is at rest or engaged in low-intensity exercise, these solutions typically provide relatively accurate monitoring results.
[0014] However, when users engage in high-intensity exercise or experience drastic changes in their activity level, existing multi-sensor switching strategies often suffer from limitations such as severe motion artifact interference and sensor light leakage leading to signal distortion, making it difficult to accurately identify the signal quality of the currently used primary sensor. Specifically, during exercise, vigorous limb movements introduce a large amount of motion artifact interference, while changes in the skin's contact with the sensor cause light leakage, resulting in drastic changes in the amplitude and waveform of the pulse wave signal. The combined effect of these factors often leads to a significant decrease in pulse wave signal quality, or even severe distortion. Existing heart rate calculation methods based on pulse wave signals struggle to effectively distinguish between real heartbeat signals and interference signals when faced with strong motion artifact interference and severe light leakage, resulting in unstable or significantly distorted heart rate calculation results. This not only directly impacts user experience but also limits the practical application value of heart rate data in sports science, health management, and other fields.
[0015] Therefore, this application provides a heart rate detection method to solve the technical problems of low accuracy in existing heart rate detection methods.
[0016] Please see Figure 1 , Figure 1 This is an exemplary system architecture diagram of a heart rate detection method provided in an embodiment of this application.
[0017] like Figure 1 As shown, the system architecture may include a terminal 101, a network 102, and multiple heart rate monitoring devices 103. The network 102 serves as the medium for providing a communication link between the terminal 101 and the heart rate monitoring devices 103. The network 102 may include various types of wired or wireless communication links, such as wired communication links including fiber optic cables, twisted-pair cables, or coaxial cables, and wireless communication links including Bluetooth communication links, Wireless-Fidelity (Wi-Fi) communication links, or microwave communication links, etc.
[0018] Terminal 101 can interact with heart rate detection device 103 via network 102 to receive or send messages to heart rate detection device 103. Alternatively, terminal 101 can interact with heart rate detection device 103 via network 102 to receive messages or data sent to heart rate detection device 103 by other users. Both terminal 101 and heart rate detection device 103 can be hardware or software. When terminal 101 is software, it can be installed in the heart rate detection device 103 listed above, and can be implemented as multiple software programs or software modules (e.g., to provide distributed services) or as a single software program or software module; no specific limitation is made here. When heart rate detection device 103 is hardware, it includes, but is not limited to, smartwatches, sports armbands, smart rings, etc. When heart rate detection device 103 is software, it can be installed in the terminals listed above, and can be implemented as multiple software programs or software modules (e.g., to provide distributed services) or as a single software program or software module; no specific limitation is made here.
[0019] In this embodiment, terminal 101 first collects the user's pulse wave signal and acceleration signal through multiple heart rate detection devices 103, and calculates the heart rate value corresponding to each heart rate detection device based on the corresponding pulse wave signal and acceleration signal; and terminal 101 collects the user's exercise state data, and determines the user's exercise intensity trend based on the exercise state data; wherein, the exercise intensity trend includes at least one of the following states: a first intensity change trend corresponding to the exercise state data meeting a first preset condition, a second intensity change trend corresponding to the exercise state data meeting a second preset condition, and a third intensity change trend corresponding to the exercise state data meeting a third preset condition. The intensity change trend is then determined; then the terminal 101 determines the first heart rate detection device currently selected for outputting heart rate data among multiple heart rate detection devices 103, calculates the user's first heart rate change trend based on the heart rate value corresponding to the first heart rate detection device, determines the first trend judgment result corresponding to the first heart rate detection device based on the first heart rate change trend and the exercise intensity trend, and determines the light leakage situation of the first heart rate detection device in each heart rate detection device 103; finally, based on the first trend judgment result and the light leakage situation, the terminal 101 determines the target heart rate detection device from multiple heart rate detection devices and outputs the heart rate value corresponding to the target heart rate detection device.
[0020] It should be understood that Figure 1 The number of terminals, networks, and heart rate monitoring devices shown is only illustrative; the number of terminals, networks, and servers can be any number, depending on the implementation requirements.
[0021] Please see Figure 2 , Figure 2This is a flowchart illustrating a heart rate detection method provided in an embodiment of this application. The execution entity in this embodiment can be a terminal performing heart rate detection, a processor within the terminal performing the heart rate detection method, or a heart rate detection service within the terminal performing the heart rate detection method. For ease of description, the following example uses a processor within the terminal as the execution entity to illustrate the specific execution process of the heart rate detection method.
[0022] like Figure 2 As shown, heart rate detection methods can include at least: S202. Collect the user's pulse wave signal and acceleration signal through multiple heart rate detection devices, and calculate the heart rate value corresponding to each heart rate detection device based on the corresponding pulse wave signal and acceleration signal.
[0023] Optionally, the heart rate detection method provided in this application aims to solve the problem of heart rate data distortion caused by signal interference or poor fit of a single wearable device in sports scenarios in existing heart rate detection methods. The core of this method lies in constructing a system architecture for collaborative judgment of multi-source information. Through the parallel operation and dynamic optimization of multiple heart rate detection devices, the accuracy of heart rate monitoring in complex sports environments is ensured. In specific implementation, multiple heart rate detection devices (such as headphones, armbands, watches, etc.) worn on different parts of the user's body are first used to simultaneously collect the user's pulse wave signal (PPG signal) and acceleration signal (ACC signal). Subsequently, the system independently calculates the real-time heart rate value corresponding to each heart rate detection device based on the pulse wave signal and its corresponding acceleration signal collected by each device. By independently calculating the heart rate value by multiple devices, the system can obtain multiple independent heart rate measurement results, realizing redundant acquisition of physiological data and providing multi-dimensional alternative sources for subsequent data optimization.
[0024] S204. Collect the user's motion state data and determine the user's motion intensity trend based on the motion state data; wherein, the motion intensity trend includes at least one of the following states: a first intensity change trend corresponding to the motion state data meeting a first preset condition, a second intensity change trend corresponding to the motion state data meeting a second preset condition, and a third intensity change trend corresponding to the motion state data meeting a third preset condition.
[0025] Optionally, based on the above, the system proceeds to the exercise intensity trend determination stage. Specifically, it collects the user's exercise status data and performs macroscopic analysis on this data reflecting exercise characteristics to determine the user's current exercise intensity trend. The exercise intensity trend is categorized into three states: "intensity increasing," "intensity decreasing," or "intensity remaining unchanged." This facilitates the macroscopic capture of the direction of changes in the user's exercise load, providing an objective external reference standard for the subsequent verification of the rationality of heart rate data.
[0026] S206. Determine the first heart rate detection device currently selected for outputting heart rate data among multiple heart rate detection devices, calculate the user's first heart rate change trend based on the heart rate value corresponding to the first heart rate detection device, determine the first trend judgment result corresponding to the first heart rate detection device based on the first heart rate change trend and the exercise intensity trend, and determine the light leakage situation of the first heart rate detection device in each heart rate detection device.
[0027] Optionally, after determining the user's exercise intensity trend and the heart rate calculation values of each device, the signal quality assessment stage begins. First, the primary heart rate detection device currently selected for outputting heart rate data is identified from among multiple heart rate detection devices. To verify the reliability of the device's output data, the user's primary heart rate change trend is calculated based on the historical heart rate value sequence output by the primary heart rate detection device. This trend reflects the macroscopic direction of change in the user's physiological indicators over time. Next, the calculated primary heart rate change trend is compared with the previously determined exercise intensity trend to determine if they match, thus deriving the primary trend judgment result corresponding to the primary heart rate detection device. This process essentially verifies at a macroscopic level whether the device's measurement results conform to human physiological laws and the perceived sensation of exercise. For example, during periods of increased exercise intensity, the heart rate should show an upward trend; if it decreases, it is considered a logical anomaly.
[0028] Furthermore, the physical signal quality of the first heart rate detection device is evaluated. By comparing the differences in signal characteristics between the current device and other devices, the light leakage of the first heart rate detection device among the various heart rate detection devices is determined, thereby quantifying whether the current device has optical signal acquisition failure due to loose wearing or movement.
[0029] S208. Based on the first trend judgment result and light leakage, determine the target heart rate detection device from multiple heart rate detection devices and output the heart rate value corresponding to the target heart rate detection device.
[0030] Optionally, based on the aforementioned first trend judgment result and the light leakage status of the first heart rate detection device among various heart rate detection devices, the core switching logic is executed. This judgment process first analyzes the first trend judgment result. If the current device's heart rate change trend significantly deviates from the user's exercise intensity trend, it indicates that the current device's physiological data feedback does not match the user's exercise experience, and the system will generate a device switching command. Simultaneously, the system combines the light leakage evaluation data. If the current device's light leakage is worse than a preset standard or significantly worse than other available devices, the system also determines that the current environment is unsuitable for that device to continue outputting data, thereby triggering the device switching mechanism to re-select a target heart rate detection device from the remaining multiple heart rate detection devices that meets the current exercise environment and signal quality requirements. Further, based on the pulse wave signal collected by the determined target heart rate detection device (the original first heart rate detection device or the new device after switching), the system outputs the final calibrated user heart rate value.
[0031] This application provides a heart rate detection method, which involves collecting a user's pulse wave signal and acceleration signal from multiple heart rate detection devices, calculating the heart rate value corresponding to each heart rate detection device based on the corresponding pulse wave signal and acceleration signal; collecting the user's exercise state data, and determining the user's exercise intensity trend based on the exercise state data; wherein, the exercise intensity trend includes at least one of the following states: a first intensity change trend corresponding to the exercise state data meeting a first preset condition, a second intensity change trend corresponding to the exercise state data meeting a second preset condition, and a third intensity change trend corresponding to the exercise state data meeting a third preset condition; determining the first heart rate detection device currently selected for outputting heart rate data from among the multiple heart rate detection devices, calculating the user's first heart rate change trend based on the heart rate value corresponding to the first heart rate detection device, determining the first trend judgment result corresponding to the first heart rate detection device based on the first heart rate change trend and the exercise intensity trend, and determining the light leakage situation of the first heart rate detection device in each heart rate detection device; and determining the target heart rate detection device from among the multiple heart rate detection devices based on the first trend judgment result and the light leakage situation, and outputting the heart rate value corresponding to the target heart rate detection device. Different wearing positions experience varying forces and vibrations during exercise. By acquiring signals from multiple devices and calculating heart rate values, signal sources of varying quality can be obtained. This helps to more accurately evaluate the heart rate measurement quality of each device in subsequent steps. Furthermore, if one device experiences interference or signal quality degradation, data from other devices can supplement or replace it, thereby improving the overall stability and reliability of heart rate measurement. Heart rate variation patterns differ under different exercise intensities. Collecting and analyzing the user's exercise status data can accurately determine the user's exercise intensity trend, helping to distinguish between genuine heart rate changes and abnormal heart rate readings caused by motion artifacts. This provides external evidence for subsequent judgment of the reasonableness of heart rate data. The final output heart rate value is determined. The system first detects the heart rate from a heart rate monitoring device, then calculates the heart rate trend of that device and compares it with the user's exercise intensity trend. At the logical level, it checks whether the data conforms to physiological laws, and at the physical level, it detects light leakage. This dual quality assessment of the current output data provides a crucial basis for deciding whether to switch devices. Based on the trend judgment and light leakage, the system can intelligently decide whether to switch to another heart rate monitoring device to obtain more accurate heart rate data. This adaptive switching mechanism ensures that even if a device is interfered with or its signal quality deteriorates, the system can still output stable and reliable heart rate values, thereby improving the practicality and user experience of heart rate monitoring in dynamic scenarios such as exercise.
[0032] Please see Figure 3 , Figure 3 This is a flowchart illustrating a heart rate detection method provided in an embodiment of this application.
[0033] like Figure 3As shown, heart rate detection methods can include at least: S302. Collect the user's pulse wave signal and acceleration signal through multiple heart rate detection devices, and calculate the heart rate value corresponding to each heart rate detection device based on the corresponding pulse wave signal and acceleration signal.
[0034] Optionally, for details regarding step S302, please refer to the description in step S202, which will not be repeated here.
[0035] S304. Collect the user's movement speed through satellite positioning equipment and collect the user's altitude value through a barometer; determine whether the movement speed and altitude value meet the preset conditions.
[0036] Optionally, to accurately capture changes in user load during exercise, the system first collects the user's movement speed in real time using GPS and simultaneously collects the user's altitude using a barometer. These two types of data together constitute macroscopic-level exercise status data, reflecting the user's current external movement characteristics. The system performs continuous time-series analysis on these two sets of data to determine the user's exercise intensity trend, which serves as an objective benchmark for subsequently verifying the physiological validity of the heart rate data.
[0037] Optionally, the system calculates in real time the difference between the current velocity and the velocity at the previous moment, denoted as the velocity change ΔV; simultaneously, it calculates the difference between the current altitude and the altitude at the previous moment, denoted as the altitude change ΔH. Furthermore, the method in this embodiment also sets a set of preset threshold conditions, denoted as the velocity threshold V. T and altitude threshold H T These thresholds can be adaptively adjusted based on different sports categories, such as running, hiking, or cycling.
[0038] S306. If one parameter is in an increasing state and the other parameter is in a non-decreasing state, then it is determined as the first intensity change trend, which represents an increase in exercise intensity.
[0039] Alternatively, if the condition ΔV>V is satisfied... T1 And ΔH≥0 (i.e., speed increases significantly and altitude does not decrease), or ΔV≥0 and ΔH>H are satisfied. T1 If the speed does not decrease and the altitude increases significantly, then the user is determined to be in a phase of increasing load, and the user's exercise intensity trend is determined to be an increase in intensity.
[0040] S308. If one parameter is decreasing and the other parameter is not increasing, then it is determined to be the second intensity change trend, which represents a decrease in exercise intensity.
[0041] Optionally, if condition ΔV is satisfied <V T2And ΔH≤0 (i.e., the speed decreases significantly and the altitude does not increase), or ΔV≤0 and ΔH<H are satisfied. T2 If (i.e., the speed does not increase and the altitude decreases significantly), then it is determined that the user is in the load reduction phase, and the trend of the user's exercise intensity is determined to be a decrease in intensity.
[0042] S310. If the changes in movement speed and altitude are both within the preset fluctuation range, then it is determined to be the third intensity change trend, indicating that the movement intensity remains unchanged.
[0043] Optionally, if condition V is satisfied T2 ≤ΔV≤V T1 And H T2 ≤ΔH≤H T1 If both speed and altitude changes are within the preset fluctuation range, then the user is determined to be in a steady-state load phase, and the user's exercise intensity trend is determined to be constant.
[0044] S312. Determine the first heart rate detection device currently selected for outputting heart rate data among multiple heart rate detection devices, calculate the user's first heart rate change trend based on the heart rate value corresponding to the first heart rate detection device, and determine the first trend judgment result corresponding to the first heart rate detection device based on the first heart rate change trend and the exercise intensity trend.
[0045] Optionally, for details regarding step S312, please refer to step S206, which will not be repeated here.
[0046] S314. Calculate the leakage energy ratio of each heart rate detection device. The leakage energy ratio is used to characterize the proportion of leakage noise energy in the pulse wave signal collected by the corresponding device relative to the total signal energy.
[0047] Optionally, in order to accurately quantify the signal quality of each heart rate detection device, the method of this application embodiment first extracts energy features from the pulse wave signals collected by each heart rate detection device to calculate the proportion of light leakage energy that characterizes the degree of noise interference in the signal. This parameter macroscopically reflects the optical signal acquisition efficiency of the device in the current environment.
[0048] S316. Determine the first light leakage energy percentage corresponding to the first heart rate detection device, and determine the second light leakage energy percentage corresponding to the second heart rate detection device. The second heart rate detection device is the device with the smallest light leakage energy percentage among all the heart rate detection devices other than the first heart rate detection device.
[0049] Optionally, using the previously calculated leakage energy percentages of each heart rate detection device, the first leakage energy percentage corresponding to the first heart rate detection device is first determined. Subsequently, a traversal screening is performed among the remaining heart rate detection devices excluding the first heart rate detection device to find the second heart rate detection device with the smallest leakage energy percentage, i.e., to find the device with the best physical signal acquisition environment, and its corresponding second leakage energy percentage is recorded.
[0050] S318. Calculate the energy ratio between the first leakage energy ratio and the second leakage energy ratio, and determine the leakage status of the first heart rate detection device in each heart rate detection device based on the energy ratio.
[0051] Optionally, after determining the first and second light leakage energy percentages, the system further calculates the energy ratio between these two percentages. This energy ratio reflects the light leakage level of the first heart rate detection device relative to the second heart rate detection device, which has the best light leakage performance, and is an important quantitative indicator for evaluating the light leakage of the first heart rate detection device. Then, based on the relationship between this energy ratio and a preset threshold, the light leakage of the first heart rate detection device among all heart rate detection devices is determined. If the calculated energy ratio is greater than the set threshold, it indicates that the signal noise energy of the current first heart rate detection device is significantly higher than that of other available devices in the system, indicating severe light leakage and a inferior signal quality. Conversely, if the energy ratio is less than or equal to the set threshold, it indicates that the signal quality of the current device is within an acceptable range, or the difference between it and the best device in the system is within an acceptable range.
[0052] S320: Based on the first trend judgment result and light leakage, determine the target heart rate detection device from multiple heart rate detection devices and output the heart rate value corresponding to the target heart rate detection device.
[0053] Optionally, for details regarding step S320, please refer to step S208, which will not be repeated here.
[0054] This application provides a heart rate detection method that combines motion speed collected by a satellite positioning device and altitude value collected by a barometer. Through dual-parameter collaborative analysis, it overcomes the limitations of a single parameter and can more accurately reflect the user's actual motion state. This provides a reliable basis for subsequent heart rate signal quality judgment and device switching strategies, thereby improving the accuracy of heart rate measurement in sports scenarios. By calculating the energy ratio between the current device and the best backup device in the system, dynamic quantitative evaluation of signal quality is achieved. The switching mechanism is only triggered when the signal quality of the current device is significantly worse than that of other available devices in the system, thereby avoiding invalid switching and misjudgment. This ensures that the heart rate detection system is always locked on the device with better signal quality, improving the robustness and accuracy of heart rate monitoring in complex sports environments.
[0055] Please see Figure 4 , Figure 4 This is a flowchart illustrating a heart rate detection method provided in an embodiment of this application.
[0056] like Figure 4 As shown, heart rate detection methods can include at least: S402. Collect the user's pulse wave signal and acceleration signal through multiple heart rate detection devices, and calculate the heart rate value corresponding to each heart rate detection device based on the corresponding pulse wave signal and acceleration signal; collect the user's exercise state data, and determine the user's exercise intensity trend based on the exercise state data.
[0057] Optionally, for details regarding step S402, please refer to steps S202-S204, which will not be repeated here.
[0058] S404. Determine the first heart rate detection device currently selected for outputting heart rate data among multiple heart rate detection devices; perform linear fitting on multiple heart rate values of the first heart rate detection device within a historical time window to calculate the slope of the first heart rate change trend, and determine the user's first heart rate change trend based on the slope; determine the first trend judgment result corresponding to the first heart rate detection device based on the first heart rate change trend and the exercise intensity trend.
[0059] Optionally, to accurately quantify the evolution of heart rate data output by the primary heart rate detection device over time, after determining the primary heart rate detection device, multiple consecutive heart rate values from the device within a preset historical time window are selected as analysis samples. This historical time window can be set to a fixed duration (e.g., the most recent 10 seconds) or a dynamic duration (e.g., the most recent 5 heart rate sampling points) according to actual needs. Subsequently, the sample data is processed using linear fitting algorithms such as the least squares method to calculate the slope of the fitted line. This slope serves as a quantitative representation of the trend of the primary heart rate change. A positive slope value indicates an upward trend in heart rate, a negative slope value indicates a downward trend in heart rate, and a slope value close to zero indicates that the heart rate change tends to be stable.
[0060] S406. For each heart rate detection device, acquire the pulse wave signal sequence within a preset time window; calculate the absolute sum of the cross-correlation signals between the pulse wave signal sequence and the preset single-cycle waveform sequence, and obtain the total light leakage noise energy based on the absolute sum; calculate the proportion of the total light leakage noise energy to the pulse wave signal sequence, as the light leakage energy proportion of the current heart rate detection device.
[0061] Optionally, a time window (T) ending at the current time is defined, containing N historical sampling points for analyzing the time-domain characteristics of the signal. Within this time window, K single-cycle square waves are also constructed to detect the energy of the pulse signal. The calculation formula is as follows: Then calculate the pulse wave signal within the window. } and Fangbo The cross-correlation signals between them are calculated, and the sum of their absolute values is denoted as . Based on this, define the leakage energy percentage P of the current i-th heart rate detection device. i The calculation formula is as follows: .
[0062] S408. Determine the first light leakage energy percentage corresponding to the first heart rate detection device, and determine the second light leakage energy percentage corresponding to the second heart rate detection device. The second heart rate detection device is the device with the smallest light leakage energy percentage among all the heart rate detection devices other than the first heart rate detection device. Calculate the energy ratio between the first light leakage energy percentage and the second light leakage energy percentage, and determine the light leakage situation of the first heart rate detection device among all heart rate detection devices based on the energy ratio.
[0063] Optionally, for details regarding step S408, please refer to steps S316-S318, which will not be repeated here.
[0064] S410. When the first trend judgment result indicates that the first heart rate change trend is inconsistent with the exercise intensity trend, or the energy ratio is greater than the first preset threshold, the device switching process is executed.
[0065] Optionally, based on the first trend judgment result obtained above and the light leakage of the first heart rate detection device in each heart rate detection device, the final device locking or switching decision is executed. This decision logic aims to comprehensively consider the logical rationality of physiological signals and the purity of physical signals to ensure that the output heart rate data not only matches the user's physical exertion status but also has a high-quality signal-to-noise ratio.
[0066] Specifically, when the first trend judgment result shows that the first heart rate change trend is inconsistent with the exercise intensity trend—for example, if the current exercise intensity trend is judged to be increasing, but the calculated slope indicates that the first heart rate change trend is decreasing—this indicates that the first trend judgment result shows a discrepancy between physiological data and the perceived exercise. In this case, the system determines that the reliability of the current first heart rate detection device's data is reduced, generates a switching command, and switches the heart rate output device.
[0067] Optionally, when the first trend judgment result shows that the heart rate change trend is consistent with the exercise intensity trend, the physical quality of the signal is further evaluated. If the energy ratio is greater than a first preset threshold, it indicates that the signal noise energy of the current first heart rate detection device is significantly higher than that of other available devices in the system, indicating a severe light leakage state, and it is determined that the device needs to be switched. Conversely, if the energy ratio is less than or equal to the first preset threshold, it indicates that the signal quality of the current device is within an acceptable range and can be used as the final heart rate detection device.
[0068] Specifically, the following steps can be used to switch heart rate monitoring devices: S2: If the energy ratio is greater than the first preset threshold, the second heart rate detection device with the smallest proportion of light leakage energy (excluding the first heart rate detection device) is determined as the target heart rate detection device.
[0069] Optionally, if the energy ratio is greater than a first preset threshold, it indicates that the signal quality of the first heart rate detection device is significantly worse than other available devices in the system, and it is in a state of severe light leakage. This is considered a failure at the physical signal level. To quickly restore high-quality signal acquisition, the system adopts the most direct optimization strategy: directly identifying the second heart rate detection device with the smallest proportion of light leakage energy as the target device. This strategy prioritizes addressing the problem of excessively low signal-to-noise ratio, ensuring that the system can acquire a pure pulse wave signal.
[0070] S4: If the first trend judgment result is inconsistent with the first heart rate change trend and the exercise intensity trend, and the energy ratio is less than or equal to the first preset threshold, then select the device whose heart rate change trend is consistent with the exercise intensity trend from each heart rate detection device, and determine the device with the best signal quality as the target heart rate detection device.
[0071] Optionally, when the first trend judgment result shows that the first heart rate change trend is inconsistent with the exercise intensity trend, and the system detects that the energy ratio is less than or equal to the first preset threshold, it indicates that although the first heart rate detection device is affected by light leakage interference, it is not significantly inferior to other devices. At this time, the system will initiate a more refined screening process. Specifically, the system first screens out candidate devices from each heart rate detection device whose heart rate change trend is consistent with the exercise intensity trend, excluding those whose heart rate change trend deviates from the user's actual exercise state, ensuring that the data output by the candidate devices is physiologically reasonable. Subsequently, among these candidate devices that conform to the exercise trend, their light leakage energy ratio is further compared, and the device with the smallest light leakage energy ratio among all candidate devices is determined as the target heart rate detection device. This means that the system prioritizes the device with the highest signal-to-noise ratio under the premise of conforming to the perceived exercise trend as the new output source.
[0072] S412. When the first trend judgment result indicates that the first heart rate change trend is consistent with the exercise intensity trend, and the energy ratio is less than or equal to the first preset threshold, the first heart rate detection device is maintained as the current output device.
[0073] Optionally, when the first trend judgment result indicates that the first heart rate change trend is consistent with the exercise intensity trend, and the energy ratio between the first leakage energy ratio and the second leakage energy ratio is less than or equal to a preset threshold, this means that the heart rate data output by the first heart rate detection device not only conforms to the user's actual exercise load in physiological logic, but also falls within the system's allowable range in terms of physical signal quality. In this case, the system does not switch the heart rate detection device and continues to maintain the first heart rate detection device as the heart rate output source.
[0074] S414, and outputs the heart rate value corresponding to the target heart rate detection device.
[0075] Optionally, for details regarding step S414, please refer to step S208, which will not be repeated here.
[0076] This application provides a heart rate detection method that, by calculating the sum of the absolute values of the cross-correlation between a signal sequence and a preset single-cycle waveform sequence, can accurately extract energy features characterizing light leakage from complex signals containing a large amount of motion noise. This allows the system to objectively and accurately assess the optical coupling state of each heart rate detection device in the current wearing environment, thereby effectively distinguishing between effective signals generated by physiological pulsations and noise signals generated by ambient light interference or loose wearing, providing a high-precision physical layer criterion for subsequent device switching decisions. Based on the first trend judgment result and the first light leakage energy ratio, the method determines whether to switch the heart rate detection device, achieving intelligent assessment of the heart rate measurement device's status. When the heart rate change trend is inconsistent with the exercise state or when light leakage interference is severe, it can automatically trigger device switching, thereby maintaining the continuity and accuracy of heart rate measurement. This dynamic adjustment mechanism improves the adaptability and robustness of heart rate monitoring, especially in complex and changing exercise environments, providing users with more reliable heart rate data support. When the energy ratio exceeds the standard, the system directly switches to the second heart rate detection device with the lowest leakage energy ratio to restore signal quality as quickly as possible. When the energy ratio is within the standard but switching is necessary, candidate devices whose heart rate change trend is consistent with the exercise intensity trend are prioritized, and the one with the best signal quality is selected. This hierarchical processing logic ensures rapid recovery under extreme signal interference and also ensures that the device that best matches the user's perceived physiological load can be found under general interference scenarios. This differentiated target selection strategy maximizes the preservation of the physiological rationality of heart rate data while ensuring the signal-to-noise ratio, thus outputting heart rate results that best reflect the user's actual exercise state. Using the slope of a linear fitting line to characterize the heart rate change trend transforms discrete historical heart rate data into an intuitive linear change indicator, simplifying the complexity of trend judgment. It can effectively filter out high-frequency random noise and transient interference in the heart rate signal, reflecting the overall evolution of heart rate over a period of time, making the first trend judgment result smoother and more robust, and avoiding trend misjudgment caused by single measurement errors or accidental fluctuations.
[0077] Please see Figure 5 , Figure 5 This is a structural block diagram of a heart rate detection device provided in an embodiment of this application. Figure 5 As shown, the heart rate detection device 500 includes: The heart rate signal acquisition module 510 is used to acquire the user's pulse wave signal and acceleration signal through multiple heart rate detection devices, and calculate the heart rate value corresponding to each heart rate detection device based on the corresponding pulse wave signal and acceleration signal. The motion data acquisition module 520 is used to collect the user's motion state data and determine the user's motion intensity trend based on the motion state data; wherein, the motion intensity trend includes at least one of the following states: a first intensity change trend corresponding to the motion state data meeting a first preset condition, a second intensity change trend corresponding to the motion state data meeting a second preset condition, and a third intensity change trend corresponding to the motion state data meeting a third preset condition. The device verification module 530 is used to determine the first heart rate detection device currently selected for outputting heart rate data among multiple heart rate detection devices, calculate the user's first heart rate change trend based on the heart rate value corresponding to the first heart rate detection device, determine the first trend judgment result corresponding to the first heart rate detection device based on the first heart rate change trend and the exercise intensity trend, and determine the light leakage situation of the first heart rate detection device in each heart rate detection device. The device switching module 540 is used to determine the target heart rate detection device from multiple heart rate detection devices based on the first trend judgment result and light leakage, and output the heart rate value corresponding to the target heart rate detection device.
[0078] In some possible embodiments, the motion data acquisition module 520 is further configured to acquire the user's motion speed via a satellite positioning device and the user's altitude via a barometer; determine whether the motion speed and altitude meet preset conditions: if one parameter is increasing and the other is not decreasing, it is determined to be a first intensity change trend, indicating an increase in motion intensity; if one parameter is decreasing and the other is not increasing, it is determined to be a second intensity change trend, indicating a decrease in motion intensity; if the changes in both motion speed and altitude are within a preset fluctuation range, it is determined to be a third intensity change trend, indicating no change in motion intensity.
[0079] In some possible embodiments, the device verification module 530 is further configured to calculate the leakage energy ratio of each heart rate detection device, the leakage energy ratio being used to characterize the proportion of leakage noise energy in the pulse wave signal collected by the corresponding device relative to the total signal energy; determine the first leakage energy ratio corresponding to the first heart rate detection device, and determine the second leakage energy ratio corresponding to the second heart rate detection device, the second heart rate detection device being the device with the smallest leakage energy ratio among all the heart rate detection devices other than the first heart rate detection device; calculate the energy ratio between the first leakage energy ratio and the second leakage energy ratio, and determine the leakage situation of the first heart rate detection device among all heart rate detection devices based on the energy ratio.
[0080] In some possible embodiments, the device verification module 530 is further configured to acquire a pulse wave signal sequence within a preset time window for each heart rate detection device; calculate the absolute sum of the cross-correlation signals between the pulse wave signal sequence and the preset single-cycle waveform sequence, and obtain the total light leakage noise energy based on the absolute sum; calculate the proportion of the total light leakage noise energy to the pulse wave signal sequence as the light leakage energy proportion of the current heart rate detection device.
[0081] In some possible embodiments, the device switching module 540 is further configured to execute a device switching process when the first trend judgment result indicates that the first heart rate change trend is inconsistent with the exercise intensity trend, or the energy ratio is greater than the first preset threshold; and to maintain the first heart rate detection device as the current output device when the first trend judgment result indicates that the first heart rate change trend is consistent with the exercise intensity trend, and the energy ratio is less than or equal to the first preset threshold.
[0082] In some possible embodiments, the device switching module 540 is further configured to: if the energy ratio is greater than a first preset threshold, determine the second heart rate detection device with the smallest leakage energy ratio (excluding the first heart rate detection device) as the target heart rate detection device; if the first trend judgment result indicates that the first heart rate change trend is inconsistent with the exercise intensity trend, and the energy ratio is less than or equal to the first preset threshold, then select the device whose heart rate change trend is consistent with the exercise intensity trend from among the heart rate detection devices, and determine the device with the best signal quality among them as the target heart rate detection device.
[0083] In some possible embodiments, the device verification module 530 is further configured to perform linear fitting on multiple heart rate values of the first heart rate detection device within a historical time window, calculate the slope of the first heart rate change trend, and determine the user's first heart rate change trend based on the slope.
[0084] In this embodiment, a heart rate detection device is provided, comprising: a heart rate signal acquisition module for acquiring pulse wave signals and acceleration signals of a user through multiple heart rate detection devices, and calculating the heart rate value corresponding to each heart rate detection device based on the corresponding pulse wave signals and acceleration signals; and a motion data acquisition module for acquiring the user's motion state data, and determining the user's motion intensity trend based on the motion state data; wherein the motion intensity trend includes at least one of the following states: a first intensity change trend corresponding to the motion state data meeting a first preset condition, a second intensity change trend corresponding to the motion state data meeting a second preset condition, and the motion state data... The third intensity change trend when the third preset condition is met; the device verification module is used to determine the first heart rate detection device currently selected for outputting heart rate data among multiple heart rate detection devices, calculate the user's first heart rate change trend based on the heart rate value corresponding to the first heart rate detection device, determine the first trend judgment result corresponding to the first heart rate detection device based on the first heart rate change trend and the exercise intensity trend, and determine the light leakage situation of the first heart rate detection device among each heart rate detection device; the device switching module, based on the first trend judgment result and the light leakage situation, determines the target heart rate detection device from multiple heart rate detection devices, and outputs the heart rate value corresponding to the target heart rate detection device. Different wearing positions experience varying forces and vibrations during exercise. The heart rate signal acquisition module collects signals from multiple devices and calculates heart rate values, enabling the acquisition of signal sources of varying quality. This helps to more accurately evaluate the heart rate measurement quality of each device in subsequent steps. Furthermore, if one device experiences interference or signal quality degradation, data from other devices can supplement or replace it, thereby improving the overall stability and reliability of heart rate measurement. Heart rate changes differently under varying exercise intensities. The exercise data acquisition module collects and analyzes the user's exercise status data, accurately determining the user's exercise intensity trend. This helps distinguish between genuine heart rate changes and abnormal heart rate readings caused by motion artifacts, providing external evidence for subsequent judgment of the reasonableness of heart rate data. The device verification module... The system first identifies the primary heart rate detection device that outputs heart rate data, calculates the heart rate change trend of that device, and compares it with the user's exercise intensity trend. At the logical level, it checks whether the data conforms to physiological laws, and at the physical level, it detects light leakage. This dual quality assessment of the current output data provides a crucial basis for deciding whether to switch devices. Based on the previous trend judgment and light leakage, the device switching module intelligently decides whether to switch to another heart rate detection device to obtain more accurate heart rate data. This adaptive switching mechanism ensures that even if a device is interfered with or its signal quality deteriorates, the system can still output stable and reliable heart rate values, thereby improving the practicality and user experience of heart rate monitoring in dynamic scenarios such as exercise.
[0085] This application also provides a computer storage medium that can store multiple instructions adapted for loading by a processor and executing the steps of any of the methods described in the above embodiments.
[0086] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application. Figure 6 As shown, terminal 600 may include: at least one terminal processor 601, at least one network interface 604, user interface 603, memory 605, and at least one communication bus 602.
[0087] The communication bus 602 is used to enable communication between these components.
[0088] The user interface 603 may include a display screen and a camera. Optionally, the user interface 603 may also include a standard wired interface and a wireless interface.
[0089] The network interface 604 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0090] The terminal processor 601 may include one or more processing cores. The terminal processor 601 connects to various parts within the terminal 600 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 605, and by calling data stored in the memory 605. Optionally, the terminal processor 601 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The terminal processor 601 may integrate one or more of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content to be displayed on the screen; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the terminal processor 601.
[0091] The memory 605 may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory 605 may include a non-transitory computer-readable storage medium. The memory 605 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 605 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 605 may also be at least one storage device located remotely from the aforementioned terminal processor 601. Figure 6 As shown, the memory 605, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a heart rate detection program.
[0092] exist Figure 6 In the terminal 600 shown, the user interface 603 is mainly used to provide an input interface for the user and to obtain the user's input data; while the terminal processor 601 can be used to call the heart rate detection program stored in the memory 605 and specifically perform the following operations: The user's pulse wave signal and acceleration signal are collected by multiple heart rate detection devices, and the heart rate value corresponding to each heart rate detection device is calculated based on the corresponding pulse wave signal and acceleration signal. Collect user's motion state data and determine the user's motion intensity trend based on the motion state data; wherein, the motion intensity trend includes at least one of the following states: a first intensity change trend corresponding to the motion state data meeting a first preset condition, a second intensity change trend corresponding to the motion state data meeting a second preset condition, and a third intensity change trend corresponding to the motion state data meeting a third preset condition. The system identifies the first heart rate detection device currently selected for outputting heart rate data among multiple heart rate detection devices. Based on the heart rate value corresponding to the first heart rate detection device, it calculates the user's first heart rate change trend. Based on the first heart rate change trend and the exercise intensity trend, it determines the first trend judgment result corresponding to the first heart rate detection device and determines the light leakage situation of the first heart rate detection device in each heart rate detection device. Based on the first trend judgment result and light leakage, the target heart rate detection device is determined from multiple heart rate detection devices, and the heart rate value corresponding to the target heart rate detection device is output.
[0093] In some possible embodiments, when the terminal processor 601 collects the user's motion state data and determines the user's motion intensity trend based on the motion state data, it specifically performs the following steps: collecting the user's motion speed through a satellite positioning device and collecting the user's altitude value through a barometer; determining whether the motion speed and altitude value meet preset conditions: if one parameter is in an increasing state and the other parameter is not in a decreasing state, it is determined to be a first intensity change trend, indicating an increase in motion intensity; if one parameter is in a decreasing state and the other parameter is not in an increasing state, it is determined to be a second intensity change trend, indicating a decrease in motion intensity; if the changes in motion speed and altitude value are both within a preset fluctuation range, it is determined to be a third intensity change trend, indicating that the motion intensity remains unchanged.
[0094] In some possible embodiments, when the terminal processor 601 determines the light leakage situation of the first heart rate detection device in each heart rate detection device, it specifically performs the following steps: calculating the light leakage energy ratio of each heart rate detection device, the light leakage energy ratio being used to characterize the proportion of light leakage noise energy in the pulse wave signal collected by the corresponding device relative to the total signal energy; determining the first light leakage energy ratio corresponding to the first heart rate detection device, and determining the second light leakage energy ratio corresponding to the second heart rate detection device, the second heart rate detection device being the device with the smallest light leakage energy ratio among all the other heart rate detection devices besides the first heart rate detection device; calculating the energy ratio between the first light leakage energy ratio and the second light leakage energy ratio, and determining the light leakage situation of the first heart rate detection device in each heart rate detection device based on the energy ratio.
[0095] In some possible embodiments, when the terminal processor 601 calculates the leakage energy ratio of each heart rate detection device, it specifically performs the following steps: for each heart rate detection device, it acquires a pulse wave signal sequence within a preset time window; it calculates the absolute sum of the cross-correlation signals between the pulse wave signal sequence and a preset single-cycle waveform sequence, and obtains the total leakage noise energy based on the absolute sum; it calculates the proportion of the total leakage noise energy to the pulse wave signal sequence, and uses this as the leakage energy ratio of the current heart rate detection device.
[0096] In some possible embodiments, when the terminal processor 601 determines the target heart rate detection device from multiple heart rate detection devices based on the first trend judgment result and light leakage, it specifically performs the following steps: when the first trend judgment result indicates that the first heart rate change trend is inconsistent with the exercise intensity trend, or the energy ratio is greater than a first preset threshold, a device switching process is executed; when the first trend judgment result indicates that the first heart rate change trend is consistent with the exercise intensity trend, and the energy ratio is less than or equal to the first preset threshold, the first heart rate detection device is maintained as the current output device.
[0097] In some possible embodiments, when the terminal processor 601 executes the device switching process, it specifically performs the following steps: if the energy ratio is greater than a first preset threshold, the second heart rate detection device with the smallest leakage energy ratio (excluding the first heart rate detection device) is determined as the target heart rate detection device; if the first trend judgment result indicates that the first heart rate change trend is inconsistent with the exercise intensity trend, and the energy ratio is less than or equal to the first preset threshold, then the device whose heart rate change trend is consistent with the exercise intensity trend is selected from all heart rate detection devices, and the device with the best signal quality is determined as the target heart rate detection device.
[0098] In some possible embodiments, when the terminal processor 601 calculates the user's first heart rate change trend based on the heart rate value corresponding to the first heart rate detection device, it specifically performs the following steps: performing linear fitting on multiple heart rate values of the first heart rate detection device within a historical time window, calculating the slope of the first heart rate change trend, and determining the user's first heart rate change trend based on the slope.
[0099] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0100] The modules described as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0101] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this specification are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The aforementioned available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., Digital Versatile Discs (DVDs)), or semiconductor media (e.g., Solid State Disks (SSDs)).
[0102] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0103] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0104] The above is a description of a heart rate detection method, device, storage medium, and terminal provided in this application. For those skilled in the art, based on the ideas of the embodiments of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A heart rate detection method, characterized in that, The method includes: The user's pulse wave signal and acceleration signal are collected by multiple heart rate detection devices, and the heart rate value corresponding to each heart rate detection device is calculated based on the corresponding pulse wave signal and acceleration signal. Collect the user's motion state data, and determine the user's motion intensity trend based on the motion state data; wherein, the motion intensity trend includes at least one of the following states: a first intensity change trend corresponding to the motion state data meeting a first preset condition, a second intensity change trend corresponding to the motion state data meeting a second preset condition, and a third intensity change trend corresponding to the motion state data meeting a third preset condition. The first heart rate detection device currently selected for outputting heart rate data is determined among the plurality of heart rate detection devices. The first heart rate change trend of the user is calculated based on the heart rate value corresponding to the first heart rate detection device. The first trend judgment result corresponding to the first heart rate detection device is determined based on the first heart rate change trend and the exercise intensity trend. The light leakage of the first heart rate detection device in each heart rate detection device is also determined. Based on the first trend judgment result and the light leakage situation, a target heart rate detection device is determined from the plurality of heart rate detection devices, and the heart rate value corresponding to the target heart rate detection device is output.
2. The method according to claim 1, characterized in that, The process of collecting the user's motion state data and determining the user's motion intensity trend based on the motion state data includes: The user's movement speed is collected using satellite positioning equipment, and the user's altitude is collected using a barometer; The preset conditions for determining whether the movement speed and the altitude value satisfy are: If one parameter is increasing and the other parameter is not decreasing, then it is determined to be the first intensity change trend, which represents an increase in motion intensity. If one parameter is decreasing and the other parameter is not increasing, then it is determined to be the second intensity change trend, which represents a decrease in exercise intensity. If the changes in the movement speed and the altitude are both within the preset fluctuation range, then it is determined to be the third intensity change trend, indicating that the movement intensity remains unchanged.
3. The method according to claim 1, characterized in that, Determining the light leakage status of the first heart rate detection device in each heart rate detection device includes: Calculate the leakage energy ratio of each heart rate detection device. The leakage energy ratio is used to characterize the proportion of leakage noise energy in the pulse wave signal collected by the corresponding device relative to the total signal energy. Determine the first light leakage energy percentage corresponding to the first heart rate detection device, and determine the second light leakage energy percentage corresponding to the second heart rate detection device. The second heart rate detection device is the device with the smallest light leakage energy percentage among all the heart rate detection devices other than the first heart rate detection device. Calculate the energy ratio between the first light leakage energy ratio and the second light leakage energy ratio, and determine the light leakage status of the first heart rate detection device in each heart rate detection device based on the energy ratio.
4. The method according to claim 3, characterized in that, The calculation of the leakage energy percentage of each heart rate detection device includes: For each heart rate detection device, acquire the pulse wave signal sequence within a preset time window; Calculate the absolute sum of the cross-correlation signals between the pulse wave signal sequence and the preset single-cycle waveform sequence, and obtain the total leakage noise energy based on the absolute sum; The proportion of the total light leakage noise energy to the pulse wave signal sequence is calculated and used as the light leakage energy ratio of the current heart rate detection device.
5. The method according to claim 3, characterized in that, The step of determining the target heart rate detection device from the plurality of heart rate detection devices based on the first trend judgment result and the light leakage situation includes: When the first trend judgment result indicates that the first heart rate change trend is inconsistent with the exercise intensity trend, or the energy ratio is greater than the first preset threshold, the device switching process is executed. When the first trend judgment result indicates that the first heart rate change trend is consistent with the exercise intensity trend, and the energy ratio is less than or equal to the first preset threshold, the first heart rate detection device is maintained as the current output device.
6. The method according to claim 5, characterized in that, The device switching process includes: If the energy ratio is greater than the first preset threshold, the second heart rate detection device with the smallest light leakage energy ratio, excluding the first heart rate detection device, is determined as the target heart rate detection device. If the first trend judgment result indicates that the first heart rate change trend is inconsistent with the exercise intensity trend, and the energy ratio is less than or equal to the first preset threshold, then the device whose heart rate change trend is consistent with the exercise intensity trend is selected from all heart rate detection devices, and the device with the best signal quality is determined as the target heart rate detection device.
7. The method according to claim 1, characterized in that, The step of calculating the user's first heart rate change trend based on the heart rate value corresponding to the first heart rate detection device includes: The slope of the first heart rate change trend is calculated by performing linear fitting on multiple heart rate values of the first heart rate detection device within a historical time window, and the first heart rate change trend of the user is determined based on the slope.
8. A heart rate detection device, characterized in that, The device includes: The heart rate signal acquisition module is used to acquire the user's pulse wave signal and acceleration signal through multiple heart rate detection devices, and calculate the heart rate value corresponding to each heart rate detection device based on the corresponding pulse wave signal and acceleration signal. A motion data acquisition module is used to acquire the user's motion state data and determine the user's motion intensity trend based on the motion state data; wherein, the motion intensity trend includes at least one of the following states: a first intensity change trend corresponding to the motion state data meeting a first preset condition, a second intensity change trend corresponding to the motion state data meeting a second preset condition, and a third intensity change trend corresponding to the motion state data meeting a third preset condition. The device verification module is used to determine the first heart rate detection device currently selected for outputting heart rate data among the plurality of heart rate detection devices, calculate the first heart rate change trend of the user based on the heart rate value corresponding to the first heart rate detection device, determine the first trend judgment result corresponding to the first heart rate detection device based on the first heart rate change trend and the exercise intensity trend, and determine the light leakage situation of the first heart rate detection device in each heart rate detection device. The device switching module is used to determine the target heart rate detection device from the plurality of heart rate detection devices based on the first trend judgment result and the light leakage situation, and output the heart rate value corresponding to the target heart rate detection device.
9. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions adapted for loading by a processor and executing the steps of the method as described in any one of claims 1 to 7.
10. A terminal, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method as described in any one of claims 1 to 7.