A method and apparatus for heart rate monitoring
By confirming the wearer as a living person in the smartwatch, calculating the harmonic signal weighting coefficient and confidence level of the PPG signal, eliminating interference signals, and outputting the heart rate only when the confidence level meets the condition, the problem of inaccurate heart rate measurement caused by poor wearing conditions is solved, and the accuracy and reliability of heart rate measurement are improved.
Patent Information
- Application Number
- CN202111595435.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-23
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2041-12-23
AI Technical Summary
When smartwatches are not worn properly, the photoplethysmography (PPG) signal is affected, resulting in inaccurate heart rate measurement and impacting the user experience.
By confirming that the wearer is a living person, PPG signals are acquired, and the weighting coefficients and confidence levels of harmonic signals are calculated. Heart rate values are output only when the confidence level meets the conditions. Smoothing, bandpass filtering, Hilbert transform, and notch filtering are combined to eliminate interference and generate a high-confidence heart rate curve.
It improves the accuracy and reliability of heart rate measurement, enhances the user experience, and ensures that the output heart rate value is highly reliable and can accurately reflect the user's heart rate changes.
Smart Images

Figure CN116369883B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of terminal, and in particular, to a heart rate monitoring method and device. BACKGROUND
[0002] With the increasing development of the function of smart watches, the functions of smart watches are increasing, such as sports functions and health monitoring functions. Heart rate is an important physiological indicator representing the health condition of a human body. A user can monitor the heart rate through a smart watch. At present, photoplethysmograph (PPG) technology is usually used to measure the heart rate.
[0003] However, in actual application, the position at which the user wears the smart watch, the tightness of wearing, or the skin color of the user and other factors will affect the quality of the PPG signal. If the user wears the smart watch relatively loosely, the PPG signal is poor, and it is difficult to calculate an accurate heart rate, which leads to the user finding that the heart rate is inaccurate, thereby affecting the user experience. SUMMARY
[0004] Therefore, the present application provides a heart rate monitoring method, device, computer readable storage medium and computer program product, which can provide an accurate heart rate for a user and greatly improve the user experience.
[0005] In a first aspect, a heart rate monitoring method is provided, and the method is applied to an electronic device. The method comprises the following steps.
[0006] Determining that a wearer of the electronic device is a living body;
[0007] Obtaining a first photoplethysmograph (PPG) signal;
[0008] Determining a first heart rate and a confidence degree of the first heart rate according to the first PPG signal, wherein the confidence degree of the first heart rate is determined by a weight coefficient of M harmonic signals, the M harmonic signals are determined according to the first PPG signal within a preset time, and M is an integer greater than or equal to 2;
[0009] Outputting the first heart rate when the confidence degree of the first heart rate meets a preset confidence degree condition;
[0010] Displaying the first heart rate.
[0011] In the embodiments of the present application, the first heart rate and the confidence of the first heart rate are determined based on the first PPG signal, and the first heart rate is output when the confidence of the first heart rate meets a preset confidence condition, for example, the first heart rate value is only output when the confidence of the first heart rate is higher than a confidence threshold. In this way, the output heart rate value can be ensured to have a higher reliability, so that the user can know his / her heart rate in real time, and the user can be provided with a heart rate with higher accuracy.
[0012] In a possible implementation, when the confidence of the first heart rate does not meet the preset confidence condition, the second heart rate is displayed, the second heart rate being the heart rate that meets the preset confidence condition last time. In this way, even when the confidence of the first heart rate does not meet the preset confidence condition, the heart rate that meets the preset confidence condition last time can be displayed, so that the user is presented with a heart rate value with higher reliability.
[0013] In a possible implementation, the confidence of the first heart rate meeting the preset confidence condition includes that the confidence of the first heart rate is greater than a confidence threshold.
[0014] In a possible implementation, the method further includes:
[0015] calculating a weight coefficient of each harmonic signal in the M harmonic signals;
[0016] determining a confidence of the weight coefficient of each harmonic signal, to obtain M confidences;
[0017] taking the highest confidence in the M confidences as the confidence of the first heart rate.
[0018] That is, after obtaining the M confidences based on the M harmonic signals, the highest confidence can be selected as the confidence of the first heart rate, so as to accurately reflect the heart rate of the user.
[0019] In a possible implementation, the calculating of the weight coefficient of each harmonic signal in the M harmonic signals includes:
[0020] calculating a relative error of each harmonic signal relative to an ideal signal, the ideal signal being a signal obtained by multiplying a signal at a previous moment by a phase at a next moment;
[0021] dividing the relative error of each harmonic signal by a sum of the relative errors of the M harmonic signals, to obtain the weight coefficient of each harmonic signal.
[0022] Based on the above manner, the weight coefficient of each harmonic signal can be obtained, so as to provide a basis for determining the confidence of the weight coefficient of each harmonic signal.
[0023] In one possible implementation, the method further includes:
[0024] The first PPG signal is smoothed to obtain a smoothed PPG signal.
[0025] The smoothed PPG signal is bandpass filtered to obtain a second PPG signal, which is a PPG signal within the target frequency band.
[0026] Perform a Hilbert transform on the second PPG signal to obtain an analytic signal of the second PPG signal, wherein the derivative of the phase of the analytic signal is the instantaneous frequency;
[0027] The analytical signal is subjected to notch filtering to obtain a third PPG signal, which does not include motion interference signals.
[0028] The third PPG signal is filtered through M filters to obtain the M harmonic signals.
[0029] Typically, the PPG signal acquired by a heart rate sensor also includes interference from the ACC signal. For example, when a user wears a watch, in addition to their pulse, their arm may also move. Therefore, the PPG signal acquired by the heart rate sensor will also include signals generated by this arm movement. These arm movement signals are usually acquired by the ACC accelerometer. By using notch filtering, the influence of arm movement on the PPG signal can be eliminated, i.e., interference from the ACC signal can be removed, resulting in a more accurate PPG signal.
[0030] In one possible implementation, smoothing the first PPG signal to obtain a smoothed PPG signal includes:
[0031] When an anomaly is detected in the current frame, the sum of the data from the previous frame and the data from the next frame is calculated, and the average of the sum is taken.
[0032] The average value is used as the value after smoothing the current frame.
[0033] The above smoothing process can eliminate inaccurate signals. Inaccurate signals include those that are too strong or too weak. For example, an inaccurate signal might be caused by wearing the garment too loosely.
[0034] In one possible implementation, determining the confidence level of the weighting coefficients for each harmonic signal includes:
[0035] The confidence level corresponding to the weight coefficient of each harmonic signal is determined based on the confidence interval threshold, wherein the confidence interval threshold is determined through statistical analysis of large data samples.
[0036] Here, a method using big data sample statistics is used to obtain the confidence interval threshold, which enables good generalization performance for various scenarios.
[0037] In one possible implementation, the method further includes:
[0038] Store multiple heart rate values that meet the preset confidence conditions;
[0039] Based on the multiple heart rate values, a heart rate curve is generated;
[0040] The heart rate curve is displayed.
[0041] Heart rate curves generated based on high-confidence heart rate can accurately reflect the changes in a user's heart rate over a certain period of time, which helps to improve the user experience.
[0042] Secondly, a heart rate monitoring device is provided, including a unit for performing any of the methods in the first aspect. The device may be a watch (or smartwatch) or a chip within a watch (or smartwatch). The device includes an input unit, a display unit, and a processing unit.
[0043] When the device is a watch, the processing unit may be a processor, the input unit may be a communication interface, and the display unit may be a graphics processing module and a screen; the watch may also include a memory for storing computer program code, which, when executed by the processor, causes the watch to perform any of the methods in the first aspect.
[0044] When the device is a chip inside a watch, the processing unit can be a logic processing unit inside the chip, the input unit can be an output interface, pin, or circuit, and the display unit can be a graphics processing unit inside the chip. The chip may also include a memory, which can be memory inside the chip (e.g., registers, cache, etc.) or memory located outside the chip (e.g., read-only memory, random access memory, etc.). The memory is used to store computer program code, and when the processor executes the computer program code stored in the memory, it causes the chip to execute any of the methods in the first aspect.
[0045] Alternatively, in one implementation, the input unit is used to receive a user's operation, the operation being used to measure heart rate.
[0046] The processing unit is used to determine that the wearer of the electronic device is a living person;
[0047] It is also used to acquire the first PPG signal;
[0048] It is also used to determine a first heart rate and a confidence level of the first heart rate based on the first PPG signal, wherein the confidence level of the first heart rate is determined by weighting coefficients of M harmonic signals, the M harmonic signals are determined based on the first PPG signal within a preset time, and M is an integer greater than or equal to 2.
[0049] It is also used to output the first heart rate when the confidence level of the first heart rate meets the preset confidence level condition.
[0050] The display unit is used to display the first heart rate.
[0051] In one possible implementation, when the confidence level of the first heart rate does not meet a preset confidence level condition, the display unit is used to display a second heart rate, which is the heart rate that previously met the preset confidence level condition.
[0052] In one possible implementation, the processing unit is further configured to:
[0053] Calculate the weighting coefficient of each of the M harmonic signals;
[0054] Determine the confidence level of the weighting coefficient for each harmonic signal to obtain M confidence levels;
[0055] The highest confidence level among the M confidence levels is taken as the confidence level of the first heart rate.
[0056] In one possible implementation, the processing unit is used to determine the confidence level of the weighting coefficients of each harmonic signal, specifically including:
[0057] The confidence level corresponding to the weight coefficient of each harmonic signal is determined based on the confidence interval threshold, wherein the confidence interval threshold is determined through statistical analysis of large data samples.
[0058] In one possible implementation, the processing unit is used to calculate the weighting coefficient of each harmonic signal among the M harmonic signals, specifically including:
[0059] Calculate the relative error of each harmonic signal relative to the ideal signal, where the ideal signal is the signal obtained by multiplying the signal of the previous time step by the phase of the next time step.
[0060] The weighting coefficient of each harmonic signal is obtained by dividing the relative error of each harmonic signal by the sum of the relative errors of the M harmonic signals.
[0061] In one possible implementation, the processing unit is further configured to:
[0062] The first PPG signal is smoothed to obtain a smoothed PPG signal.
[0063] The smoothed PPG signal is bandpass filtered to obtain a second PPG signal, which is a PPG signal within the target frequency band.
[0064] Perform a Hilbert transform on the second PPG signal to obtain an analytic signal of the second PPG signal, wherein the derivative of the phase of the analytic signal is the instantaneous frequency;
[0065] The analytical signal is subjected to notch filtering to obtain a third PPG signal, which does not include motion interference signals.
[0066] The third PPG signal is filtered through M filters to obtain the M harmonic signals.
[0067] In one possible implementation, the processing unit is used to smooth the first PPG signal to obtain a smoothed PPG signal, specifically including:
[0068] The sum of the data from the previous frame and the data from the next frame is calculated, and the average of the sum is taken.
[0069] The average value is used as the value after smoothing the current frame.
[0070] Optionally, the confidence level of the first heart rate satisfies preset confidence conditions, including:
[0071] The confidence level of the first heart rate is greater than the confidence threshold.
[0072] In one possible implementation, the processing unit is further configured to:
[0073] Store multiple heart rate values that meet the preset confidence conditions;
[0074] Based on the multiple heart rate values, a heart rate curve is generated;
[0075] The display unit is used to display the heart rate curve.
[0076] Thirdly, a computer-readable storage medium is provided that stores computer program code, which, when run by a heart rate monitoring device, causes the device to perform any of the methods in the first aspect.
[0077] Fourthly, a computer program product is provided, the computer program product comprising: computer program code, which, when run by a heart rate monitoring device, causes the device to perform any of the methods in the first aspect. Attached Figure Description
[0078] Figure 1 This is an example diagram illustrating an application scenario of an embodiment of this application;
[0079] Figure 2 This is a schematic flowchart of a heart rate monitoring method according to an embodiment of this application;
[0080] Figure 3 This is a schematic flowchart of a method for determining heart rate confidence according to an embodiment of this application;
[0081] Figure 4 This is a schematic diagram of the software system used in the embodiments of this application;
[0082] Figure 5 This is a schematic diagram of the structure applied in the embodiments of this application;
[0083] Figure 6 This is an example diagram of a heart rate monitoring interface according to an embodiment of this application;
[0084] Figure 7 This is another example diagram of a heart rate monitoring interface according to an embodiment of this application;
[0085] Figure 8 This is a comparative schematic diagram of the optimized pitfall signal according to an embodiment of this application;
[0086] Figure 9 This is a comparative schematic diagram of the optimized emerging signal according to an embodiment of this application. Detailed Implementation
[0087] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0088] This application applies to electronic devices, such as smartwatches, wristbands, or other wearable devices capable of monitoring heart rate. This application describes a smartwatch as an example. Currently, smartwatches use photoplethysmograph (PPG) technology to measure the user's pulse or heart rate.
[0089] The principle of using PPG technology to measure pulse or heart rate is as follows: Light of a specific color wavelength is emitted by a light-emitting diode (LED) and enters the human body. Then, the attenuated light after being reflected and absorbed by the blood vessels and tissues is measured. The pulse signal is detected by recording the pulsation state of the blood vessels.
[0090] For example, a heart rate sensor (e.g., a PPG sensor or PPG module) can be installed in a smartwatch. The smartwatch collects PPG signals through the heart rate sensor and obtains the user's instantaneous heart rate based on the PPG signals. This application does not specifically limit the type of heart rate sensor; for example, the heart rate sensor includes a reflective photoelectric heart rate sensor, a transmissive photoelectric heart rate sensor, etc.
[0091] However, factors such as the wearing condition and tightness of the smartwatch can affect the quality of the PPG signal, ultimately impacting the reliability of the heart rate readings and thus the user experience. The following combines... Figure 1 The following are examples of scenarios.
[0092] like Figure 1 The smartwatch shown in Figure (1) includes a watch face 11 and a watch band 12. The user can wear the smartwatch on their wrist via the watch band 12, allowing the back of the watch face 11 to fit snugly against the skin. The user can adjust the tightness of the fit by adjusting the watch band 12. If the adjustment is relatively loose, the user's wearing posture of the smartwatch will be as follows: Figure 1 As shown in (2). From Figure 1 As shown in section (2), the user adjusted the watch strap 12 too loosely, resulting in a certain amount of space between the watch face 11 and the arm. The back of the smartwatch's watch face 11 did not fit the wrist completely. If the smartwatch is worn too loosely, it may move or flip on the user's wrist, which may lead to inaccurate heart rate readings from the heart rate sensor.
[0093] exist Figure 1 In the scenario shown in (2), the heart rate measured by the smartwatch may be inaccurate, meaning the heart rate may fluctuate greatly. Large fluctuations in heart rate include: a heart rate that is too high or too low. For example, if the heart rate measured in the first second is 80, in the second second it is 81, in the third second it is 120, in the fourth second it is 80, and in the fifth second it is 81, then the heart rate in the third second is too high. Or, for another example, if the heart rate measured in the first second is 80, in the second second it is 81, in the third second it is 20, in the fourth second it is 80, and in the fifth second it is 81, then the heart rate in the third second is too low.
[0094] It should be understood that Figure 1This is merely an illustrative description of one application scenario of this application, and does not constitute a limitation on the embodiments of this application, nor is this application limited thereto. For example, the smartwatch may move to the joint; or the smartwatch may swing back and forth with the arm during arm movements. The technical solutions of the embodiments of this application are applicable to these scenarios.
[0095] In view of this, embodiments of this application provide a method and electronic device for heart rate monitoring. The heart rate monitoring method of this application calculates harmonic weighting coefficients (or harmonic weight values) based on PPG signals, then uses these coefficients to determine the corresponding confidence level, and only outputs the heart rate value when the confidence level is high, thus ensuring the accuracy of the heart rate readings and improving the user experience.
[0096] The following combination Figure 2 The flowchart below describes the heart rate monitoring method according to embodiments of this application. For ease of description, the smartwatch will be referred to as a "watch" below. Figure 2 This is a schematic flowchart of a heart rate monitoring method according to an embodiment of this application. Figure 2 As shown, the heart rate monitoring method includes:
[0097] Step 201: Receive a user's operation, which is used to measure heart rate. Alternatively, the operation is used to trigger the heart rate monitoring function.
[0098] This application does not limit the specific method of operation. For example, the operation may be that the user clicks on an application in the UI interface (such as motion monitoring, single measurement, etc. in the UI interface) to trigger the heart rate monitoring function.
[0099] The application can receive user input. The application includes heart rate monitoring functionality. For example, the application includes, but is not limited to, applications for heart rate monitoring, activity tracking, exercise tracking, and health monitoring.
[0100] In one possible example, after receiving a user's action, the application can send a trigger action to the system, causing the system to call the heart rate sensor to collect data (such as PPG signals).
[0101] It should be noted that step 201 above is an optional step. That is, step 201 is one possible way to trigger the watch to measure heart rate, meaning the watch can initiate heart rate measurement after receiving a user's input (which can also be understood as the watch passively measuring heart rate). However, this application is not limited to this. In fact, the watch can also actively measure heart rate. For example, in scenarios where the user wears the watch, the watch can display the user's heart rate reading at any time, allowing the user to easily check their real-time heart rate by raising their wrist.
[0102] Step 202: Obtain the first PPG signal.
[0103] It's understandable that whether the heart rate is measured actively or passively, the watch can obtain the first PPG signal.
[0104] Specifically, acquiring the first PPG signal includes: acquiring the first PPG signal through a heart rate sensor.
[0105] As one possible implementation, after the system receives a heart rate monitoring action triggered by the application, it can call a heart rate sensor (such as a PPG sensor or PPG module) to collect PPG signals.
[0106] This application embodiment can perform heart rate calculation based on the collected PPG signal. Optionally, before calculating the heart rate, it can first detect whether the watch is being worn, or in other words, detect whether the user is wearing the watch.
[0107] Step 203: Determine whether the wearer of the watch is a living person.
[0108] It should be understood that determining whether the wearer is a living person is to detect whether the watch is being worn by the user. If the user is wearing the watch, there will be a need for heart rate monitoring.
[0109] One possible approach is to combine infrared detection technology with a live wear algorithm to detect whether the watch wearer is a living person.
[0110] Optionally, detecting whether the wearer of the watch is a living person can be achieved through the following steps:
[0111] Step 1: Determine whether the watch is being worn using infrared detection.
[0112] The principle of infrared detection technology is as follows: Infrared light is incident on the object to be detected, and the reflected energy is measured; by comparing the reflected energy with an energy threshold, it can be determined whether the watch is being worn. Generally speaking, the reflected energy differs between air and a human hand. Less energy is reflected from air, while more energy is reflected from a human hand.
[0113] For example, if the energy reflected back exceeds the energy threshold, it is considered to be worn on the person's hand; if the energy reflected back is less than the energy threshold, it is considered not to be worn.
[0114] The second step is to determine whether the wearer is alive using a live wear algorithm.
[0115] The liveness detection algorithm is based on a liveness detection model. Since the reflectivity of light after reflection from a human body differs from that after reflection from a non-human body, a liveness detection model is needed for training and differentiation. This model is a pre-trained model used to distinguish whether a watch is being worn. For example, the reflectivity of a watch on a person's wrist is different from that on a cup. Based on this liveness detection model, it can determine whether the watch is being worn by a person.
[0116] Optionally, after detecting whether the wearer of the electronic device is a living person through the above steps, the wearing result can be returned to the system. The wearing result indicates whether the wearer of the watch is a living person (or whether the user is wearing the watch).
[0117] Optionally, in one possible implementation, the wearing result can be identified by an identifier value. For example, if the identifier value is 0, it means that the watch is not being worn by the user; if the identifier value is 1, it means that the watch is being worn.
[0118] If the user is detected wearing the device, step 202 can be performed, for example, by acquiring a first PPG signal via a heart rate sensor in order to calculate the user's heart rate.
[0119] It should be understood that the implementation of this application does not limit the execution order of steps 202 and 203. They can be executed simultaneously; or step 202 can be executed first and step 203 can be executed later; or step 203 can be executed first and step 202 can be executed later.
[0120] Step 204: If it is determined that the wearer of the watch is a living person, determine the first heart rate and the confidence level of the first heart rate based on the first PPG signal.
[0121] The confidence level of heart rate is used to characterize the reliability of heart rate values. For example, the higher the confidence level of heart rate, the higher the reliability of the heart rate value; the lower the confidence level of heart rate, the lower the reliability of the heart rate value.
[0122] In this embodiment, the confidence level of the heart rate can be calculated simultaneously with the heart rate calculation. The confidence level of the heart rate is obtained by calculating the harmonic weights of the PPG signal. This will be discussed later in conjunction with... Figure 3 Detailed description of step 204.
[0123] Step 205: When the confidence level of the first heart rate meets a preset confidence condition, output the first heart rate. Alternatively, output the first heart rate according to the confidence level output strategy (e.g., the first heart rate is a high-confidence heart rate). A high-confidence heart rate refers to a heart rate whose confidence level meets a confidence threshold. For example, a high-confidence heart rate is one whose confidence level is greater than the confidence threshold. For ease of description, the following description uses a high-confidence heart rate as an example.
[0124] The confidence level output strategy refers to deciding whether to output a heart rate value based on its confidence level. For example, if the confidence level of the heart rate is relatively high, it means that the heart rate value is relatively reliable, and the heart rate value can be output; if the confidence level of the heart rate is relatively low, it means that the heart rate value is unreliable, and the heart rate value can be discarded.
[0125] In this embodiment, a confidence threshold can be set to determine the level of confidence, thereby deciding whether to output the heart rate. Optionally, as a possible implementation, the confidence output strategy is as follows: when the confidence of the heart rate is greater than the confidence threshold, the heart rate is considered a high-confidence heart rate, and the heart rate can be output; when the confidence of the heart rate is less than or equal to the confidence threshold, the heart rate is considered a low-confidence heart rate, and the heart rate is not output. The high-confidence heart rate refers to the heart rate when the confidence of the heart rate is greater than the confidence threshold.
[0126] In some possible implementations, after obtaining a high-confidence heart rate, the high-confidence heart rate value can be returned to the application so that the heart rate value can be presented to the user in real time through the interface.
[0127] Alternatively, step 205 can be replaced with: when the confidence level of the first heart rate meets the preset confidence level condition, output the first heart rate. It should be understood that the aforementioned high-confidence heart rate can be considered an example description of a heart rate that meets the preset confidence level condition.
[0128] In some possible implementations, the confidence level of the first heart rate satisfies a preset confidence condition, including: the confidence level of the first heart rate is greater than a confidence threshold. For example, if the confidence level of the first heart rate is 1 and the confidence threshold is 2, then it can be determined that the confidence level of the first heart rate is less than the confidence threshold, so the current heart rate is not output; if the confidence level of the first heart rate is 2 and the confidence threshold is 1, then it can be determined that the confidence level of the first heart rate is greater than the confidence threshold, so the current heart rate is output.
[0129] Alternatively, in some possible embodiments, the confidence level of the first heart rate satisfies a preset confidence condition, including: the confidence level of the first heart rate falls within a high confidence interval.
[0130] Step 206: Display the first heart rate. Or, display the heart rate that meets the preset reliability criteria.
[0131] For example, in a sports scenario, users will raise their wrists at any time to check their real-time heart rate. Displaying a high-confidence heart rate on the UI allows users to know their heart rate in real time, providing them with a highly accurate heart rate reading.
[0132] Optionally, in step 207, the heart rate with high confidence is stored. Alternatively, multiple heart rate values that satisfy preset confidence conditions are stored.
[0133] After obtaining a high-confidence heart rate value, it can be saved or stored for use when generating a heart rate curve later.
[0134] The above describes the scenario where the first heart rate is output and displayed when the confidence level of the first heart rate meets the preset confidence level condition. It should be noted that when the confidence level of the first heart rate does not meet the preset confidence level condition, a second heart rate is displayed. This second heart rate is the heart rate that previously met the preset confidence level condition. The confidence level of the second heart rate meets the preset confidence level condition. It can be understood that the confidence level of the second heart rate can be determined using the heart rate monitoring method of this application embodiment.
[0135] For example, assuming the heart rate is 80 in the first second, 81 in the second, 90 in the third second, 80 in the fourth second, and 81 in the fifth second, the confidence level of the heart rate in the third second can be calculated using the heart rate monitoring method of this application. If the confidence level of the heart rate in the third second does not meet the preset confidence level condition, no value is displayed; that is, 90 is not displayed in the third second, but the heart rate value from the second second is used (or continued), i.e., the heart rate is 80 in the first second, 81 in the second second, 81 in the third second, 80 in the fourth second, and 81 in the fifth second. Here, the confidence level of the heart rate in the second second meets the preset confidence level condition. It can be understood that the confidence level of the heart rate in the second second can also be determined using the heart rate monitoring method of this application.
[0136] It is understandable that the above examples are only for ease of understanding, but this application is not limited to them.
[0137] Optionally, in step 208, a heart rate curve is generated based on the high-confidence heart rate.
[0138] As one possible approach, after obtaining multiple high-confidence heart rate values, a heart rate curve can be generated based on these values. The heart rate curve generated from high-confidence heart rate values can accurately reflect the user's heart rate changes over a certain period, thus improving the user experience.
[0139] For example, suppose the heart rate is 80 in the first second, 81 in the second, 90 in the third second, 80 in the fourth second, and 81 in the fifth second. If the confidence level of the heart rate in the third second does not meet the preset confidence level, the heart rate curve from the first to the fifth second will not use the heart rate value in the third second. Instead, it will use the following heart rate values: 80 in the first second, 81 in the second second, 80 in the fourth second, and 81 in the fifth second. The confidence level of the heart rate used to plot the heart rate curve will meet the preset confidence level.
[0140] Optionally, in step 209, the heart rate curve is displayed.
[0141] For example, after exercise, users can view the trend of heart rate changes during the exercise. Displaying a heart rate curve generated based on high-confidence heart rate values on the UI allows users to view a more accurate trend of heart rate changes.
[0142] In this embodiment, a first heart rate and its confidence level are determined based on the first PPG signal, and a high-confidence first heart rate is output according to the confidence level output strategy. In other words, the first heart rate is output when the confidence level of the first heart rate meets the preset confidence conditions. For example, the first heart rate is only output when the confidence level of the first heart rate is higher than the confidence level threshold, which can ensure that the output heart rate value is highly reliable.
[0143] In this embodiment, the confidence level of the first heart rate is determined by the weighting coefficients of M harmonic signals. The M harmonic signals are determined based on the first PPG signal within a preset time period, where M is an integer greater than or equal to 2. This embodiment does not specifically limit the duration or unit of measurement (or granularity) of the preset time period.
[0144] Optionally, as a possible implementation, M harmonic signals can be obtained based on the acquired first PPG signal, then the weighting coefficient of each harmonic signal can be calculated, and the confidence level of the weighting coefficient of each harmonic signal can be determined to obtain M confidence levels. The highest confidence level among the M confidence levels can be used as the confidence level of the first heart rate.
[0145] In other words, after obtaining M confidence levels based on M harmonic signals, the highest confidence level is selected as the confidence level of the first heart rate in order to accurately reflect the user's heart rate.
[0146] This application does not limit the specific method for obtaining M harmonic signals from the first PPG signal. The M harmonic signals can be obtained by performing some transformations on the first PPG signal and then performing harmonic decomposition based on the transformed signal.
[0147] Optionally, in some possible embodiments, the first PPG signal may undergo the following processing: smoothing, bandpass filtering, Hilbert transform, notch filtering, harmonic decomposition, etc., to obtain a processed signal. Then, the processed signal is filtered through M filters to obtain M harmonic signals.
[0148] In summary, by performing the following processing on the first PPG signal: smoothing, bandpass filtering, Hilbert transform, notch filtering, and harmonic decomposition, and then calculating the weighting coefficients of each harmonic signal after harmonic decomposition, and finally calculating the confidence level based on the weighting coefficients, the confidence level of the heart rate can be obtained.
[0149] For ease of understanding, the following is combined with Figure 3 Describe in detail the process of determining the first heart rate and the confidence level of the first heart rate based on the first PPG signal. Figure 3 A schematic flowchart illustrating a method for calculating confidence levels according to an embodiment of this application is shown. Figure 3 As shown, the method includes the following steps:
[0150] Step 301: Smooth the first PPG signal to obtain a smoothed PPG signal.
[0151] In one possible implementation, the first PPG signal is acquired by a PPG sensor at a frequency of 100 Hz, that is, 100 frames of data are acquired per second, and each frame of data occupies 10 ms.
[0152] The smoothing process can also be understood as de-burring the PPG signal. Burrs can manifest as pits and spikes.
[0153] It is understandable that both "dropping a dent" and "rising a dent" refer to abnormal signals. Abnormal signals are caused by the user wearing the watch too loosely, resulting in inaccurate PPG signal acquisition. A "dropping a dent" indicates a signal that is too weak; a "rising a dent" indicates a signal that is too strong. Regarding how to identify "dropping a dent" and "rising a dent," this application embodiment can identify abnormal signals by setting a threshold.
[0154] Optionally, as a possible implementation, peaks in the PPG signal can be identified by setting a proportional threshold. The value of the proportional threshold can be preset, and this application does not limit the specific value of the proportional threshold.
[0155] For example, when an anomaly is detected in the current frame, the difference between the data in the current frame and the data in the previous frame is calculated. This difference is then divided by the data in the previous frame to obtain a ratio. This ratio is compared to a proportional threshold to obtain the comparison result. If the ratio is greater than or equal to the proportional threshold, the data in the current frame is determined to be a spike, and smoothing is required. If the ratio is less than the proportional threshold, smoothing is not required.
[0156] The specific method for smoothing the spikes in the PPG signal in this application embodiment is not limited.
[0157] Optionally, as a possible implementation, if the data of the current frame is spiked, the smoothing process for the data of the current frame includes: calculating the sum of the data of the previous frame and the data of the next frame, then averaging the sum, and using the average as the value after smoothing the current frame.
[0158] For example, if the value of the current frame is 150, the value of the previous frame is 100, and the value of the next frame is 100, then the value of the current frame after smoothing is (100+100) / 2=100.
[0159] Based on the above methods, the first PPG signal after smoothing eliminates the issues of pitfalls and spikes.
[0160] Step 302: Bandpass filter is applied to the smoothed PPG signal to obtain a second PPG signal, which is a PPG signal within the target frequency band.
[0161] The target frequency range is determined based on the target heart rate range. The target heart rate range refers to the normal heart rate range.
[0162] For example, based on prior knowledge, it is known that the normal heart rate range is generally between 30 beats / minute and 240 beats / minute, so the target frequency range can be set to 0.5 Hz to 4 Hz.
[0163] For example, here the bandpass filter is set to only allow PPG signals with a frequency band of 0.5 Hz to 4 Hz to pass through. That is, the smoothed PPG signal is bandpass filtered from 0.5 Hz to 4 Hz to obtain the PPG signal with a frequency band of 0.5 Hz to 4 Hz (for example, denoted as the second PPG signal).
[0164] Step 303: Perform a Hilbert transform on the second PPG signal to obtain the analytic signal of the second PPG signal. The derivative of the phase of the analytic signal is the instantaneous frequency.
[0165] The Hilbert transform refers to the conversion of a real-valued signal into an analytic signal. The result of this transformation is that the one-dimensional signal becomes a signal in a two-dimensional complex plane, where the magnitude and argument of the complex number represent the amplitude and phase of the signal. Here, the instantaneous frequency can be obtained by differentiating the phase of the analytic signal.
[0166] Optionally, as one possible implementation, the first heart rate can be calculated by differentiating the phase of the analyzed signal to obtain the heart rate value. Of course, whether to output this heart rate value also depends on the confidence level of the heart rate.
[0167] Step 304: Perform notch filtering on the analyzed signal to obtain a third PPG signal. The notch filtering is used to eliminate interference from motion noise. The third PPG signal is the signal obtained after notch filtering. The third PPG signal does not contain motion interference signals.
[0168] The purpose of notch filtering is to eliminate interference from moving noise. Notch filtering can be achieved using a notch filter. A notch filter is a filter that can rapidly attenuate the input signal at a specific frequency, thereby blocking signals of that frequency from passing through.
[0169] Generally, the PPG signal acquired by a heart rate sensor also includes interference from the ACC signal. For example, when a user wears a watch, in addition to the pulse, the user's arm may also move. Therefore, the PPG signal acquired by the heart rate sensor will also include signals generated by arm movement. These arm movement signals are typically acquired by the ACC accelerometer. To eliminate the influence of arm movement on the PPG signal, notch filtering is applied to the PPG signal in conjunction with the ACC main frequency to remove interference from the ACC signal.
[0170] Step 305: Filter the third PPG signal through M filters to obtain M harmonic signals.
[0171] The M filters are narrowband filters. After filtering by the M filters, the third PPG signal can be decomposed into M harmonic signals.
[0172] For example, the third PPG signal passes through filter 1 to obtain harmonic signal 1; the third PPG signal passes through filter 2 to obtain harmonic signal 2; ...; the third PPG signal passes through filter M to obtain harmonic signal M.
[0173] After obtaining M harmonic signals, the weighting coefficient of each harmonic signal can be calculated separately, and the confidence level of the weighting coefficient of each harmonic signal can be determined.
[0174] Step 306: Determine the weighting coefficient of each harmonic signal among the M harmonic signals.
[0175] In practical implementation, the weighting coefficient of the relative error can be calculated for each harmonic signal in conjunction with the ideal signal.
[0176] Optionally, as a possible implementation, determining the weighting coefficient of each of the M harmonic signals includes:
[0177] Calculate the relative error of each harmonic signal relative to the ideal signal;
[0178] The weighting coefficient of each harmonic signal is obtained by dividing the relative error of each harmonic signal by the sum of the relative errors of the M harmonic signals.
[0179] It should be noted that each of the above harmonic signals has a corresponding ideal signal. The ideal signal can be defined as follows: the ideal signal is obtained by multiplying the signal from the previous time step by the phase of the signal from the next time step.
[0180] For example, an ideal signal can be expressed as follows:
[0181] y * [n] = e jω[n+1] y[n-1]
[0182] Among them, y * [n] represents the ideal signal at time n, y[n-1] represents the filtered signal at time n-1, and e jω[n+1] The polar coordinate representation of the phase at the next moment.
[0183] For example, taking harmonic signal 1 as an example, the relative error between harmonic signal 1 and its corresponding ideal signal is calculated as Δ1. The sum of the relative errors of the M harmonic signals is Δ1 + Δ2 + ... + Δ M Then the weighting coefficient of harmonic signal 1 is
[0184] Step 307: Determine the confidence level of the weighting coefficients for each harmonic signal.
[0185] Based on statistical analysis of large datasets, confidence interval thresholds are determined, thereby classifying confidence levels. In other words, confidence interval thresholds can be determined through statistical analysis of large datasets. After obtaining the weighting coefficients for each harmonic signal, the confidence level corresponding to each weighting coefficient can be determined based on the confidence interval thresholds.
[0186] Optionally, a certain amount of sample data can be collected, and four confidence level thresholds can be defined using the quartile method to convert the weighting coefficients into confidence levels. A higher confidence level indicates more reliable data; a lower confidence level indicates less reliable data. For example, assuming confidence levels are divided into four levels from low to high: 0, 1, 2, and 3, then confidence levels greater than or equal to 2 can be defined as high confidence intervals, and confidence levels less than 2 can be defined as low confidence intervals.
[0187] Quartiles are the values located at the three dividing points when all sample data are arranged in ascending order and divided into four equal parts. There are three quartiles: the first quartile, commonly referred to as the lower quartile, the second quartile, the median, and the third quartile, denoted as Q1, Q2, and Q3 respectively.
[0188] The following example, illustrated in Table 1, illustrates this point. Assume the collected sample data comprises 10,000 groups. These 10,000 groups are divided using the quartile method, with the three quartile values being 1000, 100, and 10 respectively. The correspondence between the weighting coefficients and the confidence intervals is shown in Table 1 below:
[0189] Table 1
[0190] Weighting factor Confidence interval greater than 1000 0 greater than 100 and less than or equal to 1000 1 greater than 10 and less than or equal to 100 2 less than or equal to 10 3
[0191] In Table 1 above, the confidence level is divided into four levels, increasing sequentially from 0 to 3. Taking the data in the third row of Table 1 as an example, if the weight coefficient value is greater than 10 and less than or equal to 100, then the corresponding confidence level can be obtained from Table 1 as 2.
[0192] It should be understood that, in specific implementation, corresponding confidence intervals can be formulated based on sample data from different scenarios (such as sleep, running, walking, yoga, etc.), or a unified confidence interval standard can be formulated. This application embodiment does not make specific limitations on this.
[0193] It should also be understood that the examples in Table 1 are merely illustrative and do not constitute a limitation on the embodiments of this application.
[0194] The above-mentioned, through Figure 3 The process shown can obtain the confidence level of the weighting coefficient of each harmonic signal, thus obtaining M confidence levels. Further, the highest confidence level among the M confidence levels can be taken as the confidence level of the heart rate.
[0195] The following combination Figure 4 and Figure 5 The software system and hardware architecture used in the embodiments of this application are described respectively.
[0196] Figure 4 This is a schematic diagram of the software system used in the embodiments of this application. For example... Figure 4 As shown, a layered software system is divided into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the software system can be divided into six layers, from top to bottom: application layer, system service layer, algorithm library, hardware abstraction layer (HAL), kernel layer, and driver layer.
[0197] like Figure 4 As shown, the application layer includes a watch face, activity tracking, calls, and workouts.
[0198] Understandable. Figure 4 The examples shown are only a portion of the applications; in fact, the application layer can include other applications as well, and this application does not limit this. For example, the application layer may also include applications such as messaging, alarm clock, weather, stopwatch, compass, timer, flashlight, calendar, and Alipay.
[0199] like Figure 4 As shown, the system service layer includes step counting, heart rate service, calories, and heart health.
[0200] An algorithm library can include multiple algorithm modules. For example, such as... Figure 4 As shown, the algorithm library includes a heart rate algorithm module, a dimming algorithm module, a sleep algorithm, and a wearable algorithm, among others.
[0201] The heart rate algorithm module is used to determine a first heart rate and its confidence level. As one possible implementation, the heart rate algorithm module is used to perform step 204 above, or to perform the aforementioned... Figure 3 The method shown.
[0202] The wearing algorithm is used to detect the wearing status of the watch. As one possible implementation, the wearing algorithm module is used to perform step 203 described above.
[0203] like Figure 4 As shown, the hardware abstraction layer includes C++ libraries, storage, display, touch control, etc. The C++ libraries are used to provide system resources for the algorithm libraries.
[0204] Understandable. Figure 4 The Hardware Abstraction Layer shown is only a part of the content. In fact, the Hardware Abstraction Layer (HAL) can also include other components, such as Bluetooth modules, GPS modules, etc.
[0205] like Figure 4 As shown, the kernel layer includes the OS kernel. The OS kernel is used for management and scheduling.
[0206] The driver layer is used to drive hardware resources. The driver layer can include multiple driver modules. For example... Figure 4 As shown, the driving layer includes PPG driver, LCD driver, and motor, etc.
[0207] For example, a user can click on a workout app. While the user is exercising, the workout app can display their heart rate in real-time through the interface. The following combines... Figure 4 This application describes the process of generating heart rate data in its embodiments. When a user clicks on the exercise application, the application layer receives the user's action and invokes the heart rate service in the system service layer. The OS kernel schedules the PPG driver to activate the PPG sensor and collect data (or PPG signals). The PPG driver can return the collected data to the OS kernel. The OS kernel sends the collected data to the algorithm library for relevant calculations. The wearability algorithm module in the algorithm library detects whether the watch is being worn based on the PPG signal and reports the wearing result to the OS kernel. If the user is detected wearing a watch, the OS kernel triggers the execution of the heart rate monitoring service. The OS kernel sends the data collected by the PPG sensor to the heart rate algorithm module. The heart rate algorithm module calculates the heart rate and its confidence level based on the PPG signal. The heart rate algorithm module returns the heart rate value and its confidence level to the OS kernel. The OS kernel determines a high-confidence heart rate value based on the confidence level output strategy. The OS kernel reports the high-confidence heart rate value to the application layer. The application layer displays the heart rate value reported by the OS kernel on the UI interface.
[0208] Optionally, the OS kernel stores high-confidence heart rate values. The application layer generates a heart rate curve based on the multiple high-confidence heart rate values reported by the OS kernel and displays the heart rate curve in the UI.
[0209] Optionally, the application layer can also receive a user's termination trigger operation, which is used to terminate heart rate monitoring. Upon receiving the termination trigger operation from the application layer, the OS kernel can schedule the heart rate algorithm module and the wearable algorithm module in the algorithm library to terminate. After termination, the heart rate algorithm module and the wearable algorithm module can report to the OS kernel. The OS kernel then schedules the PPG driver to cause the PPG sensor to perform a light-off operation.
[0210] Figure 5 A schematic diagram of a device 500 applicable to this application is shown. Device 500 may be a watch, wristband, wearable electronic device, or other wearable device for measuring heart rate, etc. The embodiments of this application do not limit the specific type of device 500.
[0211] like Figure 5 As shown, the device 500 may include components such as a radio frequency (RF) circuit 210, a memory 220, other input devices 230, a touch screen 240, a PPG module 251, a buzzer 252, an audio circuit 260, an I / O subsystem 270, a processor 280, and a power supply 290.
[0212] It should be noted that, Figure 5 The structure shown does not constitute a specific limitation on device 500. In other embodiments of this application, device 500 may include a... Figure 5 The components shown may include more or fewer components, or the device 500 may include... Figure 5 The components shown may be a combination of certain components, or the device 500 may include... Figure 5 Sub-components of some of the components shown. Figure 5 The components shown can be implemented in hardware, software, or a combination of software and hardware.
[0213] RF circuit 210 can be used to send and receive information, or to receive and send signals during a call. For example, it receives downlink information from the base station, processes it, and then sends uplink data to the base station. Typically, RF circuitry includes, but is not limited to, antennas, at least one amplifier, transceivers, couplers, low-noise amplifiers (LNAs), duplexers, etc. Furthermore, RF circuit 210 can also communicate wirelessly with networks and other devices. This wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Message Service (SMS), etc.
[0214] The memory 220 can be used to store software programs, and the processor 280 executes various functions of the device 500 by running the software programs stored in the memory 220. The memory 220 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data maintained according to the use of the device 500 (such as audio data, telephone directory, etc.). In addition, the memory 220 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0215] Other input devices 230 can be used to receive input numeric or character information, and to generate key signal inputs related to user settings and function control of device 500. Specifically, other input devices 230 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, optical mouse (an optical mouse is a touch-sensitive surface that does not display visual output, or an extension of the touch-sensitive surface formed by a touch screen). Other input devices 230 are connected to other input device controllers 271 of I / O subsystem 270, and interact with processor 280 under the control of other input device controllers 271.
[0216] The touchscreen 240 can be used to display information input by the user or information provided to the user, as well as various menus of the device 500, and can also accept user input. Specifically, the touchscreen 240 may include a display panel 241 and a touch panel 242. The display panel 241 may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini light-emitting diode (Mini LED), a micro light-emitting diode (Micro LED), a micro OLED, or a quantum dot light-emitting diode (QLED).
[0217] The touch panel 242, also known as a display screen or touch-sensitive screen, can collect user touch or non-touch operations on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel 242, and may also include motion-sensing operations; these operations include single-point control operations, multi-point control operations, etc.), and drive corresponding connected devices according to a pre-set program. Optionally, the touch panel 242 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's gestures, i.e., the touch position and posture, and detects the signals generated by the touch operation, transmitting the signals to the touch controller; the touch controller receives touch information from the touch detection device, converts it into information that the processor can process, and sends it to the processor 280, and can also receive and execute commands sent by the processor 280. In addition, the touch panel 242 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave, or any future technology. Furthermore, the touch panel 242 can cover the display panel 241. The user can operate on or near the touch panel 242 covering the display panel 241 based on the content displayed on the display panel 241 (including but not limited to: soft keyboard, virtual mouse, virtual buttons, icons, etc.). After detecting the operation on or near the touch panel 242, it transmits the information to the processor 280 via the I / O subsystem 270 to determine the user input. Subsequently, the processor 280 provides corresponding visual output on the display panel 241 based on the user input via the I / O subsystem 270. Although in Figure 5 In this embodiment, the touch panel 242 and the display panel 241 are two separate components to realize the input and output functions of the device 500. However, in some embodiments, the touch panel 242 and the display panel 241 can be integrated to realize the input and output functions of the device 500.
[0218] The display panel 241 can provide prompts regarding wearing method, wearing status, etc., under the program control of the processor 280, as well as historical information on the detected heart rate in visual (numerical, tabular, graphical) or audible (synthesized speech or tone) form. As a non-limiting example, a visual graph can be displayed showing the heart rate calculated every 5 minutes during a previous fixed time interval (e.g., 1 hour) or after the end of an exercise session (as determined by the user's instruction). The display panel 241 can also provide average heart rate information or heart rate statistics over one or more previous time periods under the control of the processor 280. As another example, the display panel 241 can provide the current heart rate value as a "real-time" heart rate value displayed periodically (e.g., every second) to the user during the ongoing exercise program.
[0219] PPG module 251 includes a light emitter and a light sensor. Heart rate measurement via the PPG module is based on the principle of light absorption by matter. The light emitter in the PPG module of the electronic device illuminates the blood vessels in the skin, and the light sensor receives the light transmitted through the skin. Since different volumes of blood within blood vessels absorb green light differently, during a heartbeat, blood flow increases, and the absorption of green light increases accordingly; during the intervals between heartbeats, blood flow decreases, and the absorption of green light decreases accordingly. Therefore, heart rate can be measured based on the absorbance of the blood. In operation, the light emitter transmits a light beam to the user's skin, and this beam can be reflected by the user's skin and received by the light sensor. The light sensor converts this light into an electrical signal indicating its intensity. This electrical signal can be in analog form and can be converted into digital form by an analog-to-digital converter. The digital signal from the analog-to-digital converter can be a time-domain PPG signal fed to the processor 280. The output of the accelerometer can also be converted into digital form using an analog-to-digital converter. The processor 280 can receive digitized signals from the light sensor and the accelerometer output signal from the digitized accelerometer, and can process these signals to provide heart rate or wear status output signals to a storage device, visual display, audible signal transducer, touch screen, or other output indicator.
[0220] The device 500 may also include at least one sensor, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 241 according to the ambient light level, and the proximity sensor can turn off the backlight of the display panel 241 and / or the touch panel 242 when the device 500 is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for vibration recognition-related functions (such as pedometers, tapping, etc.). Other sensors that may be configured in the device 500, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.
[0221] The device 500 may also include a buzzer 252 that can generate vibrations according to instructions from the processor 280.
[0222] Audio circuit 260 provides an audio interface between the user and device 500. Audio circuit 260 can convert received audio data into a signal and transmit it to speaker 261, where speaker 261 converts it into a sound signal for output. On the other hand, microphone can convert collected sound signals into signals, which are received by audio circuit 260, converted into audio data, and then output to RF circuit 210 for transmission, such as to a mobile phone, or to memory 220 for further processing.
[0223] The I / O subsystem 270 controls external devices for input and output, and may include an other input device controller 271, a sensor controller 272, and a display controller 273. Optionally, one or more other input device controllers 271 receive signals from and / or send signals to other input devices 230. Other input devices 230 may include physical buttons (press buttons, rocker buttons, etc.), dial pads, slide switches, joysticks, click wheels, and optical mice (the optical mouse may be a touch-sensitive surface that does not display visual output, or an extension of the touch-sensitive surface formed by the touchscreen). It is worth noting that the other input device controllers 271 can be connected to any one or more of the above-mentioned devices. The display controller 273 in the I / O subsystem 270 receives signals from and / or sends signals to the touchscreen 240. After the touchscreen 240 detects user input, the display controller 273 converts the detected user input into an interaction with the user interface object displayed on the touchscreen 240, thus realizing human-computer interaction. The sensor controller 272 can receive signals from one or more sensors 251 and / or send signals to one or more sensors 251.
[0224] The processor 280 is the control center of the device 500, connecting various parts of the mobile phone via various interfaces and lines. It executes various functions and processes data of the device 500 by running or executing software programs and / or modules stored in the memory 220, and by calling data stored in the memory 220. Optionally, the processor 280 may include one or more processing units. For example, the processor 110 may include at least one of the following processing units: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, video codec, digital signal processor (DSP), baseband processor, or neural network processing unit (NPU). These different processing units can be independent devices or integrated devices.
[0225] Optionally, processor 280 may integrate an application processor and a modem processor. The application processor primarily handles the operating system, user interface, and applications; the modem processor primarily handles wireless communication. It is understood that the modem processor may also not be integrated into processor 280.
[0226] The device 500 also includes a power supply 290 (such as a battery) to power the various components. Optionally, the power supply can be logically connected to the processor 280 through a power management system, thereby enabling the management of charging, discharging, and power consumption. It should be understood that, although not shown, the device 500 may also include a camera, Bluetooth module, etc., which will not be described further here.
[0227] The modules stored in the memory 220 may include: operating system, contact / motion module, graphics module, and application program, etc.
[0228] The contact / motion module is used to detect contact between an object or finger and the touchscreen 240 or the clickable touch wheel, capturing the speed (direction and magnitude) and acceleration (change in magnitude or direction) of the contact, and determining the type of contact event. For example, various contact event detection modules are used, sometimes combining gestures with elements in the user interface to achieve certain operations: finger pinching / depinching, etc.
[0229] The graphics module is used to render and display graphics on touchscreens or other displays, including web pages, icons, digital images, videos, and animations.
[0230] Applications can include contacts, phone, video conferencing, email clients, instant messaging, personal sports, camera, image management, video player, music player, calendar, plugins (e.g., weather, stocks, calculator, clock, dictionary), custom plugins, search, notes, maps, and online video, etc.
[0231] Understandable. Figure 5 The connection relationships between the modules shown are merely illustrative and do not constitute a limitation on the connection relationships between the modules of device 500. Optionally, the modules of device 500 may also adopt a combination of various connection methods described in the above embodiments.
[0232] For ease of understanding, the following is combined with Figure 6 and Figure 7 The interface will be explained below. It should be understood that... Figure 6 and Figure 7 The interface shown is not intended to limit the embodiments of this application.
[0233] Figure 6 This is an example diagram of a heart rate monitoring interface according to an embodiment of this application.
[0234] like Figure 6 As shown in (1), when wearing the watch, the user can tap the heart rate application on the watch interface. The heart rate application can perform a single heart rate measurement. It should be understood that... Figure 6The interface in (1) only shows icons for some applications, such as weather and blood oxygen saturation, which does not limit the embodiments of this application.
[0235] In the case of a single heart rate measurement, the watch interface looks like... Figure 6 As shown in (2), the watch is measuring heart rate. Figure 6 As shown in (3), the watch can display the real-time heart rate value to the user, for example, 71 beats / minute.
[0236] In this embodiment of the application, even if the watch worn by the user is relatively loose, the watch can still present a relatively accurate heart rate value to the user.
[0237] As one possible implementation, by calculating the confidence level of the heart rate, the output is as follows: Figure 6 The high confidence rate value is shown in (3).
[0238] In one possible implementation, users can enable the option to continuously measure heart rate via their mobile phones. Once enabled, the watch will monitor the user's heart rate 24 hours a day, displaying a 24-hour heart rate curve and resting heart rate.
[0239] When continuously measuring heart rate, the watch interface can... Figure 6 As shown in (4). Figure 6 The interface shown in (4) allows the watch to display the heart rate curve and resting heart rate for a certain period of time to the user.
[0240] As a possible implementation, a heart rate model can be generated from multiple high-confidence heart rate values, such as... Figure 7 The heart rate curve shown in (4) is shown in the middle.
[0241] Figure 7 This is another example diagram of a heart rate monitoring interface according to an embodiment of this application.
[0242] like Figure 7 As shown in Figure (1), when wearing the watch, the user can click on the workout application on the watch interface to open the workout application and monitor information during exercise. During exercise, the watch can display the workout information from the workout application to the user in real time, such as... Figure 7 As shown in the interface in (2), the watch can display heart rate, pace, distance, time, etc. to the user.
[0243] As a possible implementation, by calculating the confidence level of the heart rate, the output can be as follows: Figure 7 The high confidence rate value is shown in (2).
[0244] After exercise, users can view their heart rate curve during the workout. For example...Figure 7 The interface shown in (3) allows the watch to display information such as heart rate curve, average heart rate, maximum heart rate, and minimum heart rate to the user.
[0245] As a possible implementation, a heart rate model can be generated from multiple high-confidence heart rate values, such as... Figure 8 The heart rate curve shown in (3) is shown in the middle.
[0246] The following combination Figure 9 and Figure 8 This application describes the effect of signal optimization in its embodiments.
[0247] Figure 8 This is a comparative schematic diagram illustrating the optimized pitfall signal according to an embodiment of this application. For example... Figure 9 As shown in the diagram, the solid line represents the PPG signal before optimization, and the dashed line represents the PPG signal after optimization. It can be seen that the PPG signal before optimization clearly contained pitfall signals. After optimization using the algorithm of this embodiment, the pitfall signals were removed from the PPG signal.
[0248] Figure 9 This is a comparative schematic diagram showing the effect of optimizing the rising signal according to an embodiment of this application. For example... Figure 8 As shown in the diagram, the solid line represents the PPG signal before optimization, and the dashed line represents the PPG signal after optimization. It can be seen that the PPG signal before optimization clearly exhibits a spike signal; after optimization using the algorithm of this embodiment, the spike signal is removed.
[0249] It should be understood that Figure 9 and The example in the figure is a comparison result of algorithm simulation of an embodiment of this application, and does not constitute a limitation on the embodiment of this application.
[0250] This application also provides a computer program product that, when executed by a processor, implements the methods described in any of the method embodiments of this application.
[0251] The computer program product can be stored in memory and, after processes such as preprocessing, compilation, assembly, and linking, is finally converted into an executable object file that can be executed by a processor.
[0252] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a computer, implements the methods described in any of the method embodiments of this application. The computer program may be a high-level language program or an executable object program.
[0253] The computer-readable storage medium can be volatile memory or non-volatile memory, or it can include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).
[0254] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process and technical effects of the above-described apparatus and equipment can be referred to the corresponding processes and technical effects in the foregoing method embodiments, and will not be repeated here.
[0255] In the several embodiments provided in this application, the systems, apparatuses, and methods disclosed can be implemented in other ways. For example, some features of the method embodiments described above can be ignored or not performed. The apparatus embodiments described above are merely illustrative; the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Multiple units or components can be combined or integrated into another system. Furthermore, the coupling between units or components can be direct coupling or indirect coupling, including electrical, mechanical, or other forms of connection.
[0256] It should be understood that in the various embodiments of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0257] Furthermore, the terms "system" and "network" are often used interchangeably in this paper. The term "and / or" in this paper merely describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the character " / " in this paper generally indicates that the preceding and following related objects have an "or" relationship.
[0258] In summary, the above description is merely a preferred embodiment of the technical solution of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method of heart rate monitoring, characterized in that, The method is applied to an electronic device, and the method comprises: determining that a wearer of the electronic device is a living body; acquiring a first PPG signal; determining a first heart rate and a confidence degree of the first heart rate according to the first PPG signal, wherein the confidence degree of the first heart rate is determined by a weight coefficient of M harmonic signals, the M harmonic signals being determined according to the first PPG signal within a preset time, and M is an integer greater than or equal to 2; outputting the first heart rate when the confidence degree of the first heart rate meets a preset confidence condition; displaying the first heart rate; the method further comprises: calculating the weight coefficient of each harmonic signal of the M harmonic signals; determining a confidence degree of the weight coefficient of each harmonic signal to obtain M confidence degrees; taking the highest confidence degree of the M confidence degrees as the confidence degree of the first heart rate.
2. The method of claim 1, wherein, the method further comprises: displaying a second heart rate when the confidence degree of the first heart rate does not meet the preset confidence condition, the second heart rate being a heart rate that meets the preset confidence condition last time.
3. The method of claim 1, wherein, the calculation of the weight coefficient of each harmonic signal of the M harmonic signals comprises: calculating a relative error of each harmonic signal relative to an ideal signal, the ideal signal being a signal obtained by multiplying a signal at a previous moment by a phase at a next moment at a current moment; dividing the relative error of each harmonic signal by a sum of the relative errors of the M harmonic signals to obtain the weight coefficient of each harmonic signal.
4. The method according to any one of claims 1 to 3, characterized in that, the method further comprises: performing smoothing processing on the first PPG signal to obtain a PPG signal after smoothing processing; performing band-pass filtering on the PPG signal after smoothing processing to obtain a second PPG signal, the second PPG signal being a PPG signal in a target frequency range; performing Hilbert transform on the second PPG signal to obtain an analytic signal of the second PPG signal, wherein a derivative of a phase of the analytic signal is an instantaneous frequency; performing notch filtering on the analytic signal to obtain a third PPG signal, the third PPG signal not including a motion interference signal; filtering the third PPG signal through M filters to obtain the M harmonic signals.
5. The method of claim 4, wherein, the smoothing processing on the first PPG signal to obtain the PPG signal after smoothing processing comprises: when signal abnormality of a current frame is identified, calculating a sum of data of a previous frame and a next frame of the current frame, and averaging the sum; taking the average value as a value after smoothing processing of the current frame.
6. The method of claim 1, wherein, the determination of the confidence degree of the weight coefficient of each harmonic signal comprises: determining a confidence degree corresponding to the weight coefficient of each harmonic signal according to a confidence degree interval threshold, wherein the confidence degree interval threshold is determined by big data sample statistics.
7. The method according to any one of claims 1 to 3, characterized in that, the confidence degree of the first heart rate meeting the preset confidence condition comprises: the confidence degree of the first heart rate being greater than a confidence degree threshold.
8. The method according to any one of claims 1 to 3, characterized in that, the method further comprises: storing a plurality of heart rate values whose confidence degrees meet the preset confidence condition; generating a heart rate curve based on the plurality of heart rate values; displaying the heart rate curve.
9. An electronic device, comprising: An electronic device comprising a processor and a memory coupled to the processor, the memory for storing a computer program which, when executed by the processor, causes the electronic device to perform the method of any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program which, when executed by a processor, causes the processor to perform the method of any one of claims 1 to 8.
11. A chip, characterized by An apparatus comprising a processor which, when executing instructions, performs the method of any one of claims 1 to 8.
12. A computer program product, characterised in that, A computer program which, when executed by a computer, causes the computer to perform the method of any one of claims 1 to 8.
Citation Information
Patent Citations
Method for identifying instantaneous movement interference and method for computing confidence coefficients of heart rates
CN106214143A
Harmonic template classifier
US20160051158A1
Local signal-to-noise peak detection
US20170354381A1