HRV-data preprocessing method and apparatus, and electronic device

Through the screening of sliding window and RR interval sequences, the problems of abnormal data and interfering data in HRV signal data are solved, and high-accurate HRV feature extraction is achieved, improving the accuracy of disease prediction.

WO2025066208A1PCT designated stage expired Publication Date: 2025-04-03KINGFAR INTERNATIONAL INC

Patent Information

Application Number
PCT/CN2024/095337
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-27
Filing Date
2024-05-24
Publication Date
2025-04-03

AI Technical Summary

Technical Problem

When processing HRV signal data, the existing abnormal data and interfering data exist, resulting in low accuracy of the extracted characteristics and affecting the accuracy of disease prediction.

Method used

By obtaining the HRV data of the sliding window, determining the target peak value and calculating the variance, the data whose variance meets the preset range is selected; then, based on the RR interval sequence, determine whether it meets the preset heartbeat time interval range, further filter the abnormal data, and finally extract the time domain, frequency domain and nonlinear features.

Benefits of technology

Through two abnormal data filtering, HRV data characteristics with high accuracy and conforming to the human heartbeat characteristics are obtained, which improves the accuracy of disease prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024095337_03042025_PF_FP_ABST
    Figure CN2024095337_03042025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to an HRV-data preprocessing method and apparatus, and an electronic device. The method comprises: acquiring HRV data corresponding to a sliding window; determining the variances of a plurality of target peak values corresponding to the HRV data, and using HRV data, the variance of which meets a preset variance range, as first target HRV data; determining an RR interval sequence of the first target HRV data on the basis of the plurality of target peak values, determining whether each RR interval of the RR interval sequence meets a preset heartbeat time interval range, and determining second target HRV data; and extracting a time-domain feature, a frequency-domain feature and a nonlinear feature of the second target HRV data. By means of two instances of filtering performed on abnormal data, second target HRV data which has high accuracy and meets a heartbeat characteristic of a human body is obtained, such that accurate HRV features are extracted.
Need to check novelty before this filing date? Find Prior Art

Description

HRV data preprocessing method, device and electronic equipment

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on September 27, 2023, with application number 202311265053.1 and invention name “A HRV data preprocessing method, device and electronic device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0003] The present application relates to the field of machine learning technology, and in particular to a HRV data preprocessing method, device, and electronic device. Background Art

[0004] Biosignal classification is an important diagnostic tool in biomedical applications. It helps medical experts automatically classify monitored biosignal samples into normal and abnormal biosignals. Most biosignals are inherently stochastic and non-stationary, meaning their values ​​are time-dependent and their statistics change at different points in time.

[0005] Heart rate variability (HRV) is an important type of biosignal data. HRV refers to the changes in heart rate rhythm over time. Clinical practice has demonstrated that HRV can serve as an independent predictor of the risk of sudden cardiac death and is of great significance in assessing the prognosis of cardiovascular disease and predicting acute cardiovascular events. Generally, HRV feature values ​​can be extracted after preprocessing a large amount of collected raw physiological data. Machine learning based on these extracted features can be used to train models such as cognitive load, which can be used to predict conditions such as fatigue and illness.

[0006] However, the existing HRV signal data comes from electrocardiogram data or electrocardiogram monitor equipment. Due to the insufficient accuracy of the collection equipment or the large changes in the emotions and movements of the people being collected in a short period of time, there are some abnormal data in the collected HRV signal data. The existing technology uses the original HRV data to directly extract features, resulting in abnormal data or interference data in the extracted HRV data features, which affects the accuracy of disease prediction based on HRV data features in clinical practice.

[0007] Summary of the Invention

[0008] In order to solve the problem that the HRV feature data obtained in the prior art is not accurate, the present application provides an HRV data preprocessing method, device and electronic device.

[0009] In a first aspect, the present application provides a method for preprocessing HRV data, which adopts the following technical solutions:

[0010] A HRV data preprocessing method, comprising:

[0011] Get the HRV data corresponding to the sliding window;

[0012] Based on the HRV data, determining multiple target peaks corresponding to the HRV data, calculating the variance of the multiple target peaks, and using the HRV data whose variance falls within a preset variance range as the first target HRV data;

[0013] determining an RR interval sequence of the first target HRV data based on the multiple target peaks of the first target HRV data, determining whether each RR interval of the RR interval sequence meets a preset heartbeat time interval range, and using HRV data in which each RR interval of the first target HRV data meets the preset heartbeat time interval range as the second target HRV data;

[0014] The time domain features, frequency domain features and nonlinear features of the second target HRV data are extracted.

[0015] By adopting the above technical solution, HRV data corresponding to the sliding window is obtained; multiple target peaks corresponding to the HRV data are determined, and the variance of the multiple target peaks is calculated. Then, the HRV data is screened based on the variance corresponding to the HRV data, which can exclude HRV data with a large variance, that is, data with a large degree of fluctuation, which may be abnormal, thereby obtaining first target HRV data with high accuracy and relatively stability that meets the preset variance range; then, based on the multiple target peaks of the first target HRV data, the RR interval sequence of the first target HRV data is determined. The RR interval in the RR interval sequence represents the time difference between two adjacent peaks, and represents the time interval between two heartbeats of the human body. Based on the preset heartbeat time interval range, the first target HRV data corresponding to the abnormal heartbeat can be excluded to obtain normal data, that is, the second target HRV data, and feature extraction is performed on each second target HRV data; through the variance and the preset heartbeat time interval range, two abnormal data are filtered to obtain second target HRV data with high accuracy and consistent with the characteristics of the human heartbeat. Feature extraction is performed based on the second target HRV data to obtain accurate HRV features.

[0016] In an optional example, the present application may be further configured as follows: determining, based on the HRV data, a plurality of target peak values ​​corresponding to the HRV data includes:

[0017] Determining a plurality of initial peaks in the HRV data based on a minimum heart beat interval number, wherein the minimum heart beat interval number is the number of data points included in one heartbeat in the HRV data;

[0018] determining a first upper envelope and a first lower envelope of the HRV data;

[0019] determining a voltage threshold of the HRV data based on a percentage threshold, the first upper envelope, and the first lower envelope;

[0020] Peaks exceeding the voltage threshold are selected from the multiple initial peaks to obtain multiple target peaks of the HRV data.

[0021] By adopting the above technical solution, the peak value represents the maximum voltage amplitude of a heartbeat, the peak value corresponding to normal HRV data is within a set range, and multiple initial peak values ​​in the HRV data are determined based on the shortest number of heartbeat interval points. In addition, the voltage threshold value of the HRV data is calculated based on the percentage threshold value and the first upper envelope and the first lower envelope of the HRV data. The voltage threshold value represents the minimum peak value that conforms to the characteristics of the human body. The voltage threshold value can be used to screen the peak value that conforms to the characteristics of the human body from multiple initial peak values ​​as the target peak value, so that the target peak value is obtained more accurately.

[0022] In an optional example, the present application may be further configured as follows: obtaining HRV data corresponding to the sliding window includes:

[0023] Acquire first initial HRV data corresponding to the sliding window, and determine a second upper envelope and a second lower envelope of the first initial HRV data;

[0024] determining a maximum amplitude difference between the second upper envelope and the second lower envelope;

[0025] determining an amplitude adjustment ratio for each data point in the first initial HRV data based on a second upper envelope value, a second lower envelope value, and the maximum amplitude difference corresponding to each data point in the first initial HRV data;

[0026] The amplitude of each data point in the first initial HRV data is adjusted based on the amplitude adjustment ratio corresponding to the data point to obtain HRV data.

[0027] By adopting the above technical solution, the first initial HRV data corresponding to the sliding window is obtained, the second upper envelope and the second lower envelope of the first initial HRV data, as well as the maximum amplitude difference between the second upper envelope and the second lower envelope are determined, and the amplitude adjustment ratio of each data point in the initial total HRV data is determined based on the second upper envelope value, the second lower envelope value and the maximum amplitude difference corresponding to each data point in the first initial HRV data. Then, each data point is adjusted based on the amplitude adjustment ratio, so that the amplitude of the adjusted first initial HRV data is still within the original second upper and lower envelopes, the amplitude of data with too high amplitude is reduced, and the amplitude of data with too low amplitude is increased. Finally, the amplitude of each data point in the first initial HRV data is adjusted to a reasonable amplitude range, so as to obtain smooth and effective HRV data.

[0028] In an optional example, the present application may be further configured as follows: performing amplitude adjustment on each data point in the first initial HRV data based on the amplitude adjustment ratio corresponding to the data point to obtain HRV data includes:

[0029] performing amplitude adjustment on each data point in the first initial HRV data based on the amplitude adjustment ratio corresponding to the data point to obtain first HRV data after amplitude adjustment;

[0030] Performing anomaly detection on the first HRV data after amplitude adjustment to determine an abnormal point;

[0031] The value of the abnormal point is corrected based on the mean or median corresponding to multiple data points before or after the abnormal point to obtain the HRV data.

[0032] By adopting the above technical solution, anomaly detection is performed on the first HRV data after amplitude adjustment, an abnormal point is determined, and the value of the abnormal point is corrected based on the mean or median of the data surrounding the abnormal point, so that the abnormal value of the abnormal point can be returned to a normal value, thereby ensuring the accuracy and smoothness of the HRV data.

[0033] In an optional example, the present application may be further configured as follows: performing abnormality detection on the amplitude-adjusted first HRV data to determine abnormal points includes:

[0034] Determining a first difference between a target data point and a previous data point, and a second difference between a target data point and a subsequent data point in the amplitude-adjusted first HRV data, wherein the target data point is any data in the first HRV data;

[0035] calculating a first ratio of the first difference value to the target data point, and a second ratio of the second difference value to the target data point;

[0036] When the first ratio and the second ratio of the target data point are both greater than a preset ratio threshold, the target data point is determined to be an abnormal point.

[0037] By adopting the above technical solution, the first ratio and the second ratio of the target data point in the first HRV data after amplitude adjustment are determined. If the first ratio and the second ratio of the target data point both exceed the preset ratio threshold, it means that the target data point has a numerical mutation compared with the surrounding data points, and the target data point is determined to be an abnormal point. The abnormal point can be accurately determined by the change of the target data point compared with the surrounding data points.

[0038] In an optional example, the present application may be further configured as follows: performing abnormality detection on the amplitude-adjusted first HRV data to determine abnormal points includes:

[0039] determining a median value of the amplitude-adjusted first HRV data, and determining a median deviation of a target data point in the amplitude-adjusted first HRV data based on the median value;

[0040] When the median deviation of the target data point is greater than a preset deviation threshold, the target data point is determined to be an abnormal point.

[0041] By adopting the above technical solution, the median of the first HRV data after amplitude adjustment is determined, and the median deviation of the target data point in the first HRV data after amplitude adjustment is determined based on the median. If the median deviation of the target data point is greater than the preset deviation threshold, it means that the degree to which the target data point deviates from the median of the first HRV data exceeds the normal range, and the target data point is determined as an abnormal point, which can accurately screen out abnormal points with excessively large median deviations.

[0042] In an optional example, the present application may be further configured as follows: obtaining the first initial HRV data corresponding to the sliding window includes:

[0043] Obtaining second initial HRV data corresponding to the sliding window;

[0044] Performing a fast Fourier transform on a time domain signal corresponding to the second initial HRV data to obtain a frequency domain signal corresponding to the second initial HRV data;

[0045] Determining whether the frequency domain signal corresponding to the second initial HRV data is a valid frequency domain signal based on a preset frequency domain interval;

[0046] If valid, perform segmented filtering on the valid frequency domain signal, integrate the segmented filtered valid frequency domain signals and perform inverse fast Fourier transform to obtain the filtered first initial HRV data.

[0047] By adopting the above technical solution, after the time domain signal is converted into a frequency domain signal, the effective frequency domain signal is judged by the preset frequency domain interval, which can exclude the data with abnormal frequency and obtain valid data. Then, the effective data is denoised by combining the segmented filtering operation, which can accurately remove noise interference and improve the accuracy of the first initial HRV data.

[0048] In an optional example, the present application may be further configured to: extract the nonlinear features of the second target HRV data, including:

[0049] Drawing a Pontevedra scatter plot and a difference scatter plot based on the second target HRV data;

[0050] Determining the ellipse major axis standard deviation and the ellipse minor axis standard deviation of the Pontevedra scatter plot;

[0051] Determine the number of midpoints in the first quadrant and the third quadrant in the difference scatter plot;

[0052] The nonlinear characteristics include: the standard deviation of the major axis of the ellipse, the standard deviation of the minor axis of the ellipse, the number of midpoints in the first quadrant, and the number of midpoints in the third quadrant.

[0053] By adopting the above technical solution, a Pontevez scatter plot and a difference scatter plot are drawn based on the second target HRV data. The standard deviation of the major axis of the ellipse and the standard deviation of the minor axis of the ellipse obtained from the Pontevez scatter plot can reflect the parasympathetic nerve activity of the human body. The number of midpoints in the first quadrant and the number of midpoints in the third quadrant obtained from the difference scatter plot can reflect the changes in two consecutive cardiac intervals, indicating heart rate and sympathetic nerve activity. Based on these nonlinear indicators, the physiological state of the human body can be evaluated.

[0054] In an optional example, the present application can be further configured as follows: the multiple target peaks are peaks in the HRV data that exceed a voltage threshold, and the step of determining the voltage threshold is: determining the maximum amplitude difference between the first upper envelope and the first lower envelope of the HRV data, and determining the product of the maximum amplitude difference and a preset percentage threshold, and taking the sum of the product and the amplitude of the first lower envelope corresponding to the maximum amplitude difference as the voltage threshold.

[0055] In a second aspect, the present application provides an HRV data preprocessing device, which adopts the following technical solution:

[0056] A HRV data preprocessing device, comprising:

[0057] An acquisition module is used to obtain HRV data corresponding to the sliding window;

[0058] A first processing module is configured to determine, based on the HRV data, a plurality of target peak values ​​corresponding to the HRV data, calculate a variance of the plurality of target peak values, and use the HRV data whose variance falls within a preset variance range as first target HRV data;

[0059] a second processing module, configured to determine an RR interval sequence of the first target HRV data based on the multiple target peaks of the first target HRV data, determine whether each RR interval of the RR interval sequence meets a preset heartbeat time interval range, and use HRV data in which each RR interval of the first target HRV data meets the preset heartbeat time interval range as the second target HRV data;

[0060] An extraction module is used to extract the time domain features, frequency domain features and nonlinear features of the second target HRV data.

[0061] In a third aspect, the present application provides an electronic device, which adopts the following technical solution:

[0062] one or more processors;

[0063] Memory;

[0064] One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to: execute the HRV data preprocessing method as described in any one of the first aspects.

[0065] In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution:

[0066] A computer-readable storage medium having a computer program / instruction stored thereon, wherein the computer program / instruction, when executed by a processor, implements the HRV data preprocessing method as described in any one of the first aspects.

[0067] In a fifth aspect, the present application provides an apparatus, comprising: a processor, configured to call and run a computer program from a memory, so that a device equipped with the apparatus performs the HRV data preprocessing method as described in any one of the first aspects.

[0068] In a sixth aspect, the present application provides a computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the HRV data preprocessing method as described in any one of the first aspects.

[0069] In summary, this application has the following beneficial technical effects:

[0070] The present application obtains HRV data corresponding to a sliding window; determines multiple target peaks corresponding to the HRV data, and calculates the variance of the multiple target peaks, and then filters the HRV data based on the variance corresponding to the HRV data, which can exclude HRV data with a large variance, that is, data with a large degree of fluctuation, which may be abnormal, thereby obtaining first target HRV data with high accuracy and relatively stability that meets the preset variance range; then, based on the multiple target peaks of the first target HRV data, determines the RR interval sequence of the first target HRV data, the RR interval in the RR interval sequence represents the time difference between two adjacent peaks, and represents the time interval between two heartbeats of the human body. Based on the preset heartbeat time interval range, the first target HRV data corresponding to the abnormal heartbeat can be excluded to obtain normal data, that is, the second target HRV data, and feature extraction is performed on each second target HRV data; through the variance and the preset heartbeat time interval range, two abnormal data are filtered to obtain second target HRV data with high accuracy and consistent with the characteristics of the human heartbeat, and feature extraction is performed based on the second target HRV data to obtain accurate HRV features. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] FIG1 is a flow chart of a method for preprocessing HRV data according to an embodiment of the present application;

[0072] FIG2 is a partial time domain signal waveform provided by an embodiment of the present application;

[0073] FIG3 is a schematic diagram of a first upper envelope and a first lower envelope provided in an embodiment of the present application;

[0074] FIG4 is a schematic diagram of a target peak provided in an embodiment of the present application;

[0075] FIG5 is a schematic diagram of a waveform before amplitude adjustment provided in an embodiment of the present application;

[0076] FIG6 is a schematic diagram of a waveform after amplitude adjustment provided in an embodiment of the present application;

[0077] FIG7 is a waveform comparison diagram before and after amplitude adjustment provided by an embodiment of the present application;

[0078] FIG8 is a schematic diagram of a power spectrum waveform provided in an embodiment of the present application;

[0079] FIG9 is a Pound-Calew scatter plot provided in an embodiment of the present application;

[0080] FIG10 is a schematic structural diagram of an HRV data preprocessing device provided in an embodiment of the present application;

[0081] FIG11 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0082] The present application is further described in detail below with reference to Figures 1-11.

[0083] This specific embodiment is merely an explanation of the present application and is not a limitation of the present application. After reading this specification, those skilled in the art may make non-creative modifications to the present embodiment as needed, but as long as they are within the scope of the claims of the present application, they are protected by the patent law.

[0084] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0085] In this document, the term "and / or" simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document, unless otherwise specified, generally indicates an "or" relationship between the related objects.

[0086] For ease of understanding, the following are explanations of the terms involved in this plan:

[0087] RR interval: defined as the time difference between two consecutive peaks, also known as NN interval or IBI (Inter-Beat Interval, heartbeat interval) interval, usually measured in milliseconds, is an important data for calculating HRV indicators.

[0088] Heart rate: refers to the number of heartbeats per minute of a normal person in a resting state.

[0089] ECG: refers to electrocardiogram, which can use an electrocardiograph to record the changes in electrical activity generated by each heart cycle from the human body surface.

[0090] PPG: Photoplethysmography (PPG) uses a photoelectric sensor to detect the difference in intensity of reflected light after absorption by human blood and tissues, and to record the changes in vascular volume during the cardiac cycle.

[0091] HRV data can be a time series of beat intervals extracted from a normal human electrocardiogram (ECG) or pulse signal (PPG). The signal waveform of HRV data is a time domain signal, which represents the change of the voltage generated by the human heartbeat over time. The horizontal axis of the time domain signal waveform represents time, and the vertical axis represents voltage.

[0092] The present invention provides an HRV data preprocessing method, as shown in FIG1 . The method provided in the present invention can be performed by an electronic device, which can be a server or a terminal device. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The terminal device can be, but is not limited to, a smartphone, tablet computer, laptop computer, or desktop computer. The terminal device and server can be directly or indirectly connected via wired or wireless communication, which is not a limitation of the present invention.

[0093] The HRV data preprocessing method provided in the embodiment of the present application mainly solves the problem of accuracy in feature extraction of original physiological signals during real-time prediction. Due to problems such as insufficient accuracy of the acquisition equipment or possible deviation in wearing, the collected HRV data may contain abnormal data. The embodiment of the present application preprocesses the HRV data to eliminate the abnormal data, thereby improving the accuracy of the HRV data and extracting more accurate data features. The method includes:

[0094] S101: Obtain HRV data corresponding to a sliding window.

[0095] In an embodiment of the present application, real-time HRV data is acquired, and the real-time HRV data is segmented according to a sliding window to obtain HRV data corresponding to the sliding window.

[0096] Specifically, the sliding window slides for a specific duration, and the data of the sliding window duration is segmented from the HRV data acquired in real time. When the duration of the real-time HRV data is greater than the sliding window duration, the real-time HRV data can be segmented through the sliding window. Assuming that the sliding window duration is set to 15s, and the sliding specific duration of the sliding window is 1s, when the duration of acquiring real-time HRV data exceeds 15s, the sliding window can segment the real-time HRV data once to obtain the HRV data of 0-15s corresponding to the sliding window. When the duration of the real-time HRV data exceeds the sum of the sliding window duration and the sliding specific duration, that is, 16s, the real-time HRV data is segmented for the second time through the sliding window to obtain the HRV data of 1-16s corresponding to the sliding window. Similarly, each time the sliding window slides, 15s of HRV data can be obtained, and finally multiple HRV data are obtained.

[0097] Among them, the embodiment of the present application does not limit the specific sliding duration and the sliding window duration, and the user can set them according to actual needs.

[0098] The sliding window segments real-time HRV data according to a specific sliding duration, generating the HRV data corresponding to the sliding window. Sliding window data segmentation preserves the sequential relationship in the time series, breaking long sequences into multiple shorter windows of data, or HRV data. Adjacent HRV data contain data redundancy, ensuring the relative integrity of the overall data even if some window data is removed during subsequent data processing. Window data can capture smaller changes and fluctuations, allowing data removal based on anomalies within these small changes and fluctuations, resulting in more accurate data.

[0099] S102 : Based on the HRV data, determine multiple target peaks corresponding to the HRV data, calculate the variances of the multiple target peaks, and use the HRV data whose variances fall within a preset variance range as first target HRV data.

[0100] In the embodiment of the present application, it is assumed that there are n target peaks corresponding to a certain sliding window, namely: R1, R2...Rn. The average value avg of the n target peaks is calculated, and its expression is:

[0101] Calculate the variance s of n target peaks 2 , whose expression is:

[0102] Where n represents the number of target peaks, R i represents the i-th target peak among n target peaks, and avg represents the average of the n target peaks.

[0103] The variance is determined to be within the preset variance range. If it is not, this indicates significant fluctuations in the target peak value of the HRV data, possibly due to network latency or vibration of the wearable data acquisition device. To ensure overall data accuracy, this HRV data is discarded, and only the HRV data with a variance within the preset variance range is retained as the first target HRV data. The preset variance range indicates the degree of fluctuation of the target peak value and can be set between 0 and 1 based on actual needs.

[0104] S103. Based on multiple target peaks of the first target HRV data, determine the RR interval sequence of the first target HRV data, judge whether each RR interval of the RR interval sequence meets the preset heart beat time interval range, and use the HRV data in which each RR interval in the first target HRV data meets the preset heart beat time interval range as the second target HRV data.

[0105] In an embodiment of the present application, for the first target HRV data, the moments corresponding to multiple target peaks are obtained, the time difference between two adjacent target peaks in the first target HRV data is calculated, and the RR interval sequence corresponding to the first target HRV data is obtained. Assuming that the number of target peaks of the first target HRV data is n+1, the horizontal axis times corresponding to the target peaks are R1, R2...Rn+1, and the number of RR intervals obtained by calculating the time difference between each two adjacent target peaks is n. The corresponding RR interval sequence can be expressed as [RR1, RR2...RRn], where RRn=Rn+1-Rn.

[0106] Figure 2 shows a portion of the time-domain signal waveform corresponding to the first target HRV data. The abscissa represents time, and the ordinate represents the voltage amplitude corresponding to that time. The peak represents the maximum voltage generated by a heartbeat. Figure 2 shows three target peaks, with the corresponding abscissas being R1, R2, and R3. The time difference between R1 and R2 is R2-R1, and the RR interval formed by R1 and R2 is RR1. Similarly, the RR interval formed by R2 and R3 is RR2 = R3-R2. In Figure 2, the QST complex represents ventricular depolarization; the P wave represents atrial excitation; the T wave represents ventricular repolarization; the QT interval represents the time from ventricular depolarization to complete repolarization; and the ST segment represents the period between ventricular depolarization completion and the onset of repolarization.

[0107] The preset heartbeat time interval range represents the maximum value of the RR interval under normal circumstances and can be determined based on the age of the person being measured. If an RR interval sequence corresponding to the first target HRV data contains an RR interval that does not conform to the preset heartbeat time interval, it indicates that abnormal data has been generated in the first target HRV data. The first target HRV data corresponding to the abnormal data is discarded, and the first target HRV data in which each RR interval conforms to the preset heartbeat time interval range is retained as the second target HRV data.

[0108] S104: Extracting time domain features, frequency domain features, and nonlinear features of the second target HRV data.

[0109] It can be seen that in the embodiment of the present application, by obtaining the HRV data corresponding to the sliding window; determining multiple target peaks corresponding to the HRV data, and calculating the variance of the multiple target peaks, and then screening the HRV data based on the variance corresponding to the HRV data, it is possible to exclude HRV data with a large variance, that is, data with a large degree of fluctuation that may be abnormal, thereby obtaining first target HRV data with high accuracy and relatively stable compliance with the preset variance range; then based on the multiple target peaks of the first target HRV data, the RR interval sequence of the first target HRV data is determined, the RR interval in the RR interval sequence represents the time difference between two adjacent peaks, and represents the time interval between two heartbeats of the human body. Based on the preset heartbeat time interval range, the first target HRV data corresponding to the abnormal heartbeat can be excluded, and normal data, namely the second target HRV data, can be obtained, and feature extraction is performed on each second target HRV data; through the variance and the preset heartbeat time interval range, two abnormal data are filtered to obtain second target HRV data with high accuracy and compliance with the human heartbeat characteristics. Feature extraction is performed based on the second target HRV data to obtain accurate HRV features.

[0110] A possible implementation of the embodiment of the present application is to determine multiple target peaks corresponding to the HRV data based on the HRV data, including:

[0111] Determining a plurality of initial peaks in the HRV data based on the number of shortest heart beat interval points, wherein the number of shortest heart beat interval points is the number of data points included in one heartbeat in the HRV data;

[0112] determining a first upper envelope and a first lower envelope of the HRV data;

[0113] determining a voltage threshold for the HRV data based on the percentage threshold, the first upper envelope, and the first lower envelope;

[0114] Peaks exceeding a voltage threshold are selected from the multiple initial peaks to obtain multiple target peaks of the HRV data.

[0115] In this embodiment, the number of the shortest cardiac interval points represents the number of data points corresponding to at least one heartbeat, which can be calculated using the expression:

[0116] Among them, winSize is the shortest heart rate interval point number, maxRatePerMin1 indicates the maximum heart rate, that is, the maximum number of heartbeats per minute of a normal person in a resting state, which can be set to 120 according to human characteristics; freq is the sampling rate set when collecting raw HRV data, indicating the number of data points collected per second; 60 means 1 minute is 60 seconds, which is used for unit conversion.

[0117] In an embodiment of the present application, all maximum and minimum points in the HRV data are determined; the HRV time domain signal waveform (i.e., HRV data) is segmented according to the number of shortest cardiac interval points to obtain multiple data segments, and the number of data points contained in each data segment is the shortest cardiac interval point number; for each data segment, if the data segment does not contain a maximum value, the initial peak value is not selected; if the data segment contains a maximum value, the maximum value is used as the initial peak value; if the data segment contains two or more maximum values, the one with the largest amplitude among the two or more maximum values ​​is selected as the initial peak value, thereby obtaining multiple initial peak values ​​corresponding to the HRV data.

[0118] The initial peak value is filtered using a voltage threshold to obtain a target peak value that matches human characteristics. Specifically, as shown in Figure 3, all maximum points are connected by a smooth curve to form the first upper envelope of the HRV data. Between two adjacent maximum points, the smallest minimum point is selected as the trough, and all troughs are connected by a smooth curve to form the first lower envelope of the HRV data.

[0119] Determine the amplitude difference between the first upper envelope and the first lower envelope corresponding to each data point in the HRV data. The expression of the difference is:

[0120] maxThresholdi=upperEnvelopei-underEnvelopei

[0121] Wherein, maxThresholdi represents the difference between the first upper envelope and the first lower envelope corresponding to the i-th data point in the HRV data, upperEnvelopei represents the amplitude of the first upper envelope corresponding to the i-th data point in the HRV data, and underEnvelopei represents the amplitude of the first lower envelope corresponding to the i-th data point in the HRV data.

[0122] The maximum value maxThreshold1 of the amplitude difference between the first upper envelope and the first lower envelope is determined.

[0123] Optionally, multiple target peaks are peaks in the HRV data that exceed a voltage threshold, wherein the step of determining the voltage threshold is: determining the maximum amplitude difference between the first upper envelope and the first lower envelope of the HRV data, and determining the product of the maximum amplitude difference and a preset percentage threshold, and taking the sum of the product and the amplitude of the first lower envelope corresponding to the maximum amplitude difference as the voltage threshold.

[0124] Specifically, the voltage threshold, also called the percentile value, is calculated, representing the minimum peak value of the HRV data collected from a normal human body. The expression of the percentile value Y is:

[0125] Y=maxThreshold1×thersholdPercent+underEnvelope

[0126] where thersholdPercent is a preset percentage threshold, which can be set based on historical HRV data, such as 70%; maxThreshold1 is the maximum amplitude difference between the first upper envelope and the first lower envelope; and underEnvelope is the amplitude of the first lower envelope corresponding to maxThreshold1.

[0127] As shown in FIG4 , the curve is the time domain signal waveform of the HRV data, the straight line is the percentage line, and the corresponding amplitude is the voltage threshold, wherein the initial peak exceeding the voltage threshold is determined as the target peak.

[0128] It can be seen that in the embodiment of the present application, the peak value represents the maximum voltage amplitude of a heartbeat, the peak value corresponding to normal HRV data is within a set range, and multiple initial peak values ​​in the HRV data are determined based on the shortest number of heartbeat interval points, and the voltage threshold value of the HRV data is calculated based on the percentage threshold value and the first upper envelope and the first lower envelope of the HRV data. The voltage threshold value represents the minimum peak value that conforms to the characteristics of the human body. The voltage threshold value can be used to screen the peak value that conforms to the characteristics of the human body from multiple initial peak values ​​as the target peak value, so that the target peak value can be obtained more accurately.

[0129] Furthermore, to improve the accuracy of HRV data, calculating the variance of multiple target peaks includes: calculating the time difference between two adjacent target peaks as the RR interval; determining whether the RR interval is within a preset time interval range. If any RR interval is not within the heartbeat time interval range, the HRV data is determined to be abnormal data; if all RR intervals are within the heartbeat time interval range, the variance of the multiple target peaks is calculated, and the HRV data with variances within the preset variance range is used as the first target data. The heartbeat time interval range, which corresponds to the heartbeat time interval corresponding to the RR interval corresponding to the HRV data collected from a normal person, can be set to 0-3s.

[0130] A possible implementation of the embodiment of the present application is to obtain HRV data corresponding to the sliding window, including:

[0131] Acquire first initial HRV data corresponding to the sliding window, and determine a second upper envelope and a second lower envelope of the first initial HRV data;

[0132] determining a maximum amplitude difference between the second upper envelope and the second lower envelope;

[0133] determining an amplitude adjustment ratio for each data point in the first initial HRV data based on a second upper envelope value, a second lower envelope value, and a maximum amplitude difference corresponding to each data point in the first initial HRV data;

[0134] The amplitude of each data point in the first initial HRV data is adjusted based on the amplitude adjustment ratio corresponding to the data point to obtain HRV data.

[0135] Specifically, the second upper envelope and the second lower envelope of the first initial HRV data are determined. The process of generating the envelopes may refer to the process of generating the first upper envelope and the first lower envelope.

[0136] The expression of the amplitude adjustment ratio of the current data point is:

[0137] Wherein, h1 is the amplitude of the second upper envelope corresponding to the current data point, h2 is the amplitude of the second lower envelope corresponding to the current data point, and maxThreshold2 is the maximum value of the difference between the amplitudes of the second upper envelope and the second lower envelope.

[0138] The expression of the adjusted amplitude result h3 of the current data point is:

[0139] Where h is the amplitude of the current data point before adjustment, h2 is the amplitude of the second lower envelope corresponding to the current data point, and ratio is the amplitude adjustment ratio of the current data point.

[0140] The amplitude of the original HRV data collected by the device is voltage. The amplitude of the original HRV data can be converted from voltage to percentage, which is convenient for processing and analyzing the HRV data. Specifically, the ratio of the voltage amplitude of all HRV data points to the set value is used as the amplitude of the updated data point to obtain the first initial HRV data with the amplitude expressed as a percentage, wherein the set value is set according to actual needs, so that the original voltage amplitude can be adjusted to an appropriate percentage range through the set value.

[0141] Figure 5 is a waveform diagram of the first initial HRV data before amplitude adjustment, where the horizontal axis of the waveform represents time and the vertical axis represents amplitude in percentage; Figure 6 is a waveform diagram of the HRV data after amplitude adjustment; Figure 7 is a comparison diagram of the waveforms before and after amplitude adjustment. It can be seen that the waveform after amplitude adjustment is within a smaller amplitude range and the adjusted waveform is gentler.

[0142] It can be seen that in the embodiment of the present application, the first initial HRV data corresponding to the sliding window is obtained, the second upper envelope and the second lower envelope of the first initial HRV data, as well as the maximum amplitude difference between the second upper envelope and the second lower envelope are determined, and the amplitude adjustment ratio of each data point in the initial total HRV data is determined based on the second upper envelope value, the second lower envelope value and the maximum amplitude difference corresponding to each data point in the first initial HRV data, and then each data point is adjusted based on the amplitude adjustment ratio, so that the amplitude of the adjusted first initial HRV data is still within the original second upper and lower envelopes, the amplitude of data with too high amplitude becomes smaller, and the amplitude of data with too low amplitude becomes larger, and finally the amplitude of each data point in the first initial HRV data is adjusted to a reasonable amplitude range to obtain smooth and effective HRV data.

[0143] A possible implementation of the embodiment of the present application is to perform amplitude adjustment on each data point in the first initial HRV data based on the amplitude adjustment ratio corresponding to the data point to obtain HRV data, including:

[0144] performing amplitude adjustment on each data point in the first initial HRV data based on the amplitude adjustment ratio corresponding to the data point to obtain first HRV data after amplitude adjustment;

[0145] Performing anomaly detection on the first HRV data after amplitude adjustment to determine an abnormal point;

[0146] Based on the mean or median corresponding to multiple data points before or after the abnormal point, the value of the abnormal point is corrected to obtain HRV data.

[0147] The first initial HRV data is generally non-smooth, and the accuracy of the data can be improved by detecting and correcting abnormal data. For the detected abnormal points, this embodiment provides two correction methods, namely mean correction method and median correction method.

[0148] Specifically, for each outlier, the mean or median of multiple data points before or after the outlier is taken as the replacement value for the outlier. The multiple data points can be a specific number of data points before or after the outlier, or a specific time period before or after the outlier. The specific number and time period are set based on actual needs. Optionally, the specific number can be set to 75, and the specific time period can be set to 2.5 seconds.

[0149] It can be seen that in the embodiment of the present application, anomaly detection is performed on the first HRV data after amplitude adjustment, the outlier point is determined, and the value of the outlier point is corrected based on the mean or median of the data surrounding the outlier point, so that the outlier value of the outlier point can be returned to the normal value, thereby ensuring the accuracy and smoothness of the HRV data.

[0150] A possible implementation of the embodiment of the present application is to perform anomaly detection on the amplitude-adjusted first HRV data to determine an abnormal point, including:

[0151] Determining a first difference between a target data point and a previous data point, and a second difference between the target data point and a subsequent data point in the amplitude-adjusted first HRV data, wherein the target data point is any data in the first HRV data;

[0152] calculating a first ratio of the first difference value to the target data point, and a second ratio of the second difference value to the target data point;

[0153] When the first ratio and the second ratio of the target data point are both greater than a preset ratio threshold, the target data point is determined to be an abnormal point.

[0154] In this embodiment of the present application, percentage detection is used to detect outliers that have a sudden change in amplitude compared to adjacent data points. The preset ratio threshold represents the degree of change in the amplitude of the target data point compared to the previous or next data point, and can be set to 20% based on actual needs.

[0155] Specifically, assuming the amplitude of a target data point is B, the amplitude of the data point preceding the target data point is A, and the amplitude of the data point following the target data point is C, the difference between the target data point and the preceding data point is a first difference BA, and the difference between the target data point and the following data point is a second difference BC. The absolute value of the ratio of the first difference BA to the target data point is a first ratio |(BA) / B×100%|, and the absolute value of the ratio of the second difference BC to the target data point is a second ratio |(BC) / B×100%|. If both the first ratio and the second ratio of the target data point are greater than a preset ratio threshold, the target data point is determined to be an outlier.

[0156] It can be seen that in the embodiment of the present application, the first ratio and the second ratio of the target data point in the first HRV data after amplitude adjustment are determined. If the first ratio and the second ratio of the target data point both exceed the preset ratio threshold, it means that the target data point has a numerical mutation compared with the surrounding data points, and the target data point is determined to be an abnormal point. The abnormal point can be accurately determined by the change of the target data point compared with the surrounding data points.

[0157] A possible implementation of the embodiment of the present application is to perform anomaly detection on the amplitude-adjusted first HRV data to determine an abnormal point, including:

[0158] determining a median value of the amplitude-adjusted first HRV data, and determining a median deviation of a target data point in the amplitude-adjusted first HRV data based on the median value;

[0159] When the median deviation of a target data point is greater than a preset deviation threshold, the target data point is determined to be an outlier.

[0160] In an embodiment of the present application, the median of the amplitude-adjusted first HRV data is determined; the absolute value of the difference between each data point and the median is calculated to generate a difference set; and the median of the difference set, medianDiff, is determined.

[0161] Calculate the median deviation f of the target data point, and its expression is:

[0162] Here, k is a coefficient set based on experience, and the value of k is 1.483.

[0163] If the median deviation of the target data point is greater than the preset deviation threshold, the target data point is identified as an outlier. The preset threshold represents the maximum degree to which the target data point deviates from the median of the data, and can be set to 4 based on practical experience.

[0164] It can be seen that in the embodiment of the present application, the median of the first HRV data after amplitude adjustment is determined, and the median deviation of the target data point in the first HRV data after amplitude adjustment is determined based on the median. If the median deviation of the target data point is greater than the preset deviation threshold, it means that the degree to which the target data point deviates from the median of the first HRV data exceeds the normal range, and the target data point is determined as an abnormal point, which can accurately screen out abnormal points with excessively large median deviations.

[0165] In a possible implementation of the embodiment of the present application, obtaining first initial HRV data corresponding to the sliding window includes:

[0166] Obtaining second initial HRV data corresponding to the sliding window;

[0167] Performing a fast Fourier transform on the time domain signal corresponding to the second initial HRV data to obtain a frequency domain signal corresponding to the second initial HRV data;

[0168] Determining whether a frequency domain signal corresponding to the second initial HRV data is a valid frequency domain signal based on a preset frequency domain interval;

[0169] If valid, perform segmented filtering on the valid frequency domain signal, integrate the segmented filtered valid frequency domain signals and perform inverse fast Fourier transform to obtain the filtered first initial HRV data.

[0170] The main principle of filtering is to convert the time domain signal into a frequency domain signal in segments, filter it, and then convert it back to the time domain signal. The second initial HRV data corresponding to the obtained sliding window is fast Fourier transformed to obtain the frequency domain signal.

[0171] The frequency domain signal of the HRV data is primarily concentrated within a preset frequency domain interval. The ratio of the signal energy within the preset frequency domain interval to the total frequency domain energy is calculated. If this ratio is greater than a preset ratio threshold, the HRV data corresponding to the frequency domain signal is valid. The valid HRV data is then selected for filtering to obtain accurate first initial HRV data. The preset frequency domain interval for PPG signals can be 0.5-4Hz; the preset frequency domain interval for ECG signals can be 0.25-45Hz. The preset ratio threshold can be set to 90% based on practical experience.

[0172] The effective frequency domain signal is segmented and filtered. The advantage of segmented filtering is that there is no phase deviation, but the data cannot be too long, and the window length in real-time filtering cannot be too long. Therefore, in the embodiment of the present application, a window with a length of 4096 is selected as the filtering window, indicating that each filtering window represents a segment of HRV data, which contains 4096 data points.

[0173] Furthermore, window filtering can use high-pass filtering. High-pass filtering is set so that high-frequency signals can pass normally, while low-frequency signals below the set frequency threshold are blocked or weakened. This can solve data jitter and remove power frequency interference in the environment. Data jitter refers to random and short-term spikes, jitter or outliers that appear in the data due to quality problems of the data source, sampling deviations, equipment failures or other external factors. Due to interference from other devices, or when the acquisition device is an ear clip sensor that is easily shaken, power frequency interference signals may be generated. Power frequency interference signals are generally 50Hz or 60Hz, and are mainly manifested as sine waves or the superposition of other signals and sine waves that may appear during signal measurement.

[0174] It can be seen that in the embodiment of the present application, after the time domain signal is converted into a frequency domain signal, the effective frequency domain signal is judged by the preset frequency domain interval, which can exclude the data with abnormal frequency and obtain valid data. The effective data is then denoised by combining the segmented filtering operation, which can accurately remove noise interference and improve the accuracy of the first initial HRV data.

[0175] In one possible implementation of the embodiment of the present application, before filtering the second initial HRV data, wavelet decomposition is performed on the second initial HRV data corresponding to the sliding window. The wavelet coefficients generated by the wavelet decomposition contain important information of the HRV data. The wavelet coefficients corresponding to the valid data after the wavelet decomposition are larger, and the wavelet coefficients corresponding to the noise are smaller, and the wavelet coefficients of the noise are smaller than the wavelet coefficients of the valid signal. A suitable preset threshold is selected for screening. The wavelet coefficients greater than the threshold are considered to be valid signals, and the wavelet coefficients less than the threshold are considered to be noise. The wavelet coefficients are adjusted based on the preset threshold, and the adjusted wavelet coefficients of each layer are subjected to wavelet reconstruction to obtain the second initial HRV data after wavelet denoising.

[0176] Among them, the number of layers of wavelet decomposition is set according to actual needs and can be set to five layers; the preset threshold is set according to the noise level in historical data and can be set to 30db.

[0177] Furthermore, the wavelet coefficients are adjusted based on a preset threshold, and the wavelet coefficients smaller than the preset threshold can be set to zero, and the wavelet coefficients not smaller than the preset threshold can be not processed, or the difference between the wavelet coefficient and the preset threshold can be used to replace the wavelet coefficients not smaller than the preset threshold.

[0178] In one possible implementation of the embodiment of the present application, before using the HRV data in which each RR interval in the first target HRV data conforms to a preset heartbeat time interval range as the second target HRV data, the method further includes:

[0179] Determine the age of the person corresponding to the HRV data;

[0180] Determine a preset heartbeat time interval range corresponding to the age of the person based on the person's age corresponding to the HRV data and a preset normal heartbeat list;

[0181] Among them, the normal heartbeat list shows the correspondence between different age groups and normal heartbeat ranges.

[0182] In actual situations, people of different age groups have different heart rates and corresponding RR intervals. Therefore, the normal RR interval range can be determined based on the age of the people.

[0183] Specifically, the normal heart rates corresponding to different age groups can refer to the preset normal heart rate list: Newborns (birth to 4 weeks): 100-205; Infants (4 weeks to 1 year): 100-180; Toddlers (1 to 3 years): 98-140; Preschool (3 to 5 years): 80-120; School age (5 to 12 years): 75-118; Teenagers (13 to 18 years): 60-100; Adults (over 18 years old): 60-100; Adult athletes: 40-60.

[0184] The preset heartbeat time interval range is determined based on the age of the person corresponding to the HRV data and the preset normal heartbeat list: RR interval = 60000 / heart rate, where 60000 means 1 minute = 60000 ms.

[0185] Determine whether each RR interval of the RR interval sequence meets the preset heartbeat time interval range. If there is an RR interval in the first target HRV data that does not meet the preset heartbeat time interval range, the first target HRV data will be discarded and the HRV data in which each RR interval in the first target HRV data meets the preset heartbeat time interval range will be used as the second target HRV data.

[0186] The embodiments of the present application further elaborate on the extraction of features of the second target HRV data.

[0187] In one feasible manner, the second target HRV data is regarded as a function of time, and the time domain characteristics of the second target HRV data are obtained through analysis. The time domain characteristics may include: MeanRR (ms), MeanHR (bpm), SDNN (ms), SDANN (ms), RMSSD (ms), SDSD (ms), pNN50 (%) and pNN20 (%).

[0188] The time domain characteristics of the second target HRV data include:

[0189] MeanRR: represents the mean of N RR intervals, in milliseconds, and is expressed as:

[0190] MeanHR represents the average heart rate value, and its expression is:

[0191] Here, 60000 represents 1 min = 60 s = 60000 ms, and MeanRR represents the mean of N RR intervals.

[0192] SDNN: represents the standard deviation of N RR intervals, which can reflect the slow changes in heart rate and is a sensitive indicator for evaluating sympathetic nerve function. Its expression is:

[0193] Among them, RR i represents the i-th RR interval; MeanRR represents the mean of N RR intervals.

[0194] SDANN: represents the standard deviation of the mean RR interval within a preset time. Assuming that there are M sliding windows within the preset time, the M sliding windows correspond to M RR interval means, namely: MeanRR1, MeanRR2...MeanRRM. The expression of SDANN is:

[0195] Among them, MeanRR z represents the mean of the mean values ​​of M RR intervals, and its expression is:

[0196] RMSSD: represents the root mean square of consecutive RR intervals, and its expression is:

[0197] Among them, RR i represents the i-th RR interval, RR i-1 represents the i-1th RR interval.

[0198] SDSD: represents the standard deviation of the difference between adjacent RR intervals, and its expression is:

[0199] Among them, RR i represents the i-th RR interval, RR i-1 represents the i-1th RR interval, N is the number of RR intervals, and MeanRR represents the mean of N RR intervals.

[0200] pNN50: represents the percentage of RR intervals with a difference of more than 50ms between adjacent RR intervals to the total number of RR intervals. Assuming that the number of RR intervals is N, the absolute value of the difference between each RR interval and the previous RR interval is calculated, and the absolute values ​​of N-1 differences are obtained. If the absolute value of a difference is greater than 50ms, then the value of NN50 is a. The expression of pNN50 is:

[0201] pNN20: represents the percentage of RR intervals with a difference between adjacent RR intervals greater than 20ms to the total number of RR intervals. Assuming the number of RR intervals is N, the absolute value of the difference between each RR interval and the previous RR interval is calculated, and the absolute values ​​of N-1 differences are obtained. If the absolute values ​​of b differences are greater than 20ms, then the value of NN20 is b. The expression of pNN20 is:

[0202] In one feasible manner, frequency domain features of the second target HRV data are extracted, including: using fast Fourier transform to convert the time domain signal of the second target HRV data into a frequency domain signal, and then performing feature extraction on the frequency domain signal. The obtained frequency domain features may include: frequency band, including ultra-low frequency, ultra-low frequency, low frequency, high frequency, and the frequency range corresponding to each frequency band; Total Power (ms2), which represents the sum of the powers of ultra-low frequency, ultra-low frequency, low frequency, and high frequency; Power (ms2), which represents the power of the frequency band and the percentage of the power of the frequency band in the total power; Power Percent (%), which represents Power Normalized, which represents the percentage of low frequency and high frequency power in the total low frequency and high frequency power respectively; Peak (Hz), which represents the frequency corresponding to the maximum power in different frequency bands; LF / HF, which represents the ratio of the power of the low frequency band to the power of the high frequency band.

[0203] Specifically, the frequency domain characteristics of the second target HRV data include:

[0204] The frequency domain signal corresponding to the second target HRV data is converted from the frequency domain spectrum to the power spectrum. The obtained power spectrum waveform is shown in Figure 8. In Figure 8, the signal is divided into four frequency bands: ultra-low frequency (ULF), with a frequency range of 0-0.0033 Hz; very low frequency (VLF), with a frequency range of 0.0033-0.04 Hz; low frequency (LF), with a frequency range of 0.04-0.15 Hz; and high frequency (HF), with a frequency range of 0.15-0.4 Hz.

[0205] The power of the frequency band can be expressed by the area of ​​the graph formed by the frequency band time axis and the waveform, thereby obtaining the power corresponding to the four frequency bands, namely: ultra-low frequency power PULF, very low frequency power PVLF, low frequency power PLF, and high frequency power PHF.

[0206] Total Power: represents the sum of ultra-low frequency power PULF, very low frequency power PVLF, low frequency power PLF, and high frequency power PHF. Its expression is:

[0207] Total Power = P ULF +P VLF +P LF +P HF

[0208] Power Percent: Indicates the percentage of the power of the frequency band to the total power. Taking the ultra-low frequency (ULF) as an example, the percentage of its power to the total power is expressed as follows:

[0209] Among them, Total Power is the sum of ultra-low frequency power PULF, very low frequency power PVLF, low frequency power PLF, and high frequency power PHF.

[0210] Power Normalized: Indicates the percentage of low-frequency and high-frequency power in the total of low-frequency and high-frequency power, respectively. Taking low-frequency LF as an example, its percentage of the total of low-frequency and high-frequency power is expressed as follows:

[0211] Among them, PLF represents low-frequency power and PHF represents high-frequency power.

[0212] Peak: Indicates the frequency corresponding to the maximum power in different frequency bands. The frequency corresponding to the maximum power in different frequency bands can be determined based on the power spectrum.

[0213] LF / HF: Indicates the ratio of low frequency band power to high frequency band power, that is, PLF / PHF.

[0214] A possible implementation of the embodiment of the present application is to extract the nonlinear characteristics of the second target HRV data, including:

[0215] Draw a Pontevedra scatter plot and a difference scatter plot based on the second target HRV data;

[0216] Determine the standard deviation of the major and minor axes of the ellipse for the Pontevedra scatter plot;

[0217] Determine the number of points in the first and third quadrants of the difference scatter plot;

[0218] The nonlinear characteristics include: the standard deviation of the major axis of the ellipse, the standard deviation of the minor axis of the ellipse, the number of midpoints in the first quadrant, and the number of midpoints in the third quadrant.

[0219] Poincare: Pontecarai scatter plot, an image drawn using the changes in RR intervals. Each RR interval is affected by the previous RR interval, as shown in Figure 9. The horizontal axis of the Pontecarai scatter plot is the IBI interval (RR interval), and the vertical axis is the next IBI interval (RR interval). The Pontecarai scatter plot reveals the correlation between consecutive values ​​in the time series, including the linear and nonlinear change trends of HRV, giving an intuitive display of heart fluctuations, and can reveal nonlinear processes and non-periodic movements.

[0220] The nonlinear indicators extracted from the Pontevedra scatter plot include: the standard deviation of the major axis of the ellipse SD1 and the standard deviation of the minor axis of the ellipse SD2, where:

[0221] SD1, which stands for short-term variability, generally reflects parasympathetic nerve activity. When SD1 decreases, parasympathetic nerve activity decreases and sympathetic nerve activity increases. The expression of SD1 is:

[0222] Among them, SDSD represents the standard deviation of the difference between adjacent RR intervals in the time domain characteristics.

[0223] SD2, representing long-term variability, is more strongly associated with sympathetic nerve activity than parasympathetic nerve activity. When SD2 decreases, sympathetic nerve activity increases. The expression for SD2 is:

[0224] Among them, represents the standard deviation of N RR intervals in the time domain features, and SDSD represents the standard deviation of the difference between adjacent RR intervals in the time domain features.

[0225] Scatter: Difference scatter plot, also known as second-order difference plot, is used to evaluate the balance between sympathetic and parasympathetic nerves and spectral analysis estimation. Its advantage is that it uses a stable and correlated RR interval sequence. The difference scatter plot uses the difference of three consecutive RR intervals to obtain a coordinate point to make a dot plot. The x-axis of the difference scatter plot represents the duration RR of the current heart beat. u With RR on a heart beat u-1The difference in duration, the coordinate of the i-th point on the x-axis is:

[0226] x i =RR i -RR i-1

[0227] The y-axis of the difference scatter plot represents the current heart beat RR i The duration of the next heart beat is RR i+1 The difference between the two, the coordinate of the i-th point on the y-axis is:

[0228] y i =RR i -RR i+1

[0229] The difference scatter plot represents the correlation between continuous rate values ​​in the time series. The nonlinear indicators extracted from the difference scatter plot are: the number of midpoints in the first quadrant A++, the number of midpoints in the third quadrant B--, and the units of horizontal and vertical axes are ms.

[0230] A++, the first quadrant point indicates that the interval between two consecutive cardiac beats increases and the heart rate decreases, representing parasympathetic nervous activity.

[0231] B--, the third quadrant point indicates that the interval between two consecutive cardiac beats decreases and the heart rate increases, representing sympathetic nerve activity.

[0232] The time domain features, frequency domain features, and nonlinear features extracted after HRV data processing can be used for machine learning training to predict the physiological state of the human body through the trained model, thereby improving the accuracy of the prediction.

[0233] The above embodiment introduces an HRV data preprocessing method from the perspective of method flow. The following embodiment introduces an HRV data preprocessing device from the perspective of a virtual module or virtual unit. Please refer to the following embodiment for details.

[0234] The present application provides an HRV data preprocessing device, as shown in FIG10 , which may include:

[0235] An acquisition module 1001 is used to acquire HRV data corresponding to the sliding window;

[0236] The first processing module 1002 is configured to determine, based on the HRV data, multiple target peak values ​​corresponding to the HRV data, calculate variances of the multiple target peak values, and use the HRV data whose variances fall within a preset variance range as first target HRV data;

[0237] The second processing module 1003 is configured to determine an RR interval sequence of the first target HRV data based on the multiple target peak values ​​of the first target HRV data, determine whether each RR interval of the RR interval sequence meets a preset heartbeat time interval range, and use the HRV data in which each RR interval of the first target HRV data meets the preset heartbeat time interval range as the second target HRV data;

[0238] The extraction module 1004 is configured to extract the time domain features, frequency domain features, and nonlinear features of the second target HRV data.

[0239] In an optional example, the present application may be further configured as follows: when the first processing module 1002 determines multiple target peak values ​​corresponding to the HRV data based on the HRV data, it is specifically configured to:

[0240] Determining a plurality of initial peaks in the HRV data based on the number of shortest heart beat interval points, wherein the number of shortest heart beat interval points is the number of data points included in one heartbeat in the HRV data;

[0241] determining a first upper envelope and a first lower envelope of the HRV data;

[0242] determining a voltage threshold for the HRV data based on the percentage threshold, the first upper envelope, and the first lower envelope;

[0243] Peaks exceeding a voltage threshold are selected from the multiple initial peaks to obtain multiple target peaks of the HRV data.

[0244] In an optional example, the present application may be further configured as follows: when the acquisition module 1001 acquires the HRV data corresponding to the sliding window, it is specifically configured to:

[0245] Acquire first initial HRV data corresponding to the sliding window, and determine a second upper envelope and a second lower envelope of the first initial HRV data;

[0246] determining a maximum amplitude difference between the second upper envelope and the second lower envelope;

[0247] determining an amplitude adjustment ratio for each data point in the first initial HRV data based on a second upper envelope value, a second lower envelope value, and a maximum amplitude difference corresponding to each data point in the first initial HRV data;

[0248] The amplitude of each data point in the first initial HRV data is adjusted based on the amplitude adjustment ratio corresponding to the data point to obtain HRV data.

[0249] In an optional example, the present application may be further configured as follows: when the acquisition module 1001 performs amplitude adjustment on each data point in the first initial HRV data based on the amplitude adjustment ratio corresponding to the data point to obtain the HRV data, it is specifically configured to:

[0250] performing amplitude adjustment on each data point in the first initial HRV data based on the amplitude adjustment ratio corresponding to the data point to obtain first HRV data after amplitude adjustment;

[0251] Performing anomaly detection on the first HRV data after amplitude adjustment to determine an abnormal point;

[0252] Based on the mean or median corresponding to multiple data points before or after the abnormal point, the value of the abnormal point is corrected to obtain HRV data.

[0253] In an optional example, the present application may be further configured as follows: when the acquisition module 1001 performs anomaly detection on the first HRV data after amplitude adjustment and determines an abnormal point, it is specifically configured to:

[0254] Determining a first difference between a target data point and a previous data point, and a second difference between the target data point and a subsequent data point in the amplitude-adjusted first HRV data, wherein the target data point is any data in the first HRV data;

[0255] calculating a first ratio of the first difference value to the target data point, and a second ratio of the second difference value to the target data point;

[0256] When the first ratio and the second ratio of the target data point are both greater than a preset ratio threshold, the target data point is determined to be an abnormal point.

[0257] In an optional example, the present application may be further configured as follows: when the acquisition module 1001 performs anomaly detection on the first HRV data after amplitude adjustment and determines an abnormal point, it is specifically configured to:

[0258] determining a median value of the amplitude-adjusted first HRV data, and determining a median deviation of a target data point in the amplitude-adjusted first HRV data based on the median value;

[0259] When the median deviation of a target data point is greater than a preset deviation threshold, the target data point is determined to be an outlier.

[0260] In an optional example, the present application may be further configured as follows: when the acquisition module 1001 acquires the first initial HRV data corresponding to the sliding window, it is specifically configured to:

[0261] Obtaining second initial HRV data corresponding to the sliding window;

[0262] Performing a fast Fourier transform on the time domain signal corresponding to the second initial HRV data to obtain a frequency domain signal corresponding to the second initial HRV data;

[0263] Determining whether a frequency domain signal corresponding to the second initial HRV data is a valid frequency domain signal based on a preset frequency domain interval;

[0264] If valid, perform segmented filtering on the valid frequency domain signal, integrate the segmented filtered valid frequency domain signals and perform inverse fast Fourier transform to obtain the filtered first initial HRV data.

[0265] In an optional example, the present application may be further configured as follows: when the extraction module 1004 extracts the nonlinear features of the second target HRV data, it is specifically configured to:

[0266] Draw a Pontevedra scatter plot and a difference scatter plot based on the second target HRV data;

[0267] Determine the standard deviation of the major and minor axes of the ellipse for the Pontevedra scatter plot;

[0268] Determine the number of points in the first and third quadrants of the difference scatter plot;

[0269] The nonlinear characteristics include: the standard deviation of the major axis of the ellipse, the standard deviation of the minor axis of the ellipse, the number of midpoints in the first quadrant, and the number of midpoints in the third quadrant.

[0270] In an optional example, the present application can be further configured as follows: the multiple target peaks are peaks in the HRV data that exceed a voltage threshold, the first processing module 1002 determines the maximum amplitude difference between the first upper envelope and the first lower envelope of the HRV data, and determines the product of the maximum amplitude difference and a preset percentage threshold, and uses the sum of the product and the amplitude of the first lower envelope corresponding to the maximum amplitude difference as the voltage threshold.

[0271] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working process of the HRV data preprocessing device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0272] An electronic device is provided in an embodiment of the present application, as shown in FIG11 . The electronic device 1100 shown in FIG11 includes a processor 1101 and a memory 1103. The processor 1101 and the memory 1103 are connected, for example, via a bus 1102. Optionally, the electronic device 1100 may further include a transceiver 1104. It should be noted that in actual applications, the number of transceivers 1104 is not limited to one, and the structure of the electronic device 1100 does not constitute a limitation on the embodiments of the present application.

[0273] Processor 1101 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 1101 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.

[0274] Bus 1102 may include a path for transmitting information between the aforementioned components. Bus 1102 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, for example. Bus 1102 may be divided into an address bus, a data bus, a control bus, and so on. For ease of illustration, FIG11 shows only one thick line, but this does not mean that there is only one bus or only one type of bus.

[0275] The memory 1103 may be a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory) or other type of dynamic storage device that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.

[0276] The memory 1103 is used to store application code for executing the solution of the present application, and is controlled by the processor 1101. The processor 1101 is used to execute the application code stored in the memory 1103 to implement the content shown in the embodiment of the HRV data preprocessing method.

[0277] The electronic devices include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. They may also include servers, etc. The electronic device shown in FIG11 is merely an example and should not limit the functionality and scope of use of the embodiments of the present application.

[0278] The present application provides a computer-readable storage medium having a computer program / instruction stored thereon, which, when executed by a processor, implements the corresponding contents of the aforementioned method embodiments. The computer-readable storage medium may be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the art.

[0279] The present application also provides an apparatus, including: a processor, configured to call and run a computer program from a memory, so that a device equipped with the apparatus executes and implements the corresponding contents in the aforementioned method embodiment.

[0280] The present application also provides a computer program product, including a computer program / instruction, which implements the corresponding content in the aforementioned method embodiment when executed by a processor.

[0281] It should be understood that although the steps in the flowcharts of the accompanying drawings are shown in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the flowcharts of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0282] The above are only some of the implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A HRV data preprocessing method, characterized in that: include: Get the HRV data corresponding to the sliding window; Based on the HRV data, determine multiple target peaks corresponding to the HRV data, calculate the variance of the multiple target peaks, and use the HRV data whose variance meets the preset variance range as the first target HRV data; Based on the multiple target peaks of the first target HRV data, determine the RR interval sequence of the first target HRV data, judge whether each RR interval of the RR interval sequence meets the preset heartbeat time interval range, and use the HRV data in which each RR interval of the first target HRV data meets the preset heartbeat time interval range as the second target HRV data; The time domain features, frequency domain features and nonlinear features of the second target HRV data are extracted.

2. The method according to claim 1, characterized in that The determining, based on the HRV data, a plurality of target peak values ​​corresponding to the HRV data includes: Determine a plurality of initial peaks in the HRV data based on the shortest heart beat interval point number, wherein the shortest heart beat interval point number is the number of data points included in one heart beat in the HRV data; Determining a first upper envelope and a first lower envelope of the HRV data; determining a voltage threshold of the HRV data based on a percentage threshold, the first upper envelope, and the first lower envelope; Peaks exceeding the voltage threshold are selected from the multiple initial peaks to obtain multiple target peaks of the HRV data.

3. The method according to claim 1, characterized in that The obtaining of HRV data corresponding to the sliding window includes: Acquire first initial HRV data corresponding to the sliding window, and determine a second upper envelope and a second lower envelope of the first initial HRV data; determining a maximum amplitude difference between the second upper envelope and the second lower envelope; Determine an amplitude adjustment ratio for each data point in the first initial HRV data based on a second upper envelope value, a second lower envelope value, and the maximum amplitude difference corresponding to each data point in the first initial HRV data; The amplitude of each data point in the first initial HRV data is adjusted based on the amplitude adjustment ratio corresponding to the data point to obtain HRV data.

4. The method according to claim 3, characterized in that The step of performing amplitude adjustment on each data point in the first initial HRV data based on the amplitude adjustment ratio corresponding to the data point to obtain HRV data includes: Performing amplitude adjustment on each data point in the first initial HRV data based on the amplitude adjustment ratio corresponding to the data point to obtain first HRV data after amplitude adjustment; Performing anomaly detection on the first HRV data after the amplitude adjustment to determine an abnormal point; Based on the mean or median corresponding to a plurality of data points before or after the abnormal point, the value of the abnormal point is corrected to obtain the HRV data.

5. The method according to claim 4, characterized in that The performing abnormality detection on the amplitude-adjusted first HRV data to determine abnormal points includes: Determine a first difference between a target data point and a previous data point in the first HRV data after amplitude adjustment, and a second difference between the target data point and a subsequent data point, wherein the target data point is any data in the first HRV data; Calculating a first ratio of the first difference value to the target data point, and a second ratio of the second difference value to the target data point; When the first ratio and the second ratio of the target data point are both greater than a preset ratio threshold, the target data point is determined to be an abnormal point.

6. The method according to claim 4, characterized in that The performing abnormality detection on the amplitude-adjusted first HRV data to determine abnormal points includes: determining a median value of the amplitude-adjusted first HRV data, and determining a median deviation of a target data point in the amplitude-adjusted first HRV data based on the median value; When the median deviation of the target data point is greater than a preset deviation threshold, the target data point is determined to be an abnormal point.

7. The method according to claim 3, characterized in that The obtaining of first initial HRV data corresponding to the sliding window includes: Acquire the second initial HRV data corresponding to the sliding window; Performing a fast Fourier transform on the time domain signal corresponding to the second initial HRV data to obtain a frequency domain signal corresponding to the second initial HRV data; Determining whether the frequency domain signal corresponding to the second initial HRV data is a valid frequency domain signal based on a preset frequency domain interval; If effective, the effective frequency domain signal is segmented filtered, and the effective frequency domain signal after segmented filtering is integrated and inverse fast Fourier transformed to obtain the first initial HRV data after filtering.

8. The method according to claim 1, characterized in that The multiple target peaks are peaks in the HRV data that exceed a voltage threshold. The step of determining the voltage threshold is: determining the maximum amplitude difference between the first upper envelope and the first lower envelope of the HRV data, and determining the product of the maximum amplitude difference and a preset percentage threshold, and taking the sum of the product and the amplitude of the first lower envelope corresponding to the maximum amplitude difference as the voltage threshold.

9. The method according to any one of claims 1 to 8, characterized in that: Extracting the nonlinear characteristics of the second target HRV data includes: Draw a Pondecare scatter plot and a difference scatter plot based on the second target HRV data; Determine the ellipse major axis standard deviation and the ellipse minor axis standard deviation of the Pontevedra scatter plot; Determine the number of midpoints in the first quadrant and the third quadrant in the difference scatter plot; The nonlinear characteristics include: the standard deviation of the major axis of the ellipse, the standard deviation of the minor axis of the ellipse, the number of midpoints in the first quadrant, and the number of midpoints in the third quadrant.

10. A HRV data preprocessing device, characterized in that: include: An acquisition module, used to acquire HRV data corresponding to the sliding window; A first processing module, configured to determine, based on the HRV data, a plurality of target peak values ​​corresponding to the HRV data, calculate the variance of the plurality of target peak values, and use the HRV data whose variance meets a preset variance range as the first target HRV data; A second processing module is used to determine the RR interval sequence of the first target HRV data based on the multiple target peaks of the first target HRV data, determine whether each RR interval of the RR interval sequence meets the preset heartbeat time interval range, and use the HRV data in which each RR interval of the first target HRV data meets the preset heartbeat time interval range as the second target HRV data; The extraction module is used to extract the time domain features, frequency domain features and nonlinear features of the second target HRV data.

11. An electronic device, characterized in that: The electronic device includes: at least one processor; Memory; At least one application, wherein the at least one application is stored in a memory and configured to be executed by at least one processor, and the at least one application is configured to: execute a HRV data preprocessing method according to any one of claims 1 to 9.

12. A device, characterized in that: include: The processor is used to call and run a computer program from a memory, so that a device equipped with the device executes a HRV data preprocessing method as described in any one of claims 1 to 9.

13. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instruction is executed by a processor, a HRV data preprocessing method as claimed in any one of claims 1 to 9 is implemented.

14. A computer program product, characterized in that The method comprises a computer program / instruction, which, when executed by a processor, implements a HRV data preprocessing method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Heartbeat period acquiring method and device based on BCG signal

    CN105574348A

  • Sleep staging method based on heart rate variability

    CN111067503A

  • HRV data preprocessing method and device and electronic equipment

    CN117271977A

  • Method for removing abnormal heartbeat and trend of electrocardiogram data, autonomic nerve monitor device, and septicemia sideration alarm device

    JP2012065713A

Cited By

  • Data acquisition and processing method and system for digital delivery of intelligent factory

    CN121094451A