Heart rate calculation method and system for wearable acquisition device
Through multi-scale adaptive heart rate calculation method and user feature adaptive adjustment algorithm, multi-head attention neural network and knowledge distillation technology are used to solve the problem of user feature adaptability and detection accuracy of wearable devices, and efficient capture and continuous optimization of multiple heart rhythm abnormalities are achieved.
Patent Information
- Application Number
- CN202510756813.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2045-06-09
AI Technical Summary
The existing heart rate monitoring methods of wearable devices cannot adapt to different user characteristics, cannot capture multiple heart rhythm abnormalities at the same time, and lack the ability to optimize with user data accumulation, resulting in a decrease in detection accuracy, especially in the elderly and patients with cardiovascular disease.
The multi-scale adaptive heart rate calculation method is used to analyze PPG signals through multi-head attention neural network, combine user feature adaptive adjustment algorithm and incremental learning, optimize individualized feature distribution, and use knowledge distillation technology to improve detection accuracy.
It improves the detection range and accuracy of different types of heart rhythm abnormalities, especially in the elderly and patients with cardiovascular disease, and maintains a stable high detection rate, and continuously optimizes with the accumulation of user data, providing reliable long-term monitoring tools.
Smart Images

Figure CN120284232A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of disease risk prediction, and more specifically, it relates to a heart rate calculation method and system for wearable acquisition devices. Background Art
[0002] With the popularization of health monitoring devices, wearable devices have become an important tool for heart rate monitoring and health management. In the health monitoring scenario, wearable devices need to identify abnormal conditions such as arrhythmia and provide health warnings for users. However, traditional heart rate monitoring methods mainly rely on the heart rate value itself and ignore the rich morphological information contained in the photoplethysmogram (PPG) signal waveform.
[0003] Currently, common heart rate monitoring algorithms for wearable devices mainly adopt technical solutions such as fixed time window analysis, single feature extraction, and static models. These methods have the following problems: First, the feature extraction with a fixed time scale cannot capture different types of cardiac arrhythmias (such as rapid premature beats and slow atrial fibrillation) simultaneously; second, the same feature focus is used for all users without considering the differences in the importance of PPG morphological features among different populations, resulting in a decrease in detection accuracy for special populations (such as the elderly and patients with cardiovascular diseases); finally, there is a lack of the ability to continuously optimize with the accumulation of user data and cannot adapt to the long-term physiological changes of users.
[0004] Therefore, there is a need for a heart rate calculation method that can adapt to different user characteristics, capture multiple cardiac arrhythmia patterns, and can be continuously optimized with the accumulation of user data to improve the accuracy and stability of heart rate monitoring of wearable devices. Summary of the Invention
[0005] The present invention provides a heart rate calculation method and system for wearable acquisition devices, which solves the technical problem of how to adapt to different user characteristics, capture multiple cardiac arrhythmia patterns, and can be continuously optimized with the accumulation of user data in the prior art.
[0006] The present invention provides a heart rate calculation method for wearable acquisition devices, including: Analyze the PPG signal collected by the wearable device on multiple time scales and extract morphological features of multiple time scales; Apply a multi-head attention neural network to process the morphological features of multiple time scales and automatically focus on the waveform features at different time scales; According to the basic information and physiological characteristics of the user, adaptively adjust the importance weights of each feature in the multi-head attention neural network; Based on the output of the adjusted attention network, by comparing the current waveform features with the templates in the self-learning normal waveform library, the detection of abnormal heart rate is achieved, and the individual feature distribution is continuously optimized through incremental learning.
[0007] Further, the multiple time scales include 0.5 seconds, 2 seconds, 5 seconds, and 10 seconds, and the window overlap rate is 50%.
[0008] Further, the morphological features include peak width, peak slope, second derivative value, peak-to-peak distance, waveform area, waveform symmetry, valley-to-peak ratio, waveform energy, spectral center, and waveform entropy.
[0009] Further, the attention of the multi-head attention neural network includes: The multi-head attention neural network contains multiple attention heads, each attention head corresponding to a time scale, and focuses on the significant waveform features at that time scale through attention calculation; Multiply the time scale feature vector by the query matrix to obtain the query vector; Multiply the time scale feature vector by the key matrix to obtain the key vector; Multiply the time scale feature vector by the value matrix to obtain the value vector; Multiply the query vector by the transpose of the key vector, divide by the square root of the key dimension, and then apply the softmax function to obtain the attention score; Multiply the attention score by the value vector to obtain the output value; Among them, the feature vector refers to the feature vector corresponding to the time scale, and the query matrix, key matrix, and value matrix are the parameter matrices for attention calculation.
[0010] Further, the basic information and physiological characteristics of the user include: age group, gender, basic heart rate, heart rate variability index, body mass index, activity level, and history of cardiovascular disease.
[0011] Further, adaptively adjusting the importance weights of each feature in the multi-head attention neural network includes: Based on the basic information and physiological characteristics of the user, construct a user feature vector; Map the user feature vector to a feature importance coefficient through a feature importance mapping neural network; Based on the output of the mapping function, adjust the attention head weights of the multi-head attention network.
[0012] Further, compare the current PPG waveform with the templates in the self-learning normal waveform library to obtain a similarity score through the dynamic time warping algorithm.
[0013] Further, through the knowledge distillation technique, the step of converting the abnormal detection knowledge of the medical-grade electrocardiogram device into the parameter optimization objective of the wearable device algorithm is carried out. In knowledge distillation, a knowledge distillation loss function is adopted, which consists of two parts: one part is the cross-entropy loss between the true label and the prediction of the PPG model, and the other part is the KL divergence between the softened outputs of the ECG model and the PPG model; the two parts are weighted and combined through a weight coefficient, and the KL divergence part is also multiplied by the square of the temperature parameter as a regulation factor.
[0014] Further, the optimization of the individual feature distribution updates the user's personal normal waveform template library in an incremental learning manner, fuses the original template and the current feature vector through a weighted average method, and updates the weight to control the retention ratio of old and new information, so as to obtain the updated template library.
[0015] A heart rate calculation system for a wearable acquisition device, which is used to implement a heart rate calculation method for a wearable acquisition device, includes: A multi-scale feature extraction module, which is used to analyze the PPG signal collected by the wearable device on multiple time scales and extract morphological features on multiple time scales; An attention feature optimization module, which is used to process the morphological features on multiple time scales by applying a multi-head attention neural network and automatically focus on the waveform features at different time scales; A user adaptive adjustment module, which is used to adaptively adjust the importance weights of each feature in the multi-head attention neural network according to the user's basic information and physiological characteristics; An abnormal detection module, which is used to detect heart rate abnormalities based on the output of the adjusted attention network by comparing the current waveform features with the templates in the self-learning normal waveform library, and continuously optimize the individual feature distribution in an incremental learning manner.
[0016] The beneficial effects of the present invention are as follows: By analyzing the PPG signal on multiple time scales simultaneously, the present invention can effectively capture different types of cardiac arrhythmia characteristics, such as rapid premature beats to slow atrial fibrillation, making the detection range more comprehensive, and the detection rate of common cardiac arrhythmias tends to be stable, which is improved compared with traditional methods; Secondly, based on the user feature-based adaptive adjustment algorithm, the system can automatically optimize the algorithm parameters according to the individual characteristics of the user, maintain a stable high detection rate in special populations such as the elderly and patients with cardiovascular diseases, and avoid the problem of decreased accuracy of traditional methods in these populations; Through personalized learning and knowledge distillation techniques, the system can continuously optimize over time, effectively adapt to the long-term physiological changes of users, and the detection accuracy is improved from the initial stage, providing a reliable long-term monitoring tool for patients with chronic cardiovascular diseases. Description of the Drawings
[0017] Figure 1 It is a flowchart of a heart rate calculation method for a wearable acquisition device provided in an embodiment of the present invention; Figure 2 It is a module diagram of a heart rate calculation system for a wearable acquisition device provided in an embodiment of the present invention. Detailed implementation manners
[0018] Now, the subject matter described herein will be discussed with reference to example embodiments. It should be understood that discussing these embodiments is only to enable those skilled in the art to better understand and thus implement the subject matter described herein. Without departing from the protection scope of the content of this specification, changes can be made to the functions and arrangements of the elements discussed. Each example can omit, substitute, or add various processes or components as needed. Additionally, the features described in some examples can also be combined in other examples.
[0019] In at least one embodiment of the present invention, a heart rate calculation method and system for a wearable acquisition device are disclosed. As Figure 1 shown, it includes: According to the embodiments of the present application, this embodiment is applicable to the heart rate abnormality detection scenario in wearable health monitoring devices, aiming at the requirements of detecting arrhythmias for different user groups (such as the elderly, athletes, patients with cardiovascular diseases, etc.). In the field of health monitoring, traditional heart rate detection methods mainly rely on the heart rate value itself, while ignoring the rich morphological information contained in the photoplethysmogram (PPG) signal waveform, and cannot effectively identify various arrhythmias.
[0020] The present application provides a multi-scale adaptive heart rate abnormality detection method, which realizes the extraction and analysis of PPG signal features at different time scales, and can adaptively adjust the abnormality detection parameters according to user characteristics, mainly including the following steps: Step 1: Analyze the PPG signal collected by the wearable device at multiple time scales, and extract the morphological features at multiple time scales.
[0021] This step analyzes the PPG signal collected by the wearable device at multiple time scales, and extracts the morphological features at multiple time scales. It should be noted that this step mainly includes the following sub-steps: 1.1. PPG signal preprocessing: Denoise and normalize the original PPG signal. The denoising uses a band-pass filter (frequency range 0.5 - 5 Hz) to remove baseline drift and high-frequency noise; the normalization process normalizes the signal amplitude to the range of [0, 1] for subsequent processing.
[0022] 1.2. Multi-scale window partitioning: The preprocessed PPG signal is divided into sliding windows of four time scales, namely 0.5 seconds, 2 seconds, 5 seconds, and 10 seconds, with a window overlap rate of 50% to cover the time characteristics of different types of cardiac arrhythmias.
[0023] 1.3. Morphological feature extraction: Extract 10 key morphological parameters from the PPG signal within each time window to form a feature vector. It should be understood that these features include: Peak width: representing the width of the main peak of the PPG waveform, in milliseconds; Peak slope: representing the slope of the rising edge of the PPG waveform, in amplitude / millisecond; Second derivative values: the maximum and minimum values of the second derivative of the waveform, reflecting the degree of waveform bending; Peak interval: the time interval between two adjacent peaks, in milliseconds; Waveform area: the integral area within one cycle of the PPG waveform; Waveform symmetry: the ratio of the rising time to the falling time of the waveform; Valley-peak ratio: the ratio of the valley amplitude to the peak amplitude of the waveform; Waveform energy: the energy distribution characteristics of the signal; Spectrum center: the central position of the signal frequency distribution; Waveform entropy: an index to measure the complexity of the waveform.
[0024] For each window scale , a feature vector is formed : ; where represents the -th feature parameter extracted at scale . Therefore, for the input PPG signal, a multi-scale feature matrix is finally formed, containing the morphological features of all time scales, where represents the scale feature matrices of 0.5s, 2s, 5s, and 10s.
[0025] Step 2: Apply a multi-head attention neural network to process the morphological features of multiple time scales and automatically focus on the waveform features at different time scales.
[0026] In this step, apply a multi-head attention neural network to process the multi-scale feature matrix obtained in Step 1 and automatically focus on the most significant waveform features at different time scales. It should be noted that this step mainly includes the following sub-steps: 2.1. Attention head construction: Construct an independent attention head for each time scale feature vector to form a multi-head attention neural network structure. Each attention head contains three transformation matrices: query matrix , key matrix , and value matrix , where is the dimension of the feature vector (10 in this example), and is the internal dimension of the attention network (both are set to 8 in this example).
[0027] In the embodiments of the present application, the multi-head attention neural network includes the following specific components: Input layer: Receives a feature tensor with a shape of [batch_size, time_scales, feature_dim], where batch_size is the batch size, time_scales is the number of time scales (4 in this example), and feature_dim is the feature dimension (10 in this example). Attention calculation layer: Each time scale corresponds to one attention head, and there are a total of 4 attention heads. Fusion layer: Connects the outputs of all attention heads and maps them to a unified feature space.
[0028] 2.2. Attention calculation: For the feature vector of each time scale , calculate the attention output through the following steps: Calculate the query vector: ; where is the query vector, is the feature vector of time scale , and is the query matrix; Calculate the key vector: ; where is the key vector, is the feature vector of time scale , and is the key matrix; Calculate the value vector: ; where is the value vector, is the feature vector of time scale , and is the value matrix; Calculate the attention score: ; where is the attention score, is the transpose of , is the dimension of the key vector, and is the scaling factor. Calculate the output: , where is the output vector of the attention head, and is a normalization function that converts the attention score into a probability distribution.
[0029] In specific application scenarios, the attention calculation process adapts to different types of arrhythmia detection. For example: For rapid arrhythmias (such as premature beats): The attention head with a short time scale (0.5 seconds) can capture the mutation characteristics of the waveform. For chronic arrhythmias (such as atrial fibrillation): The attention head with a long time scale (10 seconds) can capture the periodic change characteristics of the waveform. For mixed arrhythmias: Attention heads with multiple time scales work together to comprehensively analyze the waveform characteristics.
[0030] 2.3. Multi-head fusion: Connect the outputs of each attention head and pass through a linear transformation matrix for fusion to obtain the final feature representation: ; where represents the vector concatenation operation, which concatenates the attention outputs of the four time scales into a long vector; is the final feature representation after fusion; , , , are the outputs of the attention heads with four different time scales of 0.5s, 2s, 5s, and 10s respectively; is the fusion transformation matrix.
[0031] The implementation of the fusion layer includes the following steps: Concatenate the outputs of all attention heads to generate a feature tensor with a dimension of [batch_size, 4*d_v], where batch_size represents the batch size, 4 represents the number of attention heads with four time scales, and d_v represents the feature dimension of the output of each attention head. Map the concatenated features to the final feature space through the linear transformation matrix to obtain the output feature with a shape of [batch_size, d], where batch_size represents the number of samples in the batch, and d represents the dimension of the final feature.
[0032] In addition, through the multi-head attention neural network, the system can automatically identify the most significant waveform features at different time scales. For example, it pays attention to the rapid waveform changes of premature beats at the 0.5-second scale and the long-period abnormal patterns of atrial fibrillation at the 10-second scale, thereby improving the detection ability for different types of arrhythmias.
[0033] Step 3: According to the user's basic information and physiological characteristics, adaptively adjust the importance weights of each feature in the multi-head attention neural network.
[0034] According to an embodiment of the present application, in this step, the importance weights of each feature in the multi-head attention network are adaptively adjusted according to the user's basic information and physiological characteristics. It should be noted that this step mainly includes the following sub-steps: 3.1 Construction of User Feature Vector: Based on the user's basic information and physiological characteristics, construct the user feature vector. . User features include: Age group: Divided into three categories: young (18 - 40 years old), middle-aged (41 - 60 years old), and elderly (> 60 years old); Gender: male or female; Basal heart rate: The average heart rate at rest, with the unit of beats per minute; Heart rate variability index: SDNN (standard deviation of adjacent R-R intervals), with the unit of milliseconds; Body mass index (BMI): weight (kg) / height² (m²); Activity level: A quantitative index of daily activity intensity; Whether there is a history of cardiovascular disease: A binary index (0 or 1).
[0035] The construction process of the user feature vector includes: Standardize numerical features (such as basal heart rate, BMI, etc.) and map them to the interval [0, 1]; Perform one-hot encoding conversion on categorical features (such as age group, gender, etc.); Concatenate all the converted features to form the final user feature vector. .
[0036] 3.2 Feature Importance Mapping Neural Network: Construct a mapping function , which maps the user feature vector to the feature importance coefficient. The mapping function adopts a two-layer fully connected neural network structure: ; Among them, and are the first and second weight matrices respectively, and are the first and second bias vectors respectively, is the activation function; In the embodiment of this application, the specific structure of the feature importance mapping neural network is: Input layer: Receive the user feature vector , with the dimension being the number of user features (in this example, the dimension after processing 7 features); Hidden layer: A fully connected layer containing 16 neurons, using the ReLU activation function; Output layer: A fully connected layer containing 4 neurons, corresponding to the feature importance coefficients of 4 time scales; Output normalization: Use the Softmax function to ensure that the sum of all weight coefficients is 1.
[0037] 3.3 Feature Weight Adjustment: According to the output of the mapping function, adjust the attention head weights of the multi-head attention network in step 2: ; Among them, is the benchmark feature weight, is the output coefficient of the mapping function for the th feature, is the adjusted feature weight, Represents the user feature vector. Here, Represents the index of the time scale, ranging from 1 to 4, corresponding to time scales of 0.5 seconds, 2 seconds, 5 seconds, and 10 seconds respectively.
[0038] Application examples in specific scenarios: 1. Elderly cardiovascular disease patient scenario: User features: Age = 72 years old, with a history of cardiovascular disease, basal heart rate = 62 bpm. Feature importance output: The weight coefficients for long time scales (5 seconds and 10 seconds) increase significantly (about 0.35 and 0.4). Adjustment effect: Improve the detection sensitivity for chronic atrial fibrillation and bradycardia.
[0039] Young athlete scenario: User features: Age = 25 years old, without a history of cardiovascular disease, basal heart rate = 55 bpm. Feature importance output: The weight coefficients for short time scales (0.5 seconds and 2 seconds) increase (about 0.45 and 0.3). Adjustment effect: Improve the detection sensitivity for instantaneous heart rate changes and premature beats during exercise.
[0040] It should be understood that for the elderly user group, the system will automatically increase the weights of features in long time windows (5 seconds and 10 seconds) to improve the detection sensitivity for chronic arrhythmias; while for the young athlete group, the weights of features in short time windows (0.5 seconds and 2 seconds) are increased to improve the responsiveness to rapid heart rate changes during exercise.
[0041] In addition, through user feature adaptive adjustment, the system can optimize the parameters of the anomaly detection algorithm according to the characteristics of different populations, and improve the detection accuracy in diverse user groups.
[0042] Step 4: Based on the output of the adjusted attention network, by comparing the current waveform features with the templates in the self - learned normal waveform library, detect heart rate anomalies, and continuously optimize the individual feature distribution through incremental learning.
[0043] In an embodiment of the present application, in this step, based on the output of the adjusted attention network, by comparing the current waveform features with the templates in the self - learned normal waveform library, detect heart rate anomalies, and continuously optimize the individual feature distribution through incremental learning, and continuously optimize the individual feature distribution through incremental learning. It can be seen that this step mainly includes the following sub - steps: 4.1. Construction of the normal waveform template library: The system initially configures a basic template library containing various typical PPG normal waveforms. These templates contain standard PPG waveforms at different heart rate levels (such as 60 bpm, 80 bpm, 100 bpm, etc.). Each template is recorded as a feature vector and obtained using the same feature extraction method as in Step 1.
[0044] The composition of the normal waveform template library includes: Basic template set: containing 10 - 15 standard normal waveform templates covering different heart rate levels Personalized template set: an exclusive template set established for each user, initially empty, and continuously accumulating templates during the usage process Template index structure: an index organized by heart rate level for quick positioning of templates with similar heart rates.
[0045] 4.2. Dynamic Time Warping Algorithm: Compare the current PPG feature vector processed in Steps 2 and 3 with the templates in the template library, and calculate the similarity score using the Dynamic Time Warping (DTW) algorithm: ; Among them, and are the current feature vector and the template feature vector respectively, represents the alignment path between the two sequences, is the minimum alignment distance, that is, the similarity score; and are respectively the and th elements in the sequences aligned through the path ; is the length of the alignment path, is the minimum similarity value.
[0046] The specific implementation of the Dynamic Time Warping algorithm includes: Constructing the cumulative distance matrix: Calculate the distances between all points of the two feature vectors and fill the cumulative distance matrix Finding the optimal alignment path: Starting from the lower right corner of the matrix, find the path with the minimum distance to reach the upper left corner Calculating the normalized distance: Divide the minimum path distance by the path length to obtain the normalized similarity score.
[0047] In practical applications, for different types of cardiac arrhythmias, there are different variants in the implementation of the DTW algorithm: For periodic abnormalities (such as atrial fibrillation): Use the cyclic DTW variant, allowing the path to cycle at the sequence boundary For local abnormalities (such as premature beats): Use the constrained DTW variant, restricting the maximum time offset window For morphological abnormalities (such as ST segment changes): Use the weighted DTW variant, assigning higher weights to key feature points.
[0048] 4.3. Abnormality Detection: Judge whether the heart rate is abnormal according to the similarity score. If the similarity score with the most matching template exceeds the preset threshold , it is determined as an abnormal heart rate. The threshold is set considering individual differences of users. The initial value is set according to the statistical characteristics of the user group and is adjusted later through feedback.
[0049] The decision-making process for anomaly detection includes: Template matching: Select 3 - 5 templates closest to the current heart rate from the template library for comparison Similarity ranking: Calculate the DTW distance between the current feature vector and each template, and sort them in ascending order of distance Threshold determination: If the minimum distance exceeds the preset threshold then it is determined as abnormal heart rate Abnormal classification: Further classify the anomaly into different types (such as premature beats, tachycardia, atrial fibrillation, etc.) according to the abnormal feature pattern and distance distribution.
[0050] 4.4 Personalized template library update: For the PPG waveforms determined to be normal, update the user's personal normal waveform template library through incremental learning: ; where, is the original template, is the current feature vector, is the update weight (value range 0 - 1), is the updated template. The update weight increases as the template matching degree increases, ensuring that high-quality matches have a greater impact on the template.
[0051] The personalized template library update strategy includes: New template generation: When a normal waveform at a certain heart rate level appears for the first time, directly add it as a new template Existing template update: When a waveform similar to the existing template appears, update the template according to the above formula Template aging mechanism: Set a usage frequency count for each template and regularly delete templates with low usage frequencies Template diversity maintenance: Ensure that the template library covers all intervals of the user's heart rate dynamic range.
[0052] In a specific application scenario, such as the morning heart rate monitoring scenario, the system works through the following process: 1. After the user wears the device, start monitoring the morning resting heart rate; 2. The system extracts the multi-scale features of the PPG signal and processes them through an adaptive model; 3. Compare with the resting heart rate template in the user's personalized template library; 4. If a significant difference is detected, such as a reduction in heart rate variability exceeding 40%, issue a potential cardiac arrhythmia warning; 5. Update the normal waveform data to the personalized template library to optimize future detection effects.
[0053] Therefore, in this way, the system can continuously adjust and optimize the individualized normal waveform template library as the user's data accumulates, making the anomaly detection more accurately adapt to the user's individual characteristics.
[0054] An embodiment of the present application also provides a method for further improving the generalization performance and detection accuracy of an algorithm by extracting anomaly detection knowledge from professional medical-grade electrocardiogram (ECG) devices. Specifically, this step mainly includes the following sub-steps: Knowledge source model construction: Based on a large amount of clinical electrocardiogram (ECG) data, a professional-level arrhythmia detection model is constructed, which can accurately identify various types of arrhythmias, including sinus tachycardia, sinus bradycardia, atrial fibrillation, atrial flutter, premature beats, ventricular fibrillation, etc.
[0055] The structure of the knowledge source model includes: Input layer: Receives standard 12-lead or single-lead ECG data Feature extraction layer: Contains multiple layers of convolutional neural networks to extract the time-frequency features of the electrocardiogram signal Classification layer: Outputs classification results and confidence levels of multiple types of arrhythmias.
[0056] This electrocardiogram anomaly detection model has the following characteristics in practical applications: High accuracy: The classification accuracy on the standard arrhythmia dataset has been improved; Medical verification: Clinically verified to meet the data processing requirements at the medical device level Multi-disease coverage: Can identify more than 20 common types of arrhythmias; Knowledge distillation algorithm: Through knowledge distillation technology, the knowledge of the medical-grade ECG model is transformed into a form that the PPG model of the wearable device can learn.
[0057] The specific method is: Let the PPG model not only learn the hard labels (true abnormal / normal classification), but also learn the soft labels (probability distribution) output by the ECG model, and minimize the total knowledge distillation loss function of the KL divergence between the two: ; Among them, is the total knowledge distillation loss function, which is used to guide the student model to learn knowledge from the teacher model; is the cross-entropy loss function, is the true label, is the label predicted by the PPG model, is the KL divergence (Kullback-Leibler divergence), is the softened output of the ECG model (teacher model), is the softened output of the PPG model (student model), is the temperature parameter (used to soften the model output), is the weight coefficient (used to balance the ratio of the hard label loss and the distillation loss).
[0058] The specific implementation of the knowledge distillation process includes: Label softening: Using the temperature parameter (usually set to 2-5) Soften the output of the teacher model Matching process: For the same input sample, minimize the KL divergence between the student model and the softened output of the teacher model Joint training: Simultaneously train the hard label supervision signal and the softened knowledge transfer signal, weight coefficient Usually set to 0.3-0.7.
[0059] Application scenario example: In the sleep abnormal rhythm monitoring scenario, the following process can be implemented: 1. Use professional ECG equipment to record user sleep data, and doctors will mark abnormal events; 2. The ECG model analyzes the data and produces detailed probability distribution output; 3. Input the PPG data of the corresponding time into the student model and learn the output mode of the ECG model through knowledge distillation; 4. In actual use, the student model is able to identify abnormal patterns similar to those detected by the ECG model based on PPG data alone.
[0060] Parameter optimization: Based on the results of knowledge distillation, the parameters of the PPG anomaly detection model are optimized so that it can achieve a detection accuracy close to that of medical-grade equipment while maintaining its lightweight. The optimized parameters include key parameters for feature extraction, the weight matrix for attention calculation, and the judgment threshold for anomaly detection.
[0061] The parameter optimization process includes: Sensitivity analysis: Identify the key parameters that have the greatest impact on model performance Constraint optimization: Find the optimal balance between performance and efficiency under device resource constraints Differentiated adjustment: Differentiate parameter configuration for different types of anomalies Verification and fine-tuning: Fine-tune the final parameter configuration through precise verification of labeled data sets.
[0062] It should be noted that through medical-grade knowledge enhancement, this embodiment can provide heart rate abnormality detection capabilities close to those of professional medical equipment under the resource constraints of wearable devices, significantly improving detection accuracy and reliability.
[0063] According to the implementation provided by this application, a high-precision heart rate anomaly detection method for wearable devices is implemented through multi-scale morphological feature extraction, multi-dimensional attention network, user feature adaptive adjustment, anomaly detection and personalized learning, and medical-grade knowledge enhancement, which has the following technical effects: Improved detection accuracy: The detection rate of common abnormal heart rhythms such as atrial fibrillation and ventricular tachycardia in the implementation method provided by this application reaches 92%, which is about 35% higher than that of traditional methods. It should be noted that in special populations such as the elderly and patients with cardiovascular diseases, this method maintains a stable high detection rate, avoiding the problem of decreased accuracy of traditional methods in these populations.
[0064] Wide range of abnormal type coverage: Through multi-scale analysis and attention network, this embodiment can simultaneously capture the heart rate abnormality characteristics at different time scales, and the identification range includes various types from rapid premature beats to slow atrial fibrillation, overcoming the limitations of traditional single-scale analysis.
[0065] Personalized adaptation ability: The method provided in this application is based on an adaptive adjustment algorithm of user characteristics, enabling the system to automatically optimize algorithm parameters according to the individual characteristics of users and continuously optimize over time, improving the detection accuracy in different user groups.
[0066] Expansion of application scenarios: This embodiment expands the function of wearable devices from simple heart rate value monitoring to the detection of cardiac arrhythmias with medical reference value, improving the health management value and clinical auxiliary diagnosis potential of the devices.
[0067] Long-term monitoring value: Through the continuous learning and adaptation algorithm provided in this application, the system can provide stable and reliable heart rate abnormality detection services for a long time, providing continuous data support for the management of chronic cardiovascular diseases.
[0068] In the embodiments of this application, this multi-scale adaptive heart rate abnormality detection method has been verified in actual application scenarios. The following is an application example in a health monitoring scenario.
[0069] Application scenario: Daily monitoring of elderly patients with chronic cardiovascular diseases.
[0070] A medical institution equipped 80 patients with chronic cardiovascular diseases (aged 65 - 78 years, including 46 males and 34 females) with wearable devices integrating the method of this application for continuous monitoring for 6 months. All patients had a history of atrial fibrillation, premature beats or other cardiac arrhythmias. This monitoring aimed to evaluate the detection effect and long-term adaptability of this method in actual home use.
[0071] The first stage: Initialization and user characteristic acquisition.
[0072] The system first collected the basic information of each user, including age (average 71.3 years), gender, basic heart rate (average resting heart rate 67.2 bpm), heart rate variability index SDNN (average 38.4 ms), BMI value (average 26.5), daily activity level score (using the International Physical Activity Questionnaire IPAQ score) and type of cardiovascular disease.
[0073] Taking the patient with ID A076 (72-year-old male with a history of atrial fibrillation) as an example, the user characteristic vector constructed by the system is: u A076 = [0.95, 1, 0.68, 0.42, 0.73, 0.25, 1], where each dimension corresponds to the age group, gender, basal heart rate, SDNN, BMI, activity level, and history of cardiovascular disease after standardization.
[0074] Phase 2: Multi-scale morphological feature extraction.
[0075] Taking the 5-minute PPG signal of patient A076 in the early morning resting state as an example, the system extracts morphological features on four time scales: On the 0.5-second time scale, some of the extracted feature values: peak width: 247 ms, peak slope: 0.043 amplitude / ms, maximum value of the second derivative: 0.00018 amplitude / ms 2 .
[0076] On the 10-second time scale, some of the extracted feature values: average waveform period: 892 ms, waveform entropy: 0.673, spectral center: 1.12 Hz.
[0077] Phase 3: Adaptive adjustment and anomaly detection.
[0078] Based on the user feature vector of patient A076, the weight adjustment coefficients output by the feature importance mapping neural network are: [0.15, 0.25, 0.22, 0.38], corresponding to the attention head weight adjustment coefficients for four time scales (0.5 seconds, 2 seconds, 5 seconds, 10 seconds).
[0079] After adjustment, the system pays more attention to the features on the long time scales (5 seconds and 10 seconds), which is in line with the clinical understanding that the waveform abnormalities of elderly patients with atrial fibrillation are usually more obvious on longer time scales.
[0080] On the 14th day of monitoring, when patient A076 had an atrial fibrillation attack, the system detected the following significant changes in features on the 10-second time scale: an increase of 246% in waveform period variability, an increase of 58% in waveform entropy, and a decrease of 31% in waveform symmetry.
[0081] After comparing with the patient's personal normal waveform template library, the DTW distance score was 0.47 (the threshold was set at 0.35), and the system successfully detected and marked it as an atrial fibrillation anomaly.
[0082] Phase 4: Personalized learning and model optimization.
[0083] During the 6-month monitoring period, the patient A076's personal waveform template library expanded from the initial 5 reference templates to 27 personalized templates, covering the standard waveforms at different heart rate levels and activity states.
[0084] The attention head weights for this patient have also been automatically adjusted multiple times and finally converged to [0.12, 0.21, 0.25, 0.42], further enhancing the attention to long - term scale features and improving the sensitivity of atrial fibrillation detection.
[0085] Verification of detection accuracy effect: The monitoring data of all 80 patients were compared with the hospital Holter monitoring results to verify the detection accuracy of this method: Comparison of the accuracy rates of different types of arrhythmias: The detection accuracy rate of atrial fibrillation reached 91.7%, 33.4% higher than that of the traditional single - feature method. The detection accuracy rate of premature beats reached 87.6%, 29.1% higher than the traditional method. The detection accuracy rate of tachycardia reached 93.2%, 26.7% higher than the traditional method. The detection accuracy rate of bradycardia reached 94.5%, 23.8% higher than the traditional method.
[0086] Detection effect of population differences: The detection accuracy rate of the elderly group (70 - 78 years old) was 90.3%, and that of the middle - aged group (65 - 69 years old) was 91.2%, with only a 0.9% difference between groups. The detection accuracy rate of the group with a history of cardiovascular disease was 89.8%, and that of the mild disease group was 91.5%, with only a 1.7% difference between groups.
[0087] This indicates that this method maintains a high and stable detection accuracy rate in different populations, overcoming the problem that the accuracy rate of traditional methods significantly decreases in special populations.
[0088] Verification of personalized adaptation effect: Compare the detection effects of using the model six months ago and the model six months later: Average detection accuracy rate of the initial model: 82.4% Average detection accuracy rate after six - month adaptation: 91.8% Reduction in detection error rate: 53.4% Reduction in missed - detection rate: 67.2%.
[0089] Adaptability to individual patient changes: Among the 80 patients, 12 had a significant change in basal heart rate (>15%) during the monitoring period. The detection accuracy rate after the system's automatic adjustment remained at 88.7%, only 2.5% lower than that of the stable population. Seven patients adjusted their drug treatment regimens during the monitoring period. The system automatically adapted to the waveform changes within two weeks, and the detection accuracy rate recovered from the temporarily decreased 76.4% to 89.3%.
[0090] The verification results show that through personalized learning and adaptive adjustment, this method can effectively adapt to the long - term physiological changes of users, maintain a stable arrhythmia detection effect, and provide a reliable long - term monitoring tool for patients with chronic cardiovascular diseases.
[0091] Such as Figure 2As shown, a heart rate calculation system for wearable acquisition devices is used to implement a heart rate calculation method for wearable acquisition devices, including: A multi-scale feature extraction module for analyzing the PPG signal collected by the wearable device on multiple time scales and extracting morphological features of multiple time scales; An attention feature optimization module for applying a multi-head attention neural network to process the morphological features of multiple time scales and automatically focusing on waveform features at different time scales; A user adaptive adjustment module for adaptively adjusting the importance weights of each feature in the multi-head attention neural network according to the basic information and physiological characteristics of the user; An anomaly detection module for detecting heart rate anomalies based on the output of the adjusted attention network by comparing the current waveform features with the templates in the self-learning normal waveform library, and continuously optimizing the individual feature distribution through incremental learning.
[0092] The above describes the embodiments of the present invention, but these embodiments are not limited to the above specific implementation manners. The above specific implementation manners are merely illustrative and not restrictive. Under the inspiration of these embodiments, those of ordinary skill in the art can also make more equivalent embodiments in various forms, all of which fall within the protection scope of these embodiments.
Claims
1. A heart rate calculation method for wearable acquisition devices, characterized in that, It includes the following steps: Analyze the PPG signals collected by the wearable device on multiple time scales, and extract the morphological features on multiple time scales; Apply a multi-head attention neural network to process the morphological features on multiple time scales, and automatically focus on the waveform features at different time scales; According to the basic information and physiological characteristics of the user, adaptively adjust the importance weights of each feature in the multi-head attention neural network; Based on the output of the adjusted attention network, detect abnormal heart rate by comparing the current waveform features with the templates in the self-learning normal waveform library, and continuously optimize the individual feature distribution through incremental learning.
2. The heart rate calculation method for a wearable acquisition device according to claim 1, wherein, The multiple time scales include 0.5 seconds, 2 seconds, 5 seconds, and 10 seconds, and the window overlap rate is 50%.
3. A heart rate calculation method for a wearable acquisition device according to claim 1, characterized in that The morphological features include peak width, peak slope, second derivative value, peak-to-peak distance, waveform area, waveform symmetry, valley-peak ratio, waveform energy, spectral center, and waveform entropy.
4. A heart rate calculation method for a wearable acquisition device according to claim 1, characterized in that, The attention of the multi-head attention neural network includes: The multi-head attention neural network contains multiple attention heads, each attention head corresponds to a time scale, and focuses on the significant waveform features at that time scale through attention calculation; Multiply the time-scale feature vector by the query matrix to obtain the query vector; Multiply the time-scale feature vector by the key matrix to obtain the key vector; Multiply the time-scale feature vector by the value matrix to obtain the value vector; Multiply the query vector by the transpose of the key vector, divide by the square root of the key dimension, and then apply the softmax function to obtain the attention score; Multiply the attention score by the value vector to obtain the output value; Among them, the feature vector refers to the feature vector corresponding to the time scale, and the query matrix, key matrix, and value matrix are the parameter matrices for attention calculation.
5. A heart rate calculation method for a wearable acquisition device according to claim 1, characterized in that, The basic information and physiological characteristics of the user include: age group, gender, basal heart rate, heart rate variability index, body mass index, activity level, and history of cardiovascular disease.
6. A heart rate calculation method for a wearable acquisition device according to claim 1, characterized in that, Adaptive adjustment of the importance weights of each feature in the multi-head attention neural network includes: Based on the basic information and physiological characteristics of the user, construct a user feature vector; Map the user feature vector to a feature importance coefficient through a feature importance mapping neural network; Based on the output of the mapping function, adjust the attention head weights of the multi-head attention network.
7. A heart rate calculation method for a wearable acquisition device according to claim 1, characterized in that Compare the current PPG waveform with the templates in the self-learning normal waveform library to obtain the similarity score through the dynamic time warping algorithm.
8. A heart rate calculation method for a wearable acquisition device according to claim 1, characterized in that, The step of converting the abnormal detection knowledge of the medical-grade electrocardiogram device into the parameter optimization target of the wearable device algorithm through knowledge distillation technology, where knowledge distillation uses a knowledge distillation loss function, and the knowledge distillation loss function consists of two parts: one part is the cross-entropy loss between the true label and the PPG model prediction, and the other part is the KL divergence between the softened outputs of the ECG model and the PPG model; the two parts are weighted and combined through a weight coefficient, and the KL divergence part is also multiplied by the square of the temperature parameter as a regulatory factor.
9. A heart rate calculation method for a wearable acquisition device according to claim 1, characterized in that The optimization of the individualized feature distribution updates the user's personal normal waveform template library in an incremental learning manner, fuses the original template and the current feature vector through a weighted average method, and updates the weights to control the retention ratio of old and new information, so as to obtain the updated template library.
10. A heart rate calculation system for a wearable acquisition device, which is used to implement a heart rate calculation method for a wearable acquisition device as described in any one of claims 1-9, characterized in that, It includes: A multi-scale feature extraction module for analyzing the PPG signals collected by the wearable device on multiple time scales and extracting morphological features on multiple time scales; An attention feature optimization module for processing the morphological features on multiple time scales using a multi-head attention neural network to automatically focus on the waveform features at different time scales; A user adaptive adjustment module for adaptively adjusting the importance weights of each feature in the multi-head attention neural network according to the user's basic information and physiological characteristics; An anomaly detection module for detecting heart rate anomalies based on the output of the adjusted attention network by comparing the current waveform features with the templates in the self-learning normal waveform library, and continuously optimizing the individualized feature distribution through an incremental learning manner.
Citation Information
Patent Citations
Method and system for arrhythmia prediction using transducer-based neural networks
CN116504398A
Non-contact abnormal heart rate identification and disease risk cognition method and system
CN117807484A
Non-contact pulse wave and heart rate detection method combining sliding window filtering and multi-head attention mechanism
CN119302629A
Intelligent nursing management system and method for critical patients
CN119453949A
Contactless monitoring of photoplethysmography using radar
US20230157646A1