Methods, apparatuses, electronic devices, and storage media for measuring heart rate signal quality
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-21
- Publication Date
- 2026-08-11
AI Technical Summary
[0014]根据本申请实施例的衡量心率信号质量的装置,通过获取模块获取多个第一设定时间的光电容积脉搏波描记法PPG信号的原始数据和多个第一设定时间结束时的第一时刻的心率值,通过处理模块对各第一设定时间的PPG信号的原始数据进行短时傅里叶变换,得到各第一设定时间的幅度向量和频率向量,通过确定模块根据各第一设定时间的幅度向量、频率向量和各第一时刻的心率值,确定各第一时刻的第一心率信号质量和第二设定时间的第二心率信号质量,通过计算模块根据各第一心率信号质量和第二心率信号质量,计算目标心率信号质量。由此,该装置能够全面衡量心率信号质量,进而可以用来衡量光电信号硬件模组的性能,以及用户佩戴可穿戴设备的质量。
Smart Images

Figure CN116491920B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wearable device technology, and in particular to a method, apparatus, electronic device and storage medium for measuring heart rate signal quality. Background Technology
[0002] As people's living standards continue to improve, wearable devices (such as smartwatches / bands) are becoming increasingly popular among consumers. The PPG (Photo Pethysmo Graphic) signal measured by wearable devices contains motion signals, heart rate signals, and noise signals. The quality of the heart rate signal can be calculated by the proportion of the heart rate signal in the measured PPG signal. Quantifying the heart rate signal quality is very useful in practice, as it can be used to measure the performance of the PPG signal module and the quality of the wearable device worn by the user.
[0003] Therefore, how to comprehensively measure the quality of heart rate signals is an urgent problem to be solved. Summary of the Invention
[0004] This application aims to at least partially solve one of the technical problems in the aforementioned technologies.
[0005] This application proposes a method for measuring heart rate signal quality. The method includes: acquiring raw data of photoplethysmography (PPG) signals at multiple first predetermined times and heart rate values at multiple first moments; wherein each first moment is the moment at the end of the corresponding first predetermined time; performing a short-time Fourier transform on the raw data of the PPG signals at each first predetermined time to obtain corresponding amplitude vectors and frequency vectors; determining the first heart rate signal quality at each first moment and the second heart rate signal quality at a second predetermined time based on the amplitude vector, frequency vector, and heart rate value at each first predetermined time; wherein the second predetermined time includes all the first predetermined times; and calculating a target heart rate signal quality based on the first heart rate signal quality and the second heart rate signal quality.
[0006] The method for measuring heart rate signal quality according to embodiments of this application first acquires raw data of photoplethysmography (PPG) signals for multiple first set time periods and heart rate values at the first moment after the end of each first set time period. Then, a short-time Fourier transform is performed on the raw data of the PPG signals for each first set time period to obtain the amplitude vector and frequency vector corresponding to the raw data of the PPG signals for each first set time period. Next, based on the amplitude vector, frequency vector, and heart rate value at each first moment, the first heart rate signal quality at each first moment and the second heart rate signal quality at the second set time period are determined. Finally, the target heart rate signal quality is calculated based on the first and second heart rate signal qualities. Therefore, this method can comprehensively measure heart rate signal quality, and can be used to measure the performance of optoelectronic signal hardware modules and the quality of wearable devices worn by users.
[0007] In some embodiments, determining the first heart rate signal quality at each first time and the second heart rate signal quality at the second set time based on the amplitude vector, frequency vector, and heart rate value at each first time interval includes: calculating the heart rate count corresponding to each first time interval based on the heart rate value at each first time interval; querying the frequency vector at each first time interval for a frequency value that matches the heart rate count at each first time interval; determining a target sequence number corresponding to the frequency value that matches the heart rate count at each first time interval based on the frequency value that matches the heart rate count at each first time interval; and determining the first heart rate signal quality at each first time interval and the second heart rate signal quality at the second set time interval based on the target sequence number at each first time interval.
[0008] In some embodiments, determining the quality of the first heart rate signal at each first time point based on the target sequence number at each first time point includes: calculating the sum of amplitude values corresponding to the target sequence number at each first time point within a set range based on the amplitude vector corresponding to the first set time at each first time point, as the sum of first amplitude values, and the sum of amplitude values corresponding to all sequence numbers at each first time point within the first set time period, as the sum of second amplitude values; and calculating the quality of the first heart rate signal at each first time point based on the sum of the first amplitude values and the sum of the second amplitude values.
[0009] In some embodiments, the above-described method for measuring heart rate signal quality further includes: calculating the second heart rate signal quality for the second set time based on the first heart rate signal quality at each of the first time moments.
[0010] In some embodiments, determining the quality of the second heart rate signal for the second set time based on the target sequence number of each first time point includes: normalizing the amplitude value of the amplitude vector corresponding to the raw data of the PPG signal for each first set time point; obtaining a point pair sequence of frequency and amplitude values corresponding to each first set time point based on the normalized amplitude values; querying the target point pair that matches the target sequence number of each first time point from each point pair sequence; pairing the target point pair of the current time point with the target point pair of the previous time point when the current time point is greater than zero; generating a curve cluster based on the two successfully paired target point pairs; and calculating the quality of the second heart rate signal for the second set time point based on the curve cluster.
[0011] In some embodiments, after obtaining the point-pair sequence of frequency values and amplitude values corresponding to each of the first set times, the method further includes: determining whether the amplitude value of the point pair in each point-pair sequence is less than a set amplitude value; if there is a point pair in the point-pair sequence whose amplitude value is less than the set amplitude value, then deleting the point pair whose amplitude value is less than the set amplitude value.
[0012] In some embodiments, generating the curve cluster based on two successfully paired target point pairs includes: if the target point pair at the previous moment is on the first curve, then adding the target point pair at the current moment to the first curve; or, if the target point pair at the previous moment is not on the first curve, then generating a second curve based on the target point pair at the previous moment and the target point pair at the current moment; and forming the curve cluster based on the first curve and the second curve.
[0013] This application also proposes an apparatus for measuring heart rate signal quality, comprising: an acquisition module for acquiring raw data of photoplethysmography (PPG) signals at multiple first set times and heart rate values at multiple first moments; wherein each first moment is the moment at the end of each first set time; a processing module for performing a short-time Fourier transform on the raw data of the PPG signals at each first set time to obtain corresponding amplitude vectors and frequency vectors; a determination module for determining the first heart rate signal quality at each first moment and the second heart rate signal quality at a second set time based on the amplitude vectors, frequency vectors, and heart rate values at each first moment; wherein the second set time includes all the first set times; and a calculation module for calculating a target heart rate signal quality based on the first heart rate signal quality and the second heart rate signal quality.
[0014] The apparatus for measuring heart rate signal quality according to an embodiment of this application acquires raw data of photoplethysmography (PPG) signals for multiple first set times and heart rate values at the first moment after the end of each first set time using an acquisition module. A processing module performs a short-time Fourier transform on the raw data of the PPG signals for each first set time to obtain the amplitude vector and frequency vector for each first set time. A determination module determines the first heart rate signal quality at each first moment and the second heart rate signal quality at a second set time based on the amplitude vector, frequency vector, and heart rate value at each first moment. A calculation module calculates the target heart rate signal quality based on the first and second heart rate signal qualities. Therefore, this apparatus can comprehensively measure heart rate signal quality, and can be used to measure the performance of photoelectric signal hardware modules and the quality of wearable devices worn by users.
[0015] In some embodiments, the determining module is configured to: calculate the heart rate count corresponding to each first time point based on the heart rate value at each first time point; query a frequency value matching the heart rate count at each first set time point from the frequency vector at each first set time point; determine a target sequence number corresponding to the frequency value matching the heart rate count at each first time point based on the frequency value matching the heart rate count at each first time point; and determine the first heart rate signal quality at each first time point and the second heart rate signal quality at the second set time point based on the target sequence number at each first time point.
[0016] In some embodiments, the determining module is configured to: calculate the sum of amplitude values corresponding to the target sequence number within a set range at each first moment according to the amplitude vector corresponding to the first set time at each first moment, as the sum of first amplitude values, and the sum of amplitude values corresponding to all sequence numbers at each first moment within the first set time, as the sum of second amplitude values; and calculate the first heart rate signal quality at each first moment according to the sum of the first amplitude values and the sum of the second amplitude values.
[0017] In some embodiments, the calculation module is further configured to: calculate the second heart rate signal quality for the second set time based on the first heart rate signal quality at each of the first time moments.
[0018] In some embodiments, the determining module is configured to: normalize the amplitude values of the amplitude vectors corresponding to the raw data of the PPG signals at each of the first set times; obtain a point pair sequence of frequency values and amplitude values corresponding to each of the first set times based on the normalized amplitude values; query a target point pair that matches the target sequence number at each of the point pair sequences; when the current time is greater than zero, pair the target point pair at the current time with the target point pair at the previous time; if the pairing is successful, generate a curve cluster based on the two successfully paired target point pairs; and calculate the quality of the second heart rate signal at the second set time based on the curve cluster.
[0019] In some embodiments, after obtaining the point-pair sequence of frequency and amplitude values corresponding to each of the first set times, the determining module is further configured to determine whether the amplitude value of the point pair in each point-pair sequence is less than the set amplitude value, and delete the point pair with an amplitude value less than the set amplitude value when there is a point pair in the point-pair sequence with an amplitude value less than the set amplitude value.
[0020] In some embodiments, when the determining module generates the curve cluster based on two successfully paired target point pairs, it is used to add the target point pair at the current moment to the first curve if the target point pair at the previous moment is on the first curve; or, if the target point pair at the previous moment is not on the first curve, it generates a second curve based on the target point pair at the previous moment and the target point pair at the current moment; and forms the curve cluster based on the first curve and the second curve.
[0021] This application also proposes an electronic device comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the above-described method for measuring heart rate signal quality.
[0022] The electronic device of this application embodiment can comprehensively measure the quality of the heart rate signal by performing the above-described method for measuring the quality of the heart rate signal, and can then be used to measure the performance of the photoelectric signal hardware module and the quality of the wearable device worn by the user.
[0023] This application also proposes a non-transitory computer-readable storage medium that, when the instructions in the storage medium are executed by the processor of an electronic device, enables the electronic device to perform the above-described method for measuring the quality of heart rate signals.
[0024] The non-transitory computer-readable storage medium of this application embodiment can comprehensively measure the quality of heart rate signals by performing the above-described method for measuring heart rate signal quality, and can then be used to measure the performance of the photoelectric signal hardware module and the quality of wearable devices worn by the user.
[0025] This application also proposes a computer program product that, when instructions in the computer program product are executed by a processor, performs the method for measuring heart rate signal quality as described above.
[0026] The computer program product of this application embodiment can comprehensively measure the quality of heart rate signals by executing the above-described method for measuring heart rate signal quality, and can then be used to measure the performance of the photoelectric signal hardware module and the quality of the wearable device worn by the user. Attached Figure Description
[0027] Figure 1 This is a flowchart of a method for measuring heart rate signal quality according to an embodiment of this application;
[0028] Figure 2 This is a flowchart illustrating the determination of the quality of a first heart rate signal at each first moment and the quality of a second heart rate signal at each first set time, according to an embodiment of this application. Figure 3 This is a flowchart illustrating the determination of the quality of the first heart rate signal at each first moment according to an embodiment of this application; Figure 4 This is a flowchart illustrating the determination of the quality of the second heart rate signal at each first predetermined time according to an embodiment of this application; Figure 5 This is a schematic diagram of a normalized spectrum according to an embodiment of this application; Figure 6 This is a block diagram of a device for measuring the quality of heart rate signals according to an embodiment of this application; Figure 7 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0029] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0030] The following description, in conjunction with the accompanying drawings, describes a method for measuring heart rate signal quality, an apparatus for measuring heart rate signal quality, an electronic device, a non-transitory computer-readable storage medium, and a computer program product for this application.
[0031] As people's living standards continue to improve, wearable devices (such as smartwatches / bands) are becoming increasingly popular among consumers. Heart rate tracking based on signals is an essential application for wearable devices. Measuring the proportion of heart rate signal in the original PPG signal is particularly important, as it differs from the signal-to-noise ratio (SNR) of traditional signals. The SNR of traditional signals measures the ratio of signal to noise. However, the measured PPG signal contains motion signals, heart rate signals, and noise signals, with the heart rate signal being the primary focus of the algorithm. Therefore, the heart rate signal quality (also known as SNR) in this application refers to the proportion of the heart rate signal in the original PPG signal. Quantifying heart rate signal quality is very useful in practice, as it can be used to measure the performance of optoelectronic signal modules and the quality of wear for the user.
[0032] Therefore, this application proposes a method for comprehensively measuring the quality of heart rate signals, which calculates the quality of heart rate signals from both instantaneous and global perspectives.
[0033] Figure 1 This is a flowchart of a method for measuring heart rate signal quality according to an embodiment of this application.
[0034] like Figure 1 As shown in the embodiments of this application, the method for measuring the quality of heart rate signals includes the following steps: S101, acquire raw data of multiple first-set time PPG signals and multiple first-time heart rate values; wherein, each first time is the time when each first-set time ends.
[0035] The first set time can be configured according to actual needs, for example, it can be 6 seconds, or it can be longer or shorter, there is no specific restriction here. For example, the raw data of PPG signal can be acquired within the time intervals of 1-6 seconds, 2-7 seconds, 3-8 seconds, and 9-14 seconds.
[0036] In this step, wearable devices such as a sports watch and a heart rate monitor (or heart rate belt) need to be worn simultaneously, and the PPG signal output by the sports watch and the heart rate signal output by the heart rate monitor (or heart rate belt) need to be aligned in time. The heart rate monitor (or heart rate belt) outputs one heart rate value per second.
[0037] After the wearable device is put on, the raw PPG signal data is stored. Once a certain amount of data has been accumulated (e.g., after a first set time), the raw PPG signal data and heart rate value at the current moment (e.g., the 6th second) within those 6 seconds are obtained. In subsequent first moments, the PPG signal is advanced in 1-second increments, repeating the previous first moment for 5 seconds, for example, 1 second to 6 seconds, 2 seconds to 7 seconds, 3 seconds to 8 seconds, and so on.
[0038] It should be noted that if the quality of the first heart rate signal at each first moment is being measured, then the sports watch should be able to output the PPG signal in a timely manner and the heart rate monitor (or heart rate belt) should be able to output the heart rate signal in a timely manner; if the quality of the second heart rate signal at each first set time is being measured, then it is only necessary to align the PPG signal and the heart rate signal in time after the acquisition of the PPG signal and the heart rate signal is completed.
[0039] S102, perform short-time Fourier transform on the raw data of the PPG signals at each first set time to obtain the corresponding amplitude vector and frequency vector.
[0040] In this step, a short-time Fourier transform (SFT) is performed on the raw PPG signal data within the previous 6 seconds to obtain the corresponding amplitude spectrum S and frequency vector f for these 6 seconds. The amplitude spectrum S is a one-dimensional vector, i.e., the amplitude vector, whose index is a frequency point, and the value of the amplitude vector is the energy magnitude of the corresponding frequency point, i.e., the amplitude value. The frequency vector f has the same index as the amplitude spectrum S, also representing a frequency point, and its value is the frequency value corresponding to that frequency point.
[0041] S103, based on the amplitude vector and frequency vector of each first set time and the heart rate value of each first moment, determine the first heart rate signal quality of each first moment and the second heart rate signal quality of the second set time; wherein, the second set time includes all the first set times.
[0042] In some embodiments, such as Figure 2 As shown, based on the amplitude vector and frequency vector of each first set time and the heart rate value of each first moment, the quality of the first heart rate signal at each first moment and the quality of the second heart rate signal at the second set time are determined, including: S201, calculate the number of heart rate counts corresponding to each first moment based on the heart rate value at each first moment.
[0043] The heart rate count is calculated by dividing the heart rate value by 60 (60 represents the time in seconds).
[0044] S202, query the frequency value that matches the heart rate count corresponding to each first time point from the frequency vector of each first set time.
[0045] In this step, the difference between the heart rate count at the current moment (e.g., 6s) and the frequency values of the frequency vector at the current moment at the first set time (6s before the current moment) is calculated, and the value with the smallest absolute value of the difference is obtained as the frequency value that matches the heart rate count at the current moment (e.g., 6s).
[0046] S203, based on the frequency value matching the heart rate count at each first moment, determine the target sequence number corresponding to the frequency value matching the heart rate count at each first moment.
[0047] In this step, based on the frequency value matching the heart rate count at the current time (e.g., the 6th second), the frequency point corresponding to the frequency value matching the heart rate count at the current time (the 6th second) is determined, which is the target sequence number.
[0048] S204, determine the quality of the first heart rate signal at each first moment and the quality of the second heart rate signal at the second set time according to the target sequence number of each first moment.
[0049] In some embodiments, such as Figure 3 As shown, based on the target sequence number of each first time moment, the quality of the first heart rate signal at each first time moment is determined, including: S301, based on the amplitude vector of each first moment corresponding to the first set time, calculate the sum of the amplitude values corresponding to the target sequence number within the set range at each first moment, as the sum of the first amplitude values, and the sum of the amplitude values corresponding to all sequences within the first set time at each first moment, as the sum of the second amplitude values.
[0050] The range can be set according to actual needs; for example, it can be 2 or 3 points near the target number.
[0051] For example, if the target number is 4, then the amplitude values corresponding to numbers 3, 4, and 5 are obtained from the amplitude vector, and the sum of the amplitude values corresponding to numbers 3, 4, and 5 is calculated as the sum of the first amplitude values S1. The sum of the amplitude values corresponding to numbers 1-6 is calculated as the sum of the second amplitude values S2.
[0052] S302, calculate the quality of the first heart rate signal at each first moment based on the sum of the first amplitude value and the sum of the second amplitude value.
[0053] In this step, the quality of the first heart rate signal at the current moment (e.g., 6s) is Q1 = S1 / S2.
[0054] It should be noted that the quality of the second heart rate signal at the second set time mainly depends on the energy proportion of the heart rate signal at the second set time and the continuity of the signal. From these two perspectives, this application introduces two quantitative methods for measuring the quality of the heart rate signal.
[0055] The following section will first introduce the energy percentage of the heart rate signal at the second set time.
[0056] In some embodiments, after step S302 above, the method further includes: calculating the quality of the second heart rate signal for a second set time based on the quality of the first heart rate signal at each first time point.
[0057] Based on the first heart rate signal quality calculated above for each first moment, the average value of the first heart rate signal quality over the entire time period (second set time) is taken as the second heart rate signal quality Q21 for the second set time, which is the energy proportion of the heart rate signal during the second set time.
[0058] Next, we will discuss the continuity of the heart rate signal at the second set time.
[0059] In some embodiments, such as Figure 4 As shown, based on the target sequence number of each first moment, the quality of the second heart rate signal at the second set time is determined, including: S401, normalize the amplitude value of the amplitude vector corresponding to the original data of the PPG signal at each first set time.
[0060] In this step, the amplitude values of the amplitude vector are normalized to their maximum and minimum values, normalized to the range of 0-1. The normalized spectrum is shown below. Figure 5 As shown, the horizontal axis represents the frequency point, and the vertical axis represents the normalized amplitude value.
[0061] S402, based on the normalized amplitude value, obtain the point-to-point sequence of frequency and amplitude values corresponding to each first set time.
[0062] After step S402, the method further includes: determining whether the amplitude value of a point pair in each point pair sequence is less than a set amplitude value; if there is a point pair in the point pair sequence whose amplitude value is less than the set amplitude value, then deleting the point pair whose amplitude value is less than the set amplitude value.
[0063] The amplitude value can be set according to actual needs; for example, it can be 0.1.
[0064] In this step, local peaks are found in the normalized amplitude values to obtain a sequence of frequency and amplitude pairs. Then, the amplitude values of each pair in the sequence are compared with a set amplitude value. If any pair has an amplitude value less than the set amplitude value, that pair is removed from the sequence.
[0065] S403, from each point pair sequence, query the target point pair that matches the target sequence number of each first time step.
[0066] In this step, from the point pair sequence, it is searched to see if there is a point pair within the preset range of the current frequency point, and the point pair Set0 that is closest to the current frequency point is selected.
[0067] S404: When the current time is greater than zero, pair the target point pair at the current time with the target point pair at the previous time.
[0068] S405, if the pairing is successful, then generate a cluster of curves based on the two successfully paired target point pairs.
[0069] Step S405 includes: if the target point pair at the previous moment is on the first curve, then add the target point pair at the current moment to the first curve; or, if the target point pair at the previous moment is not on the first curve, then generate a second curve based on the target point pair at the previous moment and the target point pair at the current moment; and obtain the first curve and the second curve within a second set time period as a curve cluster.
[0070] In other words, if the current time is zero, no processing is performed; if the current time is greater than zero, the point pairs at the current time are paired with the point pairs at the previous time according to a pairing condition. One implementation of the pairing condition is that the frequency of the point pair at the current time differs from the frequency of the point pair at the previous time by within 6 BPM (heartbeats per minute). If the point pairs at the current time and the point pairs at the previous time meet the pairing condition, it is determined whether the point pair at the previous time is already in the first curve. If the point pair at the previous time is already in the first curve, the point pair at the current time is added to the first curve, thus increasing the length of the first curve; if the point pair at the current time is not in a curve, a new curve is generated by combining the point pair at the previous time and the point pair at the current time, serving as the second curve. All curves generated within the second set time period (including the first and second curves) form a curve cluster.
[0071] As time increases, steps S403-S405 are executed cyclically, resulting in a continuously growing cluster of curves.
[0072] S406, calculate the quality of the second heart rate signal at the second set time based on the curve cluster.
[0073] In this step, the second heart rate signal quality Q22 at the second set time is statistically calculated as the ratio of the number of point pairs in the curve cluster to the second set time (calculated in seconds).
[0074] It should be noted that the second heart rate signal quality Q21 mainly considers the energy ratio of the heart rate signal, while the second heart rate signal quality Q22 mainly considers the continuity of the heart rate signal.
[0075] S104, calculate the target heart rate signal quality based on the quality of each first heart rate signal and the quality of each second heart rate signal.
[0076] In this step, after obtaining the first heart rate signal quality Q1 and the second heart rate signal quality Q22 for the second set time, the second heart rate signal quality Q21 for the second set time can be calculated based on the first heart rate signal quality Q1. After obtaining the second heart rate signal quality Q21 and the second heart rate signal quality Q22, the target heart rate signal quality is calculated. This target heart rate signal quality is the final global heart rate signal quality, which can be obtained by weighting Q21 and Q22 according to a set ratio.
[0077] It should be noted that since the heart rate signal quality is measured on the original PPG signal, the strength of the motion signal will affect the quality of the first heart rate signal. Therefore, the proportion of Q21 in the setting ratio can be set as small as possible, or even zero. Specifically, when the proportion of Q21 in the setting ratio is set to zero, only the second heart rate signal quality Q22 is used as the target heart rate signal quality.
[0078] In summary, the method for measuring heart rate signal quality according to the embodiments of this application first acquires the raw data of photoplethysmography (PPG) signals for multiple first set time periods and the heart rate value at the first moment after the end of the multiple first set time periods. Then, a short-time Fourier transform is performed on the raw data of the PPG signals for each first set time period to obtain the amplitude vector and frequency vector corresponding to the raw data of the PPG signals for each first set time period. Next, based on the amplitude vector, frequency vector, and heart rate value at each first moment, the first heart rate signal quality at each first moment and the second heart rate signal quality at the second set time period are determined. Finally, the target heart rate signal quality is calculated based on the first and second heart rate signal qualities. Therefore, this method can comprehensively measure heart rate signal quality, and can thus be used to measure the performance of optoelectronic signal hardware modules and the quality of wearable devices worn by users.
[0079] Figure 6 This is a block diagram of an apparatus for measuring the quality of heart rate signals according to an embodiment of this application.
[0080] like Figure 6 As shown, the apparatus 600 for measuring the quality of heart rate signals according to an embodiment of this application includes: an acquisition module 601, a processing module 602, a determination module 603, and a calculation module 604.
[0081] The acquisition module 601 acquires the raw data of the photoplethysmography (PPG) signals at each first set time and the heart rate value at each first moment, where each first moment is the moment at the end of each first set time. The processing module 602 performs a short-time Fourier transform on the raw data of the PPG signals at each first set time to obtain the amplitude vector and frequency vector corresponding to the raw data of the PPG signals at each first set time. The determination module 603 determines the first heart rate signal quality at each first moment and the second heart rate signal quality at a second set time based on the amplitude vector, frequency vector, and heart rate value at each first moment, where the second set time includes all first set times. The calculation module 604 calculates the target heart rate signal quality based on the first and second heart rate signal qualities.
[0082] In some embodiments, the determining module 603 is configured to calculate the heart rate count corresponding to each first time based on the heart rate value at each first time; query the frequency value matching the heart rate count at each first set time from the frequency vector at each first set time; determine the target sequence number corresponding to the frequency value matching the heart rate count at each first time based on the frequency value matching the heart rate count at each first time; and determine the first heart rate signal quality at each first time and the second heart rate signal quality at the second set time based on the target sequence number at each first time.
[0083] In some embodiments, the determining module 603: calculates the sum of amplitude values corresponding to the target sequence number within a set range at each first moment according to the amplitude vector corresponding to the first set time at each first moment, as the sum of the first amplitude values, and the sum of amplitude values corresponding to all sequence numbers within the first set time at each first moment, as the sum of the second amplitude values; and calculates the first heart rate signal quality at each first moment according to the sum of the first amplitude values and the sum of the second amplitude values.
[0084] In some embodiments, the calculation module 604 is further configured to: calculate the quality of the second heart rate signal at a second set time based on the quality of the first heart rate signal at each first moment.
[0085] In some embodiments, the determining module 603 is configured to: normalize the amplitude values of the amplitude vectors corresponding to the raw data of the PPG signals at each first set time; obtain a point pair sequence of frequency values and amplitude values corresponding to each first set time based on the normalized amplitude values; query the target point pairs that match the target sequence number at each first time from each point pair sequence; when the current time is greater than zero, pair the target point pairs at the current time with the target point pairs at the previous time; if the pairing is successful, generate a curve cluster based on the two successfully paired target point pairs; and calculate the quality of the second heart rate signal at the second set time based on the curve cluster.
[0086] In some embodiments, after obtaining the point-pair sequence of frequency values and amplitude values corresponding to each first set time, the determining module 603 is further configured to determine whether the amplitude value of the point pair in each point-pair sequence is less than the set amplitude value, and delete the point pair with an amplitude value less than the set amplitude value when there is a point pair in the point-pair sequence with an amplitude value less than the set amplitude value.
[0087] In some embodiments, when the determining module 603 generates a curve cluster based on two successfully paired target point pairs, it is used to add the target point pair at the current moment to the first curve if the target point pair at the previous moment is on the first curve; or, if the target point pair at the previous moment is not on the first curve, it generates a second curve based on the target point pair at the previous moment and the target point pair at the current moment; and forms a curve cluster based on the first curve and the second curve.
[0088] It should be noted that for details not disclosed in the apparatus for measuring heart rate signal quality in the embodiments of this application, please refer to the details disclosed in the method for measuring heart rate signal quality in the embodiments of this application, which will not be described in detail here.
[0089] The apparatus for measuring heart rate signal quality according to an embodiment of this application acquires raw data of photoplethysmography (PPG) signals for multiple first set times and heart rate values at the first moment after the end of each first set time using an acquisition module. A processing module performs a short-time Fourier transform on the raw data of the PPG signals for each first set time to obtain the amplitude vector and frequency vector for each first set time. A determination module determines the first heart rate signal quality at each first moment and the second heart rate signal quality at a second set time based on the amplitude vector, frequency vector, and heart rate value at each first moment. A calculation module calculates the target heart rate signal quality based on the first and second heart rate signal qualities. Therefore, this apparatus can comprehensively measure heart rate signal quality, and can be used to measure the performance of photoelectric signal hardware modules and the quality of wearable devices worn by users.
[0090] Based on the above embodiments, this application also proposes an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the above-described method for measuring heart rate signal quality.
[0091] Figure 7 This is a structural block diagram of an electronic device according to an embodiment of the present disclosure.
[0092] like Figure 7 As shown, the electronic device 700 includes: a memory 710 and a processor 720, and a bus 730 connecting different components (including the memory 710 and the processor 720).
[0093] The memory 710 is used to store executable instructions of the processor 720; the processor 701 is configured to call and execute the executable instructions stored in the memory 702 to implement the method for measuring heart rate signal quality proposed in the above embodiments of this disclosure.
[0094] Bus 730 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0095] Electronic device 700 typically includes a variety of electronic device readable media. These media can be any available media that can be accessed by electronic device 700, including volatile and non-volatile media, removable and non-removable media.
[0096] The memory 710 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 740 and / or cache memory 750. The electronic device 700 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 760 can be used to read and write non-removable, non-volatile magnetic media (…). Figure 7 Not shown; usually referred to as a "hard drive"). Although Figure 7 As not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 730 via one or more data media interfaces. Memory 710 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this disclosure.
[0097] A program / utility 780 having a set (at least one) of program modules 770 may be stored in, for example, memory 710. Such program modules 770 include—but are not limited to—an operating system, one or more functions, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 770 typically perform the functions and / or methods described in the embodiments of this disclosure.
[0098] Electronic device 700 can also communicate with one or more external devices 790 (e.g., keyboard, pointing device, display 791, etc.), and with one or more devices that enable a user to interact with electronic device 700, and / or with any device that enables electronic device 700 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 792. Furthermore, electronic device 700 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 793. As shown, network adapter 793 communicates with other modules of electronic device 700 via bus 730. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0099] The processor 720 executes various functional applications and data processing by running programs stored in the memory 710.
[0100] It should be noted that the implementation process of the electronic device in the embodiments of this disclosure is described in the foregoing explanation of the method in the embodiments of this disclosure, and will not be repeated here.
[0101] The electronic device of this application embodiment can comprehensively measure the quality of the heart rate signal by performing the above-described method for measuring the quality of the heart rate signal, and can then be used to measure the performance of the photoelectric signal hardware module and the quality of the wearable device worn by the user.
[0102] Based on the above embodiments, this application also proposes a non-transitory computer-readable storage medium, which, when the instructions in the storage medium are executed by the processor of an electronic device, enables the electronic device to perform the above-described method for measuring the quality of heart rate signals.
[0103] The non-transitory computer-readable storage medium of this application embodiment can comprehensively measure the quality of heart rate signals by performing the above-described method for measuring heart rate signal quality, and can then be used to measure the performance of the photoelectric signal hardware module and the quality of wearable devices worn by the user.
[0104] This application also proposes a computer program product that, when instructions in the computer program product are executed by a processor, performs the method for measuring heart rate signal quality as described above.
[0105] The computer program product of this application embodiment can comprehensively measure the quality of heart rate signals by executing the above-described method for measuring heart rate signal quality, and can then be used to measure the performance of the photoelectric signal hardware module and the quality of the wearable device worn by the user.
[0106] In the description of this application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc., indicating the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.
[0107] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0108] In this application, unless otherwise expressly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0109] In this application, unless otherwise expressly specified and limited, "above" or "below" the second feature can mean that the first feature is in direct contact with the second feature, or that the first feature is in indirect contact with the second feature through an intermediate medium. Furthermore, "above," "on top of," and "over" the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply that the first feature is at a lower horizontal level than the second feature.
[0110] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0111] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A method for measuring the quality of heart rate signals, characterized in that, include: The raw data of photoplethysmography (PPG) signals for multiple first predetermined time periods and heart rate values for multiple first moments are acquired; wherein, the first moment is the end time of the corresponding first predetermined time period. Perform a short-time Fourier transform on the raw data of the PPG signal in each of the plurality of first set time periods to obtain the corresponding amplitude vector and frequency vector. Based on the amplitude vector, frequency vector, and heart rate values of each of the plurality of first set time periods, the quality of the first heart rate signal at each of the plurality of first moments and the quality of the second heart rate signal during a second set time period are determined; wherein, the second set time period includes the plurality of first set time periods; The target heart rate signal quality is calculated based on the first heart rate signal quality and the second heart rate signal quality at each of the plurality of first time points; wherein... The step of determining the first heart rate signal quality for each of the plurality of first predetermined time periods and the second heart rate signal quality for a second predetermined time period based on the amplitude vector, frequency vector, and heart rate values for each of the plurality of first predetermined time periods includes: Based on the frequency vector corresponding to each of the plurality of first set time periods and the heart rate value of each of the plurality of first moments, determine the frequency point corresponding to each of the plurality of first moments; The quality of the first heart rate signal at each of the plurality of first moments is determined based on the frequency point corresponding to each first moment in the plurality of first moments and the amplitude vector of each first set time period in the plurality of first set time periods.
2. The method for measuring heart rate signal quality according to claim 1, characterized in that, The step of determining the frequency point corresponding to each of the plurality of first set time periods based on the frequency vector corresponding to each of the plurality of first set time periods and the heart rate value of each of the plurality of first time moments includes: Based on the heart rate value at each of the plurality of first moments, calculate the heart rate count corresponding to each first moment; From the frequency vector of each of the plurality of first set time periods, query the frequency value that matches the heart rate count corresponding to the corresponding first moment; Based on the frequency value of the heart rate count corresponding to each of the plurality of first moments, determine the frequency point corresponding to each of the first moments.
3. The method for measuring heart rate signal quality according to claim 1 or 2, characterized in that, Determining the quality of the first heart rate signal at each of the plurality of first moments based on the frequency point of each first moment in the plurality of first moments and the amplitude vector of each first set time period in the plurality of first set time periods includes: Based on the amplitude vector of the first set time period corresponding to each of the plurality of first moments, calculate the sum of the amplitude values corresponding to the frequency points of each first moment within a set range, and use it as the sum of the first amplitude values corresponding to each first moment; The sum of the amplitude values corresponding to all frequency points within the first set time period corresponding to each of the plurality of first moments is taken as the sum of the second amplitude values corresponding to each first moment. The first heart rate signal quality for each of the plurality of first moments is obtained by summing the first amplitude value and summing the second amplitude value for each of the plurality of first moments.
4. The method for measuring heart rate signal quality according to claim 1 or 2, characterized in that, The step of determining the quality of the first heart rate signal at each of the plurality of first time moments and the quality of the second heart rate signal at the second time moment based on the amplitude vector, frequency vector, and heart rate values of each of the plurality of first time moments further includes: The quality of the second heart rate signal for the second set time period is calculated based on the quality of the first heart rate signal for each of the plurality of first moments.
5. The method for measuring heart rate signal quality according to claim 1 or 2, characterized in that, The step of determining the quality of the first heart rate signal at each of the plurality of first time moments and the quality of the second heart rate signal at the second time moment based on the amplitude vector, frequency vector, and heart rate values of each of the plurality of first time moments further includes: The amplitude value of the amplitude vector of each of the plurality of first set time periods is normalized; Based on the normalized amplitude value, obtain the point-to-point sequence of frequency and amplitude values corresponding to each of the plurality of first set time periods; From the point pair sequence corresponding to each of the plurality of first set time periods, query the target point pair that matches the frequency point of each of the plurality of first moments; When the current time is greater than zero, pair the target point pair at the current time with the target point pair at the previous time. If the pairing is successful, a cluster of curves is generated based on the two successfully paired target point pairs; The quality of the second heart rate signal during the second set time period is calculated based on the curve cluster.
6. The method for measuring heart rate signal quality according to claim 5, characterized in that, After obtaining the point-to-point sequence of frequency and amplitude values corresponding to each of the plurality of first set time periods, the method further includes: Determine whether the amplitude value of the point pair in the point pair sequence corresponding to each first set time period in the first set time period is less than a set amplitude value; If there is a pair in the point pair sequence whose amplitude value is less than a set amplitude value, then the point pair whose amplitude value is less than the set amplitude value is deleted from the point pair sequence.
7. The method for measuring heart rate signal quality according to claim 5, characterized in that, The step of generating the curve cluster based on the two successfully paired target point pairs includes: If the target point pair from the previous time step lies on the first curve included in the curve cluster, then the target point pair from the current time step is added to the first curve; or, If the target point pair at the previous time step is not on the first curve included in the curve cluster, then a second curve is generated based on the target point pair at the previous time step and the target point pair at the current time step, and the curve cluster includes the second curve.
8. A device for measuring the quality of heart rate signals, characterized in that, include: The acquisition module is used to acquire raw data of photoplethysmography (PPG) signals for multiple first set time periods and heart rate values for multiple first moments; wherein, the first moment is the end moment of the corresponding first set time period. The processing module is used to perform short-time Fourier transform on the raw data of the PPG signal in each of the plurality of first set time periods to obtain the corresponding amplitude vector and frequency vector. The determining module is configured to determine the quality of a first heart rate signal at each of the plurality of first time periods and the quality of a second heart rate signal at a second time period based on the amplitude vector, frequency vector, and heart rate values at the plurality of first time periods; wherein the second time period includes the plurality of first time periods. The calculation module is used to calculate the target heart rate signal quality based on the first heart rate signal quality and the second heart rate signal quality at each of the plurality of first moments; The determining module is specifically used for: Based on the frequency vector corresponding to each of the plurality of first set time periods and the heart rate value of each of the plurality of first moments, determine the frequency point corresponding to each of the plurality of first moments; The quality of the first heart rate signal at each of the plurality of first moments is determined based on the frequency point corresponding to each first moment in the plurality of first moments and the amplitude vector of each first set time period in the plurality of first set time periods.
9. The apparatus for measuring the quality of heart rate signals according to claim 8, characterized in that, The determining module is further configured to: Based on the heart rate value at each of the plurality of first moments, calculate the heart rate count corresponding to each first moment; From the frequency vector of each of the plurality of first set time periods, query the frequency value that matches the heart rate count corresponding to the corresponding first moment; Based on the frequency value of the heart rate count corresponding to each of the plurality of first moments, determine the frequency point corresponding to each of the first moments.
10. The apparatus for measuring the quality of heart rate signals according to claim 8 or 9, characterized in that, The determining module is used for: Based on the amplitude vector of the first set time period corresponding to each of the plurality of first moments, calculate the sum of the amplitude values corresponding to the frequency points of each first moment within a set range, and use it as the sum of the first amplitude values corresponding to each first moment; as well as The sum of the amplitude values corresponding to all frequency points within the first set time period corresponding to each of the plurality of first moments is taken as the sum of the second amplitude values corresponding to each first moment. The first heart rate signal quality for each of the plurality of first moments is calculated based on the sum of the first amplitude value and the sum of the second amplitude value corresponding to each of the plurality of first moments.
11. The apparatus for measuring the quality of heart rate signals according to claim 8 or 9, characterized in that, The determining module is further configured to: The quality of the second heart rate signal for the second set time period is calculated based on the quality of the first heart rate signal for each of the plurality of first moments.
12. The apparatus for measuring the quality of heart rate signals according to claim 8 or 9, characterized in that, The determining module is further configured to: The amplitude value of the amplitude vector of each of the plurality of first set time periods is normalized; Based on the normalized amplitude value, obtain the point-to-point sequence of frequency and amplitude values corresponding to each of the plurality of first set time periods; From the point pair sequence corresponding to each of the plurality of first set time periods, query the target point pair that matches the frequency point of each of the plurality of first moments; When the current time is greater than zero, pair the target point pair at the current time with the target point pair at the previous time. If the pairing is successful, a cluster of curves is generated based on the two successfully paired target point pairs; The quality of the second heart rate signal during the second set time period is calculated based on the curve cluster.
13. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the method for measuring heart rate signal quality as described in any one of claims 1-7.
14. A non-transitory computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is able to perform the method for measuring the quality of a heart rate signal as described in any one of claims 1-7.
Citation Information
Patent Citations
System and method for heart rate estimation
CN108926333A
On-demand heart rate estimation based on optical measurements
WO2018005729A1