A Real-Time Health Early Warning System and Method Based on Time-Aware Autoencoder

By combining a two-stage filtering method with a time-aware autoencoder, the problems of noise and time series irregularities in heart rate data analysis of wearable devices are solved, generating a personalized resting heart rate matrix, and realizing accurate monitoring and real-time early warning of the user's health status.

CN119380986BActive Publication Date: 2025-10-31BEIJING INST OF TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411492536.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-10-31
Estimated Expiration
2044-10-24

AI Technical Summary

Technical Problem

Existing technologies for heart rate data analysis in wearable devices suffer from data noise, differences in the periodic characteristics of time series data, and irregular intervals, resulting in poor performance of traditional methods in denoising, generating resting heart rate matrices, and modeling.

Method used

A two-stage filtering method was used to fuse heart rate and step count time series data to generate a personalized resting heart rate matrix. A time-aware autoencoder was used to model the resting heart rate time series data. Non-equidistant data were processed by global time interval analysis and exponential decay time mapping to construct a resting heart rate error model based on dynamic thresholds.

Benefits of technology

It improves the accuracy of monitoring individual health status and the effectiveness of real-time health warnings, and can accurately identify changes in health status and generate personalized health warning data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119380986B_ABST
    Figure CN119380986B_ABST
Patent Text Reader

Abstract

This invention discloses a real-time health warning system and method based on a time-aware autoencoder, belonging to the field of intelligent system technology, applied to the analysis of heart rate data in wearable devices for non-diagnostic or therapeutic purposes. The implementation method of this invention is as follows: 1. Fusion of time-series data of heart rate and steps using a two-stage filtering method; 2. Generation of a resting heart rate matrix using the maximum power of the resting heart rate power spectrum; 3. Real-time health warning based on the resting heart rate matrix. Compared with existing technologies, this invention constructs a resting heart rate matrix that, by calculating the power spectrum of the resting heart rate time-domain sequence, can capture the user's unique heart rate cycle pattern. It proposes a global time interval analysis method and an exponentially decaying time interval mapping method to effectively adapt to processing non-equidistant time-series data. Simultaneously, it proposes a resting heart rate error model based on dynamic thresholds for personalized monitoring of the health status of wearable device users, thereby improving the practicality of the health warning model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a real-time health early warning system and method based on a time-aware autoencoder, belonging to the field of intelligent system technology and applied to the analysis of heart rate data in wearable devices for non-diagnostic or therapeutic purposes. Background Technology

[0002] In the field of military medicine, wearable technology holds significant importance. Wearable devices enable seamless, 24 / 7 tracking and recording of an individual's physiological state. Some wearable devices already support electrocardiogram (ECG) functions, enabling the detection of arrhythmias, heart rate monitoring, and sinus rhythm detection. Compared to current conventional healthcare that relies on discontinuous physiological measurements, continuously acquiring and analyzing physiological data can sensitively identify subtle changes and abnormal fluctuations below an individual's baseline. Therefore, wearable devices are increasingly valued in real-time health data collection.

[0003] Real-time health alert data analysis based on wearable devices can be modeled as anomaly detection models. Abnormal behavior in this context specifically refers to data points that deviate significantly from normal observations, related to abnormal physiological states or external influencing factors. Autoencoders are a widely used data modeling method for wearable devices, where the encoding module learns deep, implicit feature representations of the data, while the decoding module aims to accurately reconstruct the original physiological signals. Although autoencoders have shown significant potential in anomaly detection for health alert systems, the quality challenges of data collected by consumer-grade wearable devices cannot be ignored. First, data noise is particularly prominent due to hardware limitations and diverse usage scenarios. For example, in daily activities, changes in a user's movement state and differences in their environment inevitably introduce interference factors into the collected physiological indicators. Given the specificity of wearable data noise, existing denoising methods are not effective when directly applied to the analysis of heart rate alert data from wearable devices. Second, the generation of the resting heart rate matrix is ​​based on the duration of periodic signals in time-series data. A resting heart rate matrix generated with a fixed period size will destroy the periodic characteristics of the time-series data because the periodic characteristics of time-series data acquired by wearable devices vary from person to person. Furthermore, time-series data generated by wearable devices often exhibits irregular time intervals. This is due to uncertainties such as the device's battery life limitations and user wearing habits. Clearly, data acquired hours and days ago has different importance for analyzing current health status. While traditional preprocessing techniques such as interpolation can fill in missing data, virtual time series data cannot fully reflect an individual's real-life health status.

[0004] Therefore, in the real-time health early warning system of time-aware autoencoders, the following issues urgently need to be addressed: how to specifically denoise the wearable data, how to effectively utilize the periodicity of the wearable data to generate a resting heart rate matrix, and how to efficiently model resting heart rate time series data, given the unique quality defects and time structure characteristics of the wearable data. Summary of the Invention

[0005] The purpose of this invention is to address the technical problems of traditional methods performing poorly in wearable data denoising, generating resting heart rate matrices, and modeling resting heart rate time series data. This invention proposes a real-time health early warning system and method based on a time-aware autoencoder.

[0006] The objective of this invention is achieved through the following technical solution:

[0007] This invention discloses a real-time health early warning method based on a time-aware autoencoder, comprising the following steps:

[0008] Step 1: Use a two-stage filtering method to fuse the time series data of heart rate and steps;

[0009] Step 1.1: Obtain real-time heart rate and step count time series data as shown in Equation (1) through a wearable device;

[0010] H = {(h1,t1),(h1,t2),…,(h...} n ,t n )},S={(S1,t1),(S1,t2),…,(s n ,t n )} (1)

[0011] Among them, h i Indicates the t-th i Heart rate value at any given time, s i Indicates the t-th i Step count at any given time;

[0012] Step 1.2: The heart rate time series data is filtered for nighttime events as shown in Equation (2);

[0013]

[0014] in, This is the filtered heart rate sequence; the heart rate sequence is used to filter out the nighttime heart rates with zero step counts within the nighttime time period [t0, t1);

[0015] Step 1.3: Merge the filtered heart rate time series data and step count time series data in the manner shown in Equation (3);

[0016]

[0017] Where X is the heart rate sequence The step count statistics s are merged into the formed sequence;

[0018] Step 1.4: Resample the merged time series data as shown in Equation (4);

[0019]

[0020] Among them, I k ={i|t k ≤t i <t k+1} represents the time interval [t] k , t k+1 The set of indices of all data points within ) |I k | is set I k The size of Δt is the resampling time interval, t k = t0 + kΔt, where k = 0, 1, 2, ...;

[0021] Step 1.5: Obtain resampled time series data under resting conditions to obtain resting heart rate data;

[0022]

[0023]

[0024] Among them, s j It is the resampled sequence X r The time series data includes the number of steps, where W is the size of the sliding window. This is the merged time series data for heart rate and steps. Where h... k This is resting heart rate data. Resting heart rate h k Remove abnormal heart rate data caused by activity, resting heart rate h k Its corresponding t k It is also used for health monitoring heart rate data.

[0025] Step 2: Generate the resting heart rate matrix using the maximum power of the resting heart rate power spectrum;

[0026] Step 2.1: Divide the resting heart rate data into equal time series lengths, and then obtain the number of columns n of the resting heart rate matrix as shown in Equation (6);

[0027]

[0028] f max =arg max f P(f) (6)

[0029] Among them, t s t represents the time at which the resting heart rate begins. e This indicates the end time of resting heart rate, where N represents the number of data points in the resting heart rate time series data, and f max P(f) represents the frequency corresponding to the maximum power in the resting heart rate power spectrum, P(f) represents the power spectrum at frequency f, and T represents the maximum power f. max The corresponding period, This indicates a round-down operation.

[0030] Step 2.2: Generate the resting heart rate matrix (H, T) as shown in equation (7);

[0031]

[0032] Among them, h i,j Indicates at t i,j The resting heart rate at time t, where (N+n)×n represents the dimension of the matrix (H, T);

[0033] Step 3: Implement real-time health alerts based on the resting heart rate matrix;

[0034] Step 3.1: Construct a time-aware autoencoder;

[0035] Step 3.1.1: Extract the resting heart rate matrix (H, T) to obtain the resting heart rate data H and its corresponding time data T as shown in Equation (8);

[0036]

[0037]

[0038] Among them, h i,j Indicates at t i,j The resting heart rate at time t, where (N+n)×n represents the dimension of the matrix (H, T);

[0039] Step 3.1.2: Obtain the time interval matrix ΔT as shown in equation (9);

[0040]

[0041] Where ΔT is the time interval matrix, and Δt is the time interval in the matrix.

[0042] Step 3.1.3: Use the exponential decay method to obtain the time mapping of resting heart rate data as shown in equation (10);

[0043]

[0044] Among them, t it0 and t0 represent the current and start times of the resting heart rate sequence, respectively, and k is the decay coefficient, which controls the decay rate.

[0045] Step 3.2: Input the resting heart rate time series data and time intervals into the time-aware encoder, and train the time-aware unit in the time-aware encoder in the manner shown in Equation (11);

[0046]

[0047] Among them, C t-1 It is the short-term state at time t-1, W e and B e These are the encoder's weight matrix and bias vector, respectively. ReLU(·) represents the ReLU nonlinear rectified function, i.e., f(x) = max(0, x). C t-1 -ReLU(W e C t-1 +B e ) represents long-term memory. This represents short-term memory with time weights. Combining time-weighted short-term memory with long-term memory yields the adjusted short-term state of the previous time step. The specific short-term state at time t is shown in equation (12);

[0048]

[0049] Where * represents element-wise product, Γ u and Γ f These represent the update and forgetting gate signals at time t, which are related to the resting heart rate h, respectively.

[0050] Step 3.3: Train the time-aware decoder and further reconstruct the resting heart rate in the manner shown in Equation (13);

[0051]

[0052] z t =f(W e B e h t ,t)=σ(W e h t +B e +V e t) (13)

[0053] Where f and g represent time-aware encoder and decoder functions, respectively. t This represents the resting heart rate sequence data at time t. tThis represents the output of the time-aware encoder at time t, and also the input of the decoder. This represents the output of the time-aware decoder at time t, i.e., the reconstructed resting heart rate. W e and B e These are the encoder's weight matrix and bias vector, W. d and B d These are the weight matrix and bias vector of the decoder, respectively. V e This is a time-dependent weight matrix. σ and φ are the activation functions in the encoder and decoder, respectively.

[0054] Step 3.4: Use the original resting heart rate sequence and the reconstructed resting heart rate sequence to generate real-time health warning data using equation (14);

[0055]

[0056] Where θ represents the threshold, The indicator function is shown in equation (15).

[0057]

[0058] When e > θ, e - θ > 0, so The value is 1, which triggers a health alert. When e ≤ θ, e - θ ≤ 0, so The value is 0, at which point heart rate and step count time series are collected again; e represents the original resting heart rate h and the reconstructed resting heart rate h. The error loss is specifically shown in equation (16).

[0059]

[0060] Where δ is an adjustable hyperparameter;

[0061] This invention discloses a real-time health warning system based on a time-aware autoencoder, used to implement the above-mentioned method. The real-time health warning system based on a time-aware autoencoder disclosed in this invention includes a time-series data fusion module for heart rate and steps, a resting heart rate matrix generation module, and a module for implementing real-time health warnings based on the resting heart rate matrix.

[0062] The heart rate and step count time series data fusion module is used to filter out noise caused by unhealthy conditions and obtain resting heart rate time series data.

[0063] The resting heart rate matrix generation module is used to convert resting heart rate time series data into a resting heart rate matrix;

[0064] The real-time health warning module based on the resting heart rate matrix is ​​used to model the heart rate data and time data of the resting heart rate matrix and generate real-time health warning data.

[0065] Beneficial effects:

[0066] Compared with existing technologies, it has the following beneficial effects:

[0067] This invention proposes a two-stage filtering method to fuse heart rate and step count statistics into a resting heart rate. The resting heart rate obtained by this method focuses on the heart rate of wearable device wearers during their nighttime rest.

[0068] This invention innovatively constructs a personalized resting heart rate matrix. This personalized resting heart rate matrix plays an important role in health monitoring applications, especially considering the inter-individual time-cycle differences in physiological data collected by wearable devices. By calculating the power spectrum of the resting heart rate time-domain sequence, this invention can capture the unique heart rate cycle pattern of each user, thereby greatly improving the accuracy of individual health monitoring.

[0069] This invention proposes a global time interval analysis method and an exponentially decaying time interval mapping method, aiming to fully explore and integrate the time interval information in the resting heart rate time series. By inputting the resting heart rate time series and its corresponding time interval features into a time-aware autoencoder, it effectively adapts to and accurately processes non-equidistant time series data, overcoming the limitations of traditional methods in analyzing such complex time series data.

[0070] This invention proposes a resting heart rate error model based on dynamic thresholds. The resting heart rate error model can set threshold coefficients according to individual health needs to personalize the monitoring of wearable device wearers' health status data, thereby improving the practicality of health early warning models.

[0071] Therefore, the real-time health early warning system proposed in this invention can accurately monitor changes in users' health status data. Attached Figure Description

[0072] Figure 1 The flowchart shows a real-time health early warning method based on a time-aware autoencoder.

[0073] Figure 2 Raw heart rate sequence image acquired by wearable device;

[0074] Figure 3 A sequence of raw step counts obtained from wearable devices;

[0075] Figure 4 Resting heart rate graph after fusing heart rate sequence and step count statistics;

[0076] Figure 5 A visualization of the convergence process of the loss values ​​on the training set;

[0077] Figure 6 A visualization of the convergence process of the loss values ​​on the validation set;

[0078] Figure 7 A comparison of the original and reconstructed sequences of the first sample in the resting heart rate matrix;

[0079] Figure 8 A comparison of the original and reconstructed sequences of the second sample in the resting heart rate matrix;

[0080] Figure 9 Dispersion plot of abnormal ratings for real-time health alerts of subjects. Detailed Implementation

[0081] To better illustrate the purpose and advantages of this invention, the invention will be further described below with reference to the accompanying drawings and examples. It should be noted that the implementation of this invention is not limited to the following embodiments, and any modifications or alterations made to this invention will fall within the scope of protection of this invention.

[0082] Example

[0083] like Figure 1 As shown, the real-time health early warning method based on a time-aware autoencoder of the present invention has the following specific implementation steps:

[0084] Step 1: Use a two-stage filtering method to fuse the time series data of heart rate and steps;

[0085] When consumer-grade wearable data is used for real-time health alerts, it is often subject to data anomalies not caused by changes in health status, such as those resulting from strenuous physical activity. Therefore, it is necessary to design efficient data fusion strategies to obtain time-series data caused by changes in health status from heart rate and step count statistics collected from consumer-grade wearables.

[0086] Step 1.1: Obtain real-time heart rate and step count time series data as shown in Equation (1) through a wearable device;

[0087] H={(76,Jun-23 00:00:00),(74,Jun-23 00:03:00),…,(66,Sept-0506:08:00)},

[0088] S={(0,Jun-23 00:00:00),(0,Jun-23 00:01:00),…,(0,Sept-0523:59:00)}(1) In this embodiment, the original heart rate sequence and the original step count sequence are respectively as follows Figure 2 and Figure 3As shown.

[0089] Step 1.2: Nighttime heart rate data can generally avoid the impact of strenuous daytime exercise on health. Therefore, in the first stage, the heart rate sequence is filtered to extract nighttime heart rates where the step count is zero within the nighttime time period [t0, t1). In this embodiment, the nighttime period [t0, t1) is defined as from midnight to 7:00 AM. Therefore, It can be shown in equation (2):

[0090]

[0091] Step 1.3: Obtain the heart rate sequence Then, it is combined with the step count statistics as shown in equation (3):

[0092]

[0093] Where X is the heart rate sequence The step count statistics S are merged into the formed sequence.

[0094] Step 1.4: Resample the merged sequence, setting the resampling time interval to Δt. The resampled time point can be represented as t. k = t0 + kΔt, where k = 0, 1, 2, ... The resampled sequence X r This can be expressed as formula (4):

[0095]

[0096] Among them, I k ={i|t k ≤t i <t k+1} represents the time interval [t] k , t k+1 The set of indices for all data points within ) | I k | is set I k The size of the sample. In this embodiment, the resampling time interval is Δt = 1 min.

[0097] Step 1.5: Although the X obtained from the first stage filtering operation r The influence of daily activities during the daytime period on health monitoring has been filtered out, but further confirmation is needed that the wearer of the wearable device is in a static state to truly reflect the wearer's health status. Therefore, a second-stage filtering is introduced to obtain the resting heart rate in this invention. In this embodiment, the size of the sliding window W = 12, therefore, this step can be expressed as formula (5) as follows:

[0098]

[0099]

[0100] Among them, s j It is the resampled sequence X r The step count statistics in the middle, This is the sequence obtained from the second-stage filtering operation, which combines heart rate and step count statistics. Where h... k This invention focuses on resting heart rate. Resting heart rate h k Filtering out activity-induced increases in heart rate is beneficial for assessing underlying health conditions. Resting heart rate (h) k Its corresponding t k It is also used for health monitoring. In this embodiment, the resting heart rate h k like Figure 4 As shown.

[0101] Step 2: Generate the resting heart rate matrix using the maximum power of the resting heart rate power spectrum;

[0102] The generation of the resting heart rate matrix depends on the duration of the periodic signal in the time series data. A resting heart rate matrix generated with a fixed period size destroys the periodic characteristics of the time series because the periodic characteristics of wearable data vary from person to person.

[0103] Step 2.1: The number of columns n in the personalized resting heart rate matrix is ​​calculated according to formula (6):

[0104]

[0105] f max =arg max f P(f) (6)

[0106] Among them, t s t represents the time at which the resting heart rate begins. e This indicates the end time of resting heart rate, where N represents the number of data points in the resting heart rate time series data, and f max P(f) represents the frequency corresponding to the maximum power in the resting heart rate power spectrum, and T represents the maximum power f. max The corresponding period, This indicates a round-down operation.

[0107] In this embodiment, the number of columns n=2 in the personalized resting heart rate matrix used for model training is obtained through the following calculation:

[0108]

[0109] After converting the timestamp into a time interval in seconds, the specific values ​​that can be calculated are:

[0110]

[0111] Step 2.2: This invention improves upon the traditional method of generating a resting heart rate matrix with a fixed cycle size, generating a personalized resting heart rate matrix. (From f) max The resulting personalized resting heart rate matrix (H, T) with timestamps for model training has a dimension of 86×2, as shown in Equation (7):

[0112]

[0113] Where H is the pretreated resting heart rate.

[0114] Step 3: Implement real-time health alerts based on the resting heart rate matrix;

[0115] Unlike models that only model time-series data, this invention inputs both resting heart rate time-series data and time intervals into a time-aware encoder. The autoencoder represents the inherent patterns of normal resting heart rate data using learned low-dimensional features. When abnormal resting heart rate samples are input, the reconstructed resting heart rate has a larger error.

[0116] Step 3.1: Construct a time-aware autoencoder;

[0117] Step 3.1.1: To construct the autoencoder, extract the resting heart rate data H and its corresponding time data T from the personalized resting heart rate matrix (H, T) defined above, as shown in Equation (8):

[0118]

[0119]

[0120] Step 3.1.2: Calculate the time interval matrix ΔT using equation (9) to characterize the temporal relationship between resting heart rate data:

[0121]

[0122] Step 3.1.3: Calculate the time mapping using the following exponential decay method:

[0123]

[0124] Among them, t i t0 and t0 represent the current and start times of the resting heart rate sequence, respectively, and k is the decay coefficient, controlling the decay rate. In this embodiment, k = 1, then... This time interval, based on the entire time series, can obtain global time information of resting heart rate.

[0125] Step 3.2: Input the resting heart rate time series data and time intervals into the time-aware encoder. In this embodiment, the short-term state of the previous time step in the time-aware unit within the encoder is used. This can be expressed as follows:

[0126]

[0127] Among them, C t-1 It is the short-term state at time t-1, W e and B e These are the encoder's weight matrix and bias vector, respectively. ReLU(·) represents the ReLU nonlinear rectified function, i.e., f(x) = max(0, x). C t-1 -ReLU(W e C t-1 +B e ) represents long-term memory. This represents short-term memory with time weights. Combining time-weighted short-term memory with long-term memory yields the adjusted short-term state of the previous time step.

[0128] In this embodiment, the short-term state C of the time-aware encoder at time t is... t for:

[0129]

[0130] Where * represents element-wise product, Γ u and Γ f These represent the update and forgetting gate signals at time t, which are related to the resting heart rate h, respectively.

[0131] Step 3.3: In the process of building the health warning model, the time-aware encoder learns from the resting heart rate data itself and also fully models the timestamps on the resting heart rate data. The decoder part of the autoencoder is similar in structure to the encoder part, and is responsible for reconstructing the encoded learning expression back to the resting heart rate data to support the subsequent error model construction. In this embodiment, for the first and second samples in the resting heart rate matrix, the time-aware autoencoder can be simplified to the expression by formula (13):

[0132]

[0133]

[0134]

[0135] in, Representing time t i Resting heart rate sequence data. The time t represents the time of the encoder with time awareness. i The output of the decoder is also the input of the decoder. The time t represents the time-aware decoder. i The output is the reconstructed resting heart rate. and These are the encoder's weight matrix and bias vector, respectively. and These are the weight matrix and bias vector of the decoder, respectively. This is a time-dependent weight matrix. σ and φ are the activation functions in the encoder and decoder, respectively. In this embodiment, the time-aware autoencoder is trained for 20 epochs, and the changes in loss values ​​on the training and validation sets during training are as follows: Figure 5 and Figure 6 As shown. In this embodiment, the original and reconstructed sequences of the first and second samples in the resting heart rate matrix are as follows. Figure 7 and Figure 8 As shown. The original resting heart rate sequence is represented by the solid pink line, and the reconstructed resting heart rate sequence is represented by the dashed blue line.

[0136] Step 3.4: Use the original resting heart rate sequence and the reconstructed resting heart rate sequence to generate real-time health warning data using equation (14);

[0137]

[0138] Where θ represents the threshold, The indicator function is shown in equation (15).

[0139]

[0140] When e > θ, e - θ > 0, so The value is 1, which triggers a health alert. When e ≤ θ, e - θ ≤ 0, so The value is 0, at which point heart rate and step count time series are collected again; e represents the original resting heart rate h and the reconstructed resting heart rate h. The error loss is specifically shown in equation (16).

[0141]

[0142] Where δ is an adjustable hyperparameter;

[0143] The threshold θ is calculated as follows:

[0144]

[0145] Where M is the number of samples in the resting heart rate matrix generated in the second step. λ is a coefficient that can be set according to individual health parameters. In error model construction, a 3-standard-deviation model is usually used, i.e., λ is 3. When λ takes a larger value, it indicates a higher threshold, making it less likely to generate a health warning. When λ takes a smaller value, it indicates a lower threshold, making it easier to generate a health warning. In this embodiment:

[0146]

[0147] In this embodiment, λ = 3. Therefore, the threshold is as follows:

[0148] θ=0.1070+3×0.0670=0.3080

[0149] In this embodiment, the health warning generated by the resting heart rate error model is as follows: Figure 9 As shown. Abnormal thresholds are displayed as horizontal yellow dashed lines. Abnormal scores above the threshold are displayed as red diamonds, and abnormal scores below the threshold are displayed as black solid dots. Self-reported symptom onset dates are displayed as blue solid lines, and the infection period is marked in gray.

Claims

1. A real-time health early warning method based on a time-aware autoencoder, characterized in that: Includes the following steps, Step 1: Use a two-stage filtering method to fuse the time series data of heart rate and steps; Step 2: Generate the resting heart rate matrix using the maximum power of the resting heart rate power spectrum; Step 2.1: Divide the resting heart rate data into equal time series lengths, and then obtain the number of columns n of the resting heart rate matrix as shown in Equation (6); f max =arg max f P(f) (6) Among them, t s t represents the time at which the resting heart rate begins. e This indicates the end time of resting heart rate, where N represents the number of data points in the resting heart rate time series data, and f max P(f) represents the frequency corresponding to the maximum power in the resting heart rate power spectrum, and T represents the maximum power f. max The corresponding period, This indicates a round-down operation; Step 2.2: Generate the resting heart rate matrix (H,T) as shown in equation (7); Among them, h i,j Indicates at t i,j The resting heart rate at time t, where (N+n)×n represents the dimension of matrix (H,T); Step 3: Implement real-time health alerts based on the resting heart rate matrix; Step 3.1: Construct a time-aware autoencoder; Step 3.2: Input the resting heart rate time series data and time intervals into the time-aware encoder, and train the time-aware unit in the time-aware encoder in the manner shown in Equation (11); Among them, C t-1 It is the short-term state at time t-1, W e and B e These are the encoder's weight matrix and bias vector, respectively. ReLU(·) represents the ReLU nonlinear rectified function, i.e., f(x) = max(0,x); C t-1 -ReLU(W e C t-1 +B e ) represents long-term memory. This represents time-weighted short-term memory; combining time-weighted short-term memory with long-term memory yields the adjusted short-term state of the previous time step. The specific short-term state at time t is shown in equation (12); Where * represents element-wise product, Γ u and Γ f These represent the update and forgetting gate signals at time t, respectively, which are related to the resting heart rate h. Step 3.3: Train the time-aware decoder and further reconstruct the resting heart rate in the manner shown in Equation (13); z t =f(W e ,B e ;h t ,t)=σ(W e h t +B e +V e t) (13) Where f and g represent time-aware encoder and decoder functions, respectively; h t This represents the resting heart rate sequence data at time t; z t This represents the output of the time-aware encoder at time t, which is also the input of the decoder; This represents the output of the time-aware decoder at time t, i.e., the reconstructed resting heart rate; W e and B e These are the encoder's weight matrix and bias vector, W. d and B d These are the weight matrix and bias vector of the decoder, respectively; V e It is a time-dependent weight matrix; σ and φ are the activation functions in the encoder and decoder, respectively; Step 3.4: Use the original resting heart rate sequence and the reconstructed resting heart rate sequence to generate real-time health warning data using equation (14); Where θ represents the threshold, The indicator function is shown in equation (15). When e > θ, e - θ > 0, so The value of is 1, which triggers a health alert; when e ≤ θ, e - θ ≤ 0, so The value is 0, at which point heart rate and step count time series are collected again; e represents the original resting heart rate h and the reconstructed resting heart rate h. The error loss is specifically shown in equation (16). Here, δ is an adjustable hyperparameter.

2. The real-time health early warning method based on a time-aware autoencoder as described in claim 1, characterized in that: Step 1 is implemented as follows: Step 1.1: Obtain real-time heart rate and step count time series data as shown in Equation (1) through a wearable device; H={(h1,t1),(h1,t2),…,(h n ,t n )},S={(s1,t1),(s1,t2),…,(s n ,t n )} (1) Among them, h i Indicates the t-th i Heart rate value at any given time, s i Indicates the t-th i Step count at any given time; Step 1.2: The heart rate time series data is filtered for nighttime events as shown in Equation (2); in, This is the filtered heart rate sequence; the heart rate sequence is used to filter out the nighttime heart rates with zero step counts within the nighttime time period [t0, t1); Step 1.3: Merge the filtered heart rate time series data and step count time series data in the manner shown in Equation (3); Where X is the heart rate sequence The step count statistics S are merged into the formed sequence; Step 1.4: Resample the merged time series data as shown in Equation (4); Among them, I k ={i|t k ≤t i <t k+1 } represents the time interval [t] k ,t k+1 The set of indices of all data points within ) |I k | is set I k The size; Δt is the resampling time interval, t k = t0 + kΔt, where k = 0, 1, 2, ...; Step 1.5: Obtain resampled time series data under resting conditions to obtain resting heart rate data; Among them, s j It is the resampled sequence X r The time series data includes the number of steps, where W is the size of the sliding window. This is the merged time series data of heart rate and steps; where h k This is resting heart rate data; resting heart rate h k Remove abnormal heart rate data caused by activity, resting heart rate h k Its corresponding t k It is also used for health monitoring heart rate data.

3. The real-time health early warning method based on a time-aware autoencoder as described in claim 1, characterized in that: Step 3.1 is implemented as follows: Step 3.1.1: Extract the resting heart rate matrix (H,T) to obtain the resting heart rate data H and its corresponding time data T as shown in Equation (8); Among them, h i,j Indicates at t i,j The resting heart rate at time t, where (N+n)×n represents the dimension of matrix (H,T); Step 3.1.2: Obtain the time interval matrix ΔT as shown in equation (9); Where ΔT is the time interval matrix, and Δt is the time interval in the matrix; Step 3.1.3: Use the exponential decay method to obtain the time mapping of resting heart rate data as shown in equation (10); Among them, t i t0 and t0 represent the current and start times of the resting heart rate sequence, respectively, and k is the decay coefficient, which controls the decay rate.

4. A real-time health early warning system based on a time-aware autoencoder, as described in claim 1, characterized in that: It includes a time-series data fusion module for heart rate and steps, a resting heart rate matrix generation module, and a real-time health warning module based on the resting heart rate matrix; The heart rate and step count time series data fusion module is used to filter out noise caused by unhealthy conditions and obtain resting heart rate time series data. The resting heart rate matrix generation module is used to convert resting heart rate time series data into a resting heart rate matrix; The real-time health warning module based on the resting heart rate matrix is ​​used to model the heart rate data and time data of the resting heart rate matrix and generate real-time health warning data.

Citation Information

Patent Citations

  • Health data detection method based on convolution auto-encoder Gaussian mixture model

    CN112509696A

  • Abnormality detection method and device and storage medium

    CN114664439A