A method of signal processing in heart rate measurement

By constructing a heart rate prediction model and utilizing multi-source data and individual difference correction algorithms, the problems of insufficient accuracy and poor adaptability in existing heart rate measurement methods are solved, enabling accurate heart rate measurement and health management for different users.

CN120392049BActive Publication Date: 2026-01-27GUANGDONG EDA MEDICAL TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510534039.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2026-01-27
Estimated Expiration
2045-04-27

AI Technical Summary

Technical Problem

Existing heart rate measurement methods rely on fixed parameter settings, which cannot flexibly adapt to the physiological characteristics and usage scenarios of different users, and lack the ability to comprehensively analyze multi-source data, resulting in inaccurate heart rate measurements in complex environments.

Method used

The system collects multi-source data and personal information from users, and constructs a heart rate prediction model through synchronization and preprocessing. It uses adaptive peak detection and fast Fourier transform techniques to extract features, trains the model using long short-term memory networks, and sets thresholds for individual differences and application scenarios for correction, generating heart rate health adjustment suggestions.

Benefits of technology

It achieves accurate capture of complex heart rate signal patterns, improves the accuracy and flexibility of heart rate prediction, reduces prediction errors, and enhances the accuracy and adaptability of heart rate measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120392049B_ABST
    Figure CN120392049B_ABST
Patent Text Reader

Abstract

The application discloses a signal processing method in heart rate measurement and relates to the technical field of medical signal processing, and comprises the following steps: extracting a heart rate signal feature in preprocessed user heart rate multi-source data, constructing a heart rate prediction model for the user based on the heart rate signal feature, calculating a predicted heart rate value of the user by using the heart rate prediction model, setting a heart rate difference threshold based on individual differences and application scenarios of the user, and correcting the predicted heart rate value by using a least square correction algorithm when the difference between the predicted value and an actual value exceeds the threshold. By adjusting the correction amplitude of the predicted heart rate value, the application can effectively cope with individual differences of different users, reduce prediction errors, and enhance the accuracy and precision of heart rate signal measurement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical signal processing technology, and in particular to a signal processing method for heart rate measurement. Background Technology

[0002] With the development of biomedical engineering technology, heart rate monitoring technology is increasingly widely used in healthcare and daily health management. Conventional heart rate signal processing methods mainly rely on electrocardiography (ECG) technology, which obtains heart rate information by detecting cardiac electrical activity. However, this method typically requires specialized medical equipment and environments and is complex to operate, limiting its widespread application in daily life.

[0003] Current signal processing methods for heart rate measurement still have shortcomings. Conventional signal processing methods often rely on fixed parameter settings, failing to flexibly adapt to the different physiological characteristics and usage scenarios of various users. Secondly, most existing heart rate prediction models are based on a single type of data source, lacking the ability to comprehensively analyze multi-source data. This makes the models perform poorly when facing heart rate measurements in complex environments, and unable to fully utilize wearable devices to provide detailed data information. Summary of the Invention

[0004] In view of the aforementioned existing problems, the present invention is proposed.

[0005] Therefore, the present invention provides a signal processing method for heart rate measurement, which solves the problems of insufficient signal processing accuracy and poor adaptability to individual user differences in heart rate measurement methods.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0007] In a first aspect, the present invention provides a signal processing method for heart rate measurement, comprising,

[0008] Collect users’ initial heart rate multi-source data and users’ personal information, synchronize and preprocess the users’ initial heart rate multi-source data to obtain preprocessed users’ heart rate multi-source data;

[0009] Extract heart rate signal features from preprocessed multi-source user heart rate data, construct a heart rate prediction model for the user based on the heart rate signal features, train the parameters of the heart rate prediction model, and obtain the trained heart rate prediction model.

[0010] The trained heart rate prediction model is used to calculate the user's predicted heart rate value and measure the user's actual heart rate value. A heart rate difference threshold is set based on the user's individual differences and application scenarios. When the difference between the user's predicted heart rate value and the actual heart rate value exceeds the heart rate difference threshold range, a correction algorithm is used to correct the user's predicted heart rate value to obtain the corrected heart rate value.

[0011] Based on the corrected heart rate values, comprehensive heart rate data of users is collected to generate management suggestions for heart rate health adjustment.

[0012] As a preferred embodiment of the signal processing method in heart rate measurement according to the present invention, the step of collecting the user's initial heart rate multi-source data and the user's personal information includes the following steps:

[0013] The user's initial heart rate multi-source data includes the user's PPG data, heart rate cycle data, and accelerometer data;

[0014] The user's personal information includes the user's age, gender, and health status.

[0015] As a preferred embodiment of the signal processing method in heart rate measurement according to the present invention, the method includes the following steps: synchronizing and preprocessing the user's initial multi-source heart rate data to obtain preprocessed multi-source heart rate data.

[0016] The highest sampling frequency was selected as the reference time axis, and interpolation was used to synchronize and align the user's initial heart rate multi-source data to the reference time axis.

[0017] Use a bandpass filter to remove high-frequency noise and low-frequency drift from PPG data;

[0018] Use a power frequency filter to remove power supply interference from heartbeat cycle data;

[0019] Use a low-pass filter to remove high-frequency vibration noise from accelerometer data.

[0020] As a preferred embodiment of the signal processing method in heart rate measurement according to the present invention, the step of extracting heart rate signal features from preprocessed multi-source user heart rate data includes the following steps:

[0021] The peak position features of each heartbeat cycle are extracted using an adaptive peak detection algorithm;

[0022] Select a time window of a set length and use SciPy to detect the zero-crossing features of the heartbeat cycle;

[0023] The Fast Fourier Transform library is used to extract a segment of preprocessed multi-source user heart rate data, obtain its frequency domain representation, and extract spectral energy features.

[0024] As a preferred embodiment of the signal processing method in heart rate measurement according to the present invention, the step of constructing a heart rate prediction model for the user based on heart rate signal features and training the parameters of the heart rate prediction model to obtain the trained heart rate prediction model includes the following steps:

[0025] By combining the user's personal information, the TensorFlow learning framework is used to combine the extracted heart rate signal features into a user heart rate feature vector.

[0026] Based on user heart rate feature vectors and initial heart rate multi-source data, a labeled dataset and a pre-training dataset are constructed, and the pre-training dataset is divided into a training set and a validation set.

[0027] A long short-term memory network was selected and an initial heart rate prediction model with N layers was constructed using a labeled dataset.

[0028] The user's heart rate feature vector is input into the initial heart rate prediction model for forward propagation to obtain the predicted value of the initial heart rate prediction model;

[0029] Use Philips devices to obtain the true labels from the pre-trained dataset;

[0030] The error between the predicted values ​​of the initial heart rate prediction model and the true labels was calculated using the MSE loss function.

[0031] Backpropagation is performed on the error between the predicted value and the true label to obtain the parameter gradient of the initial heart rate prediction model;

[0032] The Adam optimizer is used to update the parameter gradient of the initial heart rate prediction model, resulting in the updated initial heart rate prediction model parameters.

[0033] Based on the updated initial heart rate prediction model parameters, some layers in the N-layer initial heart rate prediction model are frozen, and the parameters of the unfrozen layers are adjusted using a low learning rate combined with the training set. At the same time, the frozen layers are gradually unfrozen to obtain the adjusted heart rate prediction model.

[0034] The accuracy and AUC-ROC curve of the adjusted heart rate prediction model were evaluated using the validation set to obtain the trained heart rate prediction model.

[0035] As a preferred embodiment of the signal processing method in heart rate measurement according to the present invention, the method includes the following steps: calculating the user's predicted heart rate value using a trained heart rate prediction model and measuring the user's actual heart rate value.

[0036] The mean and median absolute deviation of all heart rate features in the user's heart rate feature vector are calculated using robust statistics combined with the Huber loss function.

[0037] The median of the user's heart rate feature vector is defined based on the mean and median absolute deviation of all heart rate features.

[0038] The trained heart rate prediction model is used in conjunction with a Gaussian probability function to calculate the user's predicted heart rate value. The expression is as follows:

[0039] ;

[0040] ;

[0041] ;

[0042] Where σ represents the mean of all heart rate features, μ represents the transition point of the Huber loss function, and M represents the dimension of the user's heart rate feature vector. This represents the Huber loss function. Let represent the j-th heart rate feature in the user's heart rate feature vector, D represent the median absolute deviation of all heart rate features, P represent the median of the user's heart rate feature vector, and H represent the user's predicted heart rate value. This represents a scaling factor that makes the mean and median absolute deviation of all heart rate features have the same scale.

[0043] Choose wearable devices to wear on the user's wrist;

[0044] Wearable devices detect blood flow and measure the user's actual heart rate by emitting green light onto the user's skin and receiving changes in the amount of reflected light.

[0045] As a preferred embodiment of the signal processing method in heart rate measurement according to the present invention, the method includes: setting a heart rate difference threshold based on individual user differences and application scenarios; when the difference between the user's predicted heart rate value and the actual heart rate value exceeds the heart rate difference threshold range, using a correction algorithm to correct the user's predicted heart rate value to obtain a corrected heart rate value, including the following steps.

[0046] Set a heart rate difference threshold;

[0047] Calculate the difference between a user's predicted heart rate and their actual heart rate;

[0048] The difference between the user's predicted heart rate and actual heart rate is compared with a heart rate difference threshold. When the difference exceeds the range of the heart rate difference threshold, the least squares correction algorithm is used to correct the user's predicted heart rate.

[0049] When a user's predicted heart rate is greater than the sum of the user's actual heart rate and the heart rate difference threshold, the user's predicted heart rate is reduced.

[0050] When a user's predicted heart rate is less than the difference between the user's actual heart rate and the heart rate difference threshold, the user's predicted heart rate is increased.

[0051] As a preferred embodiment of the signal processing method in heart rate measurement according to the present invention, the method includes: collecting comprehensive heart rate data of users based on corrected heart rate values, and generating management suggestions for heart rate health adjustment, comprising the following steps:

[0052] The corrected heart rate value is converted into a standard heart rate display format, and the sampling frequency of the wearable device is set to collect the user's comprehensive heart rate data over a period of time.

[0053] The user's comprehensive heart rate data over a period of time includes resting heart rate data, maximum heart rate data, and minimum heart rate data;

[0054] Use line charts to analyze the trend of heart rate changes in users' comprehensive heart rate data over a period of time, and generate health reports for users.

[0055] Based on the user's health report, we provide management suggestions for adjusting heart rate health.

[0056] In a second aspect, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, it implements any step of the signal processing method in heart rate measurement as described in the first aspect of the present invention.

[0057] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the signal processing method in heart rate measurement as described in the first aspect of the present invention.

[0058] The beneficial effects of this invention are as follows: By constructing a heart rate prediction model, it achieves accurate capture of complex heart rate signal patterns. By using an adaptive peak detection algorithm and fast Fourier transform technology to extract features, it can effectively cope with individual differences among different users and improve the accuracy of heart rate prediction. Based on individual differences among users and application scenarios, a heart rate difference threshold is set. When the difference between the predicted value and the actual value exceeds the threshold, the least squares correction algorithm is used to correct the predicted value. This process effectively reduces prediction errors by adjusting the correction amplitude, thereby enhancing the accuracy and flexibility of heart rate measurement. Attached Figure Description

[0059] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0060] Figure 1This is a flowchart of the signal processing method in the heart rate measurement of Example 1.

[0061] Figure 2 This is a flowchart illustrating the correction of the user's predicted heart rate value in Example 1. Detailed Implementation

[0062] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0063] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0064] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0065] Example 1, referring to Figure 1 and Figure 2 This is the first embodiment of the present invention, which provides a signal processing method for heart rate measurement, including the following steps:

[0066] S1. Collect the user's initial heart rate multi-source data and the user's personal information, synchronize and preprocess the user's initial heart rate multi-source data to obtain preprocessed user heart rate multi-source data.

[0067] Includes the following steps,

[0068] The user's initial heart rate multi-source data includes the user's PPG data, heart rate cycle data, and accelerometer data;

[0069] The user's personal information includes the user's age, gender, and health status (all of which are obtained with the user's consent and are used for legitimate purposes).

[0070] The highest sampling frequency (i.e. the highest sampling frequency of the sensor, here it is a PPG sensor with a sampling frequency of 100Hz) is selected as the reference time axis. Interpolation is used to synchronously align the user's initial heart rate multi-source data to the reference time axis (the purpose of synchronous alignment is to eliminate the time difference between different initial heart rate multi-source data).

[0071] Use a bandpass filter to remove high-frequency noise (such as ambient light interference) and low-frequency drift (such as baseline drift caused by temperature changes) from PPG data.

[0072] Use a power frequency filter to remove power interference from the heartbeat cycle data (frequency 50Hz~60Hz).

[0073] Use a low-pass filter to remove high-frequency vibration noise (such as rapid jitter) from accelerometer data.

[0074] S2. Extract heart rate signal features from the preprocessed multi-source heart rate data of the user, construct a heart rate prediction model for the user based on the heart rate signal features, and train the parameters of the heart rate prediction model to obtain the trained heart rate prediction model.

[0075] Includes the following steps,

[0076] An adaptive peak detection algorithm (with height and distance parameters set, the height parameter used to filter out spurious peaks caused by noise, and the distance parameter used to refine the time of one cardiac cycle between adjacent peaks) is used to extract the peak position features for each heartbeat cycle.

[0077] Select a time window of a set length (e.g., 10 seconds) and use SciPy to detect the zero-crossing features of the heartbeat cycle.

[0078] Use the np.sign function in the SciPy library to find the points of change in the heartbeat cycle, and then use the np.diff function to find the positions of these points of change as the zero-crossing points of the heartbeat cycle;

[0079] The Fast Fourier Transform library (fft function) is used to extract a segment of preprocessed multi-source user heart rate data, obtain a frequency domain representation, and extract spectral energy features (i.e., the energy distribution of the heart rate signal in the frequency domain).

[0080] The FFT function is used to perform FFT transformation on the preprocessed multi-source user heart rate data to obtain the original spectral amplitude. The zero-crossing point of the heartbeat cycle is divided into multiple heartbeat cycle segments. Then, FFT transformation is performed on each segment to obtain the local spectral amplitude. The local spectral amplitude and the original spectral amplitude are combined to form a complete frequency domain representation. The sum of the squares of the spectral amplitudes is then extracted to obtain the spectral energy features.

[0081] By combining the user's personal information, the TensorFlow learning framework is used to combine the extracted heart rate signal features into a user heart rate feature vector.

[0082] First, Z-score is used to standardize users' personal information. For categorical variables (such as gender), one-hot encoding is used, such as male being encoded as [1,0] and female being encoded as [0,1].

[0083] Using the TensorFlow learning framework, the encoded user information and heart rate signal features are concatenated sequentially to form a high-dimensional user heart rate feature vector. For example, assuming a user's information and heart rate signal features are: age: 30 years old, gender: male, weight: 70 kg, height: 177 cm, peak position features: [1.2, 1.5, 1.7], zero-crossing features: [0.8, 1.0, 1.2], spectral energy features: [0.5, 0.6, 0.7], then the concatenated feature vector would be: [0.2, 1, 0, 0.5, 0.7, 1.2, 1.5, 1.7, 0.8, 1.0, 1.2, 0.5, 0.6, 0.7].

[0084] Based on user heart rate feature vectors and initial heart rate multi-source data, a labeled dataset and a pre-training dataset are constructed (a large-scale public heart rate dataset and user heart rate feature vectors are selected and combined to form a pre-training dataset), and the pre-training dataset is divided into a training set and a validation set (with an allocation ratio of 70% and 30%).

[0085] The concatenated heart rate feature vector of each user is paired with its corresponding initial heart rate multi-source data. Taking the heart rate feature vector of user [0.4,1,0,0.2,0.5,1.2,1.8,1.7,0.5,1,1.1,0.6,0.7,0.6] as an example, its corresponding initial heart rate multi-source data are [1.5,1.5,1.9], [0.3,0.6,1.7], and [0.3,0.7,1], then they are paired to form a complete paired sample (i.e., labeled dataset).

[0086] We selected a Long Short-Term Memory (LSTM) network and used a labeled dataset to build an initial heart rate prediction model with N layers (N can be 2 to 6 layers, depending on the size of the labeled dataset; here, we chose a 5-layer LSTM as the initial architecture. This depth can capture dependencies over a longer time range without making the initial heart rate prediction model overly complex).

[0087] The reason for choosing LSTM is that it is a neural network structure that is suitable for processing sequential data. Since the heart rate signal is essentially a time series data, LSTM is very suitable for heart rate prediction tasks.

[0088] The architecture of this initial heart rate prediction model consists of an input layer, a feature extraction layer, a high-level feature extraction layer, a fully connected layer, and an output layer.

[0089] Input layer: Defines the input dimensions and represents them as a three-dimensional tensor (e.g., if the length of a user's heart rate feature vector is 14, then the input dimensions are batch_size, time_steps, 14);

[0090] Feature extraction layer: Set 128 neurons (can be adjusted according to specific tasks) and use tanh as the activation function (output range between -1 and 1) to keep the gradient state of this layer stable.

[0091] Advanced Feature Extraction Layer: The design concept is the same as that of the feature extraction layer. The only difference is that it needs to extract high-level heart rate signal features from the feature extraction layer to perform the final heart rate prediction.

[0092] Fully connected layer: Set 64 or 32 neurons, and use the ELU activation function to map the output of the high-level feature extraction layer to a scalar (i.e. heart rate prediction value) through a linear transformation.

[0093] Output layer: Converts the heart rate prediction values ​​output by the fully connected layer into specific numerical values;

[0094] The user's heart rate feature vector is input into the initial heart rate prediction model for forward propagation to obtain the predicted value of the initial heart rate prediction model;

[0095] The forward propagation process is as follows: receive the user's heart rate feature vector — set the hidden state — update the internal state — use a gating mechanism (forget gate, input gate, output gate) to process the internal state information (the forget gate determines which information needs to be discarded, the input gate determines which new information needs to be stored, and the output gate determines which information needs to be output to the next time step) — perform a weighted summation on the final internal state information — obtain the predicted value of the initial heart rate prediction model;

[0096] Use Philips devices to obtain the true labels from the pre-trained dataset;

[0097] Using Philips devices, users' physiological indicators (such as activity type) are recorded synchronously during the construction of the pre-training dataset as the annotation information of the original physiological indicators. This information is then compared and screened with the users' electrocardiogram data to identify user physiological indicator samples that are not affected by time offset (such as the user's respiratory rate in a resting state) as the true labels.

[0098] The error between the predicted values ​​of the initial heart rate prediction model and the true labels is calculated using the MSE (mean squared error) loss function.

[0099] The formula is as follows:

[0100] ;

[0101] Where S represents the error between the initial heart rate prediction model's predicted value and the true label, and n represents the number of time steps. This represents the true label at time step t. This represents the predicted value of the initial heart rate prediction model at the t-th time step;

[0102] Backpropagation is performed on the error between the predicted value and the true label to obtain the parameter gradient of the initial heart rate prediction model;

[0103] Using the chain rule, starting from the output layer, the parameter gradients of the initial heart rate prediction model are calculated layer by layer. Assuming that the output layer is the result of a linear transformation plus an activation function (such as ReLU), the relative loss gradient of the weights of the linear transformation needs to be calculated. Matrix multiplication is then used to calculate the parameter loss gradient of the fully connected layer. This process is repeated layer by layer to propagate the parameter loss gradients forward until the input layer.

[0104] After the parameter loss gradient of the input layer is calculated, the parameter loss gradient of each layer is accumulated using mini-batch training to obtain all parameter gradients of the initial heart rate prediction model.

[0105] The Adam optimizer is used to update the parameter gradient of the initial heart rate prediction model, resulting in the updated initial heart rate prediction model parameters.

[0106] Define two types of state variables, the first-order moment estimate and the second-order moment estimate, and initialize them to zero;

[0107] For first-moment estimation, a hyperparameter (value of 0.9) is set based on the time step gradient of the current initial heart rate prediction model, and the time step gradient is exponentially weighted to obtain the stacked historical gradient (i.e., time step gradient reduction).

[0108] For second-order moment estimation, a hyperparameter (value of 0.999) is set based on the squared time step gradient of the current initial heart rate prediction model, and the time step gradient is exponentially weighted to obtain the magnitude of the change in the time step gradient.

[0109] Based on the changes in historical gradients and time-step gradients, an adaptive learning rate is set to update the initial heart rate prediction model at different speeds on different feature dimensions until the optimal solution is approximated.

[0110] Based on the updated initial heart rate prediction model parameters, some layers (feature extraction layer and high-level feature extraction layer) in the N-layer initial heart rate prediction model are frozen, and the parameters of the unfrozen layers (input layer, output layer and fully connected layer) are adjusted using a low learning rate combined with the training set. At the same time, the frozen layers are gradually unfrozen to obtain the adjusted heart rate prediction model.

[0111] The purpose of freezing some layers in the initial heart rate prediction model is to preserve the basic feature representations that the initial heart rate prediction model has already learned. These low-level features are similar across different users, which avoids relearning these features on subsequent new data, thereby speeding up training and reducing the risk of overfitting.

[0112] The freezing process is as follows: the initial heart rate prediction model weight file is loaded using load_state_dict in the PyTorch learning framework, and the category of the initial heart rate prediction model is defined using HeartRatePredictor based on the weight file;

[0113] Use `freeze_layers` to iterate through all parameters in each layer of the initial heart rate prediction model, print the parameter name and its `requires_grad` attribute of each layer, turn off the gradient calculation of all parameters, and determine whether it belongs to the feature extraction layer and high-level feature extraction layer that need to be frozen based on its attributes. If the `requires_grad` attribute of a certain layer is incorrect, it means that the layer has been frozen. If the `requires_grad` attribute is correct, it means that the layer has not been frozen.

[0114] Using a low learning rate (set to 0.001, the purpose of which is to reduce the magnitude of parameter updates) and the training set, train the parameters of the unfrozen layers in a small number of epochs (5-10 epochs). After each training epoch, check the performance on the validation set and record the validation loss for each epoch. If the validation loss on the validation set continues to decrease, maintain the current learning rate; if the loss no longer decreases significantly or begins to increase, appropriately reduce the learning rate (e.g., halve it) or add a regularization term.

[0115] The reason for gradually loosening the frozen layer is to introduce more layers of feature adjustments, thereby enhancing the initial heart rate prediction model's ability to adapt to newly incorporated data.

[0116] The accuracy and AUC-ROC curve of the adjusted heart rate prediction model were evaluated using the validation set to obtain the trained heart rate prediction model.

[0117] Accuracy: Set an accuracy threshold based on specific business objectives (usually between -5 and 5). Based on this threshold, count the number of data samples correctly predicted by the adjusted heart rate prediction model. Divide the number of correctly predicted data samples by the total number of predicted data samples to calculate the accuracy of the adjusted heart rate prediction model (if the accuracy at the current threshold reaches 90% or more, the overall prediction ability of the adjusted heart rate prediction model is excellent).

[0118] AUC-ROC curve: Define a confusion matrix (including true positives, false positives, true negatives, and false negatives), and use confidence scores to calculate the true positive rate (obtained by dividing true positives by the sum of true positives and false negatives) and the false positive rate (obtained by dividing false positives by the sum of false positives and true negatives).

[0119] Connect each point of the true positive rate and false positive rate in sequence to plot the ROC curve;

[0120] The trapezoidal method is used to approximate the region between two adjacent points as a trapezoid, and the areas of all trapezoids are summed to calculate the area of ​​the ROC (i.e., AUC; the closer the AUC value is to 1, the better the classification performance of the adjusted heart rate prediction model).

[0121] S3. Calculate the user's predicted heart rate value using the trained heart rate prediction model and measure the user's actual heart rate value. Set a heart rate difference threshold based on the user's individual differences and application scenario. When the difference between the user's predicted heart rate value and the actual heart rate value exceeds the heart rate difference threshold range, use a correction algorithm to correct the user's predicted heart rate value to obtain the corrected heart rate value.

[0122] Includes the following steps,

[0123] The mean and median absolute deviation of all heart rate features in the user's heart rate feature vector are calculated using robust statistics (a method to reduce the impact of outliers on data analysis results) combined with the Huber loss function.

[0124] This step calculates the mean and median absolute deviation of all heart rate features, enabling the heart rate prediction model to better adapt to different data distributions, especially when the predicted heart rate value may have large fluctuations or outliers, it can still provide accurate prediction results.

[0125] The median of the user's heart rate feature vector is defined based on the mean and median absolute deviation of all heart rate features.

[0126] For example, suppose a set of user heart rate feature vectors is [16,14,20,15,10], where each number represents a heart rate feature. If each heart rate feature is sorted from smallest to largest as [10,14,15,16,20], and there are 5 odd numbers, the median is 15. Then, we need to use the difference between each heart rate feature and this median to form a difference set [5,0,1,1,5]. The median of the difference set is 1.

[0127] The trained heart rate prediction model is used in conjunction with a Gaussian probability function to calculate the user's predicted heart rate value. The expression is as follows:

[0128] ;

[0129] ;

[0130] ;

[0131] Where σ represents the mean of all heart rate features, μ represents the transition point of the Huber loss function, used to control linear loss, and M represents the dimension of the user's heart rate feature vector. This represents the Huber loss function. Let represent the j-th heart rate feature in the user's heart rate feature vector, D represent the median absolute deviation of all heart rate features, P represent the median of the user's heart rate feature vector, and H represent the user's predicted heart rate value. This represents a scaling factor (set to 1.4826) that makes the mean and median absolute deviation of all heart rate features have the same scale. The exponential term of the Gaussian probability function describes the probability distribution. How the distance between σ and σ affects the probability density process;

[0132] Choose a wearable device (Apple Watch) to wear on the user's wrist (the non-dominant wrist, for example, a right-handed user should wear it on their left wrist);

[0133] The reason for choosing Apple Watch is its ease of wear and operation. Users can monitor their heart rate anytime, anywhere without having to carry any other devices. It can also record multiple health indicators such as steps, calories burned, and sleep quality, helping users to comprehensively manage their physical condition.

[0134] Wearable devices detect blood flow and measure the user's actual heart rate by emitting green light (green wavelength) into the user's skin and receiving changes in the amount of reflected light.

[0135] When a user's heart beats, blood flow changes, causing changes in the intensity of the reflected green light. Apple Watch detects these changes in reflected light and converts them into electrical signals to determine the time interval of each heartbeat cycle, detects fluctuations in blood flow (i.e., hemoglobin levels), and thus measures the actual heart rate.

[0136] Set a heart rate difference threshold (based on individual user differences and application scenarios; for example, for users at rest, the heart rate difference threshold can be set to a smaller range, while for users in high-intensity exercise, the heart rate difference threshold can be set to a larger range).

[0137] Individual differences among users include their physical condition (e.g., younger people have a higher baseline heart rate and a wider range of heart rate fluctuations than older people) and their exercise habits (those who engage in high-intensity training have a wider range of heart rate fluctuations, while those who engage in low-intensity activities have smaller fluctuations).

[0138] Application scenarios include users' daily walking volume (such as walking to and from get off work), activity training volume (such as running), and sleep monitoring;

[0139] By considering individual differences among users and application scenarios, this step sets a heart rate difference threshold, which can more accurately reflect the user's true heart rate changes. Whether in daily life or during exercise, it can better adapt to heart rate changes in different situations and provide more reliable monitoring results.

[0140] Calculate the difference between a user's predicted heart rate and their actual heart rate;

[0141] The difference between the user's predicted heart rate value and the actual heart rate value is compared with a heart rate difference threshold. When the difference exceeds the range of the heart rate difference threshold, the least squares correction algorithm (a regression method that minimizes the sum of squared errors between the predicted and actual values, used here to adjust the predicted heart rate value) is used to correct the user's predicted heart rate value accordingly.

[0142] The purpose of correcting the user's predicted heart rate value is to make the predicted heart rate value closer to the actual value, thereby reducing errors and timely detection of potential health problems (such as heart disease, excessive fatigue).

[0143] When a user's predicted heart rate is greater than the sum of their actual heart rate and a heart rate difference threshold, the predicted heart rate is reduced, as shown in the following expression:

[0144] ;

[0145] When a user's predicted heart rate is less than the difference between the user's actual heart rate and the heart rate difference threshold, the user's predicted heart rate is increased, as shown in the following expression:

[0146] ;

[0147] in, This indicates the corrected heart rate value. H represents the user's actual measured value, H represents the user's predicted heart rate value, and E represents the adjustment coefficient that controls the correction range.

[0148] S4. Collect comprehensive heart rate data from users based on the corrected heart rate values, and generate management suggestions for heart rate health adjustment.

[0149] Includes the following steps,

[0150] The corrected heart rate value is converted into a standard heart rate display format (e.g., 71.5 BPM, meaning the user's heart rate is 71.5 beats per minute), and the sampling frequency of the wearable device (Apple Watch) is set (sampling every five minutes, increasing to once per second or higher during exercise; users can also manually change the sampling frequency according to their own situation). The user's comprehensive heart rate data over a period of time (one week) is collected (for athletes or fitness enthusiasts, collecting this comprehensive heart rate data can help these user groups develop more scientific training plans and avoid overtraining or injury).

[0151] Over the past period, users' comprehensive heart rate data has included resting heart rate data (i.e., heart rate data collected when the user is at rest, such as heart rate data collected after waking up in the morning before getting out of bed), maximum heart rate data (peak heart rate data collected during high-intensity exercise, used to measure the user's exercise intensity limit), and minimum heart rate data (minimum heart rate data collected during deep sleep or low metabolic state, used to reflect the user's heart rate recovery ability and overall health status).

[0152] Use line charts to analyze the trend of heart rate changes in users' comprehensive heart rate data over a period of time, and generate health reports for users.

[0153] Choose an appropriate time interval (for daily activity monitoring, you can choose an hour as a time point; while for exercise training, you can choose a minute as a time point) and draw a two-dimensional coordinate (X-axis represents time, Y-axis represents the user's heart rate value), and plot the heart rate value corresponding to each time point on the graph to form a line graph;

[0154] By observing the peaks and troughs in the line graph, you can identify the user's high and low heart rate during specific time periods. For example, the heart rate is lower when waking up in the morning and higher during exercise.

[0155] Based on the user's high and low heart rate during specific time periods, analyze the patterns of heart rate changes, such as whether there are regular periodic fluctuations (e.g., differences between daytime and nighttime heart rates), and whether there are sudden increases or decreases (which may indicate a stress response). Mark important life events or activities, such as strenuous exercise, sleep periods, and meal times, on the line graph, and use different colors to distinguish different types of time points (e.g., resting heart rate in blue, exercise heart rate in red).

[0156] The user's health report includes a heart rate trend chart (with annotations on the chart explaining the reasons for the peaks and troughs), a summary of key indicators (resting heart rate after waking up each morning to help users understand their basal metabolic rate, the maximum heart rate reached each day, especially the peak heart rate during high-intensity exercise, and the lowest heart rate each day, which usually occurs during deep sleep).

[0157] Based on users' health reports, management suggestions for adjusting heart rate are provided to users (tailored to different user groups);

[0158] For office workers, it is recommended to do 5-10 minutes of deep breathing exercises every day to regulate the autonomic nervous system. Specific methods include abdominal breathing and the 4-7-8 breathing method. In terms of diet, it is necessary to reduce the intake of high sugar and high fat foods and increase the intake of fiber-rich foods, such as vegetables, fruits and whole grains, to keep blood sugar stable and avoid abnormal increases in heart rate due to blood sugar fluctuations.

[0159] For fitness athletes, different training zones (such as low intensity, medium intensity, and high intensity) should be set according to HRmax. For example, during low-intensity training, the heart rate should be controlled at 60%-70% of HRmax, and during medium-intensity training, it should be controlled at 70%-80% of HRmax. Perform a 10-15 minute dynamic warm-up before each training session to activate cardiopulmonary function and prevent a sudden increase in heart rate. After training, perform static stretching to help the heart rate gradually return to normal and promote muscle recovery. After each high-intensity training session, monitor the heart rate recovery speed. Under normal circumstances, the heart rate should drop by about 20 BPM 1 minute after training. If the recovery is slow, it indicates physical fatigue or insufficient recovery, and it is recommended to appropriately reduce the training intensity or extend the rest time.

[0160] For elderly users (those at higher risk of cardiovascular disease), measure your resting heart rate every morning before getting out of bed, record and observe its trends. If your resting heart rate is consistently higher than the normal range (60-100 BPM), consult a doctor promptly to check for heart problems. Have a comprehensive cardiovascular checkup annually, including an electrocardiogram, blood pressure, and blood lipid levels. If you have chronic diseases such as hypertension or coronary heart disease, strictly follow your doctor's advice to take medication and control your condition. Your diet should be light, reducing salt and fat intake, and eating more foods rich in potassium and magnesium, such as bananas and spinach. Maintain adequate hydration to avoid dehydration that can lead to abnormal heart rate.

[0161] This embodiment also provides a computer device applicable to the signal processing method in heart rate measurement, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the signal processing method in heart rate measurement as proposed in the above embodiment.

[0162] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0163] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the signal processing method for heart rate measurement as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0164] In summary, this invention achieves accurate capture of complex heart rate signal patterns by constructing a heart rate prediction model, extracting features using an adaptive peak detection algorithm and fast Fourier transform technology, effectively addressing individual differences among users and improving the accuracy of heart rate prediction, and setting a heart rate difference threshold based on individual user differences and application scenarios. When the difference between the predicted value and the actual value exceeds the threshold, a least squares correction algorithm is used to correct the predicted value. This process, by adjusting the correction amplitude, effectively reduces prediction errors and enhances the accuracy and flexibility of heart rate measurement.

[0165] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A signal processing method for heart rate measurement, characterized in that: include, Collect users’ initial heart rate multi-source data and users’ personal information, synchronize and preprocess the users’ initial heart rate multi-source data to obtain preprocessed users’ heart rate multi-source data; Extract heart rate signal features from preprocessed multi-source user heart rate data, construct a heart rate prediction model for the user based on these features, and train the parameters of the heart rate prediction model to obtain the trained heart rate prediction model. The specific steps are as follows: The peak position features of each heartbeat cycle are extracted using an adaptive peak detection algorithm; Select a time window of a set length and use SciPy to detect the zero-crossing features of the heartbeat cycle; The Fast Fourier Transform library is used to extract a segment of preprocessed multi-source user heart rate data, obtain its frequency domain representation, and extract spectral energy features. By combining the user's personal information, the TensorFlow learning framework is used to combine the extracted heart rate signal features into a user heart rate feature vector. Based on user heart rate feature vectors and initial heart rate multi-source data, a labeled dataset and a pre-training dataset are constructed, and the pre-training dataset is divided into a training set and a validation set. A long short-term memory network was selected and an initial heart rate prediction model with N layers was constructed using a labeled dataset. The user's heart rate feature vector is input into the initial heart rate prediction model for forward propagation to obtain the predicted value of the initial heart rate prediction model; Use Philips devices to obtain the true labels from the pre-trained dataset; The error between the predicted values ​​of the initial heart rate prediction model and the true labels was calculated using the MSE loss function. Backpropagation is performed on the error between the predicted value and the true label to obtain the parameter gradient of the initial heart rate prediction model; The Adam optimizer is used to update the parameter gradient of the initial heart rate prediction model, resulting in the updated initial heart rate prediction model parameters. Based on the updated initial heart rate prediction model parameters, some layers in the N-layer initial heart rate prediction model are frozen, and the parameters of the unfrozen layers are adjusted using a low learning rate combined with the training set. At the same time, the frozen layers are gradually unfrozen to obtain the adjusted heart rate prediction model. The accuracy and AUC-ROC curve of the adjusted heart rate prediction model were evaluated using the validation set to obtain the trained heart rate prediction model. The trained heart rate prediction model is used to calculate the user's predicted heart rate value and measure the user's actual heart rate value. A heart rate difference threshold is set based on the user's individual differences and application scenarios. When the difference between the user's predicted heart rate value and the actual heart rate value exceeds the heart rate difference threshold range, a correction algorithm is used to correct the user's predicted heart rate value to obtain the corrected heart rate value. Based on the corrected heart rate values, comprehensive heart rate data of users is collected to generate management suggestions for heart rate health adjustment.

2. The signal processing method for heart rate measurement as described in claim 1, characterized in that: The process of collecting users' initial heart rate data from multiple sources and gathering users' personal information includes the following steps: The user's initial heart rate multi-source data includes the user's PPG data, heart rate cycle data, and accelerometer data; The user's personal information includes the user's age, gender, and health status.

3. The signal processing method for heart rate measurement as described in claim 2, characterized in that: The initial multi-source heart rate data of users is synchronized and preprocessed to obtain preprocessed multi-source heart rate data, including the following steps. The highest sampling frequency was selected as the reference time axis, and interpolation was used to synchronize and align the user's initial heart rate multi-source data to the reference time axis. Use a bandpass filter to remove high-frequency noise and low-frequency drift from PPG data; Use a power frequency filter to remove power supply interference from heartbeat cycle data; Use a low-pass filter to remove high-frequency vibration noise from accelerometer data.

4. The signal processing method for heart rate measurement as described in claim 3, characterized in that: The trained heart rate prediction model is used to calculate the user's predicted heart rate, and the user's actual heart rate is measured. Includes the following steps, The mean and median absolute deviation of all heart rate features in the user's heart rate feature vector are calculated using robust statistics combined with the Huber loss function. The median of the user's heart rate feature vector is defined based on the mean and median absolute deviation of all heart rate features. The trained heart rate prediction model is used in conjunction with a Gaussian probability function to calculate the user's predicted heart rate value. The expression is as follows: ; ; ; in, This represents the mean of all heart rate characteristics. This represents the transition point of the Huber loss function. The dimension representing the user's heart rate feature vector. This represents the Huber loss function. Represents the first element in the user's heart rate feature vector. Heart rate characteristics, This represents the median absolute deviation of all heart rate characteristics. This represents the median of the user's heart rate feature vector. This indicates the user's predicted heart rate value. This represents a scaling factor that makes the mean and median absolute deviation of all heart rate features have the same scale. Choose wearable devices to wear on the user's wrist; Wearable devices detect blood flow and measure the user's actual heart rate by emitting green light onto the user's skin and receiving changes in the amount of reflected light.

5. The signal processing method for heart rate measurement as described in claim 4, characterized in that: Based on individual user differences and application scenarios, a heart rate difference threshold is set. When the difference between a user's predicted heart rate value and actual heart rate value exceeds the threshold range, a correction algorithm is used to correct the user's predicted heart rate value, resulting in a corrected heart rate value. Includes the following steps, Set a heart rate difference threshold; Calculate the difference between a user's predicted heart rate and their actual heart rate; The difference between the user's predicted heart rate value and the actual heart rate value is compared with a heart rate difference threshold. When the difference exceeds the range of the heart rate difference threshold, the least squares correction algorithm is used to correct the user's predicted heart rate value accordingly. When a user's predicted heart rate is greater than the sum of the user's actual heart rate and the heart rate difference threshold, the user's predicted heart rate is reduced. When a user's predicted heart rate is less than the difference between the user's actual heart rate and the heart rate difference threshold, the user's predicted heart rate is increased.

6. The signal processing method for heart rate measurement as described in claim 5, characterized in that: Based on the corrected heart rate values, comprehensive heart rate data is collected from users to generate management suggestions for heart rate health adjustments. Includes the following steps, The corrected heart rate value is converted into a standard heart rate display format, and the sampling frequency of the wearable device is set to collect the user's comprehensive heart rate data over a period of time. The user's comprehensive heart rate data over the past period includes resting heart rate data, maximum heart rate data, and minimum heart rate data; Use line charts to analyze the trend of heart rate changes in users' comprehensive heart rate data over a period of time, and generate health reports for users. Based on the user's health report, we provide management suggestions for adjusting heart rate health.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the signal processing method in heart rate measurement according to any one of claims 1 to 6.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the signal processing method in heart rate measurement according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Heart rate prediction and model training method and system, wearable device and medium

    CN119862375A